lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: deleting on a keyword field
Date Tue, 07 Jun 2005 01:36:34 GMT

On Jun 6, 2005, at 7:07 AM, Max Pfingsthorn wrote:
> Thanks for all the replies. I do know that the readers should be  
> reopened, but that is not the problem.

Could you work up a test case that shows this issue?  From all I can  
see, you're doing the right thing.  Something is amiss somewhere though.

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

Same thing in this case.  new Field(name, value, true, true, false)  
is the same as Field.Keyword(name, value)

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

Nothing comes to mind from what I've seen thus far.  An easily  
runnable example demonstrating this issue would be the next step.

     Erik


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


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