lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Query without Analyzer
Date Tue, 11 Sep 2007 13:16:27 GMT
Sure, but it's probably not what you want to do. You can use a
PerFieldAnalyzerWrapper to analyze different fields with
different analyzers. So your category field could be both
indexed and analyzed with, say, WhitespaceAnalyzer or some
such.

Or, as testn suggests, store it UN_TOKENIZED.

Each has its tradeoffs....

Erick


On 9/10/07, Alice <alicelista@gmail.com> wrote:
>
> Hi folks!
>
>
>
> I'm using Lucene to provide search on my application.
>
>
>
> The final query is a BooleanQuery with many fields, there are fields where
> I'll look for the entered keyword and some others to restrict the search,
> as
> the id of a category.
>
>
>
> I read, and seems to be true, that when using TermQuery, it uses the same
> analyzer used when indexing.
>
>
>
> As, there are some fields (like category Id) that I don't want to use the
> analyzer, the result is not what I expect because the term was analyzed.
>
>
>
> My question is: is there any way to search for fields without using an
> analyzer?
>
>
>
> Thank you!
>
>
>
>
>
>

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