lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Whole Phrase search in Solr
Date Mon, 03 Dec 2012 22:17:42 GMT
Ah! You have conflicting tokenizers in your index and query analyzers. They 
should be the same.

Your index has:
  <tokenizer class="solr.StandardTokenizerFactory"/>

Your query has:
   <tokenizer class="solr.KeywordTokenizerFactory"/>

That has the effect of treating the entire query term as one index term. 
That actually works for simple terms, but a quoted phrase is passed to the 
query analyzer as one string and the keyword tokenizer will treat it as one 
token and this will index it as one term, which will not match the two terms 
that were indexed by the standard tokenizer.

Stick with the same tokenizer as you used at index time.

-- Jack Krupansky

-----Original Message----- 
From: NickA
Sent: Monday, December 03, 2012 1:47 PM
Subject: Re: Whole Phrase search in Solr

Jack thank you again,

however we have the major problem that using QUOTES to bring "phrase"
results, actually does not bring any results AT ALL!

I mentioned this at the initial post, that we also used these:

fq=search_field:"check this"
fq=search_field:'check this'

But no results appear when quotes are used. What may be doing wrong in our

View this message in context:
Sent from the Solr - User mailing list archive at 

View raw message