Documentation
¶
Index ¶
- func SetTrace(t bool)
- type Client
- func (client *Client) Create(ctx context.Context, index, id string, doc interface{}) (*IndexResponse, error)
- func (client *Client) Delete(ctx context.Context, index, id string) (*IndexResponse, error)
- func (client *Client) Get(ctx context.Context, index, id string, response interface{}) error
- func (client *Client) Index(ctx context.Context, index, id string, doc interface{}) (*IndexResponse, error)
- func (client *Client) Search(ctx context.Context, index string, query interface{}, response interface{}) error
- func (client *Client) Update(ctx context.Context, index, id string, doc interface{}) (*IndexResponse, error)
- type Doc
- type IndexResponse
- type Proxy
- type SearchHits
- type SearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client --
func (*Client) Create ¶
func (client *Client) Create(ctx context.Context, index, id string, doc interface{}) (*IndexResponse, error)
Create --
func (*Client) Index ¶
func (client *Client) Index(ctx context.Context, index, id string, doc interface{}) (*IndexResponse, error)
Index --
type Doc ¶
type Doc struct {
Index string `json:"_index"`
Type string `json:"_type"`
ID string `json:"_id"`
Score float64 `json:"_score"`
}
Doc --
type IndexResponse ¶
type IndexResponse struct {
HTTPStatusCode int `json:"httpStatusCode"`
Index string `json:"_index"`
Type string `json:"_type"`
ID string `json:"_id"`
Version int `json:"_version"`
Result string `json:"result"`
}
IndexResponse --
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy 代理
func (*Proxy) SetNameSpace ¶
SetNameSpace 设置组
type SearchHits ¶
type SearchHits struct {
Total struct {
Value int `json:"value"`
Relation string `json:"relation"`
} `json:"total"`
MaxScore float64 `json:"max_score"`
}
SearchHits --
type SearchResponse ¶
SearchResponse --
Directories
¶
| Path | Synopsis |
|---|---|
|
dependency/hack
Package hack gives you some efficient functionality at the cost of breaking some Go rules.
|
Package hack gives you some efficient functionality at the cost of breaking some Go rules. |
|
dependency/querypb
Package query is a generated protocol buffer package.
|
Package query is a generated protocol buffer package. |
|
dependency/sqltypes
Package sqltypes implements interfaces and types that represent SQL values.
|
Package sqltypes implements interfaces and types that represent SQL values. |
Click to show internal directories.
Click to hide internal directories.