v1

latestOpenAPI 3.0.1Apache 2.02026-07-17427669.7 KB
Search

Search V2 DSL for compatible ES

post/es/{index}/_search

Path parameters

indexstring required

Index

Request body

_sourcestring[]

true, false, ["field1", "field2.*"]

aggsobject
explainboolean
fieldsstring[]

["field1", "field2.*", {"field": "fieldName", "format": "epoch_millis"}]

frominteger
sizeinteger
sortstring[]

"_sorce", ["+Year","-Year", {"Year": "desc"}, "Date": {"order": "asc"", "format": "yyyy-MM-dd"}}"}]

timeoutinteger
track_total_hitsboolean

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