The trick is to write a simple template in your theme to render the JSON you need in response to that JSON view. Just create the file templates/search.json.liquid
, which can be as simple as the following:
{% layout none %}
{{ search.results | json }}