lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: remove duplicate when merging indexes
Date Tue, 10 Nov 2009 09:26:49 GMT
On Tue, Nov 10, 2009 at 10:22 AM, m.harig <m.harig@gmail.com> wrote:
>
> Thanks simon
>
>    How I do get the unique ID ? will it be added to the index?
There is no such thing build into lucene. You need to generate your
own unique ID. Make sure you do NOT use the document ID as it is
volatile and is likely to change once you modify you index.

simon

>
>
>
> Simon Willnauer wrote:
>>
>> You need some kind of unique ID for you documents like a primary key in a
>> RDB.
>> If you have something like that you can call
>> IndexWriter#updateDocument(uniqueIDTerm, document) this will delete
>> the old document and add the new one.
>>
>> simon
>>
>> On Tue, Nov 10, 2009 at 10:05 AM, m.harig <m.harig@gmail.com> wrote:
>>>
>>> hello all,
>>>
>>>   This is my situation ,  i've multiple indexes , for example , index1 ,
>>> index2 , index3 ... i've to update the indexes every night . If i open my
>>> IndexWriter create=false (since i want to update the existing index) ,
>>>  am
>>> getting duplicate documents appends with the existing indexes , anyone
>>> help
>>> how do i remove duplicate documents by updating the existing index??????
>>> --
>>> View this message in context:
>>> http://old.nabble.com/remove-duplicate-when-merging-indexes-tp26280244p26280244.html
>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/remove-duplicate-when-merging-indexes-tp26280244p26280473.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message