openapi: 3.1.0
info:
contact:
email: info@manticoresearch.com
name: Manticore Software Ltd.
url: https://manticoresearch.com/contact-us/
description: |
Сlient for Manticore Search.
license:
name: MIT
url: http://opensource.org/licenses/MIT
title: Manticore Search Client
version: 5.0.0
externalDocs:
description: Find out more about Manticore Search
url: https://manticoresearch.com/
servers:
- description: Default Manticore Search HTTP
url: http://127.0.0.1:9308/
tags:
- description: "Operations regarding adding, updating or deleting documents"
name: Index
- description: Operations about performing searches over indexes
name: Search
- description: Various operations
name: Utils
paths:
/search:
post:
description: |2
The method expects an object with the following mandatory properties:
* the name of the index to search
* the match query object
For details, see the documentation on [**SearchRequest**](SearchRequest.md)
The method returns an object with the following properties:
- took: the time taken to execute the search query. - timed_out: a boolean indicating whether the query timed out. - hits: an object with the following properties:
- total: the total number of hits found.
- hits: an array of hit objects, where each hit object represents a matched document. Each hit object has the following properties:
- _id: the ID of the matched document.
- _score: the score of the matched document.
- _source: the source data of the matched document.
In addition, if profiling is enabled, the response will include an additional array with profiling information attached.
Here is an example search response:
```
{
'took':10,
'timed_out':false,
'hits':
{
'total':2,
'hits':
[
{'_id':'1','_score':1,'_source':{'gid':11}},
{'_id':'2','_score':1,'_source':{'gid':12}}
]
}
}
```
For more information about the match query syntax and additional parameters that can be added to request and response, please see the documentation [here](https://manual.manticoresearch.com/Searching/Full_text_matching/Basic_usage#HTTP-JSON).
externalDocs:
url: https://manual.manticoresearch.com/Searching/Full_text_matching/Basic_usage#HTTP-JSON
operationId: search
requestBody:
content:
application/json:
example:
- "'request=SearchRequest(index=\"test\",query=Query(query_string=\"abc\"\
))'"
schema:
$ref: '#/components/schemas/searchRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/searchResponse'
description: Ok
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Performs a search on an index
tags:
- Search
x-is_search: true
/bulk:
post:
description: "Sends multiple operatons like inserts, updates, replaces or deletes.\
\ \nFor each operation it's object must have same format as in their dedicated\
\ method. \nThe method expects a raw string as the batch in NDJSON.\n Each\
\ operation object needs to be serialized to \n JSON and separated by endline\
\ (\\n). \n \n An example of raw input:\n \n ```\n {\"insert\": {\"index\"\
: \"movies\", \"doc\": {\"plot\": \"A secret team goes to North Pole\", \"\
rating\": 9.5, \"language\": [2, 3], \"title\": \"This is an older movie\"\
, \"lon\": 51.99, \"meta\": {\"keywords\":[\"travel\",\"ice\"],\"genre\":[\"\
adventure\"]}, \"year\": 1950, \"lat\": 60.4, \"advise\": \"PG-13\"}}}\n \
\ \\n\n {\"delete\": {\"index\": \"movies\",\"id\":700}}\n ```\n \n Responds\
\ with an object telling whenever any errors occured and an array with status\
\ for each operation:\n \n ```\n {\n 'items':\n [\n {\n \
\ 'update':{'_index':'products','_id':1,'result':'updated'}\n },\n\
\ {\n 'update':{'_index':'products','_id':2,'result':'updated'}\n\
\ }\n ],\n 'errors':false\n }\n ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Updating_documents/UPDATE
operationId: bulk
requestBody:
content:
application/x-ndjson:
schema:
type: string
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/bulkResponse'
description: item updated
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Bulk index operations
tags:
- Index
/delete:
post:
description: "Delete one or several documents.\nThe method has 2 ways of deleting:\
\ either by id, in case only one document is deleted or by using a match\
\ query, in which case multiple documents can be delete .\nExample of input\
\ to delete by id:\n\n ```\n {'index':'movies','id':100}\n ```\n\nExample\
\ of input to delete using a query:\n\n ```\n {\n 'index':'movies',\n\
\ 'query':\n {\n 'bool':\n {\n 'must':\n [\n\
\ {'query_string':'new movie'}\n ]\n }\n }\n }\n\
\ ```\n\nThe match query has same syntax as in for searching.\nResponds with\
\ an object telling how many documents got deleted: \n\n ```\n {'_index':'products','updated':1}\n\
\ ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Updating_documents/UPDATE
operationId: delete
requestBody:
content:
application/json:
example:
index: test
query:
match:
title: apple
schema:
$ref: '#/components/schemas/deleteDocumentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/deleteResponse'
description: item updated
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Delete a document in an index
tags:
- Index
/insert:
post:
description: "Insert a document. \nExpects an object like:\n \n ```\n {\n\
\ 'index':'movies',\n 'id':701,\n 'doc':\n {\n 'title':'This\
\ is an old movie',\n 'plot':'A secret team goes to North Pole',\n \
\ 'year':1950,\n 'rating':9.5,\n 'lat':60.4,\n 'lon':51.99,\n\
\ 'advise':'PG-13',\n 'meta':'{\"keywords\":{\"travel\",\"ice\"\
},\"genre\":{\"adventure\"}}',\n 'language':[2,3]\n }\n }\n ```\n\
\ \nThe document id can also be missing, in which case an autogenerated one\
\ will be used:\n \n ```\n {\n 'index':'movies',\n 'doc':\n\
\ {\n 'title':'This is a new movie',\n 'plot':'A secret team\
\ goes to North Pole',\n 'year':2020,\n 'rating':9.5,\n 'lat':60.4,\n\
\ 'lon':51.99,\n 'advise':'PG-13',\n 'meta':'{\"keywords\"\
:{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}',\n 'language':[2,3]\n\
\ }\n }\n ```\n \nIt responds with an object in format:\n \n ```\n\
\ {'_index':'products','_id':701,'created':true,'result':'created','status':201}\n\
\ ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Adding_documents_to_an_index/Adding_documents_to_a_real-time_index#Adding-documents-to-a-real-time-index
operationId: insert
requestBody:
content:
application/json:
example:
index: test
id: 1
doc:
title: sample title
gid: 10
schema:
$ref: '#/components/schemas/insertDocumentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/successResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Create a new document in an index
tags:
- Index
x-is_indexapi: true
x-is_insert: true
/pq/{index}/search:
post:
description: "Performs a percolate search. \nThis method must be used only on\
\ percolate indexes.\n\nExpects two parameters: the index name and an object\
\ with array of documents to be tested.\nAn example of the documents object:\n\
\n ```\n {\n \"query\":\n {\n \"percolate\":\n {\n \
\ \"document\":\n {\n \"content\":\"sample content\"\n \
\ }\n }\n }\n }\n ```\n\nResponds with an object with matched\
\ stored queries: \n\n ```\n {\n 'timed_out':false,\n 'hits':\n \
\ {\n 'total':2,\n 'max_score':1,\n 'hits':\n [\n \
\ {\n '_index':'idx_pq_1',\n '_type':'doc',\n \
\ '_id':'2',\n '_score':'1',\n '_source':\n \
\ {\n 'query':\n {\n 'match':{'title':'some'}\n\
\ }\n }\n },\n {\n '_index':'idx_pq_1',\n\
\ '_type':'doc',\n '_id':'5',\n '_score':'1',\n\
\ '_source':\n {\n 'query':\n {\n\
\ 'ql':'some | none'\n }\n }\n }\n\
\ ]\n }\n }\n ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Updating_documents/UPDATE
operationId: percolate
parameters:
- description: Name of the percolate index
explode: false
in: path
name: index
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
example:
query:
percolate:
document:
title: some text to match
schema:
$ref: '#/components/schemas/percolateRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/searchResponse'
description: items found
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Perform reverse search on a percolate index
tags:
- Search
/replace:
post:
description: |
Replace an existing document. Input has same format as `insert` operation.
Responds with an object in format:
```
{'_index':'products','_id':1,'created':false,'result':'updated','status':200}
```
externalDocs:
url: https://manual.manticoresearch.com/Adding_documents_to_an_index/Adding_documents_to_a_real-time_index#Adding-documents-to-a-real-time-index
operationId: replace
requestBody:
content:
application/json:
example:
index: test
id: 1
doc:
title: updated title
gid: 15
schema:
$ref: '#/components/schemas/insertDocumentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/successResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Replace new document in an index
tags:
- Index
x-is_indexapi: true
x-is_replace: true
/sql:
post:
description: |
Run a query in SQL format.
Expects a query string passed through `body` parameter and optional `raw_response` parameter that defines a format of response.
`raw_response` can be set to `False` for Select queries only, e.g., `SELECT * FROM myindex`
The query string must stay as it is, no URL encoding is needed.
The response object depends on the query executed. In select mode the response has same format as `/search` operation.
externalDocs:
url: https://manual.manticoresearch.com/Connecting_to_the_server/HTTP#sql-api
operationId: sql
parameters:
- description: |
Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'.
explode: true
in: query
name: raw_response
required: false
schema:
default: true
type: boolean
style: form
requestBody:
content:
text/plain:
example: SHOW TABLES
schema:
type: string
description: |
A query parameter string.
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/sqlResponse'
description: |
In case of SELECT-only in mode none the response schema is the same as of `search`.
In case of `mode=raw` or `raw_response=true` the response depends on the query executed.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Perform SQL requests
tags:
- utils
x-is_sql: true
/update:
post:
description: "Update one or several documents.\nThe update can be made by passing\
\ the id or by using a match query in case multiple documents can be updated.\
\ For example update a document using document id:\n\n ```\n {'index':'movies','doc':{'rating':9.49},'id':100}\n\
\ ```\n\nAnd update by using a match query:\n\n ```\n {\n 'index':'movies',\n\
\ 'doc':{'rating':9.49},\n 'query':\n {\n 'bool':\n {\n\
\ 'must':\n [\n {'query_string':'new movie'}\n \
\ ]\n }\n }\n }\n ``` \n\nThe match query has same syntax as\
\ for searching.\nResponds with an object that tells how many documents where\
\ updated in format: \n\n ```\n {'_index':'products','updated':1}\n ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Updating_documents/UPDATE
operationId: update
requestBody:
content:
application/json:
example:
index: test
doc:
gid: 20
query:
equals:
cat_id: 2
schema:
$ref: '#/components/schemas/updateDocumentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/updateResponse'
description: item updated
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Update a document in an index
tags:
- Index
x-is_indexapi: true
x-is_update: true
x-is_modify: true
/{index}/_update/{id}:
post:
description: "Partially replaces a document with given id in an index\nResponds\
\ with an object of the following format: \n\n ```\n {'_index':'products','updated':1}\n\
\ ```\n"
externalDocs:
url: https://manual.manticoresearch.com/Updating_documents/REPLACE#JSON-REPLACE
operationId: partial_replace
parameters:
- description: Name of the percolate index
explode: false
in: path
name: index
required: true
schema:
type: string
style: simple
- description: Id of the document to replace
explode: false
in: path
name: id
required: true
schema:
type: number
style: simple
requestBody:
content:
application/json:
example:
doc:
price: 20
schema:
$ref: '#/components/schemas/replaceDocumentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/updateResponse'
description: item updated
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
description: error
summary: Partially replaces a document in an index
tags:
- Index
components:
examples:
objectExample:
summary: A sample object
value: www
schemas:
aggCompositeTerm:
additionalProperties: false
description: Object representing a term to be used in composite aggregation.
properties:
field:
description: Name of field to operate with
example: field1
type: string
required:
- field
aggCompositeSource:
additionalProperties: false
description: Object containing terms used for composite aggregation.
properties:
terms:
$ref: '#/components/schemas/aggCompositeTerm'
required:
- terms
aggComposite:
additionalProperties: false
description: "Object to perform composite aggregation, i.e., grouping search\
\ results by multiple fields"
properties:
size:
description: Maximum number of composite buckets in the result
example: 1000
type: integer
sources:
items:
additionalProperties:
$ref: '#/components/schemas/aggCompositeSource'
description: List of objects that contain terms used for composite aggregation.
type: array
aggTerms:
additionalProperties: false
description: Object containing term fields to aggregate on
properties:
field:
description: Name of attribute to aggregate by
example: field1
type: string
size:
description: Maximum number of buckets in the result
example: 1000
type: integer
required:
- field
aggregation:
allOf:
- description: Object used for grouping search results
properties:
terms:
$ref: '#/components/schemas/aggTerms'
sort:
items: {}
type: array
composite:
$ref: '#/components/schemas/aggComposite'
knnQuery:
description: Object representing a k-nearest neighbor search query
properties:
field:
description: Field to perform the k-nearest neighbor search on
type: string
k:
description: The number of nearest neighbors to return
type: integer
query_vector:
description: The vector used as input for the KNN search
items:
type: number
type: array
doc_id:
description: The docuemnt ID used as input for the KNN search
format: int64
type: integer
ef:
description: Optional parameter controlling the accuracy of the search
type: integer
filter:
$ref: '#/components/schemas/queryFilter'
required:
- field
- k
geoDistance:
additionalProperties: {}
description: Object to perform geo-distance based filtering on queries
properties:
location_anchor:
$ref: '#/components/schemas/geoDistance_location_anchor'
location_source:
description: Field name in the document that contains location data
distance_type:
description: Algorithm used to calculate the distance
enum:
- adaptive
- haversine
distance:
description: The distance from the anchor point to filter results by
pattern: /^\.+(km|m|cm|mm|mi|yd|ft|in|NM|nmi|kilometers|meters|centimeters|millimeters|miles|yards|foots|inches|nauticalmiles|)$/
searchQuery:
allOf:
- $ref: '#/components/schemas/queryFilter'
- properties:
highlight:
$ref: '#/components/schemas/highlight'
description: Defines a query structure for performing search operations
searchRequest:
description: Request object for search operation
example:
index: your_index
query:
query_string: your_query
properties:
index:
description: The index to perform the search on
type: string
query:
$ref: '#/components/schemas/searchQuery'
join:
description: Join clause to combine search data from multiple tables
items:
$ref: '#/components/schemas/join'
type: array
highlight:
$ref: '#/components/schemas/highlight'
limit:
description: Maximum number of results to return
type: integer
knn:
$ref: '#/components/schemas/knnQuery'
aggs:
additionalProperties:
$ref: '#/components/schemas/aggregation'
description: Defines aggregation settings for grouping results
example:
agg1:
terms:
field: field1
size: 1000
sort:
- field1: null
order: asc
expressions:
additionalProperties:
type: string
description: Expressions to calculate additional values for the result
example:
title_len: crc32(title)
max_matches:
description: Maximum number of matches allowed in the result
type: integer
offset:
description: Starting point for pagination of the result
type: integer
options:
description: Additional search options
type: object
profile:
description: Enable or disable profiling of the search request
type: boolean
sort: {}
_source: {}
track_scores:
description: Enable or disable result weight calculation used for sorting
type: boolean
required:
- index
queryFilterAlias1:
$ref: '#/components/schemas/queryFilter'
queryFilterAlias2:
$ref: '#/components/schemas/queryFilter'
boolFilter:
additionalProperties: false
properties:
must:
description: Query clauses that must match for the document to be included
items:
$ref: '#/components/schemas/queryFilter'
type: array
must_not:
description: Query clauses that must not match for the document to be included
items:
$ref: '#/components/schemas/queryFilterAlias1'
type: array
should:
description: "Query clauses that should be matched, but are not required"
items:
$ref: '#/components/schemas/queryFilterAlias2'
type: array
bulkResponse:
description: Success response for bulk search requests
example:
current_line: 0
skipped_lines: 6
error: error
items:
- "{}"
- "{}"
errors: true
properties:
items:
description: List of results
items:
type: object
type: array
errors:
description: Errors occurred during the bulk operation
type: boolean
error:
description: Error message describing an error if such occurred
type: string
current_line:
description: Number of the row returned in the response
type: integer
skipped_lines:
description: Number of rows skipped in the response
type: integer
deleteDocumentRequest:
description: |
Payload for delete request.
Documents can be deleted either one by one by specifying the document id or by providing a query object.
For more information see [Delete API](https://manual.manticoresearch.com/Deleting_documents)
example:
index: test
id: 1
properties:
index:
description: Index name
type: string
cluster:
description: Cluster name
type: string
id:
description: The ID of document for deletion
format: int64
type: integer
query:
description: Defines the criteria to match documents for deletion
type: object
required:
- index
deleteResponse:
description: Response object for successful delete request
example:
_index: test
deleted: 29
properties:
_index:
description: The name of the index from which the document was deleted
type: string
deleted:
description: Number of documents deleted
type: integer
_id:
description: "The ID of the deleted document. If multiple documents are\
\ deleted, the ID of the first deleted document is returned"
format: int64
type: integer
found:
description: Indicates whether any documents to be deleted were found
type: boolean
result:
description: "Result of the delete operation, typically 'deleted'"
type: string
highlight:
allOf:
- description: Defines a query HIGHLIGHT expression to emphasize matched results
properties:
after_match:
default:
description: "Text inserted after the matched term, typically used for\
\ HTML formatting"
type: string
allow_empty:
description: "Permits an empty string to be returned as the highlighting\
\ result. Otherwise, the beginning of the original text would be returned"
type: boolean
around:
description: Number of words around the match to include in the highlight
type: integer
before_match:
default:
description: "Text inserted before the match, typically used for HTML\
\ formatting"
type: string
emit_zones:
description: Emits an HTML tag with the enclosing zone name before each
highlighted snippet
type: boolean
encoder:
description: "If set to 'html', retains HTML markup when highlighting"
enum:
- default
- html
type: string
fields:
nullable: true
type: object
force_all_words:
description: Ignores the length limit until the result includes all keywords
type: boolean
force_snippets:
description: Forces snippet generation even if limits allow highlighting
the entire text
type: boolean
highlight_query:
$ref: '#/components/schemas/queryFilter'
html_strip_mode:
description: Defines the mode for handling HTML markup in the highlight
enum:
- none
- strip
- index
- retain
type: string
limits_per_field:
description: "Determines whether the 'limit', 'limit_words', and 'limit_snippets'\
\ options operate as individual limits in each field of the document"
type: boolean
no_match_size:
description: "If set to 1, allows an empty string to be returned as a\
\ highlighting result"
enum:
- 0
- 1
type: integer
order:
description: Sets the sorting order of highlighted snippets
enum:
- asc
- desc
- score
type: string
pre_tags:
default:
description: Text inserted before each highlighted snippet
type: string
post_tags:
default:
description: Text inserted after each highlighted snippet
type: string
start_snippet_id:
description: Sets the starting value of the %SNIPPET_ID% macro
type: integer
use_boundaries:
description: Defines whether to additionally break snippets by phrase
boundary characters
type: boolean
- $ref: '#/components/schemas/highlightFieldOption'
highlightFieldOption:
additionalProperties: false
description: Options for controlling the behavior of highlighting on a per-field
basis
properties:
fragment_size:
description: Maximum size of the text fragments in highlighted snippets
per field
type: integer
limit:
description: Maximum size of snippets per field
type: integer
limit_snippets:
description: Maximum number of snippets per field
type: integer
limit_words:
description: Maximum number of words per field
type: integer
number_of_fragments:
description: Total number of highlighted fragments per field
type: integer
insertDocumentRequest:
description: |
Object containing data for inserting a new document into the index
example:
index: test
doc:
title: This is some title
gid: 100
properties:
index:
description: Name of the index to insert the document into
type: string
cluster:
description: Name of the cluster to insert the document into
type: string
id:
description: |
Document ID. If not provided, an ID will be auto-generated
format: int64
type: integer
doc:
additionalProperties: false
description: |
Object containing document data
type: object
required:
- doc
- index
joinOn:
allOf:
- additionalProperties: false
properties:
right:
$ref: '#/components/schemas/joinCond'
- additionalProperties: false
properties:
left:
$ref: '#/components/schemas/joinCond'
- additionalProperties: false
description: Defines joined tables
properties:
operator:
enum:
- eq
type: string
join:
allOf:
- additionalProperties: false
description: Object representing the join operation between two tables
properties:
type:
description: Type of the join operation
enum:
- inner
- left
type: string
"on":
description: List of objects defining joined tables
items:
$ref: '#/components/schemas/joinOn'
type: array
query:
$ref: '#/components/schemas/fulltextFilter'
table:
description: Basic table of the join operation
type: string
required:
- "on"
- table
- type
joinCond:
additionalProperties: false
description: Object representing the conditions used to perform the join operation
properties:
field:
description: Field to join on
type: string
table:
description: Joined table
type: string
type: {}
required:
- field
- table
match:
description: Filter helper object defining a match keyword and match options
properties:
query:
type: string
operator:
enum:
- or
- and
type: string
boost:
type: number
required:
- query
match_all:
description: Filter helper object defining the 'match all'' condition
properties:
_all:
enum:
- "{}"
type: string
required:
- _all
range:
description: Filter helper object defining the 'range' condition
properties:
lt: {}
lte: {}
gt: {}
gte: {}
fulltextFilter:
additionalProperties: false
description: Defines a type of filter for full-text search queries
properties:
query_string:
description: Filter object defining a query string
type: string
match:
description: Filter object defining a match keyword passed as a string or
in a Match object
type: object
match_phrase:
description: Filter object defining a match phrase
type: object
match_all:
description: Filter object to select all documents
type: object
queryFilter:
allOf:
- $ref: '#/components/schemas/fulltextFilter'
- additionalProperties: false
properties:
bool:
$ref: '#/components/schemas/boolFilter'
equals: {}
in:
description: Filter to match a given set of attribute values.
type: object
range:
description: Filter to match a given range of attribute values passed
in Range objects
type: object
geo_distance:
$ref: '#/components/schemas/geoDistance'
description: "Object used to apply various conditions, such as full-text matching\
\ or attribute filtering, to a search query"
replaceDocumentRequest:
description: Object containing the document data for replacing an existing document
in an index.
example:
doc:
title: This is some title
gid: 100
properties:
doc:
additionalProperties: false
description: Object containing the new document data to replace the existing
one.
type: object
required:
- doc
sourceRules:
additionalProperties: {}
description: Defines which fields to include or exclude in the response for
a search query
example:
includes:
- attr1
- attri*
excludes:
- desc*
minProperties: 1
properties:
includes:
default: []
description: List of fields to include in the response
items:
type: string
excludes:
default:
- ""
description: List of fields to exclude from the response
items:
type: string
successResponse:
description: "Response object indicating the success of an operation, such as\
\ inserting or updating a document"
example:
_index: test
_id: 1
result: created
created: true
status: 201
properties:
_index:
description: Name of the document index
type: string
table:
description: Name of the document table (alias of index)
type: string
_id:
description: ID of the document affected by the request operation
format: int64
type: integer
created:
description: Indicates whether the document was created as a result of the
operation
type: boolean
result:
description: "Result of the operation, typically 'created', 'updated', or\
\ 'deleted'"
type: string
found:
description: Indicates whether the document was found in the index
type: boolean
status:
description: HTTP status code representing the result of the operation
type: integer
percolateRequest:
description: Object containing the query for percolating documents against stored
queries in a percolate index
properties:
query:
$ref: '#/components/schemas/percolateRequest_query'
required:
- query
searchResponse:
description: Response object containing the results of a search request
example:
hits:
total: 2
hits:
- _id: 1
_score: 1
_source:
gid: 11
- _id: 2
_score: 1
_source:
gid: 20
took: 0
profile: "{}"
warning: "{}"
timed_out: true
aggregations: "{}"
properties:
took:
description: Time taken to execute the search
type: integer
timed_out:
description: Indicates whether the search operation timed out
type: boolean
aggregations:
additionalProperties: false
description: Aggregated search results grouped by the specified criteria
type: object
hits:
$ref: '#/components/schemas/searchResponse_hits'
profile:
description: "Profile information about the search execution, if profiling\
\ is enabled"
type: object
warning:
additionalProperties: false
description: Warnings encountered during the search operation
type: object
responseError:
oneOf:
- $ref: '#/components/schemas/responseErrorDetails'
- $ref: '#/components/schemas/responseErrorText'
responseErrorDetails:
description: Detailed error information returned in case of an error response
properties:
type:
description: Type or category of the error
type: string
reason:
description: Detailed explanation of why the error occurred
nullable: true
type: string
index:
description: "The index related to the error, if applicable"
nullable: true
type: string
required:
- type
responseErrorText:
description: Error message text returned in case of an error
type: string
errorResponse:
description: Error response object containing information about the error and
a status code
example:
status: 500
error: an error occured
properties:
error:
$ref: '#/components/schemas/responseError'
status:
default: 500
description: HTTP status code of the error response
type: integer
required:
- error
sqlRawResponse:
items:
type: object
type: array
sqlObjResponse:
type: object
sqlResponse:
description: List of responses from executed SQL queries
example:
- total: 0
error: null
oneOf:
- $ref: '#/components/schemas/sqlRawResponse'
- $ref: '#/components/schemas/sqlObjResponse'
updateDocumentRequest:
description: Payload for updating a document or multiple documents in an index
properties:
index:
description: Name of the document index
type: string
cluster:
description: Name of the document cluster
type: string
doc:
additionalProperties: false
description: Object containing the document fields to update
example:
gid: 10
type: object
id:
description: Document ID
format: int64
type: integer
query:
$ref: '#/components/schemas/queryFilter'
required:
- doc
- index
updateResponse:
description: Success response returned after updating one or more documents
example:
_index: test
updated: 29
properties:
_index:
description: Name of the document index
type: string
updated:
description: Number of documents updated
type: integer
_id:
description: Document ID
format: int64
type: integer
result:
description: "Result of the update operation, typically 'updated'"
type: string
geoDistance_location_anchor:
additionalProperties: false
description: Specifies the location of the pin point used for search
properties:
lat:
description: Latitude of the anchor point
lon:
description: Longitude of the anchor point
percolateRequest_query:
additionalProperties: false
example:
percolate:
document:
title: some text to match
properties:
percolate:
description: Object representing the document to percolate
type: object
required:
- percolate
searchResponse_hits:
description: "Object containing the search hits, which represent the documents\
\ that matched the query."
example:
total: 2
hits:
- _id: 1
_score: 1
_source:
gid: 11
- _id: 2
_score: 1
_source:
gid: 20
properties:
max_score:
description: Maximum score among the matched documents
type: integer
total:
description: Total number of matched documents
type: integer
total_relation:
description: Indicates whether the total number of hits is accurate or an
estimate
type: string
hits:
description: "Array of hit objects, each representing a matched document"
items:
type: object
type: array