lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <lucenelist2...@danielnaber.de>
Subject Re: content depending Analyzing
Date Mon, 10 Dec 2007 18:59:45 GMT
On Montag, 10. Dezember 2007, Helmut Jarausch wrote:

>  an Analyzer
> implements a 'TokenStream(String fieldName, Reader reader)"
> But for me that's too late. When tokenizing the TOC
> field I would need access to the LANG field to decide
> how to tokenize.

IndexWriter contains an addDocument() call that also takes an analyzer. If 
you always use that call, the analyzer in the IndexWriter constructor will 
never be called. This way you can create your Document object and always 
use the appropriate analyzer.

I hope you are aware that you need to use the same analyzer for searching. 
This is a bit difficult with multiple analyzers, unless you ask the users 
what language they want to search in.

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


Mime
View raw message