lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message