Perform reverse search on a percolate table
Performs a percolate search. This method must be used only on percolate tables. Expects two parameters: the table name and an object with array of documents to be tested. An example of the documents object: ``` { "query" { "percolate": { "document": { "content":"sample content" } } } }
Responds with an object with matched stored queries: ```
{
'timed_out':false,
'hits': {
'total':2,
'max_score':1,
'hits': [
{
'table':'idx_pq_1',
'_type':'doc',
'_id':'2',
'_score':'1',
'_source': {
'query': {
'match':{'title':'some'}
}
}
},
{
'table':'idx_pq_1',
'_type':'doc',
'_id':'5',
'_score':'1',
'_source': {
'query': {
'ql':'some | none'
}
}
}
]
}
}
Path parameters
Name of the percolate table
Request body
Example request
{
"query": {
"percolate": {
"document": {
"title": "some text to match"
}
}
}
}Response
items found
Example response
{
"hits": {
"total": 2,
"hits": [
{
"_id": 1,
"_score": 1,
"_source": {
"gid": 11
}
},
{
"_id": 2,
"_score": 1,
"_source": {
"gid": 20
}
}
]
},
"took": 0,
"user_query": "What is vector search?",
"sources": "[{\"id\":1,\"title\":\"Vector Search\",\"content\":\"...\",\"knn_dist\":0.12}]",
"response": "Vector search finds similar items by comparing embeddings...",
"profile": "{}",
"scroll": "scroll",
"warning": "{}",
"timed_out": true,
"search_query": "vector search, embeddings, similarity search",
"aggregations": {
"sizes": {
"buckets": [
{
"key": "small",
"doc_count": 1,
"status": "selected"
},
{
"key": "large",
"doc_count": 1,
"status": "available"
}
]
},
"colors": {
"buckets": [
{
"key": 10,
"doc_count": 1019
},
{
"key": 9,
"doc_count": 954,
"status": "unavailable"
}
]
}
},
"conversation_uuid": "docs-chat-001"
}Changes
Changed in 6 of the 13 revisions of this API.71515
- ▲
the
hits/hits/items/_idresponse's property type/format changed frominteger/uint64to/for status200response-property-type-changed
- ○
added
documentIdto thehits/hits/items/_idresponse propertyallOflist for the response status200response-property-all-of-added
- ▲
- ▲
the
aggregationsresponse's property type/format changed fromobject/to/for status200response-property-type-changed
- ○
added the optional property
conversation_uuidto the response with the200statusresponse-optional-property-added
- ○
added the optional property
responseto the response with the200statusresponse-optional-property-added
- ○
added the optional property
search_queryto the response with the200statusresponse-optional-property-added
- ○
added the optional property
sourcesto the response with the200statusresponse-optional-property-added
- ○
added the optional property
user_queryto the response with the200statusresponse-optional-property-added
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the
hits/hits/items/_idresponse's property type/format changed frominteger/uuint64tointeger/uint64for status200response-property-type-changed
- ▲
- ▲
the
hits/hits/items/_idresponse's property type/format changed frominteger/int64tointeger/uuint64for status200response-property-type-changed
- ▲
- ▲
the
hits/hits/items/response's property type/format changed fromobject/to/for status200response-property-type-changed
- ○
added the optional property
hits/hits/items/_idto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/_knn_distto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/_scoreto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/_sourceto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/_type:to the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/fieldsto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/highlightto the response with the200statusresponse-optional-property-added
- ○
added the optional property
hits/hits/items/tableto the response with the200statusresponse-optional-property-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the
aggregationsresponse's property type/format changed from/toobject/for status200response-property-type-changed
- ▲
the
hits/hits/items/response's property type/format changed from/toobject/for status200response-property-type-changed
- ●
removed the optional property
conversation_uuidfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
error/oneOf[responseErrorDetails]/tablefrom the response with thedefaultstatusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/_idfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/_knn_distfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/_scorefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/_sourcefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/_type:from the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/fieldsfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/highlightfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
hits/hits/items/tablefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
responsefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
scrollfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
search_queryfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
sourcesfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
user_queryfrom the response with the200statusresponse-optional-property-removed
- ○
added the optional property
error/oneOf[responseErrorDetails]/indexto the response with thedefaultstatusresponse-optional-property-added
This revision also has 33 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲