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

Changes

Changed in 3 of the 3 revisions of this API.499

  • c7ce1991bb9a13See the full diff
    • the // response's property type changed from array to object for status

      response-property-type-changed

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property // to the response with the status

      response-optional-property-added

    • added the optional property /// to the response with the status

      response-optional-property-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 64901d9f1a5b115See the full diff
    • the / request property type changed from array to object

      request-property-type-changed

    • removed the request property /

      request-property-removed

    • added the new optional request property /

      new-optional-request-property

    • added the new optional request property /

      new-optional-request-property

    • added the new optional request property /

      new-optional-request-property

    • added the new optional request property /

      new-optional-request-property

    • added the optional property /// to the response with the status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • b796c7453ce7281See the full diff
    • the / request property type changed from object to array

      request-property-type-changed

    • the // response's property type changed from object to array for status

      response-property-type-changed

    • removed the request property /

      request-property-removed

    • removed the request property /

      request-property-removed

    • removed the request property /

      request-property-removed

    • removed the request property /

      request-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property // from the response with the status

      response-optional-property-removed

    • removed the optional property /// from the response with the status

      response-optional-property-removed

    • removed the optional property /// from the response with the status

      response-optional-property-removed

    • added the new optional request property /

      new-optional-request-property

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog