feat: add es version 6 support

This commit is contained in:
loveuer
2024-05-08 23:14:06 +08:00
parent 2bac049856
commit 63b9abbc76
8 changed files with 420 additions and 11 deletions

View File

@ -31,3 +31,20 @@ type ESMapping map[string]struct {
Properties map[string]any `json:"properties"`
} `json:"mappings"`
}
type ESResponseV6 struct {
ScrollId string `json:"_scroll_id"`
Took int `json:"took"`
TimedOut bool `json:"timed_out"`
Shards struct {
Total int `json:"total"`
Successful int `json:"successful"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
} `json:"_shards"`
Hits struct {
Total int `json:"total"`
MaxScore float64 `json:"max_score"`
Hits []*ESSource `json:"hits"`
} `json:"hits"`
}