Filter Support
-
If we are using the following stack
WP
Metabox
Bricks Builder
FacetWp
Queryra
This a company directory site with CPTs and custom meta data. I can see end users searching for a company but than wanting to filter the results. Is this possible? Are search results filterable via FacetWP?
-
Hi Joe,
Thanks for laying out the full stack, that helps.
Let me split this into what I can answer definitively and what I cannot.
CPTs and Meta Box fields: yes. Queryra indexes custom post types, and it indexes
title, content, excerpt, text-type custom fields and taxonomies, so your company
records and the Meta Box text fields on them are searchable. Meta Box documents
the compatibility on their side as well. You can also choose which post types are
searchable, so search can be scoped to the company CPT.FacetWP: I have not tested that combination, so I am not going to guess at it.
Here is what decides it, and it is worth knowing either way. Queryra hooks into the
standard WordPress search request and replaces the result set for that query.
FacetWP maintains its own index and applies its filtering to the query on the page.
So the question is whether, on your results page, FacetWP filters within the set
Queryra returned, or rebuilds its own query from scratch. In the first case,
faceting on top of semantic results should work. In the second, the facets would
work but the results underneath would no longer be the semantic ones.The same question decides whether the ranking survives, because semantic search
puts most of its value in the order things come back in, and anything that re-sorts
loses that.Now the practical part: you already have this stack running and I do not. That means
you can get a definitive answer today, on your actual configuration, faster than I
could by rebuilding an approximation of it. Two steps, about ten minutes:- Before touching any facet, run a plain search by typing this straight into the
address bar: yoursite.com/?s=some+natural+phrase. That skips the theme and the
builder and goes to the path Queryra hooks into. Tell me whether those results
look right. This also settles Bricks on its own, which is still marked
“verification in progress” in our docs. I wrote up why this exact test matters
here: https://queryra.com/blog/wordpress-search-plugin-not-working-theme-override - Then apply one facet and send me the resulting URL plus what you see. Did the set
shrink sensibly, or turn into something else? Did the order change?
With those two things I can tell you what is actually happening and what to change.
Without them, either of us is guessing.One more question, because it might make this much simpler: is the filtering meant
to happen on the search results page itself, or on a separate directory archive that
is not a search page? If the facets live on the archive and search is its own
surface, the two never collide and there is nothing to reconcile.I do work through compatibility testing for other plugins, but the queue is long and
honest timing on FacetWP from my side would be weeks. The route above gets you an
answer this week.Rafał
Hi Joe,
Following up because the latest version changes the answer for you.
Queryra can now filter its own search results while keeping the semantic order intact — you pass a filter alongside the query and it narrows the result set before the ranking is finalised, so faceting no longer means losing the semantic sort. That’s the thing you were worried about, and it’s the cleaner path than having FacetWP re-filter Queryra’s output.
One important scope note, because it decides whether this fits your directory. It filters by taxonomies and by category/tag/brand. Meta Box text fields are searchable but are not yet available as filters. So the deciding question is: are the company attributes people filter on stored as taxonomies, or as Meta Box custom fields? If taxonomies — this works today. If custom fields — that’s the part not yet covered, and worth knowing before you build around it.
For FacetWP specifically: your developer can use the
queryra_result_idshook to intersect FacetWP’s selection with Queryra’s results in PHP, which keeps the ranking. The two-step test I mentioned still gives you the definitive answer for your exact stack.Marking this resolved for now since the capability is in place — but tell me which way your filters are stored and I’m happy to go deeper, or open a new thread anytime.
Rafał
Hi Joe,
Short follow-up, because the question I left you with now answers itself.
Version 1.5.3 adds a Search filters section under Queryra → Support. It lists the filter parameters for your site with the real values read from your own catalogue next to each one, and where a taxonomy is empty it says so. So rather than working out which of your company attributes are taxonomies and which are Meta Box fields, you can open that panel and see exactly what is filterable on your directory.
One rule that catches people out: the value is the term name, not the slug.
Legal%20Servicesworks,legal-servicesreturns nothing.Worked examples and the rest of the rules: https://queryra.com/blog/…
Rafał
- Before touching any facet, run a plain search by typing this straight into the
You must be logged in to reply to this topic.