You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Joseph B. Ottinger" <jo...@enigmastation.com> on 2005/03/07 09:55:23 UTC
Getting the newly-added doc id?
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?
-----------------------------------------------------------------------
Joseph B. Ottinger http://enigmastation.com
IT Consultant joeo@enigmastation.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Getting the newly-added doc id?
Posted by "Joseph B. Ottinger" <jo...@enigmastation.com>.
Argh, okay. Thank you very much.
On Mon, 7 Mar 2005, Mario Ivankovits wrote:
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
-----------------------------------------------------------------------
Joseph B. Ottinger http://enigmastation.com
IT Consultant joeo@enigmastation.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Getting the newly-added doc id?
Posted by Mario Ivankovits <ma...@ops.co.at>.
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org