Persistent Filters are rules that apply to every search on your search page, without visitors seeing them. Use them to keep a kind of content out of the results, or to show only one part of your index. They are on the Filters tab.
Add a rule
- Open Settings > Opensolr Search, tab Filters.
- Click + Add Filter.
- Pick the Mode: + Include shows only the documents that match the rule; - Exclude hides them.
- Type the Solr Field and the Value.
- Click Save Filters. The × button on a row removes it.
How a rule matches
- The value is matched as you type it. A value with spaces is matched as a whole phrase.
- Several rules all apply together.
- Field names are the names in your index, the ones listed under Facet Configuration on the Facet Mapping tab.
Examples
- - Exclude, field
product_category_sm, valueDiscontinued: products of that category never show. - + Include, field
product_category_sm, valueBooks: only items of the Books category show.
Where they apply
To the results and to the suggestions under the search box of the WordPress Native search page. They do not apply to the Embeddable search page.