Gravatar for

Question by jtresidder, May 11, 2018 7:25 PM

Filtering Hive Search Results

I'm trying to figure out how to to apply some basic filtering on the search page created using the Hive framework, and I can't help but feel like I'm missing something obvious.

As an example, I have created a page and followed the getting started instructions up to this point ( Now I'm trying to add some real basic filtering to the results list, say to limit the results to items in a certain branch of the content tree, or to only display results of a certain template. This seems like something that pretty much everyone is going to want to do, but I just can't find any simple instructions on how to do it. The closest I've found is this article ( which seems pretty over-complicated for something so basic.

Can anyone point me in the right direction? Or am I mistaken, and I need to do everything that article mentions?

1 Reply
Gravatar for

Answer by François Lachance-Guillemette, May 11, 2018 8:08 PM

OOTB, on the Search Interface component, you can select "Filter Rules" which will be applied to all of the Search Interface. It uses Sitecore's rule engine to generate expressions understood by the index.

You can also put them on the tab if you want to show this content in a specific tab.

Also, you can add the "Query Filter" component in your page. In fact, this component is "embed" in both the tab and the Search Interface, so it serves the same purpose, but allows you to outsource the filter into it's own Data Source item in Sitecore's content tree.

Hope this helps!

Gravatar for

Comment by jtresidder, May 11, 2018 9:17 PM

Thanks for the reply @François Lachance-Guillemette. I think I'm following, however when I look at a Query Filter, I don't see Filter Rules anywhere, regardless of if it's on the search interface, or it's own component. It's particularly weird because I can see the field on the template, but not on the actual content items, either in the tree or in experience editor. Is there something special that needs to happen for the rules field to be usable?

Ask a question