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 12:25:41 GMT
On Tue, 2005-08-23 at 13:53 +0200, Derya Kasapoglu wrote:
> Thank you for your help!!!
> 
> I try it without Analyzer!
> 
> document.add(Field.Keyword("path", file[i].getAbsolutePath()));
> 
> then
> 
> Term term = new Term("path", file[i].getAbsolutePath());
> Query query = new TermQuery(term);
> reader.delete(term);
> 
> so is better! :) and it works!!!!

That's the easiest way to do it, keep one copy of the field that has
gone through the StandardAnalyzer and one version as a keyword. Then you
can use the keyword version when you need to look up a particular
document, e.g. to delete it.



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