I present a bunch of documents for a newly created index and commit / optimize & amp; Turn off the author when I open and read from the index, everything works in the VM as expected. As soon as I shut down the VM, restart and read the index in a new application example, I get many documents. .
When I see the pointer through the pointer, then I think the first document in the index is as committed, but after a lot of documents with a field called "word"
The index is searching according to the expected work, but I got curiosity about the large number returned by numDocs. Anyway: I'm using the latest Java Lucene 3.0.2.
Any ideas on this?
Best regards,
Alex
Here are some code examples:
file index directory = new file (. ..); Directory directory = FSDirectory.open (indexDirectory); Indicator explorer explorer = new indicator finder (directory, true); // I also use spell-checker, but nothing should affect it (I hope) Notification Reader = IndexReader.open (directory, true); Spell checker spelling sign = new spell checker (directory); SpellChecker.indexDictionary (New LuceneDictionary (reader, "title")); SpellChecker.indexDictionary (New LuceneDictionary (reader, "Introduction")); Int numdocs = searcher.getIndexReader (). NumDocs (); Int maxDoc = searcher.getIndexReader (). MaxDoc ();
I will try code indexing a document, commit & amp; Close the author, then inspect the index with Luke, it can signal to you where the "word" document is coming from.
Comments
Post a Comment