GET /es/api/v1/typeahead/?q=query&from=0&fetch_fields=field1,field2&scroll=1m
{ "took": 29, "timed_out": false, "total": 87, "max_score": 9.226555, "hits": [...] }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
This endpoint serves as a GAIA API and acts as a wrapper for a specific pipeline "typeahead". It executes the search with the provided parameters.
Name | Type | Description | Required |
---|---|---|---|
q | string | String query to execute in the search engine | No |
size | integer | Number of hits to return per request | No |
from | integer | Start position for retrieving hits | No |
page | integer | Start page for retrieving hits. Minimum page is 1. Not applicable when from is being used | No |
fetch_fields | array | List of fields to return in the response based on field values | No |
scroll | string | Period to retain the search context for scrolling | No |
default_operator | string | The default operator for query string query: AND or OR | No |
exclude_fields | array | List of fields to exclude in the response based on field values | No |
POST /es/api/v1/typeahead/ { "q": "query", "size": 10, "from": 0, "fetch_fields": ["field1", "field2"], "scroll": "1m" }
{ "took": 29, "timed_out": false, "total": 87, "max_score": 9.226555, "hits": [...] }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }