Can I limit a search to specified collections in regular search?

Yes, you can limit the search query to certain collections, either by user selection or in a hidden manner.

By default, all the collections in a basic search are selected. To limit the search to a few collections, uncheck the remaining collections and perform the search.

mceclip0.png

you can search within a specific collection or a group of collections using the "cname" parameter in Search URL.

http://localhost:8080/searchblox/servlet/SearchServlet?cname=news&query=searchblox
http://localhost:8080/searchblox/servlet/SearchServlet?cname=sales&cname=news&query=searchblox

You can also use collection-number i.e., col parameter

http://localhost:8080/searchblox/servlet/SearchServlet?col=1&query=searchblox
http://localhost:8080/searchblox/servlet/SearchServlet?col=1&col=2&col=3&query=searchblox

you can use a hidden form field(s) as below

<input type="hidden" name="cname" value="news" /> 
<input type="hidden" name="col" value="1" /> 


To learn more about SearchBlox please visit our developer document site https://developer.searchblox.com/docs

Have more questions? Submit a request

Comments