lucene-java-user mailing list archives

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

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?

Thanks!
max


-----Original Message-----
From: Daniel Naber [mailto:lucenelist@danielnaber.de]
Sent: Friday, June 03, 2005 20:10
To: java-user@lucene.apache.org
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?

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
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