lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Barr <mi...@runtime-collective.com>
Subject Re: UpdateIndex
Date Tue, 23 Aug 2005 10:47:22 GMT
On Tue, 2005-08-23 at 12:38 +0200, Derya Kasapoglu wrote:
> i query the index for the path of the files in the directory and compare the
> dates.
> But i have a Problem!
> I find out the files which have changed but i can not delete the documet
> from the index, i don't know why!
> 
> In the Field "pathLC" is he path of documnts in lower case.
> Term term = new Term("pathLC", file[i].getAbsolutePath().toLowerCase());
> delete(Term);
> 
> Than i close the IndexReader!!!
> 
> But i can still searching for the file which sould be deleted.

When you call IndexReader#delete(Term) what value is returned? It should
return the number of matching documents it has deleted.

If this value is 0, then your term is incorrect.


-- 
Miles Barr <miles@runtime-collective.com>
Runtime Collective Ltd.


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