I'm using apache-solr-3.4.0. I'm able to search using a single word, but couldn't search using more than one word. For example: jobTitle:tester
produce the results, but jobTitle:java developer
doesn't return any result.
In my schema.xml I added like the below code for Text field type:
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="3" maxGramSize= "5"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="3" maxGramSize="5"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
jobTitle:"java developer"
otherwise the query would be interpreted atjobTitle:java _text_:developer
. You can also pass "debugQuery=true" to your query and see in the results how Solr is parsing your query and make sure it is doing what you would expect. – Hector Correa