On Jan 13, 2005, at 10:17 AM, Bertrand VENZAL wrote:




Hi,

Thanks for your quick answer, I understood wot u meant by using the
indexSearcher to get the termFreqVector. But, you use an int as an id to
find the termFrequency so I suppose that it is the position number in the
IndexReader vector.
My problem is : during the indexing phase, I can store the id, but if a
document is deleted and recreated later on (like in an update), this will
change my vector and all the id's previously set will be no more correct.
Am i right on this point ? or am i missing something ...

Yes, the Document id (the one Lucene uses) is not to be relied on long-term. But, in the example you'd get it from Hits immediately after a search, and thus it would be accurate and usable. You do not need to store any the id during indexing - Lucene maintains it and gives it to you from Hits.


        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to