Documentation ¶
Index ¶
- Variables
- func Aggregation(search *elasticV6.SearchService, aggs *querypara.Agg) (*elasticV6.SearchService, error)
- func Query(search *elasticV6.SearchService, query *querypara.Query) (*elasticV6.SearchService, error)
- type Decode
- type ESClientV6
- func (cli *ESClientV6) Agg(idx, typ string, query *querypara.Search) (*aggdecode.AggregationBucketKeyItem, error)
- func (cli *ESClientV6) BulkUpdate(rs []db.Record) error
- func (cli *ESClientV6) Connect() error
- func (cli *ESClientV6) Count(idx, typ string, query *querypara.Query) (int64, error)
- func (cli *ESClientV6) Create(name string, table, definitioin string) (bool, error)
- func (cli *ESClientV6) CreateIndex(index string, typ, mapping string) (bool, error)
- func (cli *ESClientV6) Delete(name string) (bool, error)
- func (cli *ESClientV6) DeleteByQuery(idx, typ string, query *querypara.Query) error
- func (cli *ESClientV6) DeleteIndex(index string) (bool, error)
- func (cli *ESClientV6) Exists(name string) (bool, error)
- func (cli *ESClientV6) Get(index, typ, id string) (*json.RawMessage, error)
- func (cli *ESClientV6) GetVersion() int32
- func (cli *ESClientV6) IndexExists(index string) (bool, error)
- func (cli *ESClientV6) List(index, typ string, kv []*db.ListKV) ([]*json.RawMessage, error)
- func (cli *ESClientV6) MGet(idx, typ string, ids []string, ...) ([]interface{}, error)
- func (cli *ESClientV6) PerformRequest(method, path string, params url.Values, body interface{}, headers http.Header) (interface{}, error)
- func (cli *ESClientV6) Search(idx, typ string, query *querypara.Query, ...) ([]interface{}, error)
- func (cli *ESClientV6) Set(index, typ, id string, value db.Record) error
- func (cli *ESClientV6) Status() (res *status.Status)
- func (cli *ESClientV6) Update(index, typ, id string, value string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var QueryFunc = "match_phase"
QueryFunc 需要根据需求调整 match_phase term match queryPara
Functions ¶
func Aggregation ¶
func Aggregation(search *elasticV6.SearchService, aggs *querypara.Agg) (*elasticV6.SearchService, error)
Aggregation Aggregation
func Query ¶
func Query(search *elasticV6.SearchService, query *querypara.Query) (*elasticV6.SearchService, error)
Types ¶
type ESClientV6 ¶
type ESClientV6 struct { Host string Prefix string Version int32 Username string Password string Client *elasticV6.Client }
func NewESLongConnect ¶
func NewESShortConnect ¶
func (*ESClientV6) Agg ¶
func (cli *ESClientV6) Agg(idx, typ string, query *querypara.Search) (*aggdecode.AggregationBucketKeyItem, error)
Agg Agg
func (*ESClientV6) BulkUpdate ¶
func (cli *ESClientV6) BulkUpdate(rs []db.Record) error
BulkUpdate 一个区块对应的记录一起更新
func (*ESClientV6) Connect ¶
func (cli *ESClientV6) Connect() error
func (*ESClientV6) Create ¶
func (cli *ESClientV6) Create(name string, table, definitioin string) (bool, error)
Create adapter DBCreator
func (*ESClientV6) CreateIndex ¶
func (cli *ESClientV6) CreateIndex(index string, typ, mapping string) (bool, error)
CreateIndex create index
func (*ESClientV6) Delete ¶
func (cli *ESClientV6) Delete(name string) (bool, error)
Delete adapter DBCreator
func (*ESClientV6) DeleteByQuery ¶
func (cli *ESClientV6) DeleteByQuery(idx, typ string, query *querypara.Query) error
DeleteByQuery deletes documents that match a query.
func (*ESClientV6) DeleteIndex ¶
func (cli *ESClientV6) DeleteIndex(index string) (bool, error)
DeleteIndex DeleteIndex
func (*ESClientV6) Exists ¶
func (cli *ESClientV6) Exists(name string) (bool, error)
Exists adapter DBCreator
func (*ESClientV6) Get ¶
func (cli *ESClientV6) Get(index, typ, id string) (*json.RawMessage, error)
Get RawMessage
func (*ESClientV6) GetVersion ¶
func (cli *ESClientV6) GetVersion() int32
func (*ESClientV6) IndexExists ¶
func (cli *ESClientV6) IndexExists(index string) (bool, error)
IndexExists check index exists
func (*ESClientV6) List ¶
func (cli *ESClientV6) List(index, typ string, kv []*db.ListKV) ([]*json.RawMessage, error)
List RawMessage
func (*ESClientV6) MGet ¶
func (cli *ESClientV6) MGet(idx, typ string, ids []string, decode func(x *json.RawMessage) (interface{}, error)) ([]interface{}, error)
MGet MGet
func (*ESClientV6) PerformRequest ¶
func (*ESClientV6) Search ¶
func (cli *ESClientV6) Search(idx, typ string, query *querypara.Query, decode func(x *json.RawMessage) (interface{}, error)) ([]interface{}, error)
Search Search
Click to show internal directories.
Click to hide internal directories.