0
votes

We use IBM WCS v7, with embeded Apache Solr. Solr is used as a search engine for our e-commerce based application.

As per a recent requirement, we want to use multi select facet functionality, where the user can check multiple facet attributes, and the corresponding values will be OR'ed to the search result.

Ex- I wish to check Color:RED, Color:BLUE and Color:BLACK in my default Search Results, so that each attribute value will be OR'ed in the resulting search results display.

We use the out-of-the-box SearchDisplayCmd, for our Search functionality, where the field "metaData=" takes care of history of the facets applied, and "facet=" takes care of applying a facet field. For the query param "metaData", it encodes the multiple facets into base64 encoding. It uses a special de-limiter to AND the different facet fields,and restrict the search results. brand:"POLO" color:"RED" shape:"Oval"

I want to know, if there exists any such de-limiter or any alternatives by using which, I can perform an OR operation, on different values of the same facet attribute, and use "metaData" parameter to maintain a history of the applied facets.

Any help on the same front is highly appreciated. Any other approaches, on applying multiple values of the same facet attribute are also welcome.

Great Thanks in advance.

Regards,

Jitendriya Dash

3

3 Answers

0
votes

I recently worked on this: Select multiple values of same facet

I was able to get it also.

Try to find where it hits the tag. The expression builder I used comes OOB. getCatalogNavigationView. Make sure you use the appropriate searchProfile.

Pass the facet param in this way.

<c:forEach var="facetSelect" value="paramValues.facet">
  <wcf:param name="facet" value="facetSelect>
</c:forEach

But by this method you will not be able to select values from any other attributes. If someone knows how to select values from the same facet or different facet, pls share.

0
votes

Update SELECTION column of FACET table to 1 to mark the facetable attribute as multi selectable.

0
votes

In WCS7+, for enabling multi select facet functionality go to FACET table and set 'SELECTION' column value to 1 instead of 0. If an attribute is to be made multi select facet, you can make the changes from CMC. Go to the attribute dictionary select the attribute and in facetable properties, check 'Allow multiple facet value'.