| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Elasticsearch.Search.Response
Contents
Description
Responses from Search API (http://elasticsearch.example.com/{index}/_search)
Types
A response from a search.
One strange thing about the organization of the response is that there
is a hits field with another hits field inside of it. This is how
elasticsearch presents this information, and that unusual structure is
simply mirrored by these types.
Constructors
| Response | |
A document that matched the search criteria
Constructors
| Hit | |
Response Parser
Example Data
Example response from Elasticsearch documentation:
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 20,
"relation": "eq"
},
"max_score": 1.3862942,
"hits": [
{
"_index": "my-index-000001",
"_type" : "_doc",
"_id": "0",
"_score": 1.3862942,
"_source": {
"@timestamp": "2099-11-15T14:12:12",
"http": {
"request": {
"method": "get"
},
"response": {
"status_code": 200,
"bytes": 1070000
},
"version": "1.1"
},
"source": {
"ip": "127.0.0.1"
},
"message": "GET /search HTTP/1.1 200 1070000",
"user": {
"id": "kimchy"
}
}
}
]
}
}