lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From flateric <eballn...@yahoo.de>
Subject Re: neither IndexWriter nor IndexReader would delete documents
Date Mon, 19 Nov 2007 20:40:46 GMT

Hallo Daniel;

the number returned by delete is 0, but the "uid" shows up in Luke so it is
there.
I close the reader after every delete and then re-open it for the next
delete (see my code snippets below).

Eric


Daniel Naber-10 wrote:
> 
> On Sonntag, 18. November 2007, flateric wrote:
> 
>> IndexReader ir = IndexReader.open(fsDir);
>> ir.deleteDocuments(new Term("uid", uid));
>> ir.close();
>>
>> Has absolutely no effect.
> 
> What number does ir.deleteDocuments return? If it's 0, the uid cannot be 
> found. If it's > 0: note that you need to re-open your searcher/reader to 
> see any changes to your 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/neither-IndexWriter-nor-IndexReader-would-delete-documents-tf4832123.html#a13844914
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


Mime
View raw message