Documentation ¶
Index ¶
- type MyElastic
- func (es *MyElastic) Add(index_name, type_name, id string, data interface{}) (result bool)
- func (es *MyElastic) CreateIndex(index_name, mapping string) (result bool)
- func (es *MyElastic) Search(index_name, type_name string, query interface{}, out interface{}) (result bool)
- func (es *MyElastic) SearchMap(index_name, type_name string, query interface{}, out *[]map[string]interface{}) (result bool)
- func (es *MyElastic) SortQuery(index_name string, builder []elastic.Sorter, query []elastic.Query) (bool, []string)
- func (es *MyElastic) SortQueryReturnHits(index_name string, from, size int, builder []elastic.Sorter, ...) (bool, []*elastic.SearchHit)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyElastic ¶
func (*MyElastic) CreateIndex ¶
创建索引(相当于数据库) mapping 如果为空("")则表示不创建模型
func (*MyElastic) Search ¶
func (es *MyElastic) Search(index_name, type_name string, query interface{}, out interface{}) (result bool)
添加记录,覆盖添加 index_name type_name query interface{} //查询条件 out *[]Param //查询结果
func (*MyElastic) SearchMap ¶
func (es *MyElastic) SearchMap(index_name, type_name string, query interface{}, out *[]map[string]interface{}) (result bool)
添加记录,覆盖添加 index_name type_name query interface{} //查询条件 out *[]Param //查询结果
Click to show internal directories.
Click to hide internal directories.