lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Searching a untokenized field using SnowballAnalyzer
Date Mon, 21 Aug 2006 17:43:19 GMT
: 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 should be processed with
the SnowballAnalyzer.  (take a look at the query.toString() to see what i
mean)

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.



-Hoss


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