Re: Getting the document number (with IndexReader)

2006-01-27 Thread Paul Elschot
On Friday 27 January 2006 02:36, Chun Wei Ho wrote: > Thanks for the info :) One last related question. > > If I delete documents using a IndexReader(), can I assume that the > internal document numbers of other undeleted documents (obtained using > the same IndexReader instance) will not change u

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Chun Wei Ho
Thanks for the info :) One last related question. If I delete documents using a IndexReader(), can I assume that the internal document numbers of other undeleted documents (obtained using the same IndexReader instance) will not change until I call IndexReader.close()?

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Paul Elschot
On Thursday 26 January 2006 19:44, Chris Hostetter wrote: > > : > The document number is the variable i in this case. > : If the document number is the variable i (enumerated from numDocs()), > : what's the difference between numDocs() and maxDoc() in this case? I > : was previously under the impr

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Paul Elschot
On Thursday 26 January 2006 09:47, Chun Wei Ho wrote: > Hi, > > Thanks for the help, just a few more questions: > > On 1/26/06, Paul Elschot <[EMAIL PROTECTED]> wrote: > > On Thursday 26 January 2006 09:15, Chun Wei Ho wrote: > > > I am attempting to prune an index by getting each document in tur

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Chris Hostetter
: > The document number is the variable i in this case. : If the document number is the variable i (enumerated from numDocs()), : what's the difference between numDocs() and maxDoc() in this case? I : was previously under the impression that the internal docNum might be : different to the counter.

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Chun Wei Ho
Hi, Thanks for the help, just a few more questions: On 1/26/06, Paul Elschot <[EMAIL PROTECTED]> wrote: > On Thursday 26 January 2006 09:15, Chun Wei Ho wrote: > > I am attempting to prune an index by getting each document in turn and > > then checking/deleting it: > > > > IndexReader ir = IndexR

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Paul Elschot
On Thursday 26 January 2006 09:15, Chun Wei Ho wrote: > I am attempting to prune an index by getting each document in turn and > then checking/deleting it: > > IndexReader ir = IndexReader.open(path); > for(int i=0;i Document doc = ir.document(i); > if(thisDocShouldBeDeleted(doc)) { >

Getting the document number (with IndexReader)

2006-01-26 Thread Chun Wei Ho
I am attempting to prune an index by getting each document in turn and then checking/deleting it: IndexReader ir = IndexReader.open(path); for(int i=0;i