Try using telling the QueryParser to use a PerFieldAnalyzer with the
KeywordAnalyzer configured for the fields you left UN_TOKENIZED and see if
that helps.
It helps!!! I wrapped (with PerFieldAnalyzerWrapper) KeywordAnalyzer as
default analyzer and SnowballAnalyzer only for the field that I
My guess? When you store those field untokenized, they are untokenized. When
you use the SnowBall analyzer with the query parser and search those
untokenized fields, you're query is tokenized. As you can imagine, a
tokenized search by not match un untokenzied field. Why does this not happen
with S
: doc.add(new Field("car","ferrari",Field.Store.NO,Field.Index.UN_TOKENIZED);
:
: when I try to search it using the following search strings:
:
: car:ferrari
: it finds nothing.
the IndexWriter knew that the "car" field was UN_TOKENIZED, but the
QueryParser doesn't -- you've told it every query s