Documentation
¶
Index ¶
- Constants
- type EsEntry
- type EsSearchHelper
- func (es *EsSearchHelper) Build() *search.Request
- func (es *EsSearchHelper) PrintReq() *EsSearchHelper
- func (es *EsSearchHelper) SetBoolMultiMatch(query string, fields []string, compositeType string) *EsSearchHelper
- func (es *EsSearchHelper) SetBoolTerm(field string, value any, compositeType string) *EsSearchHelper
- func (es *EsSearchHelper) SetMultiMatch(query string, op string, fuzziness string, fields ...string) *EsSearchHelper
- func (es *EsSearchHelper) SetSearchFrom(from int) *EsSearchHelper
- func (es *EsSearchHelper) SetSearchSize(size int) *EsSearchHelper
- func (es *EsSearchHelper) SetTerm(field string, value any) *EsSearchHelper
- func (es *EsSearchHelper) WithContext(ctx context.Context) *EsSearchHelper
- type Index
Constants ¶
View Source
const ( OP_AND = "AND" OP_OR = "OR" )
View Source
const ( Must = "must" Should = "should" Filter = "filter" MustNot = "must_not" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EsSearchHelper ¶
type EsSearchHelper struct {
Query *types.Query
Sorters []types.SortCombinations
From int
Size int
Highlight *types.Highlight
Source *types.SourceConfig
Aggs map[string]types.Aggregations
Index Index
// contains filtered or unexported fields
}
func NewEsSearchHelper ¶
func NewEsSearchHelper(index Index) *EsSearchHelper
func (*EsSearchHelper) Build ¶
func (es *EsSearchHelper) Build() *search.Request
func (*EsSearchHelper) PrintReq ¶
func (es *EsSearchHelper) PrintReq() *EsSearchHelper
func (*EsSearchHelper) SetBoolMultiMatch ¶
func (es *EsSearchHelper) SetBoolMultiMatch(query string, fields []string, compositeType string) *EsSearchHelper
SetBoolMultiMatch sets the bool Query's multi match Query. NOTE: CompositeType MUST be one of Must, Should, Filter, or MustNot.
func (*EsSearchHelper) SetBoolTerm ¶
func (es *EsSearchHelper) SetBoolTerm(field string, value any, compositeType string) *EsSearchHelper
func (*EsSearchHelper) SetMultiMatch ¶
func (es *EsSearchHelper) SetMultiMatch(query string, op string, fuzziness string, fields ...string) *EsSearchHelper
SetMultiMatch sets the multi match query. If fuzziness is empty, it will be set to "AUTO".
func (*EsSearchHelper) SetSearchFrom ¶
func (es *EsSearchHelper) SetSearchFrom(from int) *EsSearchHelper
func (*EsSearchHelper) SetSearchSize ¶
func (es *EsSearchHelper) SetSearchSize(size int) *EsSearchHelper
func (*EsSearchHelper) SetTerm ¶
func (es *EsSearchHelper) SetTerm(field string, value any) *EsSearchHelper
func (*EsSearchHelper) WithContext ¶
func (es *EsSearchHelper) WithContext(ctx context.Context) *EsSearchHelper
Click to show internal directories.
Click to hide internal directories.