Re: IndexReader.maxDoc() and other

2011-08-06 Thread Yonik Seeley
On Sat, Aug 6, 2011 at 4:17 PM, eks dev wrote: > Thanks Yonik, > assuming I am not going to index ID , than only an option 4. remains so far. > I have no other ideas, and Log* merge policy would mean all 4 Indexing magic > went to nothing :) > Colud then the following do the job? > clone DefaultIn

Re: IndexReader.maxDoc() and other

2011-08-06 Thread eks dev
each other. -Yonik http://www.lucidimagination.com From: eks dev To: dev@lucene.apache.org Sent: Sat, 6 August, 2011 20:47:09 Subject: IndexReader.maxDoc() and other Assuming there are no deletes, would the following work as a way to load *last added document*,

Re: IndexReader.maxDoc() and other

2011-08-06 Thread Yonik Seeley
On Sat, Aug 6, 2011 at 2:47 PM, eks dev wrote: > Assuming there are no deletes,  would the following work as a way to load > *last added document*, surviving optimize as well? > Order of documentId-s in Lucene survives optimize as far as I remember? No longer... the default merge policy can now m

IndexReader.maxDoc() and other

2011-08-06 Thread eks dev
Assuming there are no deletes, would the following work as a way to load *last added document*, surviving optimize as well? Order of documentId-s in Lucene survives optimize as far as I remember? IndexReader ir... int maxDoc = ir.maxDoc() - 1; if(maxDoc>0) //? What is the return value on empty