: I looked at the implementation of 'read(int[], int[])' in : 'SegmentTermDocs' and saw that it did the following things: : - check if the document has a frequency higher than 1, and if so read : it; : - check if the document has been deleted, and if so don't add it to the : result; : - store the document IDs, counts and frequences in attributes instead of : local variables. : : Given that the following preconditions hold in my situation: : - all documents have a frequency of 1 for the term; : - I never delete documents using the 'IndexReader' from which I get the : 'TermDocs' object; : - I am only interested in the document IDs.
I don't think it really matters wether you do deletes on the same IndexReader -- what matters is if there has been any deletes done to the index prior to opening the reader since it was last optimized. The reason being that deleting a document just causes a record of the deletion to be made, but no Term/DOc mapping information is removed. So if your index is read only and will never contain any deleted documents, then your method may be safe (i'm not 100% certain of that, just guessing) but if it's possible for documents to be deleted from your index at some point, then i'm 99% sure your approach will result it indicating matches on documents which are no longer "viable" -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]