lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Lucene Query Syntax with analyzed and unanalyzed text
Date Mon, 16 Sep 2013 17:13:25 GMT
org.apache.lucene.analysis.miscellaneous.PerFieldAnalyzerWrapper in
analyzers-common is what you need.  There's an example in the
javadocs.  Build and use the wrapper instance in place of
StandardAnalyzer or whatever you are using now.


--
Ian.


On Mon, Sep 16, 2013 at 5:36 PM, Scott Smith <ssmith@mainstreamdata.com> wrote:
> I want to be sure I understand this correctly.  Suppose I have a search that I'm going
to run through the query parser that looks like:
>
> body:"some phrase" AND keyword:"my-keyword"
>
> clearly "body" and "keyword" are field names.  However, the additional information is
that the "body" field is analyzed and the "keyword" field is not.
>
> I don't believe this will work.  I'm assuming that the query parser can't correctly determine
which fields are analyzed and which are not.
>
> Is there an easy way to handle this?

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