Search #

A search query, or query, is a request for information about documents in Pizza collections.

A search consists of one or more queries that are combined and sent to Pizza. Documents that match a search’s queries are returned in the hits, or search results, of the response.

A search may also contain additional information used to better process its queries. For example, a search may be limited to a specific collection or only return a specific number of results.

Examples #

Search all the collections under the default namespace whose names are ended with -logs, fetch the documents whose field year has value 2024:

POST /default.*-logs/_search
  "query": {
    "term": {
      "year": "2024" 

Requests #

POST /<targets>/_search

Path parameters #

  • targets
    (Optional, String) Comma-separated, names of the collection to search (wildcard supported)

Query parameters #

  • from
    (Optional, integer) How many documents to skip, should be non-negative and defaults to 0.

  • size
    (Optional, integer) The maximun number of documents to be returned in hits, defaults to 20.

Term-level queries #

  • prefix query
    Returns documents that contain a specific prefix in a provided field.
  • range query
    Returns documents that contain terms within a provided range.
  • regexp query
    Returns documents that contain terms matching a regular expression.
  • term query
    Returns documents that contain an exact term in a provided field.
Calendar March 11, 2024
Edit Edit this page