solrwcs

WCS Seach(SOLR) filter query to include or exclude given catalog_id categories


We are trying to limit WebSphere Commerce Search/SOLR keyword search to current catalog categories only by using fq=catalog_id:"1000002" and other fq values but still getting data from categories that are not part of catalog_id 1000002. Are there any other approaches to include current catalog categories only during keyword search?

We are on WCS8. I tried commenting <_config:field name="categoryname"/> in wc-search.xml and it didn't work either though it's not ideal scenario since we still would like the searches to work against current customer/site catalog_id.


Solution

  • There is no issue with fq field or value since it's working as expected. Issue was with categoryname qf, so had to customize this part to include dynamic categoryname_ qf and the search returns correct results now.