Code Block | ||
---|---|---|
| ||
GET /es/api/v1/search/?q=query&size=10&from=0&fetch_fields=field1,field2&scroll=1m |
Code Block |
---|
{ "aggregations": [ ... ], "hits": [ { "body": [ ... ], "header": [], "title": {...}, "sub_title": {...}, "id": "unique_id" } ], "total": 10000 } |
Code Block |
---|
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] } |
GAIA API endpoint, working as a wrapper for a specific pipeline, which will execute with the provided body. The main goal of this endpoint is to serve as an example of how static, well-defined endpoints can be created with a flexible and configurable backend.
Note |
---|
The starting body provided by Swagger are almost the minimum (the minimum being just q), for more options please check the schema. |
Warning |
---|
Remove this endpoint or update the pipeline it is using; this endpoint is not intended for production. |
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 |
debug_search | string | Add/Remove "search" results from final response. ('True' or 'False') | No |
allow_empty_query | boolean | Allow empty queries to be searched (e.g. " ", "*", "*.*") | No |
Code Block | ||
---|---|---|
| ||
POST /es/api/v1/search/ { "q": "query", "size": 10, "from": 0, "fetch_fields": ["field1", "field2"], "scroll": "1m" } |
Code Block |
---|
{ "aggregations": [ ... ], "hits": [ { "body": [ ... ], "header": [], "title": {...}, "sub_title": {...}, "id": "unique_id" } ], "total": 10000 } |
Code Block |
---|
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] } |
GAIA API endpoint, working as a wrapper for a specific pipeline "search_metadata", which will execute with the provided body. This endpoint will fetch the specific document id for the metadata specified in the pipeline
Note |
---|
The starting body provided by Swagger are almost the minimum (the minimum being just q), for more options please check the schema. |
Warning |
---|
Remove this endpoint or update the pipeline it is using; this endpoint is not intended for production. |
Name | Type | Description |
---|---|---|
doc_id | string | Document ID |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/search/metadata/{doc_id} |
Code Block |
---|
{ "body": [ ... ], "header": [], "title": {...}, "sub_title": {...}, "id": "unique_id" } |
Code Block |
---|
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] } |