Re: reg : document number

2006-11-06 Thread Erick Erickson
n i delete > the document when the files they represent are deleted in my file repository > > Thanks in advance for your reply > > > > Erick Erickson <[EMAIL PROTECTED]> wrote: > Do NOT rely on the Lucene document number. It changes periodically. As I > understand it

Re: reg : document number

2006-11-05 Thread Jin Yiqing
Erickson <[EMAIL PROTECTED]> wrote: Do NOT rely on the Lucene document number. It changes periodically. As I understand it the general algorithm is that each doc gets an ID one greater than the current max doc ID at INDEX time. However, when you delete documents and optimize your index, t

Re: reg : document number

2006-11-05 Thread mukkamalla rama kumar
Erick Erickson <[EMAIL PROTECTED]> wrote: Do NOT rely on the Lucene document number. It changes periodically. As I understand it the general algorithm is that each doc gets an ID one greater than the current max doc ID at INDEX time. However, when you delete documents and optimiz

Re: reg : document number

2006-11-05 Thread Erick Erickson
Do NOT rely on the Lucene document number. It changes periodically. As I understand it the general algorithm is that each doc gets an ID one greater than the current max doc ID at INDEX time. However, when you delete documents and optimize your index, the document IDs change. Simplistically, say

reg : document number

2006-11-05 Thread mukkamalla rama kumar
Hi, How is this document number assigned to documents. Can i give my own document number. I would like to get the document number for a particular file that i added to an index. - Find out what India is talking

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 > : w

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Paul Elschot
eDeleted(doc)) { > > > ir.delete(docNum); // <- I need the docNum for doc. > > > } > > > } > > > > > > How do I get the docNum for IndexReader.delete() function in the above > > > case? Is there a API function I am missing? I am working with a merged

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

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Chun Wei Ho
w do I get the docNum for IndexReader.delete() function in the above > > case? Is there a API function I am missing? I am working with a merged > > The document number is the variable i in this case. If the document number is the variable i (enumerated from numDocs()), what's the

Re: Getting the document number (with IndexReader)

2006-01-26 Thread Paul Elschot
houldBeDeleted(doc)) { > ir.delete(docNum); // <- I need the docNum for doc. > } > } > > How do I get the docNum for IndexReader.delete() function in the above > case? Is there a API function I am missing? I am working with a merged The document number is the

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

Re: Document number

2005-10-26 Thread Grant Ingersoll
Yep. hits.id() should do it. Gusenbauer Stefan wrote: Gusenbauer Stefan wrote: I've searching trough the archives but is there a way to get the document number for a specific document? I would need it for the Method getTermFreqVector of IndexReader? For deleting I've saved a

Re: Document number

2005-10-26 Thread Gusenbauer Stefan
Gusenbauer Stefan wrote: >I've searching trough the archives but is there a way to get the >document number for a specific document? I would need it for the Method >getTermFreqVector of IndexReader? For deleting I've saved a unique ID >Field to delete the documents but

Document number

2005-10-26 Thread Gusenbauer Stefan
I've searching trough the archives but is there a way to get the document number for a specific document? I would need it for the Method getTermFreqVector of IndexReader? For deleting I've saved a unique ID Field to delete the documents but how I get the document number? tha