on 2019 Jan 29 12:17 AM
Hi experts,
I need to display product types according to connected user, I define a Listener to add the filter query
that work fine for the PLP but I still get all the products in the text and autocomplete search. Any idea?
Thanks in advance
Request clarification before answering.
Hi, Hybris brings suggestions from SOLR & it doesn't filters suggestion based upon on filter query (fq parameter in search query).
SOLR 6.3+ version added feature called context filtering. It will help to filter out suggestion based upon context field mentioned in the configuration & context query at query time. The AnalyzingInfixLookupFactory and BlendedInfixLookupFactory currently support this feature, when backed by DocumentDictionaryFactory. This will requires update solrconfig.xml for suggester component & add parameter (suggest.cfq=filter term) at query time . Follow SOLR documention for more information https://lucene.apache.org/solr/guide/6_6/suggester.html
Alternate approach for older version : Use facet based suggestion, Send search query along with required filter, and required facet parameters (e.g facet.field=autosuggest, facet.prefix={Search term}.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.