Search Multi Index

This method allows to send multiple search queries, potentially targeting multiple indices, in a single API call.

POST /search/v1/indexes/*/queries

Request body Parameters

requests

list required

A list of queries. Each query is defined with the following properties:

  • indexName name of the index to target.
  • params the search parameters as defined in the [search parameters](search-parameters) page.

Examples

curl -X POST "https://api.clinia.ca/search/v1/indexes/*meta*/queries" \
-H "Content-Type: application/json" \
-H "X-Clinia-Engine-Id: ${ENGINE_ID}" \
-H "X-Clinia-API-Key: ${API_KEY}" \
--data-binary '{ "requests": [
{"indexName": "meta", "params": { "query": "jean coutu" } },
{"indexName": "pharmacy", "params": { "query": "jean coutu" } }
]
}'
{
"results": [
{
"hits": [],
"meta": {
"indexName": "meta"
},
"facets": {}
},
{
"hits": [],
"meta": {
"indexName": "pharmacy"
},
"facets": {}
}
]
}