File: search.go

package info (click to toggle)
golang-github-denverdino-aliyungo 0.0~git20180921.13fa8aa-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,824 kB
  • sloc: xml: 1,359; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 912 bytes parent folder | download | duplicates (3)
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
package opensearch

import "net/http"

type SearchArgs struct {
	//搜索主体
	Query string `ArgName:"query"`
	//要查询的应用名
	Index_name string `ArgName:"index_name"`
	//[可以通过此参数获取本次查询需要的字段内容]
	Fetch_fields string `ArgName:"fetch_fields"`
	//[指定要使用的查询分析规则]
	Qp string `ArgName:"qp"`
	//[关闭已生效的查询分析功能]
	Disable string `ArgName:"disable"`
	//[设置粗排表达式名字]
	First_formula_name string `ArgName:"first_formula_name"`
	//[设置精排表达式名字]
	Formula_name string `ArgName:"formula_name"`
	//[动态摘要的配置]
	Summary string `ArgName:"summary"`
}

//搜索
//系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求
func (this *Client) Search(args SearchArgs, resp interface{}) error {
	return this.InvokeByAnyMethod(http.MethodGet, "", "/search", args, resp)
}