I have made the following type definition in Solr:
<fieldType name="text_phrase" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
It should index values verbatim (no tokenization).
I add the value "skinny jeans" to my index.
When I run the following search query (url decoded for reading) I get no results:
http://myvm:8983/solr/mycore/select?q=*:*&fq=name:("skinny jeans")&wt=json&indent=true&debugQuery=true
You can see the URL is searching for everything (*:*) with a filter query for the exact value "skinny jeans".
I then add the value "jeans" to my index, and run a similar query with
&fq=name:("jeans")
And I do find the "jeans" element.
So it works for a single word, but not for multiple words. Why would this be? I'm searching for an exact value after all. It makes me suspect that the KeywordTokenizerFactory is doing something odd. Can anyone please advise why no results are being returned from such a basic setup?
Thanks,