WebDevStudios / wp-search-with-algolia

Improve search on your site. Autocomplete is included, along with full control over look, feel and relevance.

Home Page:https://wordpress.org/plugins/wp-search-with-algolia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs: Using `algolia_search_params` as a `pre_get_posts` filter for the Algolia query.

tw2113 opened this issue · comments

Making use of algolia_search_params allows for amending parameters used in the query for Algolia's search.

With it, you can amend the array of parameters, as documented at https://www.algolia.com/doc/api-reference/search-api-parameters/

Most specifically, you would want to make use of the filters parameter, which is documented at https://www.algolia.com/doc/api-reference/api-parameters/filters/

Make sure to note this detail:

You must declare for each attribute you use as a filter in attributesForFaceting, except for _tags, which are automatically considered as attributesForFaceting.