You can do it using PerFieldAnalyzerWrapper.
See
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/analysis/PerFiel
dAnalyzerWrapper.html for details.

Alexey

-----Original Message-----
From: Brandon Lee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 3:51 PM
To: Lucene Users List
Subject: Field Tokenization


Hi.  I would like to tokenize different fields in a document w/
different analyzers but it doesn't seem possible because analyzers are
associated w/ documents but not Fields.  Is there a reason for this?

For example, I'd like:

  Document : Field=Text   - porter w/ stop words analyzer
             Field=Author - whitespace lower-cased analyzer

If I add Field=Author as a Keyword Field (non-tokenized), the document
states that it will add it as a single word (I want separate words but
not through the porter stemmer).

I know that query would be more complicated but I'm willing to code
around that.

Thanks for any enlightenment.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to