jsonapi
jsonapi copied to clipboard
Filter across content types via /search?
I'm accessing a bolt site with 3 contenttypes, all of which have a 'groups' taxonomy. I'd like to request all the content with a particular group, across all contenttypes.
A simple /json/search?q=gwf does a search across all properties in all content, but returns content with the string in its title or similar, as well as those for which it is their group
but when I try to specifically filter group by this string: /json/search?q=filter[groups]=gwf it returns no results I know such content exists because /json/pages/?filter[groups]=gwf returns results
Is this intended/expected behaviour? If so could I request a feature for it to become possible to filter all content for that which has a certain property which matches the string?
search
only works with q
, everything else is ignored.
Yes, this is intended/expected.
If so could I request a feature for it to become possible to filter all content for that which has a certain property which matches the string?
Unfortunately, the taxonomy queries are not implemented extensively. I'm afraid I don't have much time to work on this, so I don't want to make any promises. Pull requests appreciated.
In the meantime, I think you're better off doing three separate calls on this one and merge the results (depending on what you're doing with the results, this may not work).
thank you so much for the response sadly separate queries would be incredibly inefficient for our purposes, and would only get worse with scale, but will investigate contributing :)