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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to