v1

latestOpenAPI 3.0.1Apache 2.02026-07-17427669.7 KB
Search

Search V1

post/api/{index}/_search

Path parameters

indexstring required

Index

Request body

_sourcestring[]
aggsobject
explainboolean
frominteger
max_resultsinteger
search_typestring

SearchType is the type of search to perform. Can be match, match_phrase, query_string, etc

sort_fieldsstring[]

Response

OK

aggregationsobject
errorstring
timed_outboolean
tookinteger

Time it took to generate the response

Example response

{
  "_shards": {
    "total": 5,
    "failed": 0,
    "skipped": 6,
    "successful": 1
  },
  "hits": {
    "hits": [
      {
        "highlight": "{}",
        "@timestamp": "@timestamp",
        "_index": "_index",
        "_type": "_type",
        "_source": "{}",
        "_id": "_id",
        "_score": 5.637376656633329,
        "fields": "{}"
      },
      {
        "highlight": "{}",
        "@timestamp": "@timestamp",
        "_index": "_index",
        "_type": "_type",
        "_source": "{}",
        "_id": "_id",
        "_score": 5.637376656633329,
        "fields": "{}"
      }
    ],
    "total": {
      "value": 7
    },
    "max_score": 2.3021358869347655
  },
  "took": 9,
  "timed_out": true,
  "error": "error",
  "aggregations": {
    "key": {
      "buckets": "{}",
      "interval": "interval",
      "value": "{}"
    }
  }
}