Reputation: 3
I would need to filter some items present in the GSA index when serving results. I would need to exclude all items that have an empty value (so no value) in a specific metafield (xTopic).
I have tried adding the &requiredfields=-xTopic:
to the search url but this doesn't work (the search is working fine).
Any ideas if it is possible at all and what the syntax would be?
Upvotes: 0
Views: 324
Reputation: 3
Ok, in case anyone needs this in the future - I was able to find the solution. It is true you cannot exclude any items that don't have value in a certain metatag. But, you can include only items that do have any value. So I was able to accomplish filtering by adding .xTopic (note that colon is missing -that was the part that I missed initially).
Upvotes: 0
Reputation: 91
As far as I know, it's only possible to retrieve results with metadata-inclusions and not with exclusions. A few ideas:
Furthermore at least I don't have any other creative ideas. You could at least file a feature request at Google, I also filed this one a few weeks ago. The more the better!
Upvotes: 0