lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: How do you use a different analyzer by field?
Date Mon, 10 Jul 2006 16:18:44 GMT
Use PerFieldAnalyzerWrapper

----- Original Message ----
From: Furash Gary <furashg@mcao.maricopa.gov>
To: java-user@lucene.apache.org
Sent: Monday, July 10, 2006 11:56:04 AM
Subject: How do you use a different analyzer by field?

Maybe I'm approaching this wrong (apologies) and didn't search correctly
through the archives (mia culpa), but...

If I want to apply a different analyzer to different fields in the
document, how do I do that?  It seems like when you create the index you
pass it an analyzer, and that's the one you're stuck with for any field
added to a document added to the index.  However, for field A, (a type
of case number) I might want to do X, for field B, I might want to do Y.
I could put all this in a bunch of if statements in the analyzer, but
that seems sort of odd - well, not if the assumption of the lucene
creators is that you're always indexing a single coherent real-world
document (which it may have been).

Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org





---------------------------------------------------------------------
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