lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Pfingsthorn" <>
Subject RE: deleting on a keyword field
Date Mon, 06 Jun 2005 11:07:16 GMT

Thanks for all the replies. I do know that the readers should be reopened, but that is not
the problem. I try to remove some docs, and add their new versions again to incrementally
update the index. After updating the index with the same document twice, I opened the index
in luke. There I saw that the file's uri was present three times in the uri field. So, I concluded,
it didn't delete the docs right as there are in total three documents which contain this term,
right? By the way, Reader.delete() returned 0 as well.

I thought I used Field.Keyword(), but actually I use

doc.add(new Field(URI_FIELD, uri, true, true, false));

to add the uri to the doc. I can see it in luke, and even find the docs when searching for
it (using the KeywordAnalyzer).

Any ideas?


-----Original Message-----
From: Daniel Naber []
Sent: Friday, June 03, 2005 20:10
Subject: Re: deleting on a keyword field

On Friday 03 June 2005 18:50, Max Pfingsthorn wrote:

> reader.delete(new Term(URI_FIELD, uri));
> This does not remove anything. Do I have to make the uri a normal field?

How do you know nothing was deleted? Are you aware that you need to re-open 
your IndexSearcher/Reader in order to see the changes made to the index?



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message