67,512
社区成员
发帖
与我相关
我的任务
分享
java org.apache.lucene.demo.IndexFiles {full-path-to-lucene}/src
Document doc = new Document();
doc.add(new Field("path", f.getPath(), Field.Store.YES, Field.Index.NOT_ANALYZED));
doc.add(new Field("modified",
DateTools.timeToString(f.lastModified(), DateTools.Resolution.MINUTE),
Field.Store.YES, Field.Index.NOT_ANALYZED));
doc.add(new Field("contents", new FileReader(f)));
Name Term count %
contents 1,945 98.68%
modified 0 0%
path 24 1.22%