Re: Getting the newly-added doc id?

2005-03-07 Thread Mario Ivankovits
Joseph B. Ottinger wrote:
Is there a way, after IndexWriter.addDocument(), to determine what the 
document's resulting id is? addDocument() has no return type; I could 
run a search, but the search might not be accurate if the document 
added is only slightly different than another document.

Would an external id be necessary?
As far as I know - yes.
Especially since the lucene document id can change i.e. if you delete a 
document and optimize the index.

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


Re: Document ID

2005-06-24 Thread Mario Ivankovits

Hi!

Is there any way to force the document id inside the lucene index, if
I have my own internal numbering scheme, it would be nice to have that
reflected inside the lucene index...anyway?
 
Simply put your ID as additional field to your document. You never 
should rely on lucenes document id as it might change due to delete 
documents during optimize.


---
Mario


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