Is there a way to retrieve "facet" data, without returning search results?


I’d like to submit a search request, but only get back the “facets” data without the results.

All my objects can have “tags”, as we have a finite amount of tags in our system. Ultimately, I’d like to just submit the search with “facets” set, and return only the “info” block, without the “records” section. Is that possible?

This is achievable with a bit of a work around, though the result response will not be exactly as you’ve described.

Within your request it’s possible to set the per_page search option to 1.

By formatting your request in this fashion, Swiftype will return only (you guessed it) 1 result per page response.

This method will limit the raw response data payload, while still supplying the aggregate facet data you’re looking for.