Dear Team, How can I handle compound word searches in solr ?. How can i search "hand bag" if I have "handbag" in my index. While using shingle in query analyzer, the query "ice cube" creates three tokens as "ice","cube", "icecube". Only ice and cubes are searched but not "icecubes".i.e not working for pair though I am using shingle filter.
Here's the schema config. 1. <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> 2. <analyzer type="index"> 3. <filter class="solr.SynonymFilterFactory" synonyms="synonyms_text_prime_index.txt" ignoreCase="true" expand="true"/> 4. <charFilter class="solr.HTMLStripCharFilterFactory"/> 5. <tokenizer class="solr.StandardTokenizerFactory"/> 6. <filter class="solr.ShingleFilterFactory" maxShingleSize="2" outputUnigrams="true" tokenSeparator=""/> 7. <filter class="solr.WordDelimiterFilterFactory" catenateWords="1" catenateNumbers="1" catenateAll="1" preserveOriginal="1" generateWordParts="1" generateNumberParts="1"/> 8. <filter class="solr.LowerCaseFilterFactory"/> 9. <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> 10. </analyzer> 11. <analyzer type="query"> 12. <tokenizer class="solr.StandardTokenizerFactory"/> 13. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> 14. <filter class="solr.ShingleFilterFactory" maxShingleSize="2" outputUnigrams="true" tokenSeparator=""/> 15. <filter class="solr.WordDelimiterFilterFactory" preserveOriginal="1"/> 16. <filter class="solr.LowerCaseFilterFactory"/> 17. <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/> 18. </analyzer> 19. </fieldType> Any help is appreciated.