切换到主索引

This commit is contained in:
2023-12-03 08:28:45 +08:00
parent 7fd3c82d93
commit 58c20ac003

View File

@@ -83,7 +83,7 @@ func ElasticsearchSearch(text string) (r *SearchData) {
// 执行查询 // 执行查询
res, err := es.Search( res, err := es.Search(
es.Search.WithContext(context.Background()), es.Search.WithContext(context.Background()),
es.Search.WithIndex("my_index"), es.Search.WithIndex("web_images"),
es.Search.WithBody(&buf), es.Search.WithBody(&buf),
es.Search.WithTrackTotalHits(true), es.Search.WithTrackTotalHits(true),
es.Search.WithPretty(), es.Search.WithPretty(),