Yes, SearchBlox offers a filter query parameter that lets you do a pre-query before you pass your search term, to limit the search results based on certain criteria. In addition to this filter, you can also pass the collection no(col) or collection name (cname) parameter to search on a collection or a group of collections.
You can pass any regular search query through the filter URL parameter, or through a hidden form field.
URL parameters:
Title filter with collection parameter example:
https://localhost:8443/rest/v2/api/search?query=news&filter=title:CNN&cname=news&cname=travel
URL filter example:
https://localhost:8443/rest/v2/api/search?query=news&filter=url:/travel/&col=1&col=2
Hidden form field:
<input type="hidden" name="filter" value="title:CNN" />
<input type="hidden" name="cname" value="news" />
<input type="hidden" name="cname" value="travel" />
-------------------------------------------------------------
<input type="hidden" name="filter" value="url:/travel/" />
<input type="hidden" name="col" value="1" />
<input type="hidden" name="col" value="2" />
Related Topics:
Facets and Filters in SearchBlox
Comments
0 comments
Please sign in to leave a comment.