aliyungo: github.com/denverdino/aliyungo/opensearch Index | Files

package opensearch

import "github.com/denverdino/aliyungo/opensearch"

Index

Package Files

application.go client.go data.go search.go

Constants

const (
    Internet   = ""
    Intranet   = "intranet."
    VPC        = "vpc."
    APIVersion = "v2"
)

type Client Uses

type Client struct {
    common.Client
}

func NewClient Uses

func NewClient(networkType string, region common.Region, accessKeyId, accessKeySecret string) *Client

func (*Client) GetStatus Uses

func (this *Client) GetStatus(appName string, resp interface{}) error

查看应用信息

func (*Client) Push Uses

func (this *Client) Push(appName string, args PushArgs, resp interface{}) error

上传文档 支持新增、更新、删除的批量操作

func (*Client) Search Uses

func (this *Client) Search(args SearchArgs, resp interface{}) error

搜索 系统提供了丰富的搜索语法以满足用户各种场景下的搜索需求

type OpenSearchArgs Uses

type OpenSearchArgs struct {
    Action string `ArgName:"action"`
}

OpenSearch的API比较奇怪,action不在公共参数里面

type PushArgs Uses

type PushArgs struct {
    OpenSearchArgs        // 这个参数不用填
    Table_name     string `ArgName:"table_name"` //要上传数据的表名
    Items          string `ArgName:"items"`      //规定JSON格式
}

type SearchArgs Uses

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"`
}

Package opensearch imports 2 packages (graph) and is imported by 1 packages. Updated 2018-07-25. Refresh now. Tools for package owners.