Documentation ¶
Index ¶
Constants ¶
View Source
const ( AggSum = "sum" AggAvg = "avg" AggMin = "min" AggMax = "max" AggCount = "count" AggCountCached = "count_cached" AggFacet = "facet" AggDistinct = "distinct" )
Variables ¶
This section is empty.
Functions ¶
func DisableStrictMode ¶ added in v4.13.0
func DisableStrictMode()
func EnabeStrictMode ¶ added in v4.13.0
func EnabeStrictMode()
Types ¶
type Aggregation ¶
type DSL ¶
type DSL struct { Namespace string `json:"namespace"` Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` Distinct string `json:"distinct,omitempty"` // deprecated, use aggregation with type AggDistinct instead Sort Sort `json:"sort,omitempty"` Filters []Filter `json:"filters,omitempty"` Explain bool `json:"explain,omitempty"` ReqTotal bool `json:"req_total,omitempty"` WithRank bool `json:"select_with_rank,omitempty"` Aggregations []Aggregation `json:"aggregations,omitempty"` }
func DecodeJSON ¶ added in v4.13.0
type EqualPosition ¶ added in v4.18.0
type EqualPosition struct {
Positions []string `json:"positions"`
}
type Filter ¶
type Filter struct { Op string `json:"Op,omitempty"` Field string `json:"Field,omitempty"` Joined *JoinQuery `json:"Join_Query,omitempty"` SubQ *SubQuery `json:"Subquery,omitempty"` Cond string `json:"Cond,omitempty"` Value interface{} `json:"Value,omitempty"` EqualPositions []EqualPosition `json:"equal_positions,omitempty"` Filters []Filter `json:"Filters,omitempty"` }
func (*Filter) UnmarshalJSON ¶
type JoinOnCondition ¶ added in v4.12.0
type JoinQuery ¶ added in v4.12.0
type JoinQuery struct { Filters []Filter `json:"filters,omitempty"` // contains filtered or unexported fields }
type Sort ¶
type Sort struct { Field string `json:"field"` Desc bool `json:"desc"` Values []interface{} `json:"values,omitempty"` }
func (*Sort) CheckValuesType ¶
func (*Sort) UnmarshalJSON ¶
type SubQuery ¶ added in v4.13.0
type SubQuery struct { SubQueryBase Filters []Filter `json:"filters,omitempty"` }
type SubQueryBase ¶ added in v4.13.0
type SubQueryBase struct { Namespace string `json:"namespace"` Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` Sort Sort `json:"sort,omitempty"` ReqTotal bool `json:"req_total,omitempty"` Aggregations []Aggregation `json:"aggregations,omitempty"` SelectFilter []string `json:"select_filter,omitempty"` }
Click to show internal directories.
Click to hide internal directories.