elasticpress-autosuggest icon indicating copy to clipboard operation
elasticpress-autosuggest copied to clipboard

Limit results to post type

Open leeroyrose opened this issue 7 years ago • 1 comments

Would be great if there were a way to limit the results to a specific post type of choice. At the moment, i'm indexing a WooCommerce site, including all of it's orders, and the post suggestion returns customer orders in the results. Not good! Trying to find a workaround, but was hoping this could be something addressed for the future.

leeroyrose avatar Mar 29 '17 13:03 leeroyrose

I managed to make this work using context suggesters that are used to essentially filter the results by the post type field. Will submit a PR in a few days when I have a bit of downtime.

leeroyrose avatar Mar 29 '17 14:03 leeroyrose