Documentation ¶
Index ¶
- Constants
- func CreateFilterQuery(simpleField string, value interface{}) []elastic.Query
- func CreateSortBy(sortField string, sortOrder string) elastic.Sorter
- func CreateSortByMultiple(sortParameters []SortParameter) []elastic.Sorter
- func EscapeQueryStringQuery(query string) string
- type Aggregation
- type Bucket
- type HighlightPart
- type SortParameter
Constants ¶
View Source
const HighlightPostTag = "<__POST_HL_TAG__>"
View Source
const HighlightPreTag = "<__PRE_HL_TAG__>"
Variables ¶
This section is empty.
Functions ¶
func CreateFilterQuery ¶
func CreateSortByMultiple ¶
func CreateSortByMultiple(sortParameters []SortParameter) []elastic.Sorter
func EscapeQueryStringQuery ¶
escape reserved characters, but preserve any leading or trailing wildcards
Types ¶
type Aggregation ¶
type Aggregation struct { Buckets []Bucket `json:"buckets,omitempty"` DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"` SumOtherDocCount int `json:"sum_other_doc_count"` }
func ParseAggregation ¶
func ParseAggregation(aggregations elastic.Aggregations, name string) (Aggregation, error)
type HighlightPart ¶
func TransformEsHighlight ¶
func TransformEsHighlight(esHighlight string) []HighlightPart
type SortParameter ¶
func ParseSortParams ¶
func ParseSortParams(str string) ([]SortParameter, error)
Click to show internal directories.
Click to hide internal directories.