You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Chakravarthy Yeleswarapu -X (cyeleswa - ASQUARE INC at Cisco)" <cy...@cisco.com> on 2014/08/15 12:17:53 UTC

Filtering autosuggest results in Solr

Hi,

We have following use case:

Filter autosuggest results of solr_field1 based on solr_field2 values. The solr_field2 values are constants such as "source1", "source2" etc.
If user types "xyz" for solr_field1, suggestions  returned can match anywhere in solr_field1 value such as abcxyz, xyzabc, abcxyzdef, acXyZc etc. But returned suggestions should be filtered by solr_field2 value.
Something like, q=solr_field1:xyz&fq=solr_field2:source1 or solr_field2:source2 => abcxyz, xyzabc, abcxyzdef

We have tried /terms component returns suggestions case insensitive but it has no filtering capability. Faceting query works with only prefix values.

Please can anyone suggest alternative approaches.

Thanks
Chakra