Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elasticsearch / API / Allow ndjson for _msearch endpoint
Some libraries/apps are using `_msearch` endpoint which can allow both `application/json` or `application/x-ndjson` content type. When ndjson is used, the API call is not forwarded to Elasticsearch ``` ERROR [geonetwork] - Content type 'application/x-ndjson' not supported ``` Cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html eg. ``` curl -L 'https://apps.titellus.net/geonetwork/mapstore/api/search/records/_msearch?' \ -H 'accept: application/json' \ -H 'content-type: application/x-ndjson' \ --data-raw $'{"preference":"cardQuickFilter_2"}\n{"query":{"bool":{"must":[{"bool":{"must":[{"query_string":{"query":"+(resourceType:application) -(th_infraSIG.default:Reporting_INSPIRE) -(cl_status.key:obsolete)"}}]}}]}},"size":0,"_source":{"includes":["*"],"excludes":[]},"aggs":{"th_Themes_geoportail_wallon_hierarchy.default":{"terms":{"field":"th_Themes_geoportail_wallon_hierarchy.default","size":100,"order":{"_count":"desc"}}}}}\n' ```
- Loading branch information