Skip to content

Commit

Permalink
docs: es6+ requires a content-type for search queries (#4099)
Browse files Browse the repository at this point in the history
  • Loading branch information
grmartin authored Oct 23, 2023
1 parent 36a726c commit fe83486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In addition to running search queries through the Discovery API, you can make HT
.. code-block:: bash
$ curl 'edx.devstack.elasticsearch:9200/_cat/indices?v'
$ curl 'edx.devstack.elasticsearch:9200/catalog/_search?pretty=true' -d '{"explain": true, "query": {YOUR QUERY HERE}}'
$ curl 'edx.devstack.elasticsearch:9200/catalog/_search?pretty=true' -d '{"explain": true, "query": {YOUR QUERY HERE}}' -H 'Content-Type: application/json'
The `explain`_ parameter tells Elasticsearch to return a detailed breakdown of how relevance scores were calculated. You can get yourself a query to run by intercepting queries made by the application. Add logging to ``course_discovery/apps/edx_haystack_extensions/backends.py::SimpleQuerySearchBackendMixin::build_search_kwargs`` that prints the final value of ``search_kwargs``, then run a search query through the API.

Expand Down

0 comments on commit fe83486

Please sign in to comment.