MCPcopy Create free account
hub / github.com/TruthHun/BookStack / ElasticSearchResult

Struct ElasticSearchResult

models/elasticsearch.go:74–103  ·  view source on GitHub ↗

搜索结果结构

Source from the content-addressed store, hash-verified

72
73//搜索结果结构
74type ElasticSearchResult struct {
75 Shards struct {
76 Failed int `json:"failed"`
77 Skipped int `json:"skipped"`
78 Successful int `json:"successful"`
79 Total int `json:"total"`
80 } `json:"_shards"`
81 Hits struct {
82 Hits []struct {
83 ID string `json:"_id"`
84 Index string `json:"_index"`
85 Score interface{} `json:"_score"`
86 Source struct {
87 Id int `json:"id"`
88 BookId int `json:"book_id"`
89 Title string `json:"title"`
90 Keywords string `json:"keywords"`
91 Content string `json:"content"`
92 Vcnt int `json:"vcnt"`
93 Private int `json:"private"`
94 } `json:"_source"`
95 Type string `json:"_type"`
96 Sort []int `json:"sort"`
97 } `json:"hits"`
98 MaxScore interface{} `json:"max_score"`
99 Total int `json:"total"`
100 } `json:"hits"`
101 TimedOut bool `json:"timed_out"`
102 Took int `json:"took"`
103}
104
105//创建全文搜索客户端
106func NewElasticSearchClient() (client *ElasticSearchClient) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected