Count search results in Lucene.Net -
i'm new lucene , want count occurences of search word in index. saw should use like:
indexreader reader = .......
termdocs termdoc = reader.termdocs();
termdoc.seek(new term("my_field", mstrsearchfor));
int occurencecount = termdoc.freq();
i can't seem create indexreader start.
fsdirectory directory = fsdirectory.open(new system.io.directoryinfo("c:\\temp\\")); indexreader reader = indexreader.open(directory, true);
Comments
Post a Comment