lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raf <r.ventag...@gmail.com>
Subject Re: How to deal with not analyzed fields and analyzed ones in the same query
Date Mon, 20 Jun 2011 17:27:57 GMT
You can simply use a KeywordAnalyzer for your NOT_ANALYZED fields.
This analyzer, in fact, does not modify your input.

Regards,
*Raf*

On Mon, Jun 20, 2011 at 5:12 PM, G.Long <jdevgl@gmail.com> wrote:

> Ok, I'll try this.
>
> But will it work if one of the fields has no analyzers assigned ?
>
> For example field1 is associated with a keyword analyzer, field2 with a
> standardAnalyzer and field3 has no analyzer because it was indexed as
>  Field.Index.NOT_ANALYZED. Is there something to specify in the constructor
> of the PerFieldAnalyzerWrapper for the field3 ?
>
> Regards,
> Gary
>
> Le 20/06/2011 16:43, Erick Erickson a écrit :
>
>  See PerFieldAnalyzerWrapper, then form your query like
>> field1:word1 OR field2:word1
>>
>> Best
>> Erick
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.**apache.org<java-user-unsubscribe@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.**org<java-user-help@lucene.apache.org>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message