v1

latestOpenAPI 3.1.0MIT2026-07-17116965.4 KB
Search

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'
            }
          }
        }
      ]
    }
  }
post/pq/{table}/search

Path parameters

tablestring required

Name of the percolate table

Request body

Example request

{
  "query": {
    "percolate": {
      "document": {
        "title": "some text to match"
      }
    }
  }
}

Response

items found

tookinteger

Time taken to execute the search

timed_outboolean

Indicates whether the search operation timed out

{"stackTrail":"components:schemas:searchResponse:properties:aggregations","oasType":"schema","type":"unknown","description":"Aggregated search results grouped by the specified criteria. Each named aggregation typically contains a `buckets` array (or keyed map) of bucket objects with `key`, `doc_count`, and optional `status`.\n","example":{"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"}]}}}
profileobject

Profile information about the search execution, if profiling is enabled

scrollstring

Scroll token to be used fo pagination

warningobject

Warnings encountered during the search operation

conversation_uuidstring

Existing or generated conversation id (conversational search)

user_querystring

Original user query (conversational search)

search_querystring

Standalone search query used for KNN retrieval (conversational search)

responsestring

LLM answer as generated (conversational search)

sourcesstring

JSON string containing retrieved source rows used as LLM context (conversational search).

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"
}