lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cam Bazz" <camb...@gmail.com>
Subject Re: delete by doc id
Date Tue, 12 Aug 2008 09:36:30 GMT
I get the id's to delete from a query in indexsearcher.

I think I am going trunk, hope it wont cause a lot of pain.

best.
-C.B.

On Sat, Aug 9, 2008 at 2:30 AM, Michael McCandless <
lucene@mikemccandless.com> wrote:

>
> It's risky.
>
> How would you get the IDs to know which ones to delete?  A separate reader
> running on the side?
>
> The problem is, as IndexWriter merges segments, the IDs shift.  Any reader
> you have already open won't see this shift (until you reopen it), so you
> could end up deleting the wrong IDs.
>
> Mike
>
>
> Cam Bazz wrote:
>
>  hello,
>>
>> what would happen if I modified the class IndexWriter, and made the delete
>> by id method public?
>>
>> I have two fields in my documents and I got to be able to delete by those
>> two fields, (by query in other words) and I do not wish to go trunk
>> version.
>>
>> I am getting quite desperate, and if not found a solution I will have to
>> make my documents with 3 fields, a, b and a + b so I can delete by a and
>> b.
>>
>> Best.
>>
>> could there be a side effect?
>>
>> Best.
>>
>> -c.b.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message