-
Notifications
You must be signed in to change notification settings - Fork 0
/
elastic_responses.go
36 lines (33 loc) · 1 KB
/
elastic_responses.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package elasticx
import "encoding/json"
type SearchResponse struct {
Took int `json:"took"`
Hits struct {
Total struct {
Value int
}
Hits []struct {
ID string `json:"_id"`
Source json.RawMessage `json:"_source"`
Highlights json.RawMessage `json:"highlight"`
Sort []interface{} `json:"sort"`
}
}
}
type DeleteByQueryResponse struct {
Took int `json:"took"`
TimedOut bool `json:"timed_out"`
Total int `json:"total"`
Deleted int `json:"deleted"`
Batches int `json:"batches"`
VersionConflicts int `json:"version_conflicts"`
Noops int `json:"noops"`
Retries struct {
Bulk int `json:"bulk"`
Search int `json:"search"`
}
ThrottledMillis int `json:"throttled_millis"`
RequestsPerSecond float32 `json:"requests_per_second"`
ThrottledUntilMillis int `json:"throttled_until_millis"`
Failures []json.RawMessage `json:"failures"`
}