I had a chat with a user (follow up on 1191876-zen) who's using Jetpack for the Search module only.
They're about to launch their new site and would like to know if there's a way to get a filter that displays only certain categories when researching for a specific word by keeping the posts within the categories that aren't fetched by the search engine.
For example, imagine I have 4 posts resulting after I searched for 'lorem ipsum'. They are labeled under different categories (ABC, LMN, XYZ, and ~HJK`), but I'd like the search feature to search for keywords only on "XYZ" and "HJK" as opposed to the entire range of categories created to sort the posts.
Do you think that'd be doable? Upon checking on the current hooks, it seems like this one is not in there.
cc @gibrown - Thanks for checking on that
Ya I've been thinking about this use case also and I think we should add support for it.
Basically the user would be able to specify a custom set of filters that go together. Will require some slightly complicated UI though to make it work.
I'm the user who spoke to Stef about the filters for the search module. From a UI side I think the easiest option and the one that makes most sense would be to have the option on the widget options.
Currently you can select what filters you want to apply "taxonomy" and then you can select 'tags. categories etc' If the user selected 'categories' you could then show a list of all the categories in a multiple select box so the user can select which filters they wanted to show.
I've mocked up how I think the above would work:

Hi @mfranklin82 thanks for chiming in about this.
A few questions/thoughts:
My current thinking is that there should be a new filter type (probably called "custom") that lets the user then add and rearrange a set of items that can be filtered on. The set of items could be pretty much any field in the index: categories, tags, custom taxonomies, post meta (when we get it into the index), authors, etc.
I can also imagine that a filter could possibly be a combination of multiple fields. So a user wants to have a filter that is for posts with both a particular category and a tag. Then suddenly we're providing the ability to add logic to the filters which seems really powerful. I know I've used this sort of thing in some custom filtering interfaces before and seen it get used.
Any thoughts on this? It is starting to get more complicated which I don't love. Maybe the UI should allow simple customizations and we should just make it easy to add code for more complicated filters.
I'm not sure how often a user would need to change the order or the items. I think a default of A-Z or number of posts would be suitable for most users. I couldn't imagine many cases where you'd need to have a specific order. By being able to select which taxonomies are being used in the filters will be a big step in the right direction.
Having a combination of filters would certainly be a very powerful feature but as you say trying to get this into a UI in the dashboard would be very challenging and perhaps a bit daunting for users.
I would suggest the first step would be a simple filtering option so users can select certain taxonomies for the filter and then start looking at more advanced filters.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Also requested is allowing setting filters by individual months as well as years.
So for instance it would be easier to filter by a year, and then drill into a particular month within that year. Almost a hierarchical filtering by dates. Adding to this issue since it is kinda related, but not perfectly.
Most helpful comment
I'm the user who spoke to Stef about the filters for the search module. From a UI side I think the easiest option and the one that makes most sense would be to have the option on the widget options.
Currently you can select what filters you want to apply "taxonomy" and then you can select 'tags. categories etc' If the user selected 'categories' you could then show a list of all the categories in a multiple select box so the user can select which filters they wanted to show.
I've mocked up how I think the above would work: