It is possible in two ways: 1. Use the analyzer class and generate a TokenStream/Tokenizer from it. Then add the field using the c'tor taking a TokenStream. If you want to additionally store the field, you have to add another field with the same field name, but no index and store enabled. After that, the tokens from the token stream (analyzed by your analyzer) are indexed in the field and the full contents are stored (if applicable). But if you have different analyzers you cannot use QueryParser with that.
2. Another option is PerFieldAnalyzerWrapper, that is a wrapper that chooses the right underlying analyzer depending on the used field name. You can use this for both indexing and query. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Raymond Balmès [mailto:raymond.bal...@gmail.com] > Sent: Tuesday, March 17, 2009 12:17 PM > To: java-user@lucene.apache.org > Subject: Different analyzer per field ? > > I was looking for calling a different analyzer for each field of a > document... looks like it is not possible. > Do I have it right ? > > > -Ray- --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org