Filtering by nonexistent value returns all results

My query:
{
engine_key: 'ENGINE_KEY',
q: '',
page: 1,
per_page: 12,
sort_field: { page: 'published_date' },
filters: {
page: {
search_category: 'How-To Tips & Tricks'
}
}
}

If there are no pages with this search_category tag on the page, it will return all results. If there is 1 page tagged with this search_category, it will return that one page. I would expect no results if no pages are tagged with this category. Is it possible to run a query where no results are returned on a filter that has no matches?

Hi @Ryan_Peters,

I can't reproduce this:

Request:

{
	"engine_key": "",
	"q": "",
	"filters": {
		"page": {
			"title": "nope"
		}
	}
}

Response:

...
"record_count": 0
...

Request:

{
	"engine_key": "",
	"q": "",
	"filters": {
		"page": {
			"title": "Tips and Tricks"
		}
	}
}

Response:

...
"record_count": 1
...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.