Documentation ¶
Overview ¶
Package picker contains types for constructing queries in Elasticsearch
Index ¶
- Constants
- Variables
- func MarshalRule(rule QueryRule) ([]byte, error)
- func Number(n dynamic.Number) *number
- func UnmarshalFieldJSON(data []byte, field *Field) error
- type AggKind
- type AliasField
- func (a *AliasField) Field() (Field, error)
- func (a AliasField) MarshalBSON() ([]byte, error)
- func (a AliasField) MarshalJSON() ([]byte, error)
- func (a AliasField) Path() string
- func (a *AliasField) SetPath(path string) error
- func (AliasField) Type() FieldType
- func (a *AliasField) UnmarshalBSON(data []byte) error
- func (a *AliasField) UnmarshalJSON(data []byte) error
- type AliasFieldParams
- type Aliaser
- type AllOfQuery
- func (ao *AllOfQuery) Clause() (QueryClause, error)
- func (ao *AllOfQuery) Clear()
- func (AllOfQuery) Complete()
- func (ao *AllOfQuery) Disable()
- func (ao *AllOfQuery) Enable()
- func (ao *AllOfQuery) IsEmpty() bool
- func (AllOfQuery) Kind() QueryKind
- func (ao AllOfQuery) MarshalJSON() ([]byte, error)
- func (n AllOfQuery) Name() string
- func (n *AllOfQuery) SetName(name string)
- func (ao *AllOfQuery) UnmarshalJSON(data []byte) error
- type AllOfQueryParams
- type AllOfRule
- func (a *AllOfRule) AllOfRule() (*AllOfRule, error)
- func (r AllOfRule) Filter() *RuleFilter
- func (a AllOfRule) Intervals() Rules
- func (a AllOfRule) MarshalBSON() ([]byte, error)
- func (a AllOfRule) MarshalJSON() ([]byte, error)
- func (mg AllOfRule) MaxGaps() int
- func (o AllOfRule) Ordered() bool
- func (a *AllOfRule) Rule() (QueryRule, error)
- func (r *AllOfRule) SetFilter(filter RuleFilterer) error
- func (a *AllOfRule) SetIntervals(intervals Ruleset) error
- func (mg *AllOfRule) SetMaxGaps(maxGaps interface{}) error
- func (o *AllOfRule) SetOrdered(ordered interface{}) error
- func (AllOfRule) Type() RuleType
- func (a *AllOfRule) UnmarshalBSON(data []byte) error
- func (a *AllOfRule) UnmarshalJSON(data []byte) error
- type AllOfRuleParams
- type AllOfer
- type AnyOfRule
- func (a *AnyOfRule) AnyOfRule() (*AnyOfRule, error)
- func (r AnyOfRule) Filter() *RuleFilter
- func (a AnyOfRule) Intervals() Rules
- func (a AnyOfRule) MarshalBSON() ([]byte, error)
- func (a AnyOfRule) MarshalJSON() ([]byte, error)
- func (a *AnyOfRule) Rule() (QueryRule, error)
- func (r *AnyOfRule) SetFilter(filter RuleFilterer) error
- func (a *AnyOfRule) SetIntervals(intervals Ruleset) error
- func (AnyOfRule) Type() RuleType
- func (a *AnyOfRule) UnmarshalBSON(data []byte) error
- func (a *AnyOfRule) UnmarshalJSON(data []byte) error
- type AnyOfRuleParams
- type BinaryField
- func (dv BinaryField) DocValues() bool
- func (b BinaryField) Field() (Field, error)
- func (b BinaryField) MarshalBSON() ([]byte, error)
- func (b BinaryField) MarshalJSON() ([]byte, error)
- func (dv *BinaryField) SetDocValues(v interface{}) error
- func (sa *BinaryField) SetStore(v interface{}) error
- func (sa BinaryField) Store() bool
- func (BinaryField) Type() FieldType
- func (b *BinaryField) UnmarshalBSON(data []byte) error
- func (b *BinaryField) UnmarshalJSON(data []byte) error
- type BinaryFieldParams
- type BoolQuery
- func (b *BoolQuery) Clause() (QueryClause, error)
- func (b *BoolQuery) Clear()
- func (BoolQuery) Complete()
- func (b *BoolQuery) Filter() *QueryClauses
- func (b *BoolQuery) IsEmpty() bool
- func (BoolQuery) Kind() QueryKind
- func (b BoolQuery) MarshalBSON() ([]byte, error)
- func (b BoolQuery) MarshalJSON() ([]byte, error)
- func (msm BoolQuery) MinimumShouldMatch() string
- func (b *BoolQuery) Must() *QueryClauses
- func (b *BoolQuery) MustNot() *QueryClauses
- func (n BoolQuery) Name() string
- func (b *BoolQuery) Set(v Booler) error
- func (b *BoolQuery) SetFilter(clauses Clauses) error
- func (msm *BoolQuery) SetMinimumShouldMatch(v string)
- func (b *BoolQuery) SetMust(clauses Clauses) error
- func (b *BoolQuery) SetMustNot(clauses Clauses) error
- func (n *BoolQuery) SetName(name string)
- func (b *BoolQuery) SetShould(clauses Clauses) error
- func (b *BoolQuery) Should() *QueryClauses
- func (b *BoolQuery) UnmarshalBSON(data []byte) error
- func (b *BoolQuery) UnmarshalJSON(data []byte) error
- type BoolQueryParams
- type BooleanField
- func (dv BooleanField) DocValues() bool
- func (b *BooleanField) Field() (Field, error)
- func (i BooleanField) Index() bool
- func (b BooleanField) MarshalBSON() ([]byte, error)
- func (b BooleanField) MarshalJSON() ([]byte, error)
- func (m BooleanField) Meta() Meta
- func (nv BooleanField) NullValue() interface{}
- func (dv *BooleanField) SetDocValues(v interface{}) error
- func (i *BooleanField) SetIndex(v interface{}) error
- func (m *BooleanField) SetMeta(v Meta) error
- func (nv *BooleanField) SetNullValue(v interface{})
- func (sa *BooleanField) SetStore(v interface{}) error
- func (sa BooleanField) Store() bool
- func (BooleanField) Type() FieldType
- func (b *BooleanField) UnmarshalBSON(data []byte) error
- func (b *BooleanField) UnmarshalJSON(data []byte) error
- type BooleanFieldParams
- type Booler
- type BoostMode
- type BoostingQuery
- func (b *BoostingQuery) Clause() (QueryClause, error)
- func (b *BoostingQuery) Clear()
- func (BoostingQuery) Complete()
- func (b *BoostingQuery) IsEmpty() bool
- func (BoostingQuery) Kind() QueryKind
- func (b BoostingQuery) MarshalBSON() ([]byte, error)
- func (b BoostingQuery) MarshalJSON() ([]byte, error)
- func (n BoostingQuery) Name() string
- func (b BoostingQuery) Negative() *Query
- func (nb BoostingQuery) NegativeBoost() float64
- func (b BoostingQuery) Positive() *Query
- func (n *BoostingQuery) SetName(name string)
- func (b *BoostingQuery) SetNegative(params Querier) error
- func (nb *BoostingQuery) SetNegativeBoost(negativeBoost float64) error
- func (b *BoostingQuery) SetPositive(params Querier) error
- func (b *BoostingQuery) UnmarshalBSON(data []byte) error
- func (b *BoostingQuery) UnmarshalJSON(data []byte) error
- type BoostingQueryParams
- type Boostinger
- type BoundingBox
- type BoundingBoxer
- type ByteField
- func (b ByteField) Boost() float64
- func (cp ByteField) Coerce() bool
- func (dv ByteField) DocValues() bool
- func (b *ByteField) Field() (Field, error)
- func (im ByteField) IgnoreMalformed() bool
- func (i ByteField) Index() bool
- func (b ByteField) MarshalBSON() ([]byte, error)
- func (b ByteField) MarshalJSON() ([]byte, error)
- func (m ByteField) Meta() Meta
- func (nv ByteField) NullValue() interface{}
- func (b *ByteField) SetBoost(v interface{}) error
- func (cp *ByteField) SetCoerce(v interface{}) error
- func (dv *ByteField) SetDocValues(v interface{}) error
- func (im *ByteField) SetIgnoreMalformed(v interface{}) error
- func (i *ByteField) SetIndex(v interface{}) error
- func (m *ByteField) SetMeta(v Meta) error
- func (nv *ByteField) SetNullValue(v interface{})
- func (sa *ByteField) SetStore(v interface{}) error
- func (sa ByteField) Store() bool
- func (ByteField) Type() FieldType
- func (b *ByteField) UnmarshalBSON(data []byte) error
- func (b *ByteField) UnmarshalJSON(data []byte) error
- type ByteFieldParams
- type Clause
- type Clauser
- type Clauses
- type CommonQuery
- func (q *CommonQuery) Clause() (QueryClause, error)
- func (q *CommonQuery) Clear()
- func (q *CommonQuery) Common() (*CommonQuery, error)
- func (CommonQuery) Complete()
- func (q *CommonQuery) IsEmpty() bool
- func (CommonQuery) Kind() QueryKind
- func (q CommonQuery) MarshalBSON() ([]byte, error)
- func (q CommonQuery) MarshalJSON() ([]byte, error)
- func (n CommonQuery) Name() string
- func (n *CommonQuery) SetName(name string)
- func (q *CommonQuery) UnmarshalBSON(data []byte) error
- func (q *CommonQuery) UnmarshalJSON(data []byte) error
- type CommonQueryParams
- type Commoner
- type CompleteClause
- type CompleteClauser
- type CompleteFuzzier
- type CompleteMatcher
- type CompletePrefixer
- type CompleteTermer
- type CompleteTermser
- type CompletionField
- func (ap CompletionField) Analyzer() string
- func (c *CompletionField) Field() (Field, error)
- func (c CompletionField) MarshalBSON() ([]byte, error)
- func (c CompletionField) MarshalJSON() ([]byte, error)
- func (mil CompletionField) MaxInputLength() int
- func (ppi CompletionField) PreservePositionIncrements() bool
- func (ps CompletionField) PreserveSeperators() bool
- func (sa CompletionField) SearchAnalyzer() string
- func (sq CompletionField) SearchQuoteAnalyzer() string
- func (ap *CompletionField) SetAnalyzer(v string)
- func (mil *CompletionField) SetMaxInputLength(v interface{}) error
- func (ppi *CompletionField) SetPreservePositionIncrements(v interface{}) error
- func (ps *CompletionField) SetPreserveSeperators(v interface{}) error
- func (sa *CompletionField) SetSearchAnalyzer(v string)
- func (sq CompletionField) SetSearchQuoteAnalyzer(v string)
- func (CompletionField) Type() FieldType
- func (c *CompletionField) UnmarshalBSON(data []byte) error
- func (c *CompletionField) UnmarshalJSON(data []byte) error
- type CompletionFieldParams
- type Completioner
- type Conflicts
- type ConstantField
- func (c *ConstantField) Field() (Field, error)
- func (c ConstantField) MarshalBSON() ([]byte, error)
- func (c ConstantField) MarshalJSON() ([]byte, error)
- func (c ConstantField) SetValue(v interface{})
- func (ConstantField) Type() FieldType
- func (c *ConstantField) UnmarshalBSON(data []byte) error
- func (c *ConstantField) UnmarshalJSON(data []byte) error
- func (c *ConstantField) Value() interface{}
- type ConstantFieldParams
- type ConstantFielder
- type ConstantScoreQuery
- func (b ConstantScoreQuery) Boost() float64
- func (cs *ConstantScoreQuery) Clause() (QueryClause, error)
- func (cs *ConstantScoreQuery) Clear()
- func (ConstantScoreQuery) Complete()
- func (cs *ConstantScoreQuery) ConstantScore() (*ConstantScoreQuery, error)
- func (cs *ConstantScoreQuery) Filter() *Query
- func (cs *ConstantScoreQuery) IsEmpty() bool
- func (ConstantScoreQuery) Kind() QueryKind
- func (cs ConstantScoreQuery) MarshalJSON() ([]byte, error)
- func (n ConstantScoreQuery) Name() string
- func (b *ConstantScoreQuery) SetBoost(v interface{}) error
- func (cs *ConstantScoreQuery) SetFilter(query Querier) error
- func (n *ConstantScoreQuery) SetName(name string)
- func (cs *ConstantScoreQuery) UnmarshalJSON(data []byte) error
- type ConstantScoreQueryParams
- type ConstantScorer
- type CopyToParam
- type Count
- type CountParams
- type Counter
- type DateField
- func (b DateField) Boost() float64
- func (dv DateField) DocValues() bool
- func (d *DateField) Field() (Field, error)
- func (f DateField) Format() string
- func (im DateField) IgnoreMalformed() bool
- func (i DateField) Index() bool
- func (d DateField) MarshalBSON() ([]byte, error)
- func (d DateField) MarshalJSON() ([]byte, error)
- func (m DateField) Meta() Meta
- func (nv DateField) NullValue() interface{}
- func (b *DateField) SetBoost(v interface{}) error
- func (dv *DateField) SetDocValues(v interface{}) error
- func (f *DateField) SetFormat(v string)
- func (im *DateField) SetIgnoreMalformed(v interface{}) error
- func (i *DateField) SetIndex(v interface{}) error
- func (m *DateField) SetMeta(v Meta) error
- func (nv *DateField) SetNullValue(v interface{})
- func (sa *DateField) SetStore(v interface{}) error
- func (sa DateField) Store() bool
- func (DateField) Type() FieldType
- func (d *DateField) UnmarshalBSON(data []byte) error
- func (d *DateField) UnmarshalJSON(data []byte) error
- type DateFieldParams
- type DateNanoSecField
- func (b DateNanoSecField) Boost() float64
- func (dv DateNanoSecField) DocValues() bool
- func (d *DateNanoSecField) Field() (Field, error)
- func (f DateNanoSecField) Format() string
- func (im DateNanoSecField) IgnoreMalformed() bool
- func (i DateNanoSecField) Index() bool
- func (d DateNanoSecField) MarshalBSON() ([]byte, error)
- func (d DateNanoSecField) MarshalJSON() ([]byte, error)
- func (m DateNanoSecField) Meta() Meta
- func (nv DateNanoSecField) NullValue() interface{}
- func (b *DateNanoSecField) SetBoost(v interface{}) error
- func (dv *DateNanoSecField) SetDocValues(v interface{}) error
- func (f *DateNanoSecField) SetFormat(v string)
- func (im *DateNanoSecField) SetIgnoreMalformed(v interface{}) error
- func (i *DateNanoSecField) SetIndex(v interface{}) error
- func (m *DateNanoSecField) SetMeta(v Meta) error
- func (nv *DateNanoSecField) SetNullValue(v interface{})
- func (sa *DateNanoSecField) SetStore(v interface{}) error
- func (sa DateNanoSecField) Store() bool
- func (d DateNanoSecField) Type() FieldType
- func (d *DateNanoSecField) UnmarshalBSON(data []byte) error
- func (d *DateNanoSecField) UnmarshalJSON(data []byte) error
- type DateNanoSecFieldParams
- type DateRangeField
- func (cp DateRangeField) Coerce() bool
- func (r *DateRangeField) Field() (Field, error)
- func (f DateRangeField) Format() string
- func (i DateRangeField) Index() bool
- func (r DateRangeField) MarshalBSON() ([]byte, error)
- func (r DateRangeField) MarshalJSON() ([]byte, error)
- func (cp *DateRangeField) SetCoerce(v interface{}) error
- func (f *DateRangeField) SetFormat(v string)
- func (i *DateRangeField) SetIndex(v interface{}) error
- func (sa *DateRangeField) SetStore(v interface{}) error
- func (sa DateRangeField) Store() bool
- func (DateRangeField) Type() FieldType
- func (r *DateRangeField) UnmarshalBSON(data []byte) error
- func (r *DateRangeField) UnmarshalJSON(data []byte) error
- type DateRangeFieldParams
- type DecayFunction
- type DeleteByQuerier
- type DeleteByQuery
- func (d DeleteByQuery) Encode() (*bytes.Buffer, error)
- func (d DeleteByQuery) MarshalBSON() ([]byte, error)
- func (d DeleteByQuery) MarshalJSON() ([]byte, error)
- func (d *DeleteByQuery) Query() *Query
- func (d *DeleteByQuery) UnmarshalBSON(data []byte) error
- func (d *DeleteByQuery) UnmarshalJSON(data []byte) error
- type DeleteByQueryParams
- type DeleteByQueryResponse
- type DenseVectorField
- func (d DenseVectorField) Dimensions() int
- func (dv *DenseVectorField) Field() (Field, error)
- func (dv DenseVectorField) MarshalJSON() ([]byte, error)
- func (d *DenseVectorField) SetDimensions(v interface{}) error
- func (DenseVectorField) Type() FieldType
- func (dv *DenseVectorField) UnmarshalJSON(data []byte) error
- type DenseVectorFieldParams
- type DisjunctionMaxQuery
- func (dm *DisjunctionMaxQuery) Clause() (QueryClause, error)
- func (dm *DisjunctionMaxQuery) Clear()
- func (DisjunctionMaxQuery) Complete()
- func (dm *DisjunctionMaxQuery) DisjunectionMax() (*DisjunctionMaxQuery, error)
- func (dm *DisjunctionMaxQuery) IsEmpty() bool
- func (DisjunctionMaxQuery) Kind() QueryKind
- func (dm DisjunctionMaxQuery) MarshalJSON() ([]byte, error)
- func (n DisjunctionMaxQuery) Name() string
- func (dm DisjunctionMaxQuery) Queries() Queries
- func (n *DisjunctionMaxQuery) SetName(name string)
- func (dm *DisjunctionMaxQuery) SetQueries(queries Queryset) error
- func (dm *DisjunctionMaxQuery) SetTieBreaker(v float64) error
- func (dm DisjunctionMaxQuery) TieBreaker() float64
- func (dm *DisjunctionMaxQuery) UnmarshalJSON(data []byte) error
- type DisjunctionMaxQueryParams
- type DisjunctionMaxer
- type DistanceFeatureQuery
- func (b DistanceFeatureQuery) Boost() float64
- func (q *DistanceFeatureQuery) Clause() (QueryClause, error)
- func (q *DistanceFeatureQuery) Clear()
- func (DistanceFeatureQuery) Complete()
- func (q *DistanceFeatureQuery) DistanceFeature() (*DistanceFeatureQuery, error)
- func (f DistanceFeatureQuery) Field() string
- func (q *DistanceFeatureQuery) IsEmpty() bool
- func (DistanceFeatureQuery) Kind() QueryKind
- func (q DistanceFeatureQuery) MarshalBSON() ([]byte, error)
- func (q DistanceFeatureQuery) MarshalJSON() ([]byte, error)
- func (n DistanceFeatureQuery) Name() string
- func (q DistanceFeatureQuery) Origin() string
- func (q DistanceFeatureQuery) Pivot() string
- func (b *DistanceFeatureQuery) SetBoost(v interface{}) error
- func (f *DistanceFeatureQuery) SetField(field string) error
- func (n *DistanceFeatureQuery) SetName(name string)
- func (q *DistanceFeatureQuery) SetOrigin(origin string) error
- func (q *DistanceFeatureQuery) SetPivot(pivot string) error
- func (q *DistanceFeatureQuery) UnmarshalBSON(data []byte) error
- func (q *DistanceFeatureQuery) UnmarshalJSON(data []byte) error
- type DistanceFeatureQueryParams
- type DistanceFeaturer
- type DistanceType
- type DoubleField
- func (b DoubleField) Boost() float64
- func (cp DoubleField) Coerce() bool
- func (dv DoubleField) DocValues() bool
- func (d *DoubleField) Field() (Field, error)
- func (im DoubleField) IgnoreMalformed() bool
- func (i DoubleField) Index() bool
- func (d DoubleField) MarshalBSON() ([]byte, error)
- func (d DoubleField) MarshalJSON() ([]byte, error)
- func (m DoubleField) Meta() Meta
- func (nv DoubleField) NullValue() interface{}
- func (b *DoubleField) SetBoost(v interface{}) error
- func (cp *DoubleField) SetCoerce(v interface{}) error
- func (dv *DoubleField) SetDocValues(v interface{}) error
- func (im *DoubleField) SetIgnoreMalformed(v interface{}) error
- func (i *DoubleField) SetIndex(v interface{}) error
- func (m *DoubleField) SetMeta(v Meta) error
- func (nv *DoubleField) SetNullValue(v interface{})
- func (sa *DoubleField) SetStore(v interface{}) error
- func (sa DoubleField) Store() bool
- func (DoubleField) Type() FieldType
- func (d *DoubleField) UnmarshalBSON(data []byte) error
- func (d *DoubleField) UnmarshalJSON(data []byte) error
- type DoubleFieldParams
- type DoubleRangeField
- func (cp DoubleRangeField) Coerce() bool
- func (r *DoubleRangeField) Field() (Field, error)
- func (i DoubleRangeField) Index() bool
- func (r DoubleRangeField) MarshalBSON() ([]byte, error)
- func (r DoubleRangeField) MarshalJSON() ([]byte, error)
- func (cp *DoubleRangeField) SetCoerce(v interface{}) error
- func (i *DoubleRangeField) SetIndex(v interface{}) error
- func (sa *DoubleRangeField) SetStore(v interface{}) error
- func (sa DoubleRangeField) Store() bool
- func (DoubleRangeField) Type() FieldType
- func (r *DoubleRangeField) UnmarshalBSON(data []byte) error
- func (r *DoubleRangeField) UnmarshalJSON(data []byte) error
- type DoubleRangeFieldParams
- type Dynamic
- type Exister
- type ExistsQuery
- func (e *ExistsQuery) Clause() (QueryClause, error)
- func (e *ExistsQuery) Clear()
- func (ExistsQuery) Complete()
- func (e *ExistsQuery) Field() string
- func (e *ExistsQuery) IsEmpty() bool
- func (e ExistsQuery) Kind() QueryKind
- func (e ExistsQuery) MarshalBSON() ([]byte, error)
- func (e ExistsQuery) MarshalJSON() ([]byte, error)
- func (n ExistsQuery) Name() string
- func (e *ExistsQuery) Set(field string, exists Exister) error
- func (e *ExistsQuery) SetField(field string) error
- func (n *ExistsQuery) SetName(name string)
- func (e *ExistsQuery) UnmarshalBSON(data []byte) error
- func (e *ExistsQuery) UnmarshalJSON(data []byte) error
- type ExistsQueryParams
- type ExpDecayFunction
- func (e *ExpDecayFunction) Decay() dynamic.Number
- func (e *ExpDecayFunction) Field() string
- func (e ExpDecayFunction) Filter() QueryClause
- func (ExpDecayFunction) FuncKind() FuncKind
- func (e ExpDecayFunction) MarshalBSON() ([]byte, error)
- func (e ExpDecayFunction) MarshalJSON() ([]byte, error)
- func (e *ExpDecayFunction) Offset() dynamic.StringNumberOrTime
- func (e ExpDecayFunction) Origin() interface{}
- func (e ExpDecayFunction) Scale() dynamic.StringOrNumber
- func (e *ExpDecayFunction) SetDecay(value interface{}) error
- func (e *ExpDecayFunction) SetField(field string) error
- func (e *ExpDecayFunction) SetFilter(c CompleteClauser) error
- func (e *ExpDecayFunction) SetOffset(offset interface{}) error
- func (e *ExpDecayFunction) SetOrigin(origin interface{}) error
- func (e *ExpDecayFunction) SetScale(scale interface{}) error
- func (b *ExpDecayFunction) SetWeight(v interface{}) error
- func (b *ExpDecayFunction) Weight() float64
- type ExpDecayFunctionParams
- type Field
- type FieldDataFrequencyFilter
- type FieldError
- type FieldMap
- type FieldMappings
- type FieldMaskingSpanQuery
- func (q *FieldMaskingSpanQuery) Clause() (QueryClause, error)
- func (q *FieldMaskingSpanQuery) Clear()
- func (FieldMaskingSpanQuery) Complete()
- func (q *FieldMaskingSpanQuery) FieldMaskingSpan() (*FieldMaskingSpanQuery, error)
- func (q *FieldMaskingSpanQuery) IsEmpty() bool
- func (FieldMaskingSpanQuery) Kind() QueryKind
- func (q FieldMaskingSpanQuery) MarshalBSON() ([]byte, error)
- func (q FieldMaskingSpanQuery) MarshalJSON() ([]byte, error)
- func (n FieldMaskingSpanQuery) Name() string
- func (n *FieldMaskingSpanQuery) SetName(name string)
- func (q *FieldMaskingSpanQuery) UnmarshalBSON(data []byte) error
- func (q *FieldMaskingSpanQuery) UnmarshalJSON(data []byte) error
- type FieldMaskingSpanQueryParams
- type FieldType
- type FieldValueFactorFunc
- type FieldValueFactorFunction
- func (fvf FieldValueFactorFunction) Factor() float64
- func (fvf FieldValueFactorFunction) Field() string
- func (fvf FieldValueFactorFunction) Filter() QueryClause
- func (FieldValueFactorFunction) FuncKind() FuncKind
- func (fvf FieldValueFactorFunction) MarshalJSON() ([]byte, error)
- func (fvf FieldValueFactorFunction) Missing() interface{}
- func (m *FieldValueFactorFunction) Modifier() Modifier
- func (fvf FieldValueFactorFunction) SetFactor(v interface{}) error
- func (fvf *FieldValueFactorFunction) SetField(field string)
- func (fvf *FieldValueFactorFunction) SetFilter(filter CompleteClauser) error
- func (fvf *FieldValueFactorFunction) SetMissing(missing interface{})
- func (m *FieldValueFactorFunction) SetModifier(modifier Modifier) error
- func (b *FieldValueFactorFunction) SetWeight(v interface{}) error
- func (b *FieldValueFactorFunction) Weight() float64
- type Fielder
- type Fields
- func (f Fields) Field(key string) (Field, error)
- func (f Fields) FieldMap() FieldMap
- func (f Fields) Fields() (Fields, error)
- func (f Fields) Get(key string) (Field, bool)
- func (f Fields) Has(key string) bool
- func (f Fields) Len() int
- func (f Fields) Remove(field string) Field
- func (f Fields) Set(key string, field Fielder) (Field, error)
- func (f *Fields) UnmarshalBSON(data []byte) error
- func (f *Fields) UnmarshalJSON(data []byte) error
- type Fieldset
- type FlattenedField
- func (dl FlattenedField) DepthLimit() float64
- func (dv FlattenedField) DocValues() bool
- func (ego FlattenedField) EagerGlobalOrdinals() bool
- func (f *FlattenedField) Field() (Field, error)
- func (ia FlattenedField) IgnoreAbove() float64
- func (i FlattenedField) Index() bool
- func (io FlattenedField) IndexOptions() IndexOptions
- func (f FlattenedField) MarshalBSON() ([]byte, error)
- func (f FlattenedField) MarshalJSON() ([]byte, error)
- func (nv FlattenedField) NullValue() interface{}
- func (dl FlattenedField) SetDepthLimit(v interface{}) error
- func (dv *FlattenedField) SetDocValues(v interface{}) error
- func (ego *FlattenedField) SetEagerGlobalOrdinals(v interface{}) error
- func (ia FlattenedField) SetIgnoreAbove(v interface{}) error
- func (i *FlattenedField) SetIndex(v interface{}) error
- func (io *FlattenedField) SetIndexOptions(v IndexOptions) error
- func (nv *FlattenedField) SetNullValue(v interface{})
- func (s *FlattenedField) SetSimilarity(v Similarity) error
- func (sq *FlattenedField) SetSplitQueriesOnWhitespace(v interface{}) error
- func (s FlattenedField) Similarity() Similarity
- func (sq FlattenedField) SplitQueriesOnWhitespace() bool
- func (FlattenedField) Type() FieldType
- func (f *FlattenedField) UnmarshalBSON(data []byte) error
- func (f *FlattenedField) UnmarshalJSON(data []byte) error
- type FlattenedFieldParams
- type FloatField
- func (b FloatField) Boost() float64
- func (cp FloatField) Coerce() bool
- func (dv FloatField) DocValues() bool
- func (f *FloatField) Field() (Field, error)
- func (im FloatField) IgnoreMalformed() bool
- func (i FloatField) Index() bool
- func (f FloatField) MarshalBSON() ([]byte, error)
- func (f FloatField) MarshalJSON() ([]byte, error)
- func (m FloatField) Meta() Meta
- func (nv FloatField) NullValue() interface{}
- func (b *FloatField) SetBoost(v interface{}) error
- func (cp *FloatField) SetCoerce(v interface{}) error
- func (dv *FloatField) SetDocValues(v interface{}) error
- func (im *FloatField) SetIgnoreMalformed(v interface{}) error
- func (i *FloatField) SetIndex(v interface{}) error
- func (m *FloatField) SetMeta(v Meta) error
- func (nv *FloatField) SetNullValue(v interface{})
- func (sa *FloatField) SetStore(v interface{}) error
- func (sa FloatField) Store() bool
- func (FloatField) Type() FieldType
- func (f *FloatField) UnmarshalBSON(data []byte) error
- func (f *FloatField) UnmarshalJSON(data []byte) error
- type FloatFieldParams
- type FloatRangeField
- func (cp FloatRangeField) Coerce() bool
- func (r *FloatRangeField) Field() (Field, error)
- func (i FloatRangeField) Index() bool
- func (r FloatRangeField) MarshalBSON() ([]byte, error)
- func (r FloatRangeField) MarshalJSON() ([]byte, error)
- func (cp *FloatRangeField) SetCoerce(v interface{}) error
- func (i *FloatRangeField) SetIndex(v interface{}) error
- func (sa *FloatRangeField) SetStore(v interface{}) error
- func (sa FloatRangeField) Store() bool
- func (FloatRangeField) Type() FieldType
- func (r *FloatRangeField) UnmarshalBSON(data []byte) error
- func (r *FloatRangeField) UnmarshalJSON(data []byte) error
- type FloatRangeFieldParams
- type FuncKind
- type Funcs
- type Function
- type FunctionScoreQuery
- func (b FunctionScoreQuery) Boost() float64
- func (bm *FunctionScoreQuery) BoostMode() BoostMode
- func (fs *FunctionScoreQuery) Clause() (QueryClause, error)
- func (fs *FunctionScoreQuery) Clear()
- func (FunctionScoreQuery) Complete()
- func (fs *FunctionScoreQuery) Functions() Functions
- func (fs *FunctionScoreQuery) IsEmpty() bool
- func (FunctionScoreQuery) Kind() QueryKind
- func (fs FunctionScoreQuery) MarshalJSON() ([]byte, error)
- func (mb FunctionScoreQuery) MaxBoost() float64
- func (ms FunctionScoreQuery) MinScore() float64
- func (fs *FunctionScoreQuery) Name() string
- func (fs *FunctionScoreQuery) Query() *Query
- func (sm *FunctionScoreQuery) ScoreMode() ScoreMode
- func (b *FunctionScoreQuery) SetBoost(v interface{}) error
- func (bm *FunctionScoreQuery) SetBoostMode(boostMode BoostMode) error
- func (fs *FunctionScoreQuery) SetFunctions(funcs Funcs) error
- func (mb FunctionScoreQuery) SetMaxBoost(v float64)
- func (ms *FunctionScoreQuery) SetMinScore(v float64)
- func (n *FunctionScoreQuery) SetName(name string)
- func (fs *FunctionScoreQuery) SetQuery(query *QueryParams) error
- func (sm *FunctionScoreQuery) SetScoreMode(scoreMode ScoreMode) error
- func (fs *FunctionScoreQuery) UnmarshalJSON(data []byte) error
- type FunctionScoreQueryParams
- type FunctionScorer
- type Functioner
- type Functions
- type Fuzzier
- type FuzzyQuery
- func (f *FuzzyQuery) Clause() (QueryClause, error)
- func (f *FuzzyQuery) Clear()
- func (FuzzyQuery) Complete()
- func (f FuzzyQuery) DefaultFuzzyRewrite() Rewrite
- func (f FuzzyQuery) Field() string
- func (f FuzzyQuery) Fuzziness() string
- func (f FuzzyQuery) FuzzyRewrite() Rewrite
- func (f *FuzzyQuery) IsEmpty() bool
- func (f FuzzyQuery) Kind() QueryKind
- func (f FuzzyQuery) MarshalBSON() ([]byte, error)
- func (f FuzzyQuery) MarshalJSON() ([]byte, error)
- func (me FuzzyQuery) MaxExpansions() int
- func (n FuzzyQuery) Name() string
- func (pl FuzzyQuery) PrefixLength() int
- func (r FuzzyQuery) Rewrite() Rewrite
- func (f *FuzzyQuery) Set(field string, fuzzier Fuzzier) error
- func (f *FuzzyQuery) SetFuzziness(v string)
- func (f *FuzzyQuery) SetFuzzyRewrite(v Rewrite) error
- func (me *FuzzyQuery) SetMaxExpansions(v interface{}) error
- func (n *FuzzyQuery) SetName(name string)
- func (pl *FuzzyQuery) SetPrefixLength(v interface{}) error
- func (r *FuzzyQuery) SetRewrite(v Rewrite) error
- func (t *FuzzyQuery) SetTranspositions(v interface{}) error
- func (t FuzzyQuery) Transpositions() bool
- func (f *FuzzyQuery) UnmarshalBSON(data []byte) error
- func (f *FuzzyQuery) UnmarshalJSON(data []byte) error
- func (f *FuzzyQuery) Vale() string
- type FuzzyQueryParams
- type FuzzyRule
- func (ap FuzzyRule) Analyzer() string
- func (f FuzzyRule) DefaultFuzzyRewrite() Rewrite
- func (r FuzzyRule) Filter() *RuleFilter
- func (f FuzzyRule) Fuzziness() string
- func (f FuzzyRule) FuzzyRewrite() Rewrite
- func (f FuzzyRule) MarshalBSON() ([]byte, error)
- func (f FuzzyRule) MarshalJSON() ([]byte, error)
- func (pl FuzzyRule) PrefixLength() int
- func (f *FuzzyRule) Rule() (QueryRule, error)
- func (ap *FuzzyRule) SetAnalyzer(v string)
- func (r *FuzzyRule) SetFilter(filter RuleFilterer) error
- func (f *FuzzyRule) SetFuzziness(v string)
- func (f *FuzzyRule) SetFuzzyRewrite(v Rewrite) error
- func (pl *FuzzyRule) SetPrefixLength(v interface{}) error
- func (f *FuzzyRule) SetTerm(term string) error
- func (t *FuzzyRule) SetTranspositions(v interface{}) error
- func (uf *FuzzyRule) SetUseField(field string)
- func (f FuzzyRule) Term() string
- func (t FuzzyRule) Transpositions() bool
- func (FuzzyRule) Type() RuleType
- func (f *FuzzyRule) UnmarshalBSON(data []byte) error
- func (f *FuzzyRule) UnmarshalJSON(data []byte) error
- func (uf FuzzyRule) UseField() string
- type FuzzyRuleParams
- type FuzzyRuler
- type GaussFunction
- func (g *GaussFunction) Decay() dynamic.Number
- func (g *GaussFunction) Field() string
- func (g GaussFunction) Filter() QueryClause
- func (GaussFunction) FuncKind() FuncKind
- func (g GaussFunction) MarshalBSON() ([]byte, error)
- func (g GaussFunction) MarshalJSON() ([]byte, error)
- func (g *GaussFunction) Offset() dynamic.StringNumberOrTime
- func (g GaussFunction) Origin() interface{}
- func (g GaussFunction) Scale() dynamic.StringOrNumber
- func (g *GaussFunction) SetDecay(value interface{}) error
- func (g *GaussFunction) SetField(field string) error
- func (g *GaussFunction) SetFilter(c CompleteClauser) error
- func (g *GaussFunction) SetOffset(offset interface{}) error
- func (g *GaussFunction) SetOrigin(origin interface{}) error
- func (g *GaussFunction) SetScale(scale interface{}) error
- func (b *GaussFunction) SetWeight(v interface{}) error
- func (b *GaussFunction) Weight() float64
- type GaussFunctionParams
- type GeoBoundingBoxQuery
- func (g GeoBoundingBoxQuery) BoundingBox() interface{}
- func (g *GeoBoundingBoxQuery) Clause() (QueryClause, error)
- func (g *GeoBoundingBoxQuery) Clear()
- func (GeoBoundingBoxQuery) Complete()
- func (g GeoBoundingBoxQuery) DecodeBoundingBox(v interface{}) error
- func (f GeoBoundingBoxQuery) Field() string
- func (g *GeoBoundingBoxQuery) GeoBoundingBox() (*GeoBoundingBoxQuery, error)
- func (g *GeoBoundingBoxQuery) IsEmpty() bool
- func (GeoBoundingBoxQuery) Kind() QueryKind
- func (g GeoBoundingBoxQuery) MarshalBSON() ([]byte, error)
- func (g GeoBoundingBoxQuery) MarshalJSON() ([]byte, error)
- func (n GeoBoundingBoxQuery) Name() string
- func (g *GeoBoundingBoxQuery) SetBoundingBox(bb BoundingBoxer)
- func (f *GeoBoundingBoxQuery) SetField(field string) error
- func (n *GeoBoundingBoxQuery) SetName(name string)
- func (g *GeoBoundingBoxQuery) SetType(typ string)
- func (g GeoBoundingBoxQuery) Type() string
- func (g *GeoBoundingBoxQuery) UnmarshalBSON(data []byte) error
- func (g *GeoBoundingBoxQuery) UnmarshalJSON(data []byte) error
- type GeoBoundingBoxQueryParams
- type GeoBoundingBoxer
- type GeoDistanceQuery
- func (q *GeoDistanceQuery) Clause() (QueryClause, error)
- func (q *GeoDistanceQuery) Clear()
- func (GeoDistanceQuery) Complete()
- func (q GeoDistanceQuery) DecodeGeoPoint(v interface{}) error
- func (q GeoDistanceQuery) Distance() string
- func (q GeoDistanceQuery) DistanceType() DistanceType
- func (f GeoDistanceQuery) Field() string
- func (q *GeoDistanceQuery) GeoDistance() (*GeoDistanceQuery, error)
- func (q GeoDistanceQuery) GeoPoint() interface{}
- func (q *GeoDistanceQuery) IsEmpty() bool
- func (GeoDistanceQuery) Kind() QueryKind
- func (q GeoDistanceQuery) MarshalBSON() ([]byte, error)
- func (q GeoDistanceQuery) MarshalJSON() ([]byte, error)
- func (n GeoDistanceQuery) Name() string
- func (q *GeoDistanceQuery) SetDistance(distance string) error
- func (q *GeoDistanceQuery) SetDistanceType(typ DistanceType) error
- func (f *GeoDistanceQuery) SetField(field string) error
- func (q *GeoDistanceQuery) SetGeoPoint(v interface{}) error
- func (n *GeoDistanceQuery) SetName(name string)
- func (q *GeoDistanceQuery) SetValidationMethod(method ValidationMethod) error
- func (q *GeoDistanceQuery) UnmarshalBSON(data []byte) error
- func (q *GeoDistanceQuery) UnmarshalJSON(data []byte) error
- func (q GeoDistanceQuery) ValidationMethod() ValidationMethod
- type GeoDistanceQueryParams
- type GeoDistancer
- type GeoPointField
- func (gp *GeoPointField) Field() (Field, error)
- func (im GeoPointField) IgnoreMalformed() bool
- func (z GeoPointField) IgnoreZValue() bool
- func (gp GeoPointField) MarshalJSON() ([]byte, error)
- func (nv GeoPointField) NullValue() interface{}
- func (im *GeoPointField) SetIgnoreMalformed(v interface{}) error
- func (z *GeoPointField) SetIgnoreZValue(v interface{}) error
- func (nv *GeoPointField) SetNullValue(v interface{})
- func (GeoPointField) Type() FieldType
- func (gp *GeoPointField) UnmarshalJSON(data []byte) error
- type GeoPointFieldParams
- type GeoPolygonQuery
- func (q *GeoPolygonQuery) Clause() (QueryClause, error)
- func (q *GeoPolygonQuery) Clear()
- func (GeoPolygonQuery) Complete()
- func (q *GeoPolygonQuery) GeoPolygon() (*GeoPolygonQuery, error)
- func (q *GeoPolygonQuery) IsEmpty() bool
- func (GeoPolygonQuery) Kind() QueryKind
- func (q GeoPolygonQuery) MarshalBSON() ([]byte, error)
- func (q GeoPolygonQuery) MarshalJSON() ([]byte, error)
- func (n GeoPolygonQuery) Name() string
- func (n *GeoPolygonQuery) SetName(name string)
- func (q *GeoPolygonQuery) UnmarshalBSON(data []byte) error
- func (q *GeoPolygonQuery) UnmarshalJSON(data []byte) error
- type GeoPolygonQueryParams
- type GeoShapeField
- func (gs *GeoShapeField) Field() (Field, error)
- func (im GeoShapeField) IgnoreMalformed() bool
- func (z GeoShapeField) IgnoreZValue() bool
- func (gs GeoShapeField) MarshalJSON() ([]byte, error)
- func (nv GeoShapeField) NullValue() interface{}
- func (o GeoShapeField) Orientation() Orientation
- func (im *GeoShapeField) SetIgnoreMalformed(v interface{}) error
- func (z *GeoShapeField) SetIgnoreZValue(v interface{}) error
- func (nv *GeoShapeField) SetNullValue(v interface{})
- func (o *GeoShapeField) SetOrientation(orientation Orientation) error
- func (GeoShapeField) Type() FieldType
- func (gs *GeoShapeField) UnmarshalJSON(data []byte) error
- type GeoShapeFieldParams
- type GeoShapeQuery
- func (q *GeoShapeQuery) Clause() (QueryClause, error)
- func (q *GeoShapeQuery) Clear()
- func (GeoShapeQuery) Complete()
- func (f GeoShapeQuery) Field() string
- func (q *GeoShapeQuery) GeoShape() (*GeoShapeQuery, error)
- func (q GeoShapeQuery) IgnoreUnmapped() bool
- func (q *GeoShapeQuery) IsEmpty() bool
- func (GeoShapeQuery) Kind() QueryKind
- func (q GeoShapeQuery) MarshalBSON() ([]byte, error)
- func (q GeoShapeQuery) MarshalJSON() ([]byte, error)
- func (n GeoShapeQuery) Name() string
- func (q GeoShapeQuery) Relation() SpatialRelation
- func (f *GeoShapeQuery) SetField(field string) error
- func (q *GeoShapeQuery) SetIgnoreUnmapped(v bool)
- func (q *GeoShapeQuery) SetIndexedShape(indexed *IndexedShape) error
- func (n *GeoShapeQuery) SetName(name string)
- func (q *GeoShapeQuery) SetRelation(v SpatialRelation) error
- func (q *GeoShapeQuery) SetShape(shape interface{}) error
- func (q GeoShapeQuery) Shape() interface{}
- func (q *GeoShapeQuery) UnmarshalBSON(data []byte) error
- func (q *GeoShapeQuery) UnmarshalJSON(data []byte) error
- type GeoShapeQueryParams
- type GeoShaper
- type HalfFloatField
- func (b HalfFloatField) Boost() float64
- func (cp HalfFloatField) Coerce() bool
- func (dv HalfFloatField) DocValues() bool
- func (hf *HalfFloatField) Field() (Field, error)
- func (im HalfFloatField) IgnoreMalformed() bool
- func (i HalfFloatField) Index() bool
- func (hf HalfFloatField) MarshalJSON() ([]byte, error)
- func (m HalfFloatField) Meta() Meta
- func (nv HalfFloatField) NullValue() interface{}
- func (b *HalfFloatField) SetBoost(v interface{}) error
- func (cp *HalfFloatField) SetCoerce(v interface{}) error
- func (dv *HalfFloatField) SetDocValues(v interface{}) error
- func (im *HalfFloatField) SetIgnoreMalformed(v interface{}) error
- func (i *HalfFloatField) SetIndex(v interface{}) error
- func (m *HalfFloatField) SetMeta(v Meta) error
- func (nv *HalfFloatField) SetNullValue(v interface{})
- func (sa *HalfFloatField) SetStore(v interface{}) error
- func (sa HalfFloatField) Store() bool
- func (HalfFloatField) Type() FieldType
- func (hf *HalfFloatField) UnmarshalJSON(data []byte) error
- type HalfFloatFieldParams
- type HasChildQuery
- func (q *HasChildQuery) Clause() (QueryClause, error)
- func (q *HasChildQuery) Clear()
- func (HasChildQuery) Complete()
- func (q *HasChildQuery) HasChild() (*HasChildQuery, error)
- func (q HasChildQuery) IgnoreUnmapped() bool
- func (q *HasChildQuery) IsEmpty() bool
- func (HasChildQuery) Kind() QueryKind
- func (q HasChildQuery) MarshalBSON() ([]byte, error)
- func (q HasChildQuery) MarshalJSON() ([]byte, error)
- func (q *HasChildQuery) MaxChildren() int
- func (q *HasChildQuery) MinChildren() int
- func (n HasChildQuery) Name() string
- func (q HasChildQuery) Query() *Query
- func (q HasChildQuery) ScoreMode() ScoreMode
- func (q *HasChildQuery) SetIgnoreUnmapped(ignoreUnmapped interface{}) error
- func (q *HasChildQuery) SetMaxChildren(max interface{}) error
- func (q *HasChildQuery) SetMinChildren(min interface{}) error
- func (n *HasChildQuery) SetName(name string)
- func (q *HasChildQuery) SetQuery(query Querier) error
- func (q *HasChildQuery) SetScoreMode(sm ScoreMode) error
- func (q *HasChildQuery) SetType(typ string) error
- func (q HasChildQuery) Type() string
- func (q *HasChildQuery) UnmarshalBSON(data []byte) error
- func (q *HasChildQuery) UnmarshalJSON(data []byte) error
- type HasChildQueryParams
- type HasChilder
- type HasParentQuery
- func (q *HasParentQuery) Clause() (QueryClause, error)
- func (q *HasParentQuery) Clear()
- func (HasParentQuery) Complete()
- func (q *HasParentQuery) HasParent() (*HasParentQuery, error)
- func (q HasParentQuery) IgnoreUnmapped() bool
- func (q *HasParentQuery) IsEmpty() bool
- func (HasParentQuery) Kind() QueryKind
- func (q HasParentQuery) MarshalBSON() ([]byte, error)
- func (q HasParentQuery) MarshalJSON() ([]byte, error)
- func (n HasParentQuery) Name() string
- func (q HasParentQuery) ParentType() string
- func (q HasParentQuery) Query() *Query
- func (q HasParentQuery) Score() bool
- func (q *HasParentQuery) SetIgnoreUnmapped(ignoreUnmapped interface{}) error
- func (n *HasParentQuery) SetName(name string)
- func (q *HasParentQuery) SetParentType(typ string) error
- func (q *HasParentQuery) SetQuery(query Querier) error
- func (q *HasParentQuery) SetScore(score interface{}) error
- func (q *HasParentQuery) UnmarshalBSON(data []byte) error
- func (q *HasParentQuery) UnmarshalJSON(data []byte) error
- type HasParentQueryParams
- type HasParenter
- type HistogramField
- func (h *HistogramField) Field() (Field, error)
- func (h HistogramField) MarshalBSON() ([]byte, error)
- func (h HistogramField) MarshalJSON() ([]byte, error)
- func (HistogramField) Type() FieldType
- func (h *HistogramField) UnmarshalBSON(data []byte) error
- func (h *HistogramField) UnmarshalJSON(data []byte) error
- type HistograpmFieldParams
- type IDsQuery
- func (id *IDsQuery) Clause() (QueryClause, error)
- func (id *IDsQuery) Clear()
- func (IDsQuery) Complete()
- func (id *IDsQuery) IDs() (*IDsQuery, error)
- func (id *IDsQuery) IsEmpty() bool
- func (IDsQuery) Kind() QueryKind
- func (id IDsQuery) MarshalJSON() ([]byte, error)
- func (n IDsQuery) Name() string
- func (n *IDsQuery) SetName(name string)
- func (id *IDsQuery) SetValues(ids []string) error
- func (id *IDsQuery) UnmarshalJSON(data []byte) error
- func (id IDsQuery) Values() []string
- type IDsQueryParams
- type IDser
- type IPField
- func (b IPField) Boost() float64
- func (dv IPField) DocValues() bool
- func (ip *IPField) Field() (Field, error)
- func (im IPField) IgnoreMalformed() bool
- func (i IPField) Index() bool
- func (ip IPField) MarshalJSON() ([]byte, error)
- func (nv IPField) NullValue() interface{}
- func (b *IPField) SetBoost(v interface{}) error
- func (dv *IPField) SetDocValues(v interface{}) error
- func (im *IPField) SetIgnoreMalformed(v interface{}) error
- func (i *IPField) SetIndex(v interface{}) error
- func (nv *IPField) SetNullValue(v interface{})
- func (sa *IPField) SetStore(v interface{}) error
- func (sa IPField) Store() bool
- func (IPField) Type() FieldType
- func (ip *IPField) UnmarshalJSON(data []byte) error
- type IPFieldParams
- type IPRangeField
- func (cp IPRangeField) Coerce() bool
- func (r *IPRangeField) Field() (Field, error)
- func (i IPRangeField) Index() bool
- func (r IPRangeField) MarshalBSON() ([]byte, error)
- func (r IPRangeField) MarshalJSON() ([]byte, error)
- func (cp *IPRangeField) SetCoerce(v interface{}) error
- func (i *IPRangeField) SetIndex(v interface{}) error
- func (sa *IPRangeField) SetStore(v interface{}) error
- func (sa IPRangeField) Store() bool
- func (IPRangeField) Type() FieldType
- func (r *IPRangeField) UnmarshalBSON(data []byte) error
- func (r *IPRangeField) UnmarshalJSON(data []byte) error
- type IPRangeFieldParams
- type Index
- type IndexOptions
- type IndexParams
- type IndexPrefixes
- type IndexSettingsParams
- type IndexedShape
- type IntegerField
- func (b IntegerField) Boost() float64
- func (cp IntegerField) Coerce() bool
- func (dv IntegerField) DocValues() bool
- func (i *IntegerField) Field() (Field, error)
- func (im IntegerField) IgnoreMalformed() bool
- func (i IntegerField) Index() bool
- func (i IntegerField) MarshalBSON() ([]byte, error)
- func (i IntegerField) MarshalJSON() ([]byte, error)
- func (m IntegerField) Meta() Meta
- func (nv IntegerField) NullValue() interface{}
- func (b *IntegerField) SetBoost(v interface{}) error
- func (cp *IntegerField) SetCoerce(v interface{}) error
- func (dv *IntegerField) SetDocValues(v interface{}) error
- func (im *IntegerField) SetIgnoreMalformed(v interface{}) error
- func (i *IntegerField) SetIndex(v interface{}) error
- func (m *IntegerField) SetMeta(v Meta) error
- func (nv *IntegerField) SetNullValue(v interface{})
- func (sa *IntegerField) SetStore(v interface{}) error
- func (sa IntegerField) Store() bool
- func (IntegerField) Type() FieldType
- func (i *IntegerField) UnmarshalBSON(data []byte) error
- func (i *IntegerField) UnmarshalJSON(data []byte) error
- type IntegerFieldParams
- type IntegerRangeField
- func (cp IntegerRangeField) Coerce() bool
- func (r *IntegerRangeField) Field() (Field, error)
- func (i IntegerRangeField) Index() bool
- func (r IntegerRangeField) MarshalBSON() ([]byte, error)
- func (r IntegerRangeField) MarshalJSON() ([]byte, error)
- func (cp *IntegerRangeField) SetCoerce(v interface{}) error
- func (i *IntegerRangeField) SetIndex(v interface{}) error
- func (sa *IntegerRangeField) SetStore(v interface{}) error
- func (sa IntegerRangeField) Store() bool
- func (IntegerRangeField) Type() FieldType
- func (r *IntegerRangeField) UnmarshalBSON(data []byte) error
- func (r *IntegerRangeField) UnmarshalJSON(data []byte) error
- type IntegerRangeFieldParams
- type IntervalsQuery
- func (q *IntervalsQuery) Clause() (QueryClause, error)
- func (q *IntervalsQuery) Clear()
- func (IntervalsQuery) Complete()
- func (f IntervalsQuery) Field() string
- func (q *IntervalsQuery) Intervals() (*IntervalsQuery, error)
- func (q *IntervalsQuery) IsEmpty() bool
- func (IntervalsQuery) Kind() QueryKind
- func (q IntervalsQuery) MarshalBSON() ([]byte, error)
- func (q IntervalsQuery) MarshalJSON() ([]byte, error)
- func (n IntervalsQuery) Name() string
- func (q *IntervalsQuery) Rule() QueryRule
- func (q *IntervalsQuery) Set(field string, rule Ruler) error
- func (f *IntervalsQuery) SetField(field string) error
- func (n *IntervalsQuery) SetName(name string)
- func (q *IntervalsQuery) SetRule(rule Ruler) error
- func (q *IntervalsQuery) UnmarshalBSON(data []byte) error
- func (q *IntervalsQuery) UnmarshalJSON(data []byte) error
- type IntervalsQueryParams
- type Intervalser
- type JoinField
- func (ego JoinField) EagerGlobalOrdinals() bool
- func (j *JoinField) Field() (Field, error)
- func (j JoinField) MarshalBSON() ([]byte, error)
- func (j JoinField) MarshalJSON() ([]byte, error)
- func (r JoinField) Relations() Relations
- func (ego *JoinField) SetEagerGlobalOrdinals(v interface{}) error
- func (r *JoinField) SetRelations(v Relations)
- func (JoinField) Type() FieldType
- func (j *JoinField) UnmarshalBSON(data []byte) error
- func (j *JoinField) UnmarshalJSON(data []byte) error
- type JoinFieldParams
- type KeywordField
- func (b KeywordField) Boost() float64
- func (dv KeywordField) DocValues() bool
- func (ego KeywordField) EagerGlobalOrdinals() bool
- func (t *KeywordField) Field() (Field, error)
- func (f KeywordField) Fields() Fields
- func (ia KeywordField) IgnoreAbove() float64
- func (i KeywordField) Index() bool
- func (io KeywordField) IndexOptions() IndexOptions
- func (t KeywordField) MarshalBSON() ([]byte, error)
- func (t KeywordField) MarshalJSON() ([]byte, error)
- func (m KeywordField) Meta() Meta
- func (n KeywordField) Normalizer() string
- func (n KeywordField) Norms() bool
- func (nv KeywordField) NullValue() interface{}
- func (b *KeywordField) SetBoost(v interface{}) error
- func (dv *KeywordField) SetDocValues(v interface{}) error
- func (ego *KeywordField) SetEagerGlobalOrdinals(v interface{}) error
- func (f *KeywordField) SetFields(fields Fieldset) error
- func (ia KeywordField) SetIgnoreAbove(v interface{}) error
- func (i *KeywordField) SetIndex(v interface{}) error
- func (io *KeywordField) SetIndexOptions(v IndexOptions) error
- func (m *KeywordField) SetMeta(v Meta) error
- func (n *KeywordField) SetNormalizer(v string)
- func (n *KeywordField) SetNorms(v interface{}) error
- func (nv *KeywordField) SetNullValue(v interface{})
- func (s *KeywordField) SetSimilarity(v Similarity) error
- func (sq *KeywordField) SetSplitQueriesOnWhitespace(v interface{}) error
- func (sa *KeywordField) SetStore(v interface{}) error
- func (s KeywordField) Similarity() Similarity
- func (sq KeywordField) SplitQueriesOnWhitespace() bool
- func (sa KeywordField) Store() bool
- func (KeywordField) Type() FieldType
- func (t *KeywordField) UnmarshalBSON(data []byte) error
- func (t *KeywordField) UnmarshalJSON(data []byte) error
- type KeywordFieldParams
- type LatLon
- type LinearDecayFunction
- func (l *LinearDecayFunction) Decay() dynamic.Number
- func (l *LinearDecayFunction) Field() string
- func (l LinearDecayFunction) Filter() QueryClause
- func (LinearDecayFunction) FuncKind() FuncKind
- func (l LinearDecayFunction) MarshalBSON() ([]byte, error)
- func (l LinearDecayFunction) MarshalJSON() ([]byte, error)
- func (l *LinearDecayFunction) Offset() dynamic.StringNumberOrTime
- func (l LinearDecayFunction) Origin() interface{}
- func (l LinearDecayFunction) Scale() dynamic.StringOrNumber
- func (l *LinearDecayFunction) SetDecay(value interface{}) error
- func (l *LinearDecayFunction) SetField(field string) error
- func (l *LinearDecayFunction) SetFilter(c CompleteClauser) error
- func (l *LinearDecayFunction) SetOffset(offset interface{}) error
- func (l *LinearDecayFunction) SetOrigin(origin interface{}) error
- func (l *LinearDecayFunction) SetScale(scale interface{}) error
- func (b *LinearDecayFunction) SetWeight(v interface{}) error
- func (b *LinearDecayFunction) Weight() float64
- type LinearDecayFunctionParams
- type LinearFunction
- type LinearFunctionParams
- type LinearFunctioner
- type LogFunction
- type LogFunctionParams
- type LogFunctioner
- type LongField
- func (b LongField) Boost() float64
- func (cp LongField) Coerce() bool
- func (dv LongField) DocValues() bool
- func (l *LongField) Field() (Field, error)
- func (im LongField) IgnoreMalformed() bool
- func (i LongField) Index() bool
- func (l LongField) MarshalBSON() ([]byte, error)
- func (l LongField) MarshalJSON() ([]byte, error)
- func (m LongField) Meta() Meta
- func (nv LongField) NullValue() interface{}
- func (b *LongField) SetBoost(v interface{}) error
- func (cp *LongField) SetCoerce(v interface{}) error
- func (dv *LongField) SetDocValues(v interface{}) error
- func (im *LongField) SetIgnoreMalformed(v interface{}) error
- func (i *LongField) SetIndex(v interface{}) error
- func (m *LongField) SetMeta(v Meta) error
- func (nv *LongField) SetNullValue(v interface{})
- func (sa *LongField) SetStore(v interface{}) error
- func (sa LongField) Store() bool
- func (LongField) Type() FieldType
- func (l *LongField) UnmarshalBSON(data []byte) error
- func (l *LongField) UnmarshalJSON(data []byte) error
- type LongFieldParams
- type LongRangeField
- func (cp LongRangeField) Coerce() bool
- func (r *LongRangeField) Field() (Field, error)
- func (i LongRangeField) Index() bool
- func (r LongRangeField) MarshalBSON() ([]byte, error)
- func (r LongRangeField) MarshalJSON() ([]byte, error)
- func (cp *LongRangeField) SetCoerce(v interface{}) error
- func (i *LongRangeField) SetIndex(v interface{}) error
- func (sa *LongRangeField) SetStore(v interface{}) error
- func (sa LongRangeField) Store() bool
- func (LongRangeField) Type() FieldType
- func (r *LongRangeField) UnmarshalBSON(data []byte) error
- func (r *LongRangeField) UnmarshalJSON(data []byte) error
- type LongRangeFieldParams
- type Lookup
- type LookupValues
- func (l LookupValues) ID() string
- func (l *LookupValues) Index() string
- func (l LookupValues) IsEmpty() bool
- func (l LookupValues) MarshalBSON() ([]byte, error)
- func (l LookupValues) MarshalJSON() ([]byte, error)
- func (l *LookupValues) Path() string
- func (l LookupValues) Routing() string
- func (l *LookupValues) SetID(id string) error
- func (l *LookupValues) SetIndex(index string) error
- func (l *LookupValues) SetPath(path string) error
- func (l LookupValues) SetRouting(routing string)
- func (l *LookupValues) UnmarshalBSON(data []byte) error
- func (l *LookupValues) UnmarshalJSON(data []byte) error
- type MappingError
- type Mappings
- type MatchAllQuery
- func (b MatchAllQuery) Boost() float64
- func (ma MatchAllQuery) Clause() (QueryClause, error)
- func (ma *MatchAllQuery) Clear()
- func (MatchAllQuery) Complete()
- func (ma *MatchAllQuery) Disable()
- func (ma *MatchAllQuery) Enable()
- func (ma *MatchAllQuery) IsEmpty() bool
- func (MatchAllQuery) Kind() QueryKind
- func (ma MatchAllQuery) MarshalJSON() ([]byte, error)
- func (ma *MatchAllQuery) MatchAll() (*MatchAllQuery, error)
- func (n MatchAllQuery) Name() string
- func (b *MatchAllQuery) SetBoost(v interface{}) error
- func (n *MatchAllQuery) SetName(name string)
- func (ma *MatchAllQuery) UnmarshalJSON(data []byte) error
- type MatchAllQueryParams
- type MatchBoolPrefixQuery
- func (ap MatchBoolPrefixQuery) Analyzer() string
- func (m *MatchBoolPrefixQuery) Clause() (QueryClause, error)
- func (m *MatchBoolPrefixQuery) Clear()
- func (MatchBoolPrefixQuery) Complete()
- func (f MatchBoolPrefixQuery) DefaultFuzzyRewrite() Rewrite
- func (f MatchBoolPrefixQuery) Field() string
- func (f MatchBoolPrefixQuery) Fuzziness() string
- func (f MatchBoolPrefixQuery) FuzzyRewrite() Rewrite
- func (ft MatchBoolPrefixQuery) FuzzyTranspositions() bool
- func (m *MatchBoolPrefixQuery) IsEmpty() bool
- func (MatchBoolPrefixQuery) Kind() QueryKind
- func (m MatchBoolPrefixQuery) MarshalBSON() ([]byte, error)
- func (m MatchBoolPrefixQuery) MarshalJSON() ([]byte, error)
- func (m *MatchBoolPrefixQuery) MatchBoolPrefix() (*MatchBoolPrefixQuery, error)
- func (me MatchBoolPrefixQuery) MaxExpansions() int
- func (msm MatchBoolPrefixQuery) MinimumShouldMatch() string
- func (n MatchBoolPrefixQuery) Name() string
- func (o MatchBoolPrefixQuery) Operator() Operator
- func (pl MatchBoolPrefixQuery) PrefixLength() int
- func (m MatchBoolPrefixQuery) Query() string
- func (ap *MatchBoolPrefixQuery) SetAnalyzer(v string)
- func (f *MatchBoolPrefixQuery) SetField(field string) error
- func (f *MatchBoolPrefixQuery) SetFuzziness(v string)
- func (f *MatchBoolPrefixQuery) SetFuzzyRewrite(v Rewrite) error
- func (ft *MatchBoolPrefixQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
- func (me *MatchBoolPrefixQuery) SetMaxExpansions(v interface{}) error
- func (msm *MatchBoolPrefixQuery) SetMinimumShouldMatch(v string)
- func (n *MatchBoolPrefixQuery) SetName(name string)
- func (o *MatchBoolPrefixQuery) SetOperator(v Operator) error
- func (pl *MatchBoolPrefixQuery) SetPrefixLength(v interface{}) error
- func (m *MatchBoolPrefixQuery) SetQuery(query string) error
- func (m *MatchBoolPrefixQuery) UnmarshalBSON(data []byte) error
- func (m *MatchBoolPrefixQuery) UnmarshalJSON(data []byte) error
- type MatchBoolPrefixQueryParams
- type MatchBoolPrefixer
- type MatchNoneQuery
- func (b MatchNoneQuery) Boost() float64
- func (mn *MatchNoneQuery) Clause() (QueryClause, error)
- func (mn *MatchNoneQuery) Clear()
- func (MatchNoneQuery) Complete()
- func (mn *MatchNoneQuery) Disable()
- func (mn *MatchNoneQuery) Enable()
- func (mn *MatchNoneQuery) IsEmpty() bool
- func (MatchNoneQuery) Kind() QueryKind
- func (mn MatchNoneQuery) MarshalJSON() ([]byte, error)
- func (n MatchNoneQuery) Name() string
- func (b *MatchNoneQuery) SetBoost(v interface{}) error
- func (n *MatchNoneQuery) SetName(name string)
- func (mn *MatchNoneQuery) UnmarshalJSON(data []byte) error
- type MatchNoneQueryParams
- type MatchPhrasePrefixQuery
- func (ap MatchPhrasePrefixQuery) Analyzer() string
- func (m *MatchPhrasePrefixQuery) Clause() (QueryClause, error)
- func (m *MatchPhrasePrefixQuery) Clear()
- func (MatchPhrasePrefixQuery) Complete()
- func (f MatchPhrasePrefixQuery) Field() string
- func (m *MatchPhrasePrefixQuery) IsEmpty() bool
- func (MatchPhrasePrefixQuery) Kind() QueryKind
- func (m MatchPhrasePrefixQuery) MarshalBSON() ([]byte, error)
- func (m MatchPhrasePrefixQuery) MarshalJSON() ([]byte, error)
- func (m *MatchPhrasePrefixQuery) MatchPhrasePrefix() (*MatchPhrasePrefixQuery, error)
- func (me MatchPhrasePrefixQuery) MaxExpansions() int
- func (n MatchPhrasePrefixQuery) Name() string
- func (m MatchPhrasePrefixQuery) Query() string
- func (ap *MatchPhrasePrefixQuery) SetAnalyzer(v string)
- func (f *MatchPhrasePrefixQuery) SetField(field string) error
- func (me *MatchPhrasePrefixQuery) SetMaxExpansions(v interface{}) error
- func (n *MatchPhrasePrefixQuery) SetName(name string)
- func (m *MatchPhrasePrefixQuery) SetQuery(query string) error
- func (s *MatchPhrasePrefixQuery) SetSlop(v interface{}) error
- func (ztq *MatchPhrasePrefixQuery) SetZeroTermsQuery(v ZeroTerms) error
- func (s MatchPhrasePrefixQuery) Slop() int
- func (m *MatchPhrasePrefixQuery) UnmarshalBSON(data []byte) error
- func (m *MatchPhrasePrefixQuery) UnmarshalJSON(data []byte) error
- func (ztq MatchPhrasePrefixQuery) ZeroTermsQuery() ZeroTerms
- type MatchPhrasePrefixQueryParams
- type MatchPhrasePrefixer
- type MatchPhraseQuery
- func (ap MatchPhraseQuery) Analyzer() string
- func (m *MatchPhraseQuery) Clause() (QueryClause, error)
- func (m *MatchPhraseQuery) Clear()
- func (MatchPhraseQuery) Complete()
- func (f MatchPhraseQuery) Field() string
- func (m *MatchPhraseQuery) IsEmpty() bool
- func (MatchPhraseQuery) Kind() QueryKind
- func (m MatchPhraseQuery) MarshalBSON() ([]byte, error)
- func (m MatchPhraseQuery) MarshalJSON() ([]byte, error)
- func (m *MatchPhraseQuery) MatchPhrase() (*MatchPhraseQuery, error)
- func (n MatchPhraseQuery) Name() string
- func (m MatchPhraseQuery) Query() string
- func (ap *MatchPhraseQuery) SetAnalyzer(v string)
- func (f *MatchPhraseQuery) SetField(field string) error
- func (n *MatchPhraseQuery) SetName(name string)
- func (m *MatchPhraseQuery) SetQuery(query string) error
- func (ztq *MatchPhraseQuery) SetZeroTermsQuery(v ZeroTerms) error
- func (m *MatchPhraseQuery) UnmarshalBSON(data []byte) error
- func (m *MatchPhraseQuery) UnmarshalJSON(data []byte) error
- func (ztq MatchPhraseQuery) ZeroTermsQuery() ZeroTerms
- type MatchPhraseQueryParams
- type MatchPhraser
- type MatchQuery
- func (ap MatchQuery) Analyzer() string
- func (a MatchQuery) AutoGenerateSynonymsPhraseQuery() bool
- func (m *MatchQuery) Clause() (QueryClause, error)
- func (m *MatchQuery) Clear()
- func (MatchQuery) Complete()
- func (cf MatchQuery) CutoffFrequency() dynamic.Number
- func (f MatchQuery) DefaultFuzzyRewrite() Rewrite
- func (f MatchQuery) Field() string
- func (f MatchQuery) Fuzziness() string
- func (f MatchQuery) FuzzyRewrite() Rewrite
- func (ft MatchQuery) FuzzyTranspositions() bool
- func (m *MatchQuery) IsEmpty() bool
- func (m MatchQuery) Kind() QueryKind
- func (l MatchQuery) Lenient() bool
- func (m MatchQuery) MarshalBSON() ([]byte, error)
- func (m MatchQuery) MarshalJSON() ([]byte, error)
- func (m *MatchQuery) Match() (*MatchQuery, error)
- func (me MatchQuery) MaxExpansions() int
- func (msm MatchQuery) MinimumShouldMatch() string
- func (n MatchQuery) Name() string
- func (o MatchQuery) Operator() Operator
- func (pl MatchQuery) PrefixLength() int
- func (m *MatchQuery) Query() *dynamic.StringNumberBoolOrTime
- func (m *MatchQuery) Set(field string, match Matcher) error
- func (ap *MatchQuery) SetAnalyzer(v string)
- func (a *MatchQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
- func (cf *MatchQuery) SetCutoffFreuency(n dynamic.Number)
- func (f *MatchQuery) SetField(field string) error
- func (f *MatchQuery) SetFuzziness(v string)
- func (f *MatchQuery) SetFuzzyRewrite(v Rewrite) error
- func (ft *MatchQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
- func (l *MatchQuery) SetLenient(v bool)
- func (me *MatchQuery) SetMaxExpansions(v interface{}) error
- func (msm *MatchQuery) SetMinimumShouldMatch(v string)
- func (n *MatchQuery) SetName(name string)
- func (o *MatchQuery) SetOperator(v Operator) error
- func (pl *MatchQuery) SetPrefixLength(v interface{}) error
- func (m *MatchQuery) SetQuery(query interface{}) error
- func (ztq *MatchQuery) SetZeroTermsQuery(v ZeroTerms) error
- func (m *MatchQuery) UnmarshalBSON(data []byte) error
- func (m *MatchQuery) UnmarshalJSON(data []byte) error
- func (ztq MatchQuery) ZeroTermsQuery() ZeroTerms
- type MatchQueryParams
- type MatchRule
- func (ap MatchRule) Analyzer() string
- func (r MatchRule) Filter() *RuleFilter
- func (m MatchRule) MarshalBSON() ([]byte, error)
- func (m MatchRule) MarshalJSON() ([]byte, error)
- func (mg MatchRule) MaxGaps() int
- func (o MatchRule) Ordered() bool
- func (m *MatchRule) Query() string
- func (m *MatchRule) Rule() (QueryRule, error)
- func (ap *MatchRule) SetAnalyzer(v string)
- func (r *MatchRule) SetFilter(filter RuleFilterer) error
- func (mg *MatchRule) SetMaxGaps(maxGaps interface{}) error
- func (o *MatchRule) SetOrdered(ordered interface{}) error
- func (m *MatchRule) SetQuery(query string) error
- func (uf *MatchRule) SetUseField(field string)
- func (MatchRule) Type() RuleType
- func (m *MatchRule) UnmarshalBSON(data []byte) error
- func (m *MatchRule) UnmarshalJSON(data []byte) error
- func (uf MatchRule) UseField() string
- type MatchRuleParams
- type MatchRuler
- type Matcher
- type Meta
- func (m Meta) Exists(key string) bool
- func (m Meta) Get(key string) string
- func (m Meta) Has(key string) bool
- func (m Meta) IsValid() bool
- func (m *Meta) Len() int
- func (m *Meta) MetricType() string
- func (m *Meta) Set(key string, value string) error
- func (m *Meta) SetMetricType(v string) error
- func (m *Meta) SetUnit(v string) error
- func (m *Meta) Unit() string
- func (m Meta) Validate() error
- func (m *Meta) Value(key string) (string, bool)
- type Modifier
- type MoreLikeThisQuery
- func (ap MoreLikeThisQuery) Analyzer() string
- func (b MoreLikeThisQuery) Boost() float64
- func (q MoreLikeThisQuery) BoostTerms() float64
- func (q *MoreLikeThisQuery) Clause() (QueryClause, error)
- func (q *MoreLikeThisQuery) Clear()
- func (MoreLikeThisQuery) Complete()
- func (q MoreLikeThisQuery) FailOnUnsupportedField() bool
- func (q MoreLikeThisQuery) Fields() []string
- func (q MoreLikeThisQuery) Include() bool
- func (q *MoreLikeThisQuery) IsEmpty() bool
- func (MoreLikeThisQuery) Kind() QueryKind
- func (q MoreLikeThisQuery) Like() interface{}
- func (q MoreLikeThisQuery) MarshalBSON() ([]byte, error)
- func (q MoreLikeThisQuery) MarshalJSON() ([]byte, error)
- func (q MoreLikeThisQuery) MaxDocFrequency() float64
- func (q MoreLikeThisQuery) MaxQueryTerms() int
- func (q MoreLikeThisQuery) MaxWordLength() int
- func (q MoreLikeThisQuery) MinDocFrequency() float64
- func (q MoreLikeThisQuery) MinTermFrequency() float64
- func (q MoreLikeThisQuery) MinWordLength() int
- func (msm MoreLikeThisQuery) MinimumShouldMatch() string
- func (q *MoreLikeThisQuery) MoreLikeThis() (*MoreLikeThisQuery, error)
- func (n MoreLikeThisQuery) Name() string
- func (ap *MoreLikeThisQuery) SetAnalyzer(v string)
- func (b *MoreLikeThisQuery) SetBoost(v interface{}) error
- func (q *MoreLikeThisQuery) SetBoostTerms(v interface{}) error
- func (q *MoreLikeThisQuery) SetFailOnUnsupportedField(v interface{}) error
- func (q *MoreLikeThisQuery) SetFields(fields []string)
- func (q *MoreLikeThisQuery) SetInclude(v interface{}) error
- func (q *MoreLikeThisQuery) SetLike(like interface{}) error
- func (q *MoreLikeThisQuery) SetMaxDocFrequency(v interface{}) error
- func (q *MoreLikeThisQuery) SetMaxQueryTerms(v interface{}) error
- func (q *MoreLikeThisQuery) SetMaxWordLength(v interface{}) error
- func (q *MoreLikeThisQuery) SetMinDocFrequency(v interface{}) error
- func (q *MoreLikeThisQuery) SetMinTermFrequency(v interface{}) error
- func (q *MoreLikeThisQuery) SetMinWordLength(v interface{}) error
- func (msm *MoreLikeThisQuery) SetMinimumShouldMatch(v string)
- func (n *MoreLikeThisQuery) SetName(name string)
- func (q *MoreLikeThisQuery) SetStopWords(stopWords []string)
- func (q *MoreLikeThisQuery) SetUnlike(unlike interface{})
- func (q MoreLikeThisQuery) StopWords() []string
- func (q MoreLikeThisQuery) Unlike() interface{}
- func (q *MoreLikeThisQuery) UnmarshalBSON(data []byte) error
- func (q *MoreLikeThisQuery) UnmarshalJSON(data []byte) error
- type MoreLikeThisQueryParams
- type MoreLikeThiser
- type MultiMatchQuery
- func (ap MultiMatchQuery) Analyzer() string
- func (a MultiMatchQuery) AutoGenerateSynonymsPhraseQuery() bool
- func (b MultiMatchQuery) Boost() float64
- func (q *MultiMatchQuery) Clause() (QueryClause, error)
- func (q *MultiMatchQuery) Clear()
- func (MultiMatchQuery) Complete()
- func (cf MultiMatchQuery) CutoffFrequency() dynamic.Number
- func (f MultiMatchQuery) DefaultFuzzyRewrite() Rewrite
- func (q MultiMatchQuery) Fields() []string
- func (f MultiMatchQuery) Fuzziness() string
- func (f MultiMatchQuery) FuzzyRewrite() Rewrite
- func (ft MultiMatchQuery) FuzzyTranspositions() bool
- func (q *MultiMatchQuery) IsEmpty() bool
- func (MultiMatchQuery) Kind() QueryKind
- func (l MultiMatchQuery) Lenient() bool
- func (q MultiMatchQuery) MarshalBSON() ([]byte, error)
- func (q MultiMatchQuery) MarshalJSON() ([]byte, error)
- func (me MultiMatchQuery) MaxExpansions() int
- func (msm MultiMatchQuery) MinimumShouldMatch() string
- func (q *MultiMatchQuery) MultiMatch() (*MultiMatchQuery, error)
- func (n MultiMatchQuery) Name() string
- func (o MultiMatchQuery) Operator() Operator
- func (pl MultiMatchQuery) PrefixLength() int
- func (q MultiMatchQuery) Query() string
- func (ap *MultiMatchQuery) SetAnalyzer(v string)
- func (a *MultiMatchQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
- func (b *MultiMatchQuery) SetBoost(v interface{}) error
- func (cf *MultiMatchQuery) SetCutoffFreuency(n dynamic.Number)
- func (q *MultiMatchQuery) SetFields(fields []string) error
- func (f *MultiMatchQuery) SetFuzziness(v string)
- func (f *MultiMatchQuery) SetFuzzyRewrite(v Rewrite) error
- func (ft *MultiMatchQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
- func (l *MultiMatchQuery) SetLenient(v bool)
- func (me *MultiMatchQuery) SetMaxExpansions(v interface{}) error
- func (msm *MultiMatchQuery) SetMinimumShouldMatch(v string)
- func (n *MultiMatchQuery) SetName(name string)
- func (o *MultiMatchQuery) SetOperator(v Operator) error
- func (pl *MultiMatchQuery) SetPrefixLength(v interface{}) error
- func (q *MultiMatchQuery) SetQuery(query string) error
- func (tb *MultiMatchQuery) SetTieBreaker(tieBreaker interface{}) error
- func (mm *MultiMatchQuery) SetType(typ MultiMatchType) error
- func (ztq *MultiMatchQuery) SetZeroTermsQuery(v ZeroTerms) error
- func (mm MultiMatchQuery) Type() MultiMatchType
- func (q *MultiMatchQuery) UnmarshalBSON(data []byte) error
- func (q *MultiMatchQuery) UnmarshalJSON(data []byte) error
- func (ztq MultiMatchQuery) ZeroTermsQuery() ZeroTerms
- type MultiMatchQueryParams
- type MultiMatchType
- type MultiMatcher
- type NestedField
- func (dp NestedField) Dynamic() Dynamic
- func (n *NestedField) Field() (Field, error)
- func (iip NestedField) IncludeInParent() bool
- func (iir NestedField) IncludeInRoot() bool
- func (n NestedField) MarshalBSON() ([]byte, error)
- func (n NestedField) MarshalJSON() ([]byte, error)
- func (p NestedField) Properties() Fields
- func (dp *NestedField) SetDynamic(dynamic Dynamic) error
- func (iip *NestedField) SetIncludeInParent(v interface{}) error
- func (iir *NestedField) SetIncludeInRoot(v interface{}) error
- func (p *NestedField) SetProperties(v Fieldset) error
- func (NestedField) Type() FieldType
- func (n *NestedField) UnmarshalBSON(data []byte) error
- func (n *NestedField) UnmarshalJSON(data []byte) error
- type NestedFieldParams
- type NestedQuerier
- type NestedQuery
- func (q *NestedQuery) Clause() (QueryClause, error)
- func (q *NestedQuery) Clear()
- func (NestedQuery) Complete()
- func (q NestedQuery) IgnoreUnmapped() bool
- func (q *NestedQuery) IsEmpty() bool
- func (NestedQuery) Kind() QueryKind
- func (q NestedQuery) MarshalBSON() ([]byte, error)
- func (q NestedQuery) MarshalJSON() ([]byte, error)
- func (n NestedQuery) Name() string
- func (q *NestedQuery) Nested() (*NestedQuery, error)
- func (q NestedQuery) Path() string
- func (q NestedQuery) Query(query Querier) *Query
- func (sm *NestedQuery) ScoreMode() ScoreMode
- func (q *NestedQuery) SetIgnoreUnmapped(v interface{}) error
- func (n *NestedQuery) SetName(name string)
- func (q *NestedQuery) SetPath(v string) error
- func (q *NestedQuery) SetQuery(query Querier) error
- func (sm *NestedQuery) SetScoreMode(scoreMode ScoreMode) error
- func (q *NestedQuery) UnmarshalBSON(data []byte) error
- func (q *NestedQuery) UnmarshalJSON(data []byte) error
- type NestedQueryParams
- type NumberField
- type ObjectField
- func (dp ObjectField) Dynamic() Dynamic
- func (ep ObjectField) Enabled() bool
- func (o *ObjectField) Field() (Field, error)
- func (o ObjectField) MarshalBSON() ([]byte, error)
- func (o ObjectField) MarshalJSON() ([]byte, error)
- func (p ObjectField) Properties() Fields
- func (dp *ObjectField) SetDynamic(dynamic Dynamic) error
- func (ep *ObjectField) SetEnabled(v interface{}) error
- func (p *ObjectField) SetProperties(v Fieldset) error
- func (ObjectField) Type() FieldType
- func (o *ObjectField) UnmarshalBSON(data []byte) error
- func (o *ObjectField) UnmarshalJSON(data []byte) error
- type ObjectFieldParams
- type Operator
- type Orientation
- type ParentIDQuery
- func (q *ParentIDQuery) Clause() (QueryClause, error)
- func (q *ParentIDQuery) Clear()
- func (ParentIDQuery) Complete()
- func (q ParentIDQuery) ID() string
- func (q ParentIDQuery) IgnoreUnmapped() bool
- func (q *ParentIDQuery) IsEmpty() bool
- func (ParentIDQuery) Kind() QueryKind
- func (q ParentIDQuery) MarshalBSON() ([]byte, error)
- func (q ParentIDQuery) MarshalJSON() ([]byte, error)
- func (n ParentIDQuery) Name() string
- func (q *ParentIDQuery) ParentID() (*ParentIDQuery, error)
- func (q *ParentIDQuery) SetID(id string) error
- func (q *ParentIDQuery) SetIgnoreUnmapped(ignore interface{}) error
- func (n *ParentIDQuery) SetName(name string)
- func (q *ParentIDQuery) SetType(typ string) error
- func (q ParentIDQuery) Type() string
- func (q *ParentIDQuery) UnmarshalBSON(data []byte) error
- func (q *ParentIDQuery) UnmarshalJSON(data []byte) error
- type ParentIDQueryParams
- type ParentIDer
- type PercolateDocumentQueryParams
- type PercolateDocumentsQueryParams
- type PercolateQuery
- func (q *PercolateQuery) Clause() (QueryClause, error)
- func (q *PercolateQuery) Clear()
- func (PercolateQuery) Complete()
- func (q PercolateQuery) Document() interface{}
- func (q PercolateQuery) DocumentType() string
- func (q PercolateQuery) Documents() interface{}
- func (f PercolateQuery) Field() string
- func (q PercolateQuery) ID() string
- func (q PercolateQuery) Index() string
- func (q *PercolateQuery) IsEmpty() bool
- func (PercolateQuery) Kind() QueryKind
- func (q PercolateQuery) MarshalBSON() ([]byte, error)
- func (q PercolateQuery) MarshalJSON() ([]byte, error)
- func (n PercolateQuery) Name() string
- func (q *PercolateQuery) Percolate() (*PercolateQuery, error)
- func (q PercolateQuery) Preference() string
- func (q PercolateQuery) Routing() string
- func (q *PercolateQuery) SetDocument(doc interface{}) error
- func (q *PercolateQuery) SetDocumentType(typ string)
- func (q *PercolateQuery) SetDocuments(docs interface{}) error
- func (f *PercolateQuery) SetField(field string) error
- func (q *PercolateQuery) SetID(id string)
- func (q *PercolateQuery) SetIndex(index string)
- func (n *PercolateQuery) SetName(name string)
- func (q *PercolateQuery) SetPreference(pref string)
- func (q *PercolateQuery) SetRouting(routing string)
- func (q *PercolateQuery) SetType(typ string)
- func (q *PercolateQuery) SetVersion(vers int)
- func (q PercolateQuery) Type() string
- func (q *PercolateQuery) UnmarshalBSON(data []byte) error
- func (q *PercolateQuery) UnmarshalJSON(data []byte) error
- func (q PercolateQuery) Version() int
- type PercolateStoredDocumentQuery
- type Percolater
- type PercolatorField
- type PercolatorFieldParams
- type PinnedQuery
- func (q *PinnedQuery) Clause() (QueryClause, error)
- func (q *PinnedQuery) Clear()
- func (PinnedQuery) Complete()
- func (q *PinnedQuery) IsEmpty() bool
- func (PinnedQuery) Kind() QueryKind
- func (q PinnedQuery) MarshalBSON() ([]byte, error)
- func (q PinnedQuery) MarshalJSON() ([]byte, error)
- func (n PinnedQuery) Name() string
- func (q *PinnedQuery) Pinned() (*PinnedQuery, error)
- func (n *PinnedQuery) SetName(name string)
- func (q *PinnedQuery) UnmarshalBSON(data []byte) error
- func (q *PinnedQuery) UnmarshalJSON(data []byte) error
- type PinnedQueryParams
- type PointField
- func (gp *PointField) Field() (Field, error)
- func (im PointField) IgnoreMalformed() bool
- func (z PointField) IgnoreZValue() bool
- func (gp PointField) MarshalJSON() ([]byte, error)
- func (nv PointField) NullValue() interface{}
- func (im *PointField) SetIgnoreMalformed(v interface{}) error
- func (z *PointField) SetIgnoreZValue(v interface{}) error
- func (nv *PointField) SetNullValue(v interface{})
- func (PointField) Type() FieldType
- func (gp *PointField) UnmarshalJSON(data []byte) error
- type PointFieldParams
- type PointInTime
- func (pit *PointInTime) Clone() *PointInTime
- func (pit *PointInTime) Encode() (*bytes.Buffer, error)
- func (v PointInTime) MarshalEasyJSON(w *jwriter.Writer)
- func (v PointInTime) MarshalJSON() ([]byte, error)
- func (v *PointInTime) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *PointInTime) UnmarshalJSON(data []byte) error
- type PrefixQuery
- func (ci PrefixQuery) CaseInsensitive() bool
- func (p *PrefixQuery) Clause() (QueryClause, error)
- func (p *PrefixQuery) Clear()
- func (PrefixQuery) Complete()
- func (p *PrefixQuery) IsEmpty() bool
- func (p PrefixQuery) Kind() QueryKind
- func (p PrefixQuery) MarshalBSON() ([]byte, error)
- func (p PrefixQuery) MarshalJSON() ([]byte, error)
- func (n PrefixQuery) Name() string
- func (r PrefixQuery) Rewrite() Rewrite
- func (p *PrefixQuery) Set(field string, prefixer Prefixer) error
- func (ci *PrefixQuery) SetCaseInsensitive(v bool)
- func (n *PrefixQuery) SetName(name string)
- func (r *PrefixQuery) SetRewrite(v Rewrite) error
- func (p *PrefixQuery) UnmarshalBSON(data []byte) error
- func (p *PrefixQuery) UnmarshalJSON(data []byte) error
- func (p PrefixQuery) Value() string
- type PrefixQueryParams
- type PrefixRule
- func (ap PrefixRule) Analyzer() string
- func (r PrefixRule) Filter() *RuleFilter
- func (p PrefixRule) MarshalBSON() ([]byte, error)
- func (p PrefixRule) MarshalJSON() ([]byte, error)
- func (p PrefixRule) Prefix() string
- func (p *PrefixRule) Rule() (QueryRule, error)
- func (ap *PrefixRule) SetAnalyzer(v string)
- func (r *PrefixRule) SetFilter(filter RuleFilterer) error
- func (p *PrefixRule) SetPrefix(prefix string) error
- func (uf *PrefixRule) SetUseField(field string)
- func (PrefixRule) Type() RuleType
- func (p *PrefixRule) UnmarshalBSON(data []byte) error
- func (p *PrefixRule) UnmarshalJSON(data []byte) error
- func (uf PrefixRule) UseField() string
- type PrefixRuleParams
- type Prefixer
- type Processor
- type ProcessorKind
- type Processorer
- type Processors
- type Querier
- type Queriers
- type Queries
- type Query
- func (q *Query) Bool() *BoolQuery
- func (q *Query) Boosting() *BoostingQuery
- func (q *Query) Clauses() (Clauses, error)
- func (q *Query) ConstantScore() *ConstantScoreQuery
- func (q *Query) DisjunctionMax() *DisjunctionMaxQuery
- func (q *Query) DistanceFeature() *DistanceFeatureQuery
- func (q *Query) Exists() *ExistsQuery
- func (q *Query) FunctionScore() *FunctionScoreQuery
- func (q *Query) Fuzzy() *FuzzyQuery
- func (q *Query) GeoBoundingBox() *GeoBoundingBoxQuery
- func (q *Query) GeoDistance() *GeoDistanceQuery
- func (q *Query) GeoShape() *GeoShapeQuery
- func (q *Query) HasChild() *HasChildQuery
- func (q *Query) HasParent() *HasParentQuery
- func (q *Query) IDs() *IDsQuery
- func (q *Query) Intervals() *IntervalsQuery
- func (q *Query) IsEmpty() bool
- func (q Query) MarshalBSON() ([]byte, error)
- func (q Query) MarshalJSON() ([]byte, error)
- func (q *Query) Match() *MatchQuery
- func (q *Query) MatchAll() *MatchAllQuery
- func (q *Query) MatchBoolPrefix() *MatchBoolPrefixQuery
- func (q *Query) MatchNone() *MatchNoneQuery
- func (q *Query) MatchPhrase() *MatchPhraseQuery
- func (q *Query) MatchPhrasePrefix() *MatchPhrasePrefixQuery
- func (q *Query) MoreLikeThis() *MoreLikeThisQuery
- func (q *Query) MultiMatch() *MultiMatchQuery
- func (q *Query) Nested() *NestedQuery
- func (q *Query) ParentID() *ParentIDQuery
- func (q *Query) Percolate() *PercolateQuery
- func (q *Query) Prefix() *PrefixQuery
- func (q *Query) Query() (*Query, error)
- func (q *Query) QueryString() *QueryStringQuery
- func (q *Query) Range() *RangeQuery
- func (q *Query) RankFeature() *RankFeatureQuery
- func (q *Query) Script() *ScriptQuery
- func (q *Query) ScriptScore() *ScriptScoreQuery
- func (q *Query) Set(params Querier) error
- func (q *Query) Shape() *ShapeQuery
- func (q *Query) SimpleQueryString() *SimpleQueryStringQuery
- func (q *Query) Term() *TermQuery
- func (q *Query) Terms() *TermsQuery
- func (q *Query) TermsSet() *TermsSetQuery
- func (q *Query) UnmarshalBSON(data []byte) error
- func (q *Query) UnmarshalJSON(data []byte) error
- func (q *Query) Wildcard() *WildcardQuery
- type QueryClause
- type QueryClauses
- func (qc *QueryClauses) Add(clause CompleteClauser, clauses ...CompleteClauser) error
- func (qc *QueryClauses) AddMany(clauses Clauses) error
- func (qc *QueryClauses) Clauses() []QueryClause
- func (qc QueryClauses) ForEach(fn func(query QueryClause) error) error
- func (qc QueryClauses) IsEmpty() bool
- func (qc QueryClauses) Len() int
- func (qc QueryClauses) MarshalJSON() ([]byte, error)
- func (qc *QueryClauses) RemoveAllForField(field string) []QueryClause
- func (qc *QueryClauses) RemoveAllOfKind(kind QueryKind) []QueryClause
- func (qc *QueryClauses) RemoveAllWithName(name string) []QueryClause
- func (qc *QueryClauses) Set(clauses Clauses) error
- func (qc *QueryClauses) UnmarshalJSON(data []byte) error
- type QueryError
- type QueryKind
- type QueryParams
- type QueryRule
- type QueryStringQuery
- func (cp QueryStringQuery) AllowLeadingWildcard() bool
- func (cp QueryStringQuery) AnalyzeWildcard() bool
- func (ap QueryStringQuery) Analyzer() string
- func (a QueryStringQuery) AutoGenerateSynonymsPhraseQuery() bool
- func (b QueryStringQuery) Boost() float64
- func (qs *QueryStringQuery) Clause() (QueryClause, error)
- func (qs *QueryStringQuery) Clear()
- func (QueryStringQuery) Complete()
- func (qs QueryStringQuery) DefaultField() string
- func (f QueryStringQuery) DefaultFuzzyRewrite() Rewrite
- func (o QueryStringQuery) DefaultOperator() Operator
- func (epi QueryStringQuery) EnablePositionIncrements() bool
- func (qs QueryStringQuery) Fields() []string
- func (f QueryStringQuery) Fuzziness() string
- func (me QueryStringQuery) FuzzyMaxExpansions() int
- func (f QueryStringQuery) FuzzyRewrite() Rewrite
- func (ft QueryStringQuery) FuzzyTranspositions() bool
- func (qs *QueryStringQuery) IsEmpty() bool
- func (QueryStringQuery) Kind() QueryKind
- func (l QueryStringQuery) Lenient() bool
- func (qs QueryStringQuery) MarshalJSON() ([]byte, error)
- func (mds QueryStringQuery) MaxDeterminizedStates() int
- func (msm QueryStringQuery) MinimumShouldMatch() string
- func (n QueryStringQuery) Name() string
- func (mds QueryStringQuery) PhraseSlop() int
- func (qs QueryStringQuery) Query() string
- func (qs *QueryStringQuery) QueryString() (*QueryStringQuery, error)
- func (sq QueryStringQuery) QuoteAnalyzer() string
- func (qf QueryStringQuery) QuoteFieldSuffix() string
- func (r QueryStringQuery) Rewrite() Rewrite
- func (cp *QueryStringQuery) SetAllowLeadingWildcard(v interface{}) error
- func (cp *QueryStringQuery) SetAnalyzeWildcard(v interface{}) error
- func (ap *QueryStringQuery) SetAnalyzer(v string)
- func (a *QueryStringQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
- func (b *QueryStringQuery) SetBoost(v interface{}) error
- func (qs *QueryStringQuery) SetDefaultField(field string)
- func (o *QueryStringQuery) SetDefaultOperator(v Operator) error
- func (epi *QueryStringQuery) SetEnablePositionIncrements(v interface{}) error
- func (qs *QueryStringQuery) SetFields(fields []string)
- func (f *QueryStringQuery) SetFuzziness(v string)
- func (me *QueryStringQuery) SetFuzzyMaxExpansions(v interface{}) error
- func (f *QueryStringQuery) SetFuzzyRewrite(v Rewrite) error
- func (ft *QueryStringQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
- func (l *QueryStringQuery) SetLenient(v bool)
- func (mds *QueryStringQuery) SetMaxDeterminizedStates(v interface{}) error
- func (msm *QueryStringQuery) SetMinimumShouldMatch(v string)
- func (n *QueryStringQuery) SetName(name string)
- func (mds *QueryStringQuery) SetPhraseSlop(v interface{}) error
- func (qs *QueryStringQuery) SetQuery(q string) error
- func (sq QueryStringQuery) SetQuoteAnalyzer(v string)
- func (qf *QueryStringQuery) SetQuoteFieldSuffix(quoteFieldSuffix string)
- func (r *QueryStringQuery) SetRewrite(v Rewrite) error
- func (tb *QueryStringQuery) SetTieBreaker(tieBreaker interface{}) error
- func (tz *QueryStringQuery) SetTimeZone(v string)
- func (tz QueryStringQuery) TimeZone() string
- func (qs *QueryStringQuery) UnmarshalJSON(data []byte) error
- type QueryStringQueryParams
- type QueryStringer
- type Queryset
- type RandomScoreFunc
- type RandomScoreFunction
- func (rs *RandomScoreFunction) Filter() QueryClause
- func (rs *RandomScoreFunction) FuncKind() FuncKind
- func (rs RandomScoreFunction) MarshalJSON() ([]byte, error)
- func (rs *RandomScoreFunction) SetField(field string)
- func (rs *RandomScoreFunction) SetFilter(filter CompleteClauser) error
- func (rs *RandomScoreFunction) SetSeed(seed interface{}) error
- func (b *RandomScoreFunction) SetWeight(v interface{}) error
- func (b *RandomScoreFunction) Weight() float64
- type RangeField
- type RangeQuery
- func (b RangeQuery) Boost() float64
- func (r *RangeQuery) Clause() (QueryClause, error)
- func (r *RangeQuery) Clear()
- func (RangeQuery) Complete()
- func (f RangeQuery) Format() string
- func (r RangeQuery) GreaterThan() dynamic.StringNumberOrTime
- func (r RangeQuery) GreaterThanOrEqualTo() dynamic.StringNumberOrTime
- func (r *RangeQuery) IsEmpty() bool
- func (RangeQuery) Kind() QueryKind
- func (r RangeQuery) LessThan() dynamic.StringNumberOrTime
- func (r RangeQuery) LessThanOrEqualTo() dynamic.StringNumberOrTime
- func (r RangeQuery) MarshalBSON() ([]byte, error)
- func (r RangeQuery) MarshalJSON() ([]byte, error)
- func (n RangeQuery) Name() string
- func (r RangeQuery) Relation() Relation
- func (r *RangeQuery) Set(field string, ranger Ranger) error
- func (b *RangeQuery) SetBoost(v interface{}) error
- func (f *RangeQuery) SetFormat(v string)
- func (n *RangeQuery) SetName(name string)
- func (r *RangeQuery) SetRelation(v Relation) error
- func (tz *RangeQuery) SetTimeZone(v string)
- func (tz RangeQuery) TimeZone() string
- func (r *RangeQuery) UnmarshalBSON(data []byte) error
- func (r *RangeQuery) UnmarshalJSON(data []byte) error
- type RangeQueryParams
- type Ranger
- type RankFeatureField
- func (f *RankFeatureField) Field() (Field, error)
- func (f RankFeatureField) MarshalBSON() ([]byte, error)
- func (f RankFeatureField) MarshalJSON() ([]byte, error)
- func (psi RankFeatureField) PositiveScoreImpact() bool
- func (psi *RankFeatureField) SetPositiveScoreImpact(v interface{}) error
- func (RankFeatureField) Type() FieldType
- func (f *RankFeatureField) UnmarshalBSON(data []byte) error
- func (f *RankFeatureField) UnmarshalJSON(data []byte) error
- type RankFeatureFieldParams
- type RankFeatureQuery
- func (b RankFeatureQuery) Boost() float64
- func (q *RankFeatureQuery) Clause() (QueryClause, error)
- func (q *RankFeatureQuery) Clear()
- func (RankFeatureQuery) Complete()
- func (f RankFeatureQuery) Field() string
- func (q RankFeatureQuery) Funcs() []string
- func (q *RankFeatureQuery) IsEmpty() bool
- func (RankFeatureQuery) Kind() QueryKind
- func (q *RankFeatureQuery) Linear() *LinearFunction
- func (q *RankFeatureQuery) Log() *LogFunction
- func (q RankFeatureQuery) MarshalBSON() ([]byte, error)
- func (q RankFeatureQuery) MarshalJSON() ([]byte, error)
- func (n RankFeatureQuery) Name() string
- func (q *RankFeatureQuery) RankFeature() (*RankFeatureQuery, error)
- func (q *RankFeatureQuery) Saturation() *SaturationFunction
- func (b *RankFeatureQuery) SetBoost(v interface{}) error
- func (f *RankFeatureQuery) SetField(field string) error
- func (q *RankFeatureQuery) SetLinear(sat LinearFunctioner) error
- func (q *RankFeatureQuery) SetLog(log LogFunctioner) error
- func (n *RankFeatureQuery) SetName(name string)
- func (q *RankFeatureQuery) SetSaturation(sat SaturationFunctioner) error
- func (q *RankFeatureQuery) SetSigmoid(sig SigmoidFunctioner) error
- func (q *RankFeatureQuery) Sigmoid() *SigmoidFunction
- func (q *RankFeatureQuery) UnmarshalBSON(data []byte) error
- func (q *RankFeatureQuery) UnmarshalJSON(data []byte) error
- type RankFeatureQueryParams
- type RankFeaturer
- type RankFeaturesField
- func (f *RankFeaturesField) Field() (Field, error)
- func (f RankFeaturesField) MarshalBSON() ([]byte, error)
- func (f RankFeaturesField) MarshalJSON() ([]byte, error)
- func (psi RankFeaturesField) PositiveScoreImpact() bool
- func (psi *RankFeaturesField) SetPositiveScoreImpact(v interface{}) error
- func (RankFeaturesField) Type() FieldType
- func (f *RankFeaturesField) UnmarshalBSON(data []byte) error
- func (f *RankFeaturesField) UnmarshalJSON(data []byte) error
- type RankFeaturesFieldParams
- type RegexpQuery
- func (q *RegexpQuery) Clause() (QueryClause, error)
- func (q *RegexpQuery) Clear()
- func (RegexpQuery) Complete()
- func (q *RegexpQuery) IsEmpty() bool
- func (RegexpQuery) Kind() QueryKind
- func (q RegexpQuery) MarshalBSON() ([]byte, error)
- func (q RegexpQuery) MarshalJSON() ([]byte, error)
- func (n RegexpQuery) Name() string
- func (q *RegexpQuery) Regexp() (*RegexpQuery, error)
- func (n *RegexpQuery) SetName(name string)
- func (q *RegexpQuery) UnmarshalBSON(data []byte) error
- func (q *RegexpQuery) UnmarshalJSON(data []byte) error
- type RegexpQueryParams
- type Regexper
- type Relation
- type Relations
- type Retries
- type Rewrite
- type Rule
- type RuleFilter
- func (r *RuleFilter) After() *Query
- func (r *RuleFilter) Before() *Query
- func (r *RuleFilter) ContainedBy() *Query
- func (r *RuleFilter) Containing() *Query
- func (r RuleFilter) MarshalBSON() ([]byte, error)
- func (r RuleFilter) MarshalJSON() ([]byte, error)
- func (r *RuleFilter) NotContainedBy() *Query
- func (r *RuleFilter) NotContaining() *Query
- func (r *RuleFilter) NotOverlapping() *Query
- func (r *RuleFilter) Overlapping() *Query
- func (r *RuleFilter) RuleFilter() (*RuleFilter, error)
- func (r *RuleFilter) Script() *Script
- func (r *RuleFilter) SetAfter(query Querier) error
- func (r *RuleFilter) SetBefore(query Querier) error
- func (r *RuleFilter) SetContainedBy(query Querier) error
- func (r *RuleFilter) SetContaining(query Querier) error
- func (r *RuleFilter) SetNotContainedBy(query Querier) error
- func (r *RuleFilter) SetNotContaining(query Querier) error
- func (r *RuleFilter) SetNotOverlapping(query Querier) error
- func (r *RuleFilter) SetOverlapping(query Querier) error
- func (r *RuleFilter) SetScript(script *Script) error
- func (r *RuleFilter) UnmarshalBSON(data []byte) error
- func (r *RuleFilter) UnmarshalJSON(data []byte) error
- type RuleFilterParams
- type RuleFilterer
- type RuleType
- type Ruler
- type Rules
- type Ruleset
- type RuntimeMappingField
- type RuntimeMappingKind
- type RuntimeMappings
- type SaturationFunction
- func (s SaturationFunction) MarshalBSON() ([]byte, error)
- func (s SaturationFunction) MarshalJSON() ([]byte, error)
- func (s SaturationFunction) Pivot() float64
- func (s *SaturationFunction) Saturation() (*SaturationFunction, error)
- func (s *SaturationFunction) SetPivot(pivot interface{}) error
- func (s *SaturationFunction) UnmarshalBSON(data []byte) error
- func (s *SaturationFunction) UnmarshalJSON(data []byte) error
- type SaturationFunctionParams
- type SaturationFunctioner
- type ScaledFloatField
- func (b ScaledFloatField) Boost() float64
- func (cp ScaledFloatField) Coerce() bool
- func (dv ScaledFloatField) DocValues() bool
- func (sf *ScaledFloatField) Field() (Field, error)
- func (im ScaledFloatField) IgnoreMalformed() bool
- func (i ScaledFloatField) Index() bool
- func (sf ScaledFloatField) MarshalJSON() ([]byte, error)
- func (m ScaledFloatField) Meta() Meta
- func (nv ScaledFloatField) NullValue() interface{}
- func (sf ScaledFloatField) ScalingFactor() float64
- func (b *ScaledFloatField) SetBoost(v interface{}) error
- func (cp *ScaledFloatField) SetCoerce(v interface{}) error
- func (dv *ScaledFloatField) SetDocValues(v interface{}) error
- func (im *ScaledFloatField) SetIgnoreMalformed(v interface{}) error
- func (i *ScaledFloatField) SetIndex(v interface{}) error
- func (m *ScaledFloatField) SetMeta(v Meta) error
- func (nv *ScaledFloatField) SetNullValue(v interface{})
- func (sf *ScaledFloatField) SetScalingFactor(v interface{}) error
- func (sa *ScaledFloatField) SetStore(v interface{}) error
- func (sa ScaledFloatField) Store() bool
- func (ScaledFloatField) Type() FieldType
- func (sf *ScaledFloatField) UnmarshalJSON(data []byte) error
- type ScaledFloatFieldParams
- type ScoreMode
- type Script
- type ScriptQuery
- func (s *ScriptQuery) Clause() (QueryClause, error)
- func (s *ScriptQuery) Clear()
- func (ScriptQuery) Complete()
- func (s *ScriptQuery) DecodeParams(val interface{}) error
- func (s *ScriptQuery) IsEmpty() bool
- func (ScriptQuery) Kind() QueryKind
- func (s ScriptQuery) Lang() string
- func (s ScriptQuery) MarshalBSON() ([]byte, error)
- func (s ScriptQuery) MarshalJSON() ([]byte, error)
- func (n ScriptQuery) Name() string
- func (s ScriptQuery) Params() dynamic.JSON
- func (s *ScriptQuery) Set(script Scripter) error
- func (n *ScriptQuery) SetName(name string)
- func (s *ScriptQuery) SetParams(params interface{}) error
- func (s *ScriptQuery) SetScript(script *Script) error
- func (s *ScriptQuery) Source() string
- func (s *ScriptQuery) UnmarshalBSON(data []byte) error
- func (s *ScriptQuery) UnmarshalJSON(data []byte) error
- type ScriptQueryParams
- type ScriptScoreFunc
- type ScriptScoreFunction
- func (s *ScriptScoreFunction) DecodeParams(val interface{}) error
- func (ss *ScriptScoreFunction) Filter() QueryClause
- func (ScriptScoreFunction) FuncKind() FuncKind
- func (s *ScriptScoreFunction) IsEmpty() bool
- func (s ScriptScoreFunction) Lang() string
- func (ss ScriptScoreFunction) MarshalJSON() ([]byte, error)
- func (s ScriptScoreFunction) Params() dynamic.JSON
- func (ss *ScriptScoreFunction) SetFilter(filter CompleteClauser) error
- func (s *ScriptScoreFunction) SetParams(params interface{}) error
- func (s *ScriptScoreFunction) SetScript(script *Script) error
- func (b *ScriptScoreFunction) SetWeight(v interface{}) error
- func (s *ScriptScoreFunction) Source() string
- func (b *ScriptScoreFunction) Weight() float64
- type ScriptScoreQuery
- func (b ScriptScoreQuery) Boost() float64
- func (s *ScriptScoreQuery) Clause() (QueryClause, error)
- func (s *ScriptScoreQuery) Clear()
- func (ScriptScoreQuery) Complete()
- func (s *ScriptScoreQuery) DecodeParams(val interface{}) error
- func (s *ScriptScoreQuery) IsEmpty() bool
- func (ScriptScoreQuery) Kind() QueryKind
- func (s ScriptScoreQuery) Lang() string
- func (s ScriptScoreQuery) MarshalBSON() ([]byte, error)
- func (s ScriptScoreQuery) MarshalJSON() ([]byte, error)
- func (ms ScriptScoreQuery) MinScore() float64
- func (n ScriptScoreQuery) Name() string
- func (s ScriptScoreQuery) Params() dynamic.JSON
- func (s *ScriptScoreQuery) Set(scriptScore *ScriptScoreQueryParams) error
- func (b *ScriptScoreQuery) SetBoost(v interface{}) error
- func (ms *ScriptScoreQuery) SetMinScore(v float64)
- func (n *ScriptScoreQuery) SetName(name string)
- func (s *ScriptScoreQuery) SetParams(params interface{}) error
- func (s *ScriptScoreQuery) SetScript(script *Script) error
- func (s *ScriptScoreQuery) Source() string
- func (s *ScriptScoreQuery) UnmarshalBSON(data []byte) error
- func (s *ScriptScoreQuery) UnmarshalJSON(data []byte) error
- type ScriptScoreQueryParams
- type ScriptScorer
- type Scripter
- type Search
- func (s Search) DocValueFields() SearchFields
- func (s Search) Encode() (*bytes.Buffer, error)
- func (s Search) Explain() bool
- func (s *Search) Fields() SearchFields
- func (s Search) From() int
- func (s *Search) IndicesBoost() map[string]float64
- func (s Search) MarshalBSON() ([]byte, error)
- func (s Search) MarshalJSON() ([]byte, error)
- func (s *Search) MinScore() float64
- func (s Search) PITID() string
- func (s Search) PITKeepAlive() *time.Time
- func (s Search) PointInTime() *PointInTime
- func (s Search) PointInTimeID() string
- func (s Search) PointInTimeKeepAlive() *time.Time
- func (s *Search) Query() *Query
- func (s Search) RuntimeMappings() RuntimeMappings
- func (s Search) SeqNoPrimaryTerm() bool
- func (s *Search) SetDocValueFields(v SearchFields) *Search
- func (s *Search) SetExplain(v bool)
- func (s *Search) SetFields(v SearchFields)
- func (s *Search) SetFrom(v int)
- func (s *Search) SetIndicesBoost(v map[string]float64)
- func (s *Search) SetMinScore(v float64)
- func (s *Search) SetPointInTime(v *PointInTime)
- func (s *Search) SetQuery(v Querier) error
- func (s *Search) SetRuntimeMappings(v RuntimeMappings)
- func (s *Search) SetSeqNoPrimaryTerm(v bool)
- func (s *Search) SetSize(v int) error
- func (s *Search) SetSource(v interface{}) error
- func (s *Search) SetStats(v []string)
- func (s *Search) SetTerminateAfter(v int)
- func (s *Search) SetTimeout(v time.Duration) *Search
- func (s *Search) SetVersion(v bool) *Search
- func (s Search) Size() int
- func (s Search) Source() interface{}
- func (s Search) Stats() []string
- func (s Search) TerminateAfter() int
- func (s Search) Timeout() time.Duration
- func (s *Search) UnmarshalBSON(data []byte) error
- func (s *Search) UnmarshalJSON(data []byte) (err error)
- func (s Search) Version() bool
- type SearchAsYouTypeField
- func (ap SearchAsYouTypeField) Analyzer() string
- func (s *SearchAsYouTypeField) Field() (Field, error)
- func (i SearchAsYouTypeField) Index() bool
- func (io SearchAsYouTypeField) IndexOptions() IndexOptions
- func (s SearchAsYouTypeField) MarshalBSON() ([]byte, error)
- func (s SearchAsYouTypeField) MarshalJSON() ([]byte, error)
- func (mss SearchAsYouTypeField) MaxShingleSize() int
- func (n SearchAsYouTypeField) Norms() bool
- func (sa SearchAsYouTypeField) SearchAnalyzer() string
- func (sq SearchAsYouTypeField) SearchQuoteAnalyzer() string
- func (ap *SearchAsYouTypeField) SetAnalyzer(v string)
- func (i *SearchAsYouTypeField) SetIndex(v interface{}) error
- func (io *SearchAsYouTypeField) SetIndexOptions(v IndexOptions) error
- func (mss *SearchAsYouTypeField) SetMaxShingleSize(v int) error
- func (n *SearchAsYouTypeField) SetNorms(v interface{}) error
- func (sa *SearchAsYouTypeField) SetSearchAnalyzer(v string)
- func (sq SearchAsYouTypeField) SetSearchQuoteAnalyzer(v string)
- func (s *SearchAsYouTypeField) SetSimilarity(v Similarity) error
- func (sa *SearchAsYouTypeField) SetStore(v interface{}) error
- func (tv *SearchAsYouTypeField) SetTermVector(v TermVector) error
- func (s SearchAsYouTypeField) Similarity() Similarity
- func (sa SearchAsYouTypeField) Store() bool
- func (tv SearchAsYouTypeField) TermVector() TermVector
- func (SearchAsYouTypeField) Type() FieldType
- func (s *SearchAsYouTypeField) UnmarshalBSON(data []byte) error
- func (s *SearchAsYouTypeField) UnmarshalJSON(data []byte) error
- type SearchAsYouTypeFieldParams
- type SearchField
- type SearchFields
- type SearchParams
- type SearchSource
- type SearchSourceParams
- type Shape
- type ShapeField
- func (gs *ShapeField) Field() (Field, error)
- func (im ShapeField) IgnoreMalformed() bool
- func (z ShapeField) IgnoreZValue() bool
- func (gs ShapeField) MarshalJSON() ([]byte, error)
- func (nv ShapeField) NullValue() interface{}
- func (o ShapeField) Orientation() Orientation
- func (im *ShapeField) SetIgnoreMalformed(v interface{}) error
- func (z *ShapeField) SetIgnoreZValue(v interface{}) error
- func (nv *ShapeField) SetNullValue(v interface{})
- func (o *ShapeField) SetOrientation(orientation Orientation) error
- func (ShapeField) Type() FieldType
- func (gs *ShapeField) UnmarshalJSON(data []byte) error
- type ShapeFieldParams
- type ShapeQuerier
- type ShapeQuery
- func (q *ShapeQuery) Clause() (QueryClause, error)
- func (q *ShapeQuery) Clear()
- func (ShapeQuery) Complete()
- func (f ShapeQuery) Field() string
- func (q ShapeQuery) IgnoreUnmapped() bool
- func (q *ShapeQuery) IsEmpty() bool
- func (ShapeQuery) Kind() QueryKind
- func (q ShapeQuery) MarshalBSON() ([]byte, error)
- func (q ShapeQuery) MarshalJSON() ([]byte, error)
- func (n ShapeQuery) Name() string
- func (q ShapeQuery) Relation() SpatialRelation
- func (f *ShapeQuery) SetField(field string) error
- func (q *ShapeQuery) SetIgnoreUnmapped(v bool)
- func (q *ShapeQuery) SetIndexedShape(indexed *IndexedShape) error
- func (n *ShapeQuery) SetName(name string)
- func (q *ShapeQuery) SetRelation(v SpatialRelation) error
- func (q *ShapeQuery) SetShape(shape interface{}) error
- func (q ShapeQuery) Shape() interface{}
- func (q *ShapeQuery) ShapeQuery() (*ShapeQuery, error)
- func (q *ShapeQuery) UnmarshalBSON(data []byte) error
- func (q *ShapeQuery) UnmarshalJSON(data []byte) error
- type ShapeQueryParams
- type ShortField
- func (b ShortField) Boost() float64
- func (cp ShortField) Coerce() bool
- func (dv ShortField) DocValues() bool
- func (s *ShortField) Field() (Field, error)
- func (im ShortField) IgnoreMalformed() bool
- func (i ShortField) Index() bool
- func (s ShortField) MarshalBSON() ([]byte, error)
- func (s ShortField) MarshalJSON() ([]byte, error)
- func (m ShortField) Meta() Meta
- func (nv ShortField) NullValue() interface{}
- func (b *ShortField) SetBoost(v interface{}) error
- func (cp *ShortField) SetCoerce(v interface{}) error
- func (dv *ShortField) SetDocValues(v interface{}) error
- func (im *ShortField) SetIgnoreMalformed(v interface{}) error
- func (i *ShortField) SetIndex(v interface{}) error
- func (m *ShortField) SetMeta(v Meta) error
- func (nv *ShortField) SetNullValue(v interface{})
- func (sa *ShortField) SetStore(v interface{}) error
- func (sa ShortField) Store() bool
- func (ShortField) Type() FieldType
- func (s *ShortField) UnmarshalBSON(data []byte) error
- func (s *ShortField) UnmarshalJSON(data []byte) error
- type ShortFieldParams
- type SigmoidFunction
- func (s SigmoidFunction) Exponent() float64
- func (s SigmoidFunction) MarshalBSON() ([]byte, error)
- func (s SigmoidFunction) MarshalJSON() ([]byte, error)
- func (s SigmoidFunction) Pivot() float64
- func (s *SigmoidFunction) SetExponent(exponent interface{}) error
- func (s *SigmoidFunction) SetPivot(pivot interface{}) error
- func (s *SigmoidFunction) Sigmoid() (*SigmoidFunction, error)
- func (s *SigmoidFunction) UnmarshalBSON(data []byte) error
- func (s *SigmoidFunction) UnmarshalJSON(data []byte) error
- type SigmoidFunctionParams
- type SigmoidFunctioner
- type Similarity
- type SimpleQueryStringQuery
- func (cp SimpleQueryStringQuery) AnalyzeWildcard() bool
- func (ap SimpleQueryStringQuery) Analyzer() string
- func (a SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery() bool
- func (b SimpleQueryStringQuery) Boost() float64
- func (qs *SimpleQueryStringQuery) Clause() (QueryClause, error)
- func (qs *SimpleQueryStringQuery) Clear()
- func (SimpleQueryStringQuery) Complete()
- func (o SimpleQueryStringQuery) DefaultOperator() Operator
- func (qs SimpleQueryStringQuery) Fields() []string
- func (qs SimpleQueryStringQuery) Flags() string
- func (me SimpleQueryStringQuery) FuzzyMaxExpansions() int
- func (me SimpleQueryStringQuery) FuzzyPrefixLength() int
- func (ft SimpleQueryStringQuery) FuzzyTranspositions() bool
- func (qs *SimpleQueryStringQuery) IsEmpty() bool
- func (SimpleQueryStringQuery) Kind() QueryKind
- func (l SimpleQueryStringQuery) Lenient() bool
- func (qs SimpleQueryStringQuery) MarshalJSON() ([]byte, error)
- func (mds SimpleQueryStringQuery) MaxDeterminizedStates() int
- func (msm SimpleQueryStringQuery) MinimumShouldMatch() string
- func (n SimpleQueryStringQuery) Name() string
- func (mds SimpleQueryStringQuery) PhraseSlop() int
- func (qs SimpleQueryStringQuery) Query() string
- func (sq SimpleQueryStringQuery) QuoteAnalyzer() string
- func (qf SimpleQueryStringQuery) QuoteFieldSuffix() string
- func (cp *SimpleQueryStringQuery) SetAnalyzeWildcard(v interface{}) error
- func (ap *SimpleQueryStringQuery) SetAnalyzer(v string)
- func (a *SimpleQueryStringQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
- func (b *SimpleQueryStringQuery) SetBoost(v interface{}) error
- func (o *SimpleQueryStringQuery) SetDefaultOperator(v Operator) error
- func (qs *SimpleQueryStringQuery) SetFields(fields []string)
- func (qs *SimpleQueryStringQuery) SetFlags(field string)
- func (me *SimpleQueryStringQuery) SetFuzzyMaxExpansions(v interface{}) error
- func (me *SimpleQueryStringQuery) SetFuzzyPrefixLength(v interface{}) error
- func (ft *SimpleQueryStringQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
- func (l *SimpleQueryStringQuery) SetLenient(v bool)
- func (mds *SimpleQueryStringQuery) SetMaxDeterminizedStates(v interface{}) error
- func (msm *SimpleQueryStringQuery) SetMinimumShouldMatch(v string)
- func (n *SimpleQueryStringQuery) SetName(name string)
- func (mds *SimpleQueryStringQuery) SetPhraseSlop(v interface{}) error
- func (qs *SimpleQueryStringQuery) SetQuery(q string) error
- func (sq SimpleQueryStringQuery) SetQuoteAnalyzer(v string)
- func (qf *SimpleQueryStringQuery) SetQuoteFieldSuffix(quoteFieldSuffix string)
- func (qs *SimpleQueryStringQuery) SimpleQueryString() (*SimpleQueryStringQuery, error)
- func (qs *SimpleQueryStringQuery) UnmarshalJSON(data []byte) error
- type SimpleQueryStringQueryParams
- type SimpleQueryStringer
- type Sort
- type SortEntry
- type SortMode
- type SortNested
- type SortOrder
- type SourceSpecifications
- type SpanContainingQuery
- func (q *SpanContainingQuery) Clause() (QueryClause, error)
- func (q *SpanContainingQuery) Clear()
- func (SpanContainingQuery) Complete()
- func (q *SpanContainingQuery) IsEmpty() bool
- func (SpanContainingQuery) Kind() QueryKind
- func (q SpanContainingQuery) MarshalBSON() ([]byte, error)
- func (q SpanContainingQuery) MarshalJSON() ([]byte, error)
- func (n SpanContainingQuery) Name() string
- func (n *SpanContainingQuery) SetName(name string)
- func (q *SpanContainingQuery) SpanContaining() (*SpanContainingQuery, error)
- func (q *SpanContainingQuery) UnmarshalBSON(data []byte) error
- func (q *SpanContainingQuery) UnmarshalJSON(data []byte) error
- type SpanContainingQueryParams
- type SpanFirstQuery
- func (q *SpanFirstQuery) Clause() (QueryClause, error)
- func (q *SpanFirstQuery) Clear()
- func (SpanFirstQuery) Complete()
- func (q *SpanFirstQuery) IsEmpty() bool
- func (SpanFirstQuery) Kind() QueryKind
- func (q SpanFirstQuery) MarshalBSON() ([]byte, error)
- func (q SpanFirstQuery) MarshalJSON() ([]byte, error)
- func (n SpanFirstQuery) Name() string
- func (n *SpanFirstQuery) SetName(name string)
- func (q *SpanFirstQuery) SpanFirst() (*SpanFirstQuery, error)
- func (q *SpanFirstQuery) UnmarshalBSON(data []byte) error
- func (q *SpanFirstQuery) UnmarshalJSON(data []byte) error
- type SpanFirstQueryParams
- type SpanMultiQuery
- func (q *SpanMultiQuery) Clause() (QueryClause, error)
- func (q *SpanMultiQuery) Clear()
- func (SpanMultiQuery) Complete()
- func (q *SpanMultiQuery) IsEmpty() bool
- func (SpanMultiQuery) Kind() QueryKind
- func (q SpanMultiQuery) MarshalBSON() ([]byte, error)
- func (q SpanMultiQuery) MarshalJSON() ([]byte, error)
- func (n SpanMultiQuery) Name() string
- func (n *SpanMultiQuery) SetName(name string)
- func (q *SpanMultiQuery) SpanMulti() (*SpanMultiQuery, error)
- func (q *SpanMultiQuery) UnmarshalBSON(data []byte) error
- func (q *SpanMultiQuery) UnmarshalJSON(data []byte) error
- type SpanMultiQueryParams
- type SpanNearQuery
- func (q *SpanNearQuery) Clause() (QueryClause, error)
- func (q *SpanNearQuery) Clear()
- func (SpanNearQuery) Complete()
- func (q *SpanNearQuery) IsEmpty() bool
- func (SpanNearQuery) Kind() QueryKind
- func (q SpanNearQuery) MarshalBSON() ([]byte, error)
- func (q SpanNearQuery) MarshalJSON() ([]byte, error)
- func (n SpanNearQuery) Name() string
- func (n *SpanNearQuery) SetName(name string)
- func (q *SpanNearQuery) SpanNear() (*SpanNearQuery, error)
- func (q *SpanNearQuery) UnmarshalBSON(data []byte) error
- func (q *SpanNearQuery) UnmarshalJSON(data []byte) error
- type SpanNearQueryParams
- type SpanNotQuery
- func (q *SpanNotQuery) Clause() (QueryClause, error)
- func (q *SpanNotQuery) Clear()
- func (SpanNotQuery) Complete()
- func (q *SpanNotQuery) IsEmpty() bool
- func (SpanNotQuery) Kind() QueryKind
- func (q SpanNotQuery) MarshalBSON() ([]byte, error)
- func (q SpanNotQuery) MarshalJSON() ([]byte, error)
- func (n SpanNotQuery) Name() string
- func (n *SpanNotQuery) SetName(name string)
- func (q *SpanNotQuery) SpanNot() (*SpanNotQuery, error)
- func (q *SpanNotQuery) UnmarshalBSON(data []byte) error
- func (q *SpanNotQuery) UnmarshalJSON(data []byte) error
- type SpanNotQueryParams
- type SpanOrQuery
- func (q *SpanOrQuery) Clause() (QueryClause, error)
- func (q *SpanOrQuery) Clear()
- func (SpanOrQuery) Complete()
- func (q *SpanOrQuery) IsEmpty() bool
- func (SpanOrQuery) Kind() QueryKind
- func (q SpanOrQuery) MarshalBSON() ([]byte, error)
- func (q SpanOrQuery) MarshalJSON() ([]byte, error)
- func (n SpanOrQuery) Name() string
- func (n *SpanOrQuery) SetName(name string)
- func (q *SpanOrQuery) SpanOr() (*SpanOrQuery, error)
- func (q *SpanOrQuery) UnmarshalBSON(data []byte) error
- func (q *SpanOrQuery) UnmarshalJSON(data []byte) error
- type SpanOrQueryParams
- type SpanTermQuery
- func (q *SpanTermQuery) Clause() (QueryClause, error)
- func (q *SpanTermQuery) Clear()
- func (SpanTermQuery) Complete()
- func (q *SpanTermQuery) IsEmpty() bool
- func (SpanTermQuery) Kind() QueryKind
- func (q SpanTermQuery) MarshalBSON() ([]byte, error)
- func (q SpanTermQuery) MarshalJSON() ([]byte, error)
- func (n SpanTermQuery) Name() string
- func (n *SpanTermQuery) SetName(name string)
- func (q *SpanTermQuery) SpanTerm() (*SpanTermQuery, error)
- func (q *SpanTermQuery) UnmarshalBSON(data []byte) error
- func (q *SpanTermQuery) UnmarshalJSON(data []byte) error
- type SpanTermQueryParams
- type SpanWithinQuery
- func (q *SpanWithinQuery) Clause() (QueryClause, error)
- func (q *SpanWithinQuery) Clear()
- func (SpanWithinQuery) Complete()
- func (q *SpanWithinQuery) IsEmpty() bool
- func (SpanWithinQuery) Kind() QueryKind
- func (q SpanWithinQuery) MarshalBSON() ([]byte, error)
- func (q SpanWithinQuery) MarshalJSON() ([]byte, error)
- func (n SpanWithinQuery) Name() string
- func (n *SpanWithinQuery) SetName(name string)
- func (q *SpanWithinQuery) SpanWithin() (*SpanWithinQuery, error)
- func (q *SpanWithinQuery) UnmarshalBSON(data []byte) error
- func (q *SpanWithinQuery) UnmarshalJSON(data []byte) error
- type SpanWithinQueryParams
- type SpatialRelation
- type String
- type Strings
- type TermQuery
- func (b TermQuery) Boost() float64
- func (ci TermQuery) CaseInsensitive() bool
- func (t *TermQuery) Clause() (QueryClause, error)
- func (t *TermQuery) Clear()
- func (TermQuery) Complete()
- func (t TermQuery) Field() string
- func (t *TermQuery) IsEmpty() bool
- func (t TermQuery) Kind() QueryKind
- func (t TermQuery) MarshalBSON() ([]byte, error)
- func (t TermQuery) MarshalJSON() ([]byte, error)
- func (n TermQuery) Name() string
- func (t *TermQuery) Set(field string, clause Termer) error
- func (b *TermQuery) SetBoost(v interface{}) error
- func (ci *TermQuery) SetCaseInsensitive(v bool)
- func (n *TermQuery) SetName(name string)
- func (t *TermQuery) SetValue(v string) error
- func (t *TermQuery) UnmarshalBSON(data []byte) error
- func (t *TermQuery) UnmarshalJSON(data []byte) error
- func (t TermQuery) Value() string
- type TermQueryParams
- type TermVector
- type Termer
- type TermsLookup
- type TermsQuery
- func (b TermsQuery) Boost() float64
- func (ci TermsQuery) CaseInsensitive() bool
- func (t *TermsQuery) Clause() (QueryClause, error)
- func (t *TermsQuery) Clear()
- func (TermsQuery) Complete()
- func (t TermsQuery) Field() string
- func (t *TermsQuery) IsEmpty() bool
- func (t TermsQuery) Kind() QueryKind
- func (t TermsQuery) Lookup() *TermsLookup
- func (t TermsQuery) MarshalBSON() ([]byte, error)
- func (t TermsQuery) MarshalJSON() ([]byte, error)
- func (n TermsQuery) Name() string
- func (t *TermsQuery) Set(field string, clause Termser) error
- func (b *TermsQuery) SetBoost(v interface{}) error
- func (ci *TermsQuery) SetCaseInsensitive(v bool)
- func (t *TermsQuery) SetField(field string)
- func (n *TermsQuery) SetName(name string)
- func (t *TermsQuery) SetValue(value []string) error
- func (t *TermsQuery) Terms() (*TermsQuery, error)
- func (t *TermsQuery) UnmarshalBSON(data []byte) error
- func (t *TermsQuery) UnmarshalJSON(data []byte) error
- func (t TermsQuery) Value() []string
- type TermsQueryParams
- type TermsSetQuery
- func (b TermsSetQuery) Boost() float64
- func (q *TermsSetQuery) Clause() (QueryClause, error)
- func (q *TermsSetQuery) Clear()
- func (TermsSetQuery) Complete()
- func (f TermsSetQuery) Field() string
- func (q *TermsSetQuery) IsEmpty() bool
- func (TermsSetQuery) Kind() QueryKind
- func (q TermsSetQuery) MarshalBSON() ([]byte, error)
- func (q TermsSetQuery) MarshalJSON() ([]byte, error)
- func (q TermsSetQuery) MinimumShouldMatchField() string
- func (q TermsSetQuery) MinimumShouldMatchScript() *Script
- func (n TermsSetQuery) Name() string
- func (b *TermsSetQuery) SetBoost(v interface{}) error
- func (f *TermsSetQuery) SetField(field string) error
- func (q *TermsSetQuery) SetMinimumShouldMatchField(v string)
- func (q *TermsSetQuery) SetMinimumShouldMatchScript(script *Script)
- func (n *TermsSetQuery) SetName(name string)
- func (q *TermsSetQuery) SetTerms(terms []string) error
- func (q TermsSetQuery) Terms() []string
- func (q *TermsSetQuery) TermsSet() (*TermsSetQuery, error)
- func (q *TermsSetQuery) UnmarshalBSON(data []byte) error
- func (q *TermsSetQuery) UnmarshalJSON(data []byte) error
- type TermsSetQueryParams
- type TermsSetter
- type Termser
- type TextField
- func (ap TextField) Analyzer() string
- func (b TextField) Boost() float64
- func (ego TextField) EagerGlobalOrdinals() bool
- func (t *TextField) Field() (Field, error)
- func (fd TextField) FieldData() bool
- func (fd TextField) FieldDataFrequencyFilter() *FieldDataFrequencyFilter
- func (f TextField) Fields() Fields
- func (i TextField) Index() bool
- func (io TextField) IndexOptions() IndexOptions
- func (cp TextField) IndexPhrases() bool
- func (ip TextField) IndexPrefixes() *IndexPrefixes
- func (t TextField) MarshalBSON() ([]byte, error)
- func (t TextField) MarshalJSON() ([]byte, error)
- func (m TextField) Meta() Meta
- func (n TextField) Norms() bool
- func (pig TextField) PositionIncrementGap() float64
- func (sa TextField) SearchAnalyzer() string
- func (sq TextField) SearchQuoteAnalyzer() string
- func (ap *TextField) SetAnalyzer(v string)
- func (b *TextField) SetBoost(v interface{}) error
- func (ego *TextField) SetEagerGlobalOrdinals(v interface{}) error
- func (fd *TextField) SetFieldData(v interface{}) error
- func (fd *TextField) SetFieldDataFrequencyFilter(v *FieldDataFrequencyFilter) error
- func (f *TextField) SetFields(fields Fieldset) error
- func (i *TextField) SetIndex(v interface{}) error
- func (io *TextField) SetIndexOptions(v IndexOptions) error
- func (cp *TextField) SetIndexPhrases(v interface{}) error
- func (ip *TextField) SetIndexPrefixes(v *IndexPrefixes) error
- func (m *TextField) SetMeta(v Meta) error
- func (n *TextField) SetNorms(v interface{}) error
- func (pig *TextField) SetPositionIncrementGap(v interface{}) error
- func (sa *TextField) SetSearchAnalyzer(v string)
- func (sq TextField) SetSearchQuoteAnalyzer(v string)
- func (s *TextField) SetSimilarity(v Similarity) error
- func (sa *TextField) SetStore(v interface{}) error
- func (tv *TextField) SetTermVector(v TermVector) error
- func (s TextField) Similarity() Similarity
- func (sa TextField) Store() bool
- func (tv TextField) TermVector() TermVector
- func (TextField) Type() FieldType
- func (t *TextField) UnmarshalBSON(data []byte) error
- func (t *TextField) UnmarshalJSON(data []byte) error
- type TextFieldParams
- type TokenCountField
- func (ap TokenCountField) Analyzer() string
- func (b TokenCountField) Boost() float64
- func (dv TokenCountField) DocValues() bool
- func (epi TokenCountField) EnablePositionIncrements() bool
- func (t *TokenCountField) Field() (Field, error)
- func (i TokenCountField) Index() bool
- func (t TokenCountField) MarshalBSON() ([]byte, error)
- func (t TokenCountField) MarshalJSON() ([]byte, error)
- func (nv TokenCountField) NullValue() interface{}
- func (ap *TokenCountField) SetAnalyzer(v string)
- func (b *TokenCountField) SetBoost(v interface{}) error
- func (dv *TokenCountField) SetDocValues(v interface{}) error
- func (epi *TokenCountField) SetEnablePositionIncrements(v interface{}) error
- func (i *TokenCountField) SetIndex(v interface{}) error
- func (nv *TokenCountField) SetNullValue(v interface{})
- func (sa *TokenCountField) SetStore(v interface{}) error
- func (sa TokenCountField) Store() bool
- func (TokenCountField) Type() FieldType
- func (t *TokenCountField) UnmarshalBSON(data []byte) error
- func (t *TokenCountField) UnmarshalJSON(data []byte) error
- type TokenCountFieldParams
- type TypeQuery
- func (q *TypeQuery) Clause() (QueryClause, error)
- func (q *TypeQuery) Clear()
- func (TypeQuery) Complete()
- func (q *TypeQuery) IsEmpty() bool
- func (TypeQuery) Kind() QueryKind
- func (q TypeQuery) MarshalBSON() ([]byte, error)
- func (q TypeQuery) MarshalJSON() ([]byte, error)
- func (n TypeQuery) Name() string
- func (n *TypeQuery) SetName(name string)
- func (q *TypeQuery) Type() (*TypeQuery, error)
- func (q *TypeQuery) UnmarshalBSON(data []byte) error
- func (q *TypeQuery) UnmarshalJSON(data []byte) error
- type TypeQueryParams
- type Typer
- type UnsignedLongField
- func (b UnsignedLongField) Boost() float64
- func (cp UnsignedLongField) Coerce() bool
- func (dv UnsignedLongField) DocValues() bool
- func (ul *UnsignedLongField) Field() (Field, error)
- func (im UnsignedLongField) IgnoreMalformed() bool
- func (i UnsignedLongField) Index() bool
- func (ul UnsignedLongField) MarshalJSON() ([]byte, error)
- func (m UnsignedLongField) Meta() Meta
- func (nv UnsignedLongField) NullValue() interface{}
- func (b *UnsignedLongField) SetBoost(v interface{}) error
- func (cp *UnsignedLongField) SetCoerce(v interface{}) error
- func (dv *UnsignedLongField) SetDocValues(v interface{}) error
- func (im *UnsignedLongField) SetIgnoreMalformed(v interface{}) error
- func (i *UnsignedLongField) SetIndex(v interface{}) error
- func (m *UnsignedLongField) SetMeta(v Meta) error
- func (nv *UnsignedLongField) SetNullValue(v interface{})
- func (sa *UnsignedLongField) SetStore(v interface{}) error
- func (sa UnsignedLongField) Store() bool
- func (UnsignedLongField) Type() FieldType
- func (ul *UnsignedLongField) UnmarshalJSON(data []byte) error
- type UnsignedLongFieldParams
- type UpdateByQuerier
- type UpdateByQuery
- func (u *UpdateByQuery) Conflicts() Conflicts
- func (u UpdateByQuery) Encode() (*bytes.Buffer, error)
- func (u UpdateByQuery) MarshalBSON() ([]byte, error)
- func (u UpdateByQuery) MarshalJSON() ([]byte, error)
- func (u *UpdateByQuery) Query() *Query
- func (u *UpdateByQuery) Script() *Script
- func (u *UpdateByQuery) SetConflicts(c Conflicts)
- func (u *UpdateByQuery) SetQuery(query Querier) error
- func (u *UpdateByQuery) SetScript(script *Script)
- func (u *UpdateByQuery) UnmarshalBSON(data []byte) error
- func (u *UpdateByQuery) UnmarshalJSON(data []byte) error
- type UpdateByQueryParams
- type UpdateByQueryResponse
- type ValidationMethod
- type Vertices
- type WKT
- type WeightFunction
- func (w WeightFunction) Filter() QueryClause
- func (WeightFunction) FuncKind() FuncKind
- func (w WeightFunction) MarshalBSON() ([]byte, error)
- func (w WeightFunction) MarshalJSON() ([]byte, error)
- func (w *WeightFunction) SetFilter(c CompleteClauser) error
- func (b *WeightFunction) SetWeight(v interface{}) error
- func (w *WeightFunction) UnmarshalBSON(data []byte) error
- func (w *WeightFunction) UnmarshalJSON(data []byte) error
- func (b *WeightFunction) Weight() float64
- type WeightFunctionParams
- type WildcardField
- func (w *WildcardField) Field() (Field, error)
- func (ia WildcardField) IgnoreAbove() float64
- func (w WildcardField) MarshalBSON() ([]byte, error)
- func (w WildcardField) MarshalJSON() ([]byte, error)
- func (nv WildcardField) NullValue() interface{}
- func (ia WildcardField) SetIgnoreAbove(v interface{}) error
- func (nv *WildcardField) SetNullValue(v interface{})
- func (WildcardField) Type() FieldType
- func (w *WildcardField) UnmarshalBSON(data []byte) error
- func (w *WildcardField) UnmarshalJSON(data []byte) error
- type WildcardFieldParams
- type WildcardQuery
- func (b WildcardQuery) Boost() float64
- func (ci WildcardQuery) CaseInsensitive() bool
- func (q *WildcardQuery) Clause() (QueryClause, error)
- func (q *WildcardQuery) Clear()
- func (WildcardQuery) Complete()
- func (f WildcardQuery) Field() string
- func (q *WildcardQuery) IsEmpty() bool
- func (WildcardQuery) Kind() QueryKind
- func (q WildcardQuery) MarshalBSON() ([]byte, error)
- func (q WildcardQuery) MarshalJSON() ([]byte, error)
- func (n WildcardQuery) Name() string
- func (r WildcardQuery) Rewrite() Rewrite
- func (b *WildcardQuery) SetBoost(v interface{}) error
- func (ci *WildcardQuery) SetCaseInsensitive(v bool)
- func (f *WildcardQuery) SetField(field string) error
- func (n *WildcardQuery) SetName(name string)
- func (r *WildcardQuery) SetRewrite(v Rewrite) error
- func (q *WildcardQuery) SetValue(value string) error
- func (q *WildcardQuery) UnmarshalBSON(data []byte) error
- func (q *WildcardQuery) UnmarshalJSON(data []byte) error
- func (q WildcardQuery) Value() string
- func (q *WildcardQuery) Wildcard() (*WildcardQuery, error)
- type WildcardQueryParams
- type WildcardRule
- func (ap WildcardRule) Analyzer() string
- func (r WildcardRule) Filter() *RuleFilter
- func (p WildcardRule) MarshalBSON() ([]byte, error)
- func (p WildcardRule) MarshalJSON() ([]byte, error)
- func (w *WildcardRule) Rule() (QueryRule, error)
- func (ap *WildcardRule) SetAnalyzer(v string)
- func (r *WildcardRule) SetFilter(filter RuleFilterer) error
- func (uf *WildcardRule) SetUseField(field string)
- func (w *WildcardRule) SetWildcard(wildcard string) error
- func (WildcardRule) Type() RuleType
- func (p *WildcardRule) UnmarshalBSON(data []byte) error
- func (p *WildcardRule) UnmarshalJSON(data []byte) error
- func (uf WildcardRule) UseField() string
- func (w WildcardRule) Wildcard() string
- type WildcardRuleParams
- type Wildcarder
- type WithAllowLeadingWildcard
- type WithAnalyzeWildcard
- type WithAnalyzer
- type WithAutoGenerateSynonymsPhraseQuery
- type WithBoost
- type WithBoostMode
- type WithCaseInsensitive
- type WithCoerce
- type WithCopyTo
- type WithCutoffFrequency
- type WithDefaultOperator
- type WithDepthLimit
- type WithDimensions
- type WithDocValues
- type WithEagerGlobalOrdinals
- type WithEnablePositionIncrements
- type WithEnabled
- type WithField
- type WithFieldData
- type WithFieldDataFrequencyFilter
- type WithFields
- type WithFormat
- type WithFuzziness
- type WithFuzzyMaxExpansions
- type WithFuzzyPrefixLength
- type WithFuzzyTranspositions
- type WithIgnoreAbove
- type WithIgnoreMalformed
- type WithIgnoreZValue
- type WithIncludeInParent
- type WithIncludeInRoot
- type WithIndex
- type WithIndexOptions
- type WithIndexPhrases
- type WithIndexPrefixes
- type WithLenient
- type WithMaxBoost
- type WithMaxDeterminizedStates
- type WithMaxExpansions
- type WithMaxGaps
- type WithMaxInputLength
- type WithMaxShingleSize
- type WithMeta
- type WithMinScore
- type WithMinimumShouldMatch
- type WithModifier
- type WithName
- type WithNegativeBoost
- type WithNormalizer
- type WithNorms
- type WithNullValue
- type WithOperator
- type WithOrdered
- type WithOrientation
- type WithPhraseSlop
- type WithPositionIncrementGap
- type WithPositiveScoreImpact
- type WithPrefixLength
- type WithPreservePositionIncrements
- type WithPreserveSeperators
- type WithProperties
- type WithQUoteFieldSuffix
- type WithQuoteAnalyzer
- type WithRelation
- type WithRelations
- type WithRewrite
- type WithRuleFilter
- type WithScalingFactor
- type WithScoreMode
- type WithSearchAnalyzer
- type WithSearchQuoteAnalyzer
- type WithSimilarity
- type WithSlop
- type WithSplitQueriesOnWhitespace
- type WithStore
- type WithTermVector
- type WithTieBreaker
- type WithTimeZone
- type WithTranspositions
- type WithWeight
- type WithZeroTermsQuery
- type WrapperQuery
- func (q *WrapperQuery) Clause() (QueryClause, error)
- func (q *WrapperQuery) Clear()
- func (WrapperQuery) Complete()
- func (q *WrapperQuery) IsEmpty() bool
- func (WrapperQuery) Kind() QueryKind
- func (q WrapperQuery) MarshalBSON() ([]byte, error)
- func (q WrapperQuery) MarshalJSON() ([]byte, error)
- func (n WrapperQuery) Name() string
- func (n *WrapperQuery) SetName(name string)
- func (q *WrapperQuery) UnmarshalBSON(data []byte) error
- func (q *WrapperQuery) UnmarshalJSON(data []byte) error
- func (q *WrapperQuery) Wrapper() (*WrapperQuery, error)
- type WrapperQueryParams
- type ZeroTerms
Constants ¶
const ( DistanceTypeArc = "arc" DistanceTypePlane = "plane" )
const ( DefaultMLTMaxQueryTerms = 25 DefaultMLTMinTermFreq = 2 DefaultMLTMinDocFreq = 5 DefaultMLTMinWordLen = 0 DefaultMLTMinimumShouldMatch = "30%" DefaultMLTMaxDocFreq = 2147483647 DefaultMLTFailOnUnsupportedField = true DefaultMLTBoostTerms = 0 DefaultMLTInclude = false DefaultMLTMinWordLength = 0 DefaultMLTMaxWordLength = 0 )
const ( // OperatorOr Operator // // For example, a query value of capital of Hungary is interpreted as // capital OR of OR Hungary. OperatorOr Operator = "OR" // OperatorAnd Operator // // For example, a query value of capital of Hungary is interpreted as capital // AND of AND Hungary. OperatorAnd Operator = "AND" And = OperatorAnd Or = OperatorOr )
const ( // SortMdoeMin - Pick the lowest value. SortModeMin = "min" // SortModeMax - Pick the highest value. SortModeMax = "max" // SortModeSum - Use the sum of all values as sort value. Only applicable for number based array fields. SortModeSum = "sum" // SortModeAvg - Use the average of all values as sort value. Only applicable for number based array fields. SortModeAvg = "avg" // Use the median of all values as sort value. Only applicable for number based array fields. SortModeMedian = "median" )
const ( // Sort in descending order SortOrderDescending = "desc" // Sort in ascending order SortOrderAscending = "asc" )
const ( ConflictsNotSpecified = "" ConflictsProceed = "proceed" ConflictsAbort = "abort" )
const DefaultAllowLeadingWildcard = true
const DefaultAnalyzeWildcard = false
const DefaultAutoGenerateSynonymsPhraseQuery = true
const DefaultBoost = float64(1)
const DefaultBoostMode = BoostModeMultiply
const DefaultCaseInsensitive = false
const DefaultCoerce = false
const DefaultDistanceType = DistanceTypeArc
const DefaultDistanceValidationMethod = ValidationMethodStrict
const DefaultDocValues = true
const DefaultDynamic = DynamicTrue
const DefaultEagerGlobalOrdinals = false
const DefaultEnablePositionIncrements = false
const DefaultEnabled = true
const DefaultFieldData = false
const DefaultFormat = "strict_date_optional_time||epoch_millis"
const DefaultFuzziness = "0"
const DefaultFuzzyMaxExpansions = int(50)
const DefaultFuzzyPrefixLength = int(0)
const DefaultFuzzyTranspositions = true
const DefaultHasChildScoreMode = ScoreModeNone
const DefaultIgnoreAbove = float64(2147483647)
const DefaultIgnoreMalformed = false
const DefaultIgnoreZ = true
const DefaultIncludeInParent = false
const DefaultIncludeInRoot = false
const DefaultIndex = true
const DefaultIndexPhrases = false
const DefaultLenient = false
const DefaultMaxBoost = float64(math.MaxFloat32)
const DefaultMaxDeterminizedStates = 10000
const DefaultMaxExpansions = int(50)
const DefaultMaxGaps = -1
const DefaultMaxInputLength = 50
const DefaultMaxShingleSize = 3
const DefaultMinScore = float64(0)
const DefaultModifier = ModifierNone
const DefaultName = ""
const DefaultNestedScoreMode = ScoreModeAvg
const DefaultNorms = true
const DefaultOperator = OperatorOr
const DefaultOrdered = false
const DefaultOrientation = OrientationRight
const DefaultPhraseSlop = 0
const DefaultPositionIncrementGap = float64(100)
const DefaultPositiveScoreImpact = true
const DefaultPrefixLength = 0
const DefaultPreservePositionIncrements = true
const DefaultPreserveSeperators = true
const DefaultRelation = RelationIntersects
const DefaultRewrite = RewriteConstantScore
const DefaultScoreMode = ScoreModeMultiply
const DefaultSlop = 0
const DefaultSpatialRelation = SpatialRelationIntersects
const DefaultSplitQueriesOnWhitespace = false
const DefaultStore = false
const DefaultTermVector = TermVectorNo
const DefaultTranspositions = true
const DefaultWeight = float64(0)
const DefaultZeroTermsQuery = ZeroTermsNone
Variables ¶
var ( ErrKindRequired = errors.New("picker: type is required") ErrUnsupportedType = errors.New("picker: unsupported type") ErrFieldNotFound = errors.New("picker: field not found") ErrFieldRequired = errors.New("picker: field is required") ErrFieldsRequired = errors.New("picker: fields is required") ErrValueRequired = errors.New("picker: value is required") ErrQueryRequired = errors.New("picker: query is required") ErrInvalidSource = errors.New("picker: invalid value for source") ErrInvalidRewrite = errors.New("picker: invalid value for rewrite") ErrFieldExists = errors.New("picker: field exists") ErrPathRequired = errors.New("picker: path is required") ErrIDRequired = errors.New("picker: id is required") ErrIndexRequired = errors.New("picker: index is required") ErrInvalidBoost = errors.New("picker: invalid value for boost") ErrInvalidFuzzyMaxExpansions = errors.New("picker: invalid value for fuzzy_max_expansions") ErrInvalidMaxExpansions = errors.New("picker: invalid value for max_expansions") ErrInvalidPrefixLength = errors.New("picker: invalidvalue for prefix_length") ErrInvalidZeroTermQuery = errors.New("picker: invalid value for zero_terms_query") ErrInvalidRelation = errors.New("picker: invalid value for relation") ErrWeightRequired = errors.New("picker: weight is required") ErrScriptRequired = errors.New("picker: script is required") ErrInvalidParams = errors.New("picker: params should marshal into a JSON object") ErrOriginRequired = errors.New("picker: origin is required") ErrScaleRequired = errors.New("picker: scale is required") ErrInvalidScoreMode = errors.New("picker: invalid value for score_mode") ErrInvalidBoostMode = errors.New("picker: invalid value for boost_mode") ErrInvalidModifier = errors.New("picker: invalid value for modifier") ErrMetaLimitExceeded = errors.New("picker: meta limit exceeded") ErrInvalidDynamic = errors.New("picker: invalid value for dynamic") ErrInvalidIndexOptions = errors.New("picker: invalid value for index_options") ErrInvalidIndexPrefixMaxChars = errors.New("picker: invalid value for index prefix_max_chars") ErrInvalidIndexPrefixMinChars = errors.New("picker: invalid value for index_prefix_min_chars") ErrScalingFactorRequired = errors.New("picker: scaling_factor is required") ErrInvalidScalingFactor = errors.New("picker: scaling_factor must be >= 1") ErrDimensionsRequired = errors.New("picker: dimensions is required") ErrInvalidOrientation = errors.New("picker: invalid orientation") ErrInvalidTermVector = errors.New("picker: invalid TermVector") ErrMissingType = errors.New("picker: missing type") ErrInvalidMaxShingleSize = errors.New("picker: invalid max_shingle_size; valid values are [2,3,4]") ErrInvalidNegativeBoost = errors.New("picker: negative_boost must be between 0 and 1.0") ErrNegativeRequired = errors.New("picker: negative is required") ErrPositiveRequired = errors.New("picker: positive is required") ErrQueriesRequired = errors.New("picker: queries is required") ErrSourceRequired = errors.New("picker: source is required") ErrPrefixRequired = errors.New("picker: prefix is required") ErrWildcardRequired = errors.New("picker: wildcard is required") ErrTermRequired = errors.New("picker: term is required") ErrTermsRequired = errors.New("picker: terms is required") ErrValuesRequired = errors.New("picker: values is required") ErrIntervalsRequired = errors.New("picker: intervals are required") ErrInvalidOperator = errors.New("picker: invalid operator") ErrInvalidMultiMatchType = errors.New("picker: invalid multimatch type") ErrInvalidTieBreaker = errors.New("picker: invalid tie breaker value ") ErrDistanceRequired = errors.New("picker: distance is required") ErrGeoPointRequired = errors.New("picker: GeoPoint is required") ErrLikeRequired = errors.New("picker: like is required") ErrTypeRequired = errors.New("picker: type is required") ErrPivotRequired = errors.New("picker: pivot is required") ErrInvalidPivot = errors.New("picker: pivot must be > 0") ErrInvalidExponent = errors.New("picker: exponent must be > 0") ErrExponentRequired = errors.New("picker: exponent is required") ErrMultiRankFeatureFunctions = errors.New("picker: only one function saturation, log, sigmoid or linear can be provided") )
var ( DefaultExplain = false DefaultFrom = int(0) DefaultSize = int(10) )
var ClockwiseOrientations = []Orientation{OrientationLeft, OrientationCW, OrientationClockwise}
var CounterClockwiseOrientations = []Orientation{OrientationRight, OrientationCCW, OrientationCounterClockwise}
var DefaultConflicts = ConflictsAbort
var DepthLimitDefault = float64(20)
var ( // ErrInvalidType indicates an invalid type ErrInvalidType = errors.New("invalid Type") )
var FieldTypeHandlers = map[FieldType]func() Field{ FieldTypeAlias: func() Field { return &AliasField{} }, FieldTypeBinary: func() Field { return &BinaryField{} }, FieldTypeBoolean: func() Field { return &BooleanField{} }, FieldTypeByte: func() Field { return &ByteField{} }, FieldTypeCompletion: func() Field { return &CompletionField{} }, FieldTypeConstant: func() Field { return &ConstantField{} }, FieldTypeDate: func() Field { return &DateField{} }, FieldTypeDateNanos: func() Field { return &DateNanoSecField{} }, FieldTypeDateRange: func() Field { return &DateRangeField{} }, FieldTypeDenseVector: func() Field { return &DenseVectorField{} }, FieldTypeDouble: func() Field { return &DoubleField{} }, FieldTypeDoubleRange: func() Field { return &DoubleRangeField{} }, FieldTypeFlattened: func() Field { return &FlattenedField{} }, FieldTypeFloat: func() Field { return &FloatField{} }, FieldTypeFloatRange: func() Field { return &FloatRangeField{} }, FieldTypePoint: func() Field { return &PointField{} }, FieldTypeGeoPoint: func() Field { return &GeoPointField{} }, FieldTypeGeoShape: func() Field { return &GeoShapeField{} }, FieldTypeShape: func() Field { return &ShapeField{} }, FieldTypeHalfFloat: func() Field { return &HalfFloatField{} }, FieldTypeIP: func() Field { return &IPField{} }, FieldTypeIPRange: func() Field { return &IPRangeField{} }, FieldTypeInteger: func() Field { return &IntegerField{} }, FieldTypeIntegerRange: func() Field { return &IntegerRangeField{} }, FieldTypeJoin: func() Field { return &JoinField{} }, FieldTypeKeyword: func() Field { return &KeywordField{} }, FieldTypeLong: func() Field { return &LongField{} }, FieldTypeLongRange: func() Field { return &LongRangeField{} }, FieldTypeNested: func() Field { return &NestedField{} }, FieldTypeObject: func() Field { return &ObjectField{} }, FieldTypePercolator: func() Field { return &PercolatorField{} }, FieldTypeRankFeature: func() Field { return &RankFeatureField{} }, FieldTypeRankFeatures: func() Field { return &RankFeaturesField{} }, FieldTypeScaledFloat: func() Field { return &ScaledFloatField{} }, FieldTypeSearchAsYouType: func() Field { return &SearchAsYouTypeField{} }, FieldTypeShort: func() Field { return &ShortField{} }, FieldTypeText: func() Field { return &TextField{} }, FieldTypeTokenCount: func() Field { return &TokenCountField{} }, FieldTypeUnsignedLong: func() Field { return &UnsignedLongField{} }, FieldTypeWildcardKeyword: func() Field { return &WildcardField{} }, FieldTypeHistogram: func() Field { return &HistogramField{} }, }
FieldTypeHandlers is a map of mapping Type to func that returns a Field instantiated with the appropriate Type
Functions ¶
func MarshalRule ¶
func UnmarshalFieldJSON ¶
Types ¶
type AggKind ¶
type AggKind string
const ( AggKindAdjacencyMatrix AggKind = "adjacency_matrix" AggKindAutoIntervalDateHistogram AggKind = "auto_date_histogram" AggKindChildren AggKind = "children" AggKindComposite AggKind = "composite" AggKindDateHistogram AggKind = "date_histogram" AggKindDateRange AggKind = "date_range" AggKindDiversifiedSampler AggKind = "diversified_sampler" AggKindFilter AggKind = "filter" AggKindFilters AggKind = "filters" AggKindGeoDistance AggKind = "geo_distance" AggKindGeohashGrid AggKind = "geohash_grid" AggKindGeotileGrid AggKind = "geotile_grid" AggKindGlobal AggKind = "global" AggKindHistogram AggKind = "histogram" AggKindIPPange AggKind = "ip_range" AggKindMissing AggKind = "missing" AggKindMultiTerms AggKind = "multi_terms" AggKindNested AggKind = "nested" AggKindParent AggKind = "parent" AggKindRange AggKind = "range" AggKindRareTerms AggKind = "rare_terms" AggKindReverseNested AggKind = "reverse_nested" AggKindSampler AggKind = "sampler" AggKindSignificantTerms AggKind = "significant_terms" AggKindSignificantText AggKind = "significant_text" AggKindTerms AggKind = "terms" AggKindVariableWidthHistogram AggKind = "variable_width_histogram" AggKindAvg AggKind = "avg" AggKindBoxplot AggKind = "boxplot" AggKindCardinality AggKind = "cardinality" AggKindExtendedStats AggKind = "extended_stats" AggKindGeoBounds AggKind = "geo_bounds" AggKindGeoCentroid AggKind = "geo_centroid" AggKindGeoLine AggKind = "geo_line" AggKindMatrixStats AggKind = "matrix_stats" AggKindMax AggKind = "max" AggKindMedianAbsoluteDeviation AggKind = "median_absolute_deviation" AggKindMin AggKind = "min" AggKindPercentileRanks AggKind = "percentile_ranks" AggKindPercentiles AggKind = "percentiles" AggKindRate AggKind = "rate" AggKindScriptedMetric AggKind = "metric" AggKindStats AggKind = "stats" AggKindStringStats AggKind = "string_stats" AggKindSum AggKind = "sum" AggKindTTest AggKind = "t_test" AggKindTopHits AggKind = "top_hits" AggKindTopMetrics AggKind = "top_metrics" AggKindValueCount AggKind = "value_count" AggKindWeightedAvg AggKind = "weighted_avg" AggKindAverageBucket AggKind = "avg_bucket" AggKindBucketScript AggKind = "bucket_script" AggKindBucketSelector AggKind = "bucket_selector" AggKindBucketSort AggKind = "bucket_sort" AggKindCumulativeCardinality AggKind = "cumulative_cardinality" AggKindCumulativeSum AggKind = "cumulative_sum" AggKindDerivative AggKind = "derivative" AggKindExtendedStatsBucket AggKind = "extended_stats_bucket" AggKindInferenceBucket AggKind = "inference" AggKindMaxBucket AggKind = "max_bucket" AggKindMinBucket AggKind = "min_bucket" AggKindMovingAverage AggKind = "moving_avg" AggKindMovingFunction AggKind = "moving_fn" AggKindMovingPercentiles AggKind = "moving_percentiles" AggKindNormalize AggKind = "normalize" AggKindPercentilesBucket AggKind = "percentiles_bucket" AggKindSerialDifferencing AggKind = "serial_diff" AggKindStatsBucket AggKind = "stats_bucket" AggKindSumBucket AggKind = "sum_bucket" )
type AliasField ¶
type AliasField struct {
// contains filtered or unexported fields
}
An AliasField mapping defines an alternate name for a field in the index. The alias can be used in place of the target field in search requests, and selected other APIs like field capabilities.
Alias targets ¶
There are a few restrictions on the target of an alias:
- The target must be a concrete field, and not an object or another field alias.
- The target field must exist at the time the alias is created.
- If nested objects are defined, a field alias must have the same nested scope as its target.
- Additionally, a field alias can only have one target. This means that it is not possible to use a field alias to query over multiple target fields in a single clause.
An alias can be changed to refer to a new target through a mappings update. A known limitation is that if any stored percolator queries contain the field alias, they will still refer to its original target. More information can be found in the percolator documentation.
Currently only the search and field capabilities APIs will accept and resolve field aliases. Other APIs that accept field names, such as term vectors, cannot be used with field aliases.
Finally, some queries, such as terms, geo_shape, and more_like_this, allow for fetching query information from an indexed document. Because field aliases aren’t supported when fetching documents, the part of the query that specifies the lookup path cannot refer to a field by its alias.
https://www.elastic.co/guide/en/elasticsearch/reference/current/alias.html
func NewAliasField ¶
func NewAliasField(params AliasFieldParams) (*AliasField, error)
func (*AliasField) Field ¶
func (a *AliasField) Field() (Field, error)
func (AliasField) MarshalBSON ¶
func (a AliasField) MarshalBSON() ([]byte, error)
func (AliasField) MarshalJSON ¶
func (a AliasField) MarshalJSON() ([]byte, error)
func (*AliasField) SetPath ¶
func (a *AliasField) SetPath(path string) error
SetPath sets path to path
func (AliasField) Type ¶
func (AliasField) Type() FieldType
func (*AliasField) UnmarshalBSON ¶
func (a *AliasField) UnmarshalBSON(data []byte) error
func (*AliasField) UnmarshalJSON ¶
func (a *AliasField) UnmarshalJSON(data []byte) error
type AliasFieldParams ¶
type AliasFieldParams struct { // The path to the target field. Note that this must be the full path, including any parent objects (e.g. object1.object2.field). Path string `json:"path"` }
func (AliasFieldParams) Alias ¶
func (a AliasFieldParams) Alias() (*AliasField, error)
func (AliasFieldParams) Field ¶
func (a AliasFieldParams) Field() (Field, error)
func (AliasFieldParams) Type ¶
func (AliasFieldParams) Type() FieldType
type Aliaser ¶
type Aliaser interface {
Alias() (*AliasField, error)
}
type AllOfQuery ¶
type AllOfQuery struct {
// contains filtered or unexported fields
}
func (*AllOfQuery) Clause ¶
func (ao *AllOfQuery) Clause() (QueryClause, error)
func (*AllOfQuery) Clear ¶
func (ao *AllOfQuery) Clear()
func (*AllOfQuery) Disable ¶
func (ao *AllOfQuery) Disable()
func (*AllOfQuery) Enable ¶
func (ao *AllOfQuery) Enable()
func (*AllOfQuery) IsEmpty ¶
func (ao *AllOfQuery) IsEmpty() bool
func (AllOfQuery) Kind ¶
func (AllOfQuery) Kind() QueryKind
func (AllOfQuery) MarshalJSON ¶
func (ao AllOfQuery) MarshalJSON() ([]byte, error)
func (*AllOfQuery) UnmarshalJSON ¶
func (ao *AllOfQuery) UnmarshalJSON(data []byte) error
type AllOfQueryParams ¶
type AllOfQueryParams struct {
Name string
}
func (AllOfQueryParams) AllOf ¶
func (ao AllOfQueryParams) AllOf() (*AllOfQuery, error)
func (AllOfQueryParams) Clause ¶
func (ao AllOfQueryParams) Clause() (CompleteClause, error)
func (AllOfQueryParams) Kind ¶
func (ao AllOfQueryParams) Kind() QueryKind
type AllOfRule ¶
type AllOfRule struct {
// contains filtered or unexported fields
}
func (AllOfRule) Filter ¶
func (r AllOfRule) Filter() *RuleFilter
func (AllOfRule) MarshalBSON ¶
func (AllOfRule) MarshalJSON ¶
func (*AllOfRule) SetFilter ¶
func (r *AllOfRule) SetFilter(filter RuleFilterer) error
func (*AllOfRule) SetIntervals ¶
func (*AllOfRule) SetMaxGaps ¶
func (mg *AllOfRule) SetMaxGaps(maxGaps interface{}) error
func (*AllOfRule) SetOrdered ¶
func (o *AllOfRule) SetOrdered(ordered interface{}) error
func (*AllOfRule) UnmarshalBSON ¶
func (*AllOfRule) UnmarshalJSON ¶
type AllOfRuleParams ¶
type AllOfRuleParams struct { // (Required, array of rule objects) An array of rules to combine. All rules // must produce a match in a document for the overall source to match. Intervals Ruleset `json:"intervals"` // (Optional, Boolean) If true, intervals produced by the rules should // appear in the order in which they are specified. Defaults to false. Ordered interface{} `json:"ordered,omitempty"` // (Optional) Rule used to filter returned intervals. Filter RuleFilterer `json:"filter,omitempty"` MaxGaps interface{} `json:"max_gaps,omitempty"` }
func (AllOfRuleParams) AllOfRule ¶
func (p AllOfRuleParams) AllOfRule() (*AllOfRule, error)
func (AllOfRuleParams) Rule ¶
func (p AllOfRuleParams) Rule() (QueryRule, error)
func (AllOfRuleParams) Type ¶
func (AllOfRuleParams) Type() RuleType
type AllOfer ¶
type AllOfer interface {
AllOf() (*AllOfQuery, error)
}
type AnyOfRule ¶
type AnyOfRule struct {
// contains filtered or unexported fields
}
func (AnyOfRule) Filter ¶
func (r AnyOfRule) Filter() *RuleFilter
func (AnyOfRule) MarshalBSON ¶
func (AnyOfRule) MarshalJSON ¶
func (*AnyOfRule) SetFilter ¶
func (r *AnyOfRule) SetFilter(filter RuleFilterer) error
func (*AnyOfRule) SetIntervals ¶
func (*AnyOfRule) UnmarshalBSON ¶
func (*AnyOfRule) UnmarshalJSON ¶
type AnyOfRuleParams ¶
type AnyOfRuleParams struct { // (Required, array of rule objects) An array of rules to match. Intervals Ruleset `json:"intervals"` // (Optional, interval filter rule object) Rule used to filter returned intervals. Filter RuleFilterer `json:"filter,omitempty"` }
func (AnyOfRuleParams) AnyOfRule ¶
func (p AnyOfRuleParams) AnyOfRule() (*AnyOfRule, error)
func (AnyOfRuleParams) Rule ¶
func (p AnyOfRuleParams) Rule() (QueryRule, error)
func (AnyOfRuleParams) Type ¶
func (AnyOfRuleParams) Type() RuleType
type BinaryField ¶
type BinaryField struct {
// contains filtered or unexported fields
}
BinaryField is a value encoded as a Base64 string.
https://www.elastic.co/guide/en/elasticsearch/reference/current/binary.html
func NewBinaryField ¶
func NewBinaryField(params BinaryFieldParams) (*BinaryField, error)
func (BinaryField) DocValues ¶
func (dv BinaryField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (BinaryField) Field ¶
func (b BinaryField) Field() (Field, error)
func (BinaryField) MarshalBSON ¶
func (b BinaryField) MarshalBSON() ([]byte, error)
func (BinaryField) MarshalJSON ¶
func (b BinaryField) MarshalJSON() ([]byte, error)
func (*BinaryField) SetDocValues ¶
func (dv *BinaryField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*BinaryField) SetStore ¶
func (sa *BinaryField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (BinaryField) Store ¶
func (sa BinaryField) Store() bool
Store returns the StoreAttr Value or false
func (BinaryField) Type ¶
func (BinaryField) Type() FieldType
func (*BinaryField) UnmarshalBSON ¶
func (b *BinaryField) UnmarshalBSON(data []byte) error
func (*BinaryField) UnmarshalJSON ¶
func (b *BinaryField) UnmarshalJSON(data []byte) error
type BinaryFieldParams ¶
type BinaryFieldParams struct { // Should the field be stored on disk in a column-stride fashion, so that it can later be used for sorting, aggregations, or scripting? Accepts true or false (default). DocValues interface{} `json:"doc_values,omitempty"` // Whether the field value should be stored and retrievable separately from the _source field. Accepts true or false (default). Store interface{} `json:"store,omitempty"` }
func (BinaryFieldParams) Binary ¶
func (b BinaryFieldParams) Binary() (*BinaryField, error)
func (BinaryFieldParams) Field ¶
func (b BinaryFieldParams) Field() (Field, error)
func (BinaryFieldParams) Type ¶
func (BinaryFieldParams) Type() FieldType
type BoolQuery ¶
type BoolQuery struct {
// contains filtered or unexported fields
}
BoolQuery is a query that matches documents matching boolean combinations of other queries. The bool query maps to Lucene BoolQuery. It is built using one or more boolean clauses, each clause with a typed occurrence.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
func (*BoolQuery) Clause ¶
func (b *BoolQuery) Clause() (QueryClause, error)
func (*BoolQuery) Filter ¶
func (b *BoolQuery) Filter() *QueryClauses
Filter clauses (query) that must appear in matching documents. However unlike must the score of the query will be ignored. Filter clauses are executed in filter context, meaning that scoring is ignored and clauses are considered for caching.
func (BoolQuery) MarshalBSON ¶
func (BoolQuery) MarshalJSON ¶
func (BoolQuery) MinimumShouldMatch ¶
func (msm BoolQuery) MinimumShouldMatch() string
func (*BoolQuery) Must ¶
func (b *BoolQuery) Must() *QueryClauses
Must clauses (query) must appear in matching documents and will contribute to the score.
func (*BoolQuery) MustNot ¶
func (b *BoolQuery) MustNot() *QueryClauses
MustNot is a set of clauses (query) where each clause must not appear in the matching documents. Clauses are executed in filter context meaning that scoring is ignored and clauses are considered for caching. Because scoring is ignored, a score of 0 for all documents is returned.
func (*BoolQuery) SetMinimumShouldMatch ¶
func (msm *BoolQuery) SetMinimumShouldMatch(v string)
func (*BoolQuery) SetMustNot ¶
func (*BoolQuery) Should ¶
func (b *BoolQuery) Should() *QueryClauses
Should clauses (query) that should appear in the matching document.
func (*BoolQuery) UnmarshalBSON ¶
func (*BoolQuery) UnmarshalJSON ¶
type BoolQueryParams ¶
type BoolQueryParams struct { // The clause (query) must appear in matching documents and will contribute // to the score. Must Clauses // The clause (query) must appear in matching documents. However unlike must // the score of the query will be ignored. Filter clauses are executed in // filter context, meaning that scoring is ignored and clauses are // considered for caching. Filter Clauses // The clause (query) should appear in the matching document. Should Clauses // The clause (query) must not appear in the matching documents. Clauses are // executed in filter context meaning that scoring is ignored and clauses are // considered for caching. Because scoring is ignored, a score of 0 for all // documents is returned. MustNot Clauses // You can use the minimum_should_match parameter to specify the number or // percentage of should clauses returned documents must match. // // If the bool query includes at least one should clause and no must or // filter clauses, the default value is 1. Otherwise, the default value is // 0. MinimumShouldMatch string Name string // contains filtered or unexported fields }
BoolQueryParams is a query that matches documents matching boolean combinations of other queries. The bool query maps to Lucene BoolQueryParams. It is built using one or more boolean clauses, each clause with a typed occurrence.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
func (BoolQueryParams) Bool ¶
func (b BoolQueryParams) Bool() (*BoolQuery, error)
func (BoolQueryParams) Clause ¶
func (b BoolQueryParams) Clause() (QueryClause, error)
func (BoolQueryParams) Kind ¶
func (b BoolQueryParams) Kind() QueryKind
type BooleanField ¶
type BooleanField struct {
// contains filtered or unexported fields
}
BooleanField accepts JSON true and false values, but can also accept strings which are interpreted as either true or false:
False values
false, "false", "" (empty string)
True values
true, "true"
func NewBooleanField ¶
func NewBooleanField() *BooleanField
func (BooleanField) DocValues ¶
func (dv BooleanField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*BooleanField) Field ¶
func (b *BooleanField) Field() (Field, error)
func (BooleanField) Index ¶
func (i BooleanField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (BooleanField) MarshalBSON ¶
func (b BooleanField) MarshalBSON() ([]byte, error)
func (BooleanField) MarshalJSON ¶
func (b BooleanField) MarshalJSON() ([]byte, error)
func (BooleanField) Meta ¶
func (m BooleanField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (BooleanField) NullValue ¶
func (nv BooleanField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*BooleanField) SetDocValues ¶
func (dv *BooleanField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*BooleanField) SetIndex ¶
func (i *BooleanField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*BooleanField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*BooleanField) SetNullValue ¶
func (nv *BooleanField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*BooleanField) SetStore ¶
func (sa *BooleanField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (BooleanField) Store ¶
func (sa BooleanField) Store() bool
Store returns the StoreAttr Value or false
func (BooleanField) Type ¶
func (BooleanField) Type() FieldType
func (*BooleanField) UnmarshalBSON ¶
func (b *BooleanField) UnmarshalBSON(data []byte) error
func (*BooleanField) UnmarshalJSON ¶
func (b *BooleanField) UnmarshalJSON(data []byte) error
type BooleanFieldParams ¶
type BooleanFieldParams struct { // DocValues sets doc_values (Optional, bool or string that can be parsed as a bool) // // Most fields are indexed by default, which makes them searchable. The inverted // index allows queries to look up the search term in unique sorted list of // terms, and from that immediately have access to the list of documents that // contain the term. // // Sorting, aggregations, and access to field values in scripts requires a // different data access pattern. Instead of looking up the term and finding // documents, we need to be able to look up the document and find the terms that // it has in a field. // // Doc values are the on-disk data structure, built at document index time, // which makes this data access pattern possible. They store the same values as // the _source but in a column-oriented fashion that is way more efficient for // sorting and aggregations. Doc values are supported on almost all field types, // with the notable exception of text and annotated_text fields. // // All fields which support doc values have them enabled by default. If you are // sure that you don’t need to sort or aggregate on a field, or access the field // value from a script, you can disable doc values in order to save disk space // // https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html DocValues interface{} `json:"doc_values,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool or string that can be parsed as a bool) Index interface{} `json:"index,omitempty"` // A null value cannot be indexed or searched. When a field is set to null, (or // an empty array or an array of null values) it is treated as though that field // has no values. // // The null_value parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched // // The null_value needs to be the same data type as the field. For instance, a // long field cannot have a string null_value. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/null-value.html NullValue interface{} `json:"null_value,omitempty"` // By default, field values are indexed to make them searchable, but they // are not stored. This means that the field can be queried, but the // original field value cannot be retrieved. // // (Optional, bool or string that can be parsed as a bool) // // Usually this doesn’t matter. The field value is already part of the // _source field, which is stored by default. If you only want to retrieve // the value of a single field or of a few fields, instead of the whole // _source, then this can be achieved with source filtering. // // In certain situations it can make sense to store a field. For instance, // if you have a document with a title, a date, and a very large content // field, you may want to retrieve just the title and the date without // having to extract those fields from a large _source field // // Stored fields returned as arrays // // For consistency, stored fields are always returned as an array because // there is no way of knowing if the original field value was a single // value, multiple values, or an empty array. // // The original value can be retrieved from the _source field instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html Store interface{} `json:"store,omitempty"` // Metadata attached to the field. This metadata is opaque to Elasticsearch, it // is only useful for multiple applications that work on the same indices to // share meta information about fields such as units // // map[string]string or picker.Meta // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html#mapping-field-meta Meta map[string]string `json:"meta,omitempty"` }
func (BooleanFieldParams) Boolean ¶
func (b BooleanFieldParams) Boolean() (*BooleanField, error)
func (BooleanFieldParams) Field ¶
func (b BooleanFieldParams) Field() (Field, error)
func (BooleanFieldParams) Type ¶
func (BooleanFieldParams) Type() FieldType
type BoostMode ¶
type BoostMode string
const ( BoostModeUnspecified BoostMode = "" // query score and function score is multiplied (default) BoostModeMultiply BoostMode = "multiply" // only function score is used, the query score is ignored BoostModeReplace BoostMode = "replace" // query score and function score are added BoostModeSum BoostMode = "sum" // average BoostModeAvg BoostMode = "avg" // max of query score and function score BoostModeMax BoostMode = "max" //min of query score and function score BoostModeMin BoostMode = "min" )
type BoostingQuery ¶
type BoostingQuery struct {
// contains filtered or unexported fields
}
BoostingQuery returns documents matching a positive query while reducing the relevance score of documents that also match a negative query.
You can use the boosting query to demote certain documents without excluding them from the search results.
func (*BoostingQuery) Clause ¶
func (b *BoostingQuery) Clause() (QueryClause, error)
func (*BoostingQuery) Clear ¶
func (b *BoostingQuery) Clear()
func (*BoostingQuery) IsEmpty ¶
func (b *BoostingQuery) IsEmpty() bool
func (BoostingQuery) Kind ¶
func (BoostingQuery) Kind() QueryKind
func (BoostingQuery) MarshalBSON ¶
func (b BoostingQuery) MarshalBSON() ([]byte, error)
func (BoostingQuery) MarshalJSON ¶
func (b BoostingQuery) MarshalJSON() ([]byte, error)
func (BoostingQuery) Negative ¶
func (b BoostingQuery) Negative() *Query
func (BoostingQuery) NegativeBoost ¶
func (nb BoostingQuery) NegativeBoost() float64
NegativeBoost is a floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the negative query. (Required)
func (BoostingQuery) Positive ¶
func (b BoostingQuery) Positive() *Query
func (*BoostingQuery) SetNegative ¶
func (b *BoostingQuery) SetNegative(params Querier) error
func (*BoostingQuery) SetNegativeBoost ¶
SetNegativeBoost sets negative_boost
func (*BoostingQuery) SetPositive ¶
func (b *BoostingQuery) SetPositive(params Querier) error
func (*BoostingQuery) UnmarshalBSON ¶
func (b *BoostingQuery) UnmarshalBSON(data []byte) error
func (*BoostingQuery) UnmarshalJSON ¶
func (b *BoostingQuery) UnmarshalJSON(data []byte) error
type BoostingQueryParams ¶
type BoostingQueryParams struct { // (Required, query object) Query you wish to run. Any returned documents // must match this query. Positive Querier // (Required, query object) Query used to decrease the relevance score of // matching documents. // // If a returned document matches the positive query and this query, the // boosting query calculates the final relevance score for the document as // follows: // // 1. Take the original relevance score from the positive query. 2. Multiply // the score by the negative_boost value. Negative Querier // (Required, float) Floating point number between 0 and 1.0 used to // decrease the relevance scores of documents matching the negative query. NegativeBoost float64 Name string }
func (BoostingQueryParams) Boosting ¶
func (p BoostingQueryParams) Boosting() (*BoostingQuery, error)
func (BoostingQueryParams) Clause ¶
func (p BoostingQueryParams) Clause() (QueryClause, error)
type Boostinger ¶
type Boostinger interface {
Boosting() (*BoostingQuery, error)
}
type BoundingBox ¶
type BoundingBox struct { TopLeft interface{} `json:"top_left"` BottomRight interface{} `json:"bottom_right"` }
BoundingBox for GeoBoundingBoxQuery
func (BoundingBox) BoundingBox ¶
func (bb BoundingBox) BoundingBox() interface{}
func (BoundingBox) MarshalEasyJSON ¶
func (v BoundingBox) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (BoundingBox) MarshalJSON ¶
func (v BoundingBox) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*BoundingBox) UnmarshalEasyJSON ¶
func (v *BoundingBox) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BoundingBox) UnmarshalJSON ¶
func (v *BoundingBox) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type BoundingBoxer ¶
type ByteField ¶
type ByteField struct {
// contains filtered or unexported fields
}
A ByteField is a signed 8-bit integer with a minimum value of -128 and a maximum value of 127.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewByteField ¶
func NewByteField(params ByteFieldParams) (*ByteField, error)
func (ByteField) Boost ¶
func (b ByteField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (ByteField) Coerce ¶
func (cp ByteField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (ByteField) DocValues ¶
func (dv ByteField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (ByteField) IgnoreMalformed ¶
func (im ByteField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (ByteField) Index ¶
func (i ByteField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (ByteField) MarshalBSON ¶
func (ByteField) MarshalJSON ¶
func (ByteField) Meta ¶
func (m ByteField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (ByteField) NullValue ¶
func (nv ByteField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*ByteField) SetBoost ¶
func (b *ByteField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*ByteField) SetCoerce ¶
func (cp *ByteField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*ByteField) SetDocValues ¶
func (dv *ByteField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*ByteField) SetIgnoreMalformed ¶
func (im *ByteField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*ByteField) SetIndex ¶
func (i *ByteField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*ByteField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*ByteField) SetNullValue ¶
func (nv *ByteField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*ByteField) SetStore ¶
func (sa *ByteField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (ByteField) Store ¶
func (sa ByteField) Store() bool
Store returns the StoreAttr Value or false
func (*ByteField) UnmarshalBSON ¶
func (*ByteField) UnmarshalJSON ¶
type ByteFieldParams ¶
type ByteFieldParams numberFieldParams
func (ByteFieldParams) Byte ¶
func (p ByteFieldParams) Byte() (*ByteField, error)
func (ByteFieldParams) Field ¶
func (p ByteFieldParams) Field() (Field, error)
func (ByteFieldParams) Type ¶
func (ByteFieldParams) Type() FieldType
type Clauser ¶
type Clauser interface { Clause Clause() (QueryClause, error) }
type Clauses ¶
type Clauses []CompleteClauser
func (*Clauses) Add ¶
func (c *Clauses) Add(clause CompleteClauser) error
type CommonQuery ¶
type CommonQuery struct {
// contains filtered or unexported fields
}
func (*CommonQuery) Clause ¶
func (q *CommonQuery) Clause() (QueryClause, error)
func (*CommonQuery) Clear ¶
func (q *CommonQuery) Clear()
func (*CommonQuery) Common ¶
func (q *CommonQuery) Common() (*CommonQuery, error)
func (*CommonQuery) IsEmpty ¶
func (q *CommonQuery) IsEmpty() bool
func (CommonQuery) Kind ¶
func (CommonQuery) Kind() QueryKind
func (CommonQuery) MarshalBSON ¶
func (q CommonQuery) MarshalBSON() ([]byte, error)
func (CommonQuery) MarshalJSON ¶
func (q CommonQuery) MarshalJSON() ([]byte, error)
func (*CommonQuery) UnmarshalBSON ¶
func (q *CommonQuery) UnmarshalBSON(data []byte) error
func (*CommonQuery) UnmarshalJSON ¶
func (q *CommonQuery) UnmarshalJSON(data []byte) error
type CommonQueryParams ¶
type CommonQueryParams struct { Name string // contains filtered or unexported fields }
func (CommonQueryParams) Clause ¶
func (p CommonQueryParams) Clause() (QueryClause, error)
func (CommonQueryParams) Common ¶
func (p CommonQueryParams) Common() (*CommonQuery, error)
func (CommonQueryParams) Kind ¶
func (CommonQueryParams) Kind() QueryKind
type Commoner ¶
type Commoner interface {
Common() (*CommonQuery, error)
}
type CompleteClause ¶
type CompleteClause interface { Clause Complete() }
type CompleteClauser ¶
type CompleteClauser interface { CompleteClause Clause() (QueryClause, error) }
type CompleteFuzzier ¶
type CompleteFuzzier interface { Fuzzier CompleteClause }
type CompleteMatcher ¶
type CompleteMatcher interface { Matcher CompleteClauser }
type CompletePrefixer ¶
type CompletePrefixer interface { Prefixer CompleteClauser }
type CompleteTermer ¶
type CompleteTermer interface { Termer CompleteClauser }
type CompleteTermser ¶
type CompleteTermser interface { Termser CompleteClauser }
type CompletionField ¶
type CompletionField struct {
// contains filtered or unexported fields
}
The CompletionField is a completion suggester which provides provides auto-complete/search-as-you-type functionality. This is a navigational feature to guide users to relevant results as they are typing, improving search precision. It is not meant for spell correction or did-you-mean functionality like the term or phrase suggesters.
Ideally, auto-complete functionality should be as fast as a user types to provide instant feedback relevant to what a user has already typed in. Hence, completion suggester is optimized for speed. The suggester uses data structures that enable fast lookups, but are costly to build and are stored in-memory.
func NewCompletionField ¶
func NewCompletionField(params CompletionFieldParams) (*CompletionField, error)
func (CompletionField) Analyzer ¶
func (ap CompletionField) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (*CompletionField) Field ¶
func (c *CompletionField) Field() (Field, error)
func (CompletionField) MarshalBSON ¶
func (c CompletionField) MarshalBSON() ([]byte, error)
func (CompletionField) MarshalJSON ¶
func (c CompletionField) MarshalJSON() ([]byte, error)
func (CompletionField) MaxInputLength ¶
func (mil CompletionField) MaxInputLength() int
MaxInputLength limits the length of a single input, defaults to 50 UTF-16 code points. This limit is only used at index time to reduce the total number of characters per input string in order to prevent massive inputs from bloating the underlying datastructure. Most use cases won’t be influenced by the default value since prefix completions seldom grow beyond prefixes longer than a handful of characters.
func (CompletionField) PreservePositionIncrements ¶
func (ppi CompletionField) PreservePositionIncrements() bool
PreservePositionIncrements enables position increments, defaults to true. If disabled and using stopwords analyzer, you could get a field starting with The Beatles, if you suggest for b. Note: You could also achieve this by indexing two inputs, Beatles and The Beatles, no need to change a simple analyzer, if you are able to enrich your data.
func (CompletionField) PreserveSeperators ¶
func (ps CompletionField) PreserveSeperators() bool
PreserveSeperators preserves the separators, defaults to true. If disabled, you could find a field starting with Foo Fighters, if you suggest for foof.
func (CompletionField) SearchAnalyzer ¶
func (sa CompletionField) SearchAnalyzer() string
SearchAnalyzer overrides Analyzer for search analysis
func (CompletionField) SearchQuoteAnalyzer ¶
func (sq CompletionField) SearchQuoteAnalyzer() string
SearchQuoteAnalyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
func (*CompletionField) SetAnalyzer ¶
func (ap *CompletionField) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*CompletionField) SetMaxInputLength ¶
func (mil *CompletionField) SetMaxInputLength(v interface{}) error
SetMaxInputLength sets the MaxInputLength value to v
func (*CompletionField) SetPreservePositionIncrements ¶
func (ppi *CompletionField) SetPreservePositionIncrements(v interface{}) error
SetPreservePositionIncrements sets the PreservePositionIncrements value to V
func (*CompletionField) SetPreserveSeperators ¶
func (ps *CompletionField) SetPreserveSeperators(v interface{}) error
SetPreserveSeperators sets the preserve_seperator to v
func (*CompletionField) SetSearchAnalyzer ¶
func (sa *CompletionField) SetSearchAnalyzer(v string)
SetSearchAnalyzer sets search_analyzer to v
func (CompletionField) SetSearchQuoteAnalyzer ¶
func (sq CompletionField) SetSearchQuoteAnalyzer(v string)
SetSearchQuoteAnalyzer sets search_quote_analyzer to v
func (CompletionField) Type ¶
func (CompletionField) Type() FieldType
func (*CompletionField) UnmarshalBSON ¶
func (c *CompletionField) UnmarshalBSON(data []byte) error
func (*CompletionField) UnmarshalJSON ¶
func (c *CompletionField) UnmarshalJSON(data []byte) error
type CompletionFieldParams ¶
type CompletionFieldParams struct { // Analyzer used to convert the text in the query value into tokens. // Defaults to the index-time analyzer mapped for the <field>. If no // analyzer is mapped, the index’s default analyzer is used. (Optional) Analyzer string `json:"analyzer,omitempty"` // SearchAnalyzer overrides Analyzer for search analysis. (Optional) SearchAnalyzer string `json:"search_analyzer,omitempty"` // SearchQuoteAnalyzer setting allows you to specify an analyzer for // phrases, this is particularly useful when dealing with disabling stop // words for phrase queries. (Optional) SearchQuoteAnalyzer string `json:"search_quote_analyzer,omitempty"` // PreserveSeperators preserves the separators, defaults to true. If // disabled, you could find a field starting with Foo Fighters, if you // suggest for foof. PreserveSeperators interface{} `json:"preserve_separators,omitempty"` // Enables position increments, defaults to true. If disabled and using // stopwords analyzer, you could get a field starting with The Beatles, if you // suggest for b. Note: You could also achieve this by indexing two inputs, // Beatles and The Beatles, no need to change a simple analyzer, if you are able // to enrich your data. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html#completion-suggester PreservePositionIncrements interface{} `json:"preserve_position_increments,omitempty"` // MaxInputLength limits the length of a single input, defaults to 50 UTF-16 // code points. This limit is only used at index time to reduce the total // number of characters per input string in order to prevent massive inputs // from bloating the underlying datastructure. Most use cases won’t be // influenced by the default value since prefix completions seldom grow // beyond prefixes longer than a handful of characters. MaxInputLength interface{} `json:"max_input_length,omitempty"` }
CompletionFieldParams creates a completion_field. A completion_field is a completion suggester which provides provides auto-complete/search-as-you-type functionality. This is a navigational feature to guide users to relevant results as they are typing, improving search precision. It is not meant for spell correction or did-you-mean functionality like the term or phrase suggesters.
Ideally, auto-complete functionality should be as fast as a user types to provide instant feedback relevant to what a user has already typed in. Hence, completion suggester is optimized for speed. The suggester uses data structures that enable fast lookups, but are costly to build and are stored in-memory.
func (CompletionFieldParams) Completion ¶
func (p CompletionFieldParams) Completion() (*CompletionField, error)
func (CompletionFieldParams) Field ¶
func (p CompletionFieldParams) Field() (Field, error)
func (CompletionFieldParams) Type ¶
func (CompletionFieldParams) Type() FieldType
type Completioner ¶
type Completioner interface {
Completion() (*CompletionField, error)
}
type ConstantField ¶
type ConstantField struct {
// contains filtered or unexported fields
}
ConstantField is a specialization of the Keyword field for the case that all documentsin the index have the same value.
! X-Pack
func NewConstantField ¶
func NewConstantField(params ConstantFieldParams) (*ConstantField, error)
func (*ConstantField) Field ¶
func (c *ConstantField) Field() (Field, error)
func (ConstantField) MarshalBSON ¶
func (c ConstantField) MarshalBSON() ([]byte, error)
func (ConstantField) MarshalJSON ¶
func (c ConstantField) MarshalJSON() ([]byte, error)
func (ConstantField) SetValue ¶
func (c ConstantField) SetValue(v interface{})
func (ConstantField) Type ¶
func (ConstantField) Type() FieldType
func (*ConstantField) UnmarshalBSON ¶
func (c *ConstantField) UnmarshalBSON(data []byte) error
func (*ConstantField) UnmarshalJSON ¶
func (c *ConstantField) UnmarshalJSON(data []byte) error
func (*ConstantField) Value ¶
func (c *ConstantField) Value() interface{}
type ConstantFieldParams ¶
type ConstantFieldParams struct {
Value interface{} `json:"value"`
}
func (ConstantFieldParams) ConstantField ¶
func (c ConstantFieldParams) ConstantField() (*ConstantField, error)
func (ConstantFieldParams) Field ¶
func (c ConstantFieldParams) Field() (Field, error)
func (ConstantFieldParams) Type ¶
func (ConstantFieldParams) Type() FieldType
type ConstantFielder ¶
type ConstantFielder interface {
ConstantField() (*ConstantField, error)
}
type ConstantScoreQuery ¶
type ConstantScoreQuery struct {
// contains filtered or unexported fields
}
func (ConstantScoreQuery) Boost ¶
func (b ConstantScoreQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*ConstantScoreQuery) Clause ¶
func (cs *ConstantScoreQuery) Clause() (QueryClause, error)
func (*ConstantScoreQuery) Clear ¶
func (cs *ConstantScoreQuery) Clear()
func (*ConstantScoreQuery) ConstantScore ¶
func (cs *ConstantScoreQuery) ConstantScore() (*ConstantScoreQuery, error)
func (*ConstantScoreQuery) Filter ¶
func (cs *ConstantScoreQuery) Filter() *Query
func (*ConstantScoreQuery) IsEmpty ¶
func (cs *ConstantScoreQuery) IsEmpty() bool
func (ConstantScoreQuery) Kind ¶
func (ConstantScoreQuery) Kind() QueryKind
func (ConstantScoreQuery) MarshalJSON ¶
func (cs ConstantScoreQuery) MarshalJSON() ([]byte, error)
func (*ConstantScoreQuery) SetBoost ¶
func (b *ConstantScoreQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*ConstantScoreQuery) SetFilter ¶
func (cs *ConstantScoreQuery) SetFilter(query Querier) error
func (*ConstantScoreQuery) UnmarshalJSON ¶
func (cs *ConstantScoreQuery) UnmarshalJSON(data []byte) error
type ConstantScoreQueryParams ¶
type ConstantScoreQueryParams struct { // (Required) Filter query you wish to run. Any returned // documents must match this query. // // Filter queries do not calculate relevance scores. To speed up // performance, Elasticsearch automatically caches frequently used filter // queries. Filter Querier // (Optional, float) Floating point number used as the constant relevance score for every document matching the filter query. Defaults to 1.0. Boost interface{} }
func (ConstantScoreQueryParams) Clause ¶
func (p ConstantScoreQueryParams) Clause() (QueryClause, error)
func (ConstantScoreQueryParams) ConstantScore ¶
func (p ConstantScoreQueryParams) ConstantScore() (*ConstantScoreQuery, error)
func (ConstantScoreQueryParams) Kind ¶
func (ConstantScoreQueryParams) Kind() QueryKind
type ConstantScorer ¶
type ConstantScorer interface {
ConstantScore() (*ConstantScoreQuery, error)
}
type CopyToParam ¶
type CopyToParam struct {
CopyToValue string `bson:"copy_to,omitempty" json:"copy_to,omitempty"`
}
CopyToParam is a Field mixin for CopyTo
The copy_to parameter allows you to copy the values of multiple fields into a group field, which can then be queried as a single field.
https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html
func (CopyToParam) CopyTo ¶
func (ctp CopyToParam) CopyTo() string
CopyTo parameter allows you to copy the values of multiple fields into a group field, which can then be queried as a single field.
func (*CopyToParam) SetCopyTo ¶
func (ctp *CopyToParam) SetCopyTo(v string)
SetCopyTo sets CopyToParam.Value to v
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
func NewCount ¶
func NewCount(params CountParams) (*Count, error)
func (Count) MarshalBSON ¶
func (Count) MarshalJSON ¶
func (*Count) UnmarshalBSON ¶
func (*Count) UnmarshalJSON ¶
type CountParams ¶
type CountParams struct {
Query Querier
}
func (CountParams) Count ¶
func (p CountParams) Count() (*Count, error)
type DateField ¶
type DateField struct {
// contains filtered or unexported fields
}
func NewDateField ¶
func NewDateField(params DateFieldParams) (*DateField, error)
func (DateField) Boost ¶
func (b DateField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (DateField) DocValues ¶
func (dv DateField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (DateField) Format ¶
func (f DateField) Format() string
Format is the format(s) that the that can be parsed. Defaults to strict_date_optional_time||epoch_millis.
Multiple formats can be seperated by ||
func (DateField) IgnoreMalformed ¶
func (im DateField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (DateField) Index ¶
func (i DateField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (DateField) MarshalBSON ¶
func (DateField) MarshalJSON ¶
func (DateField) Meta ¶
func (m DateField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (DateField) NullValue ¶
func (nv DateField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*DateField) SetBoost ¶
func (b *DateField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*DateField) SetDocValues ¶
func (dv *DateField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*DateField) SetIgnoreMalformed ¶
func (im *DateField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*DateField) SetIndex ¶
func (i *DateField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*DateField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*DateField) SetNullValue ¶
func (nv *DateField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*DateField) SetStore ¶
func (sa *DateField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (DateField) Store ¶
func (sa DateField) Store() bool
Store returns the StoreAttr Value or false
func (*DateField) UnmarshalBSON ¶
func (*DateField) UnmarshalJSON ¶
type DateFieldParams ¶
type DateFieldParams struct { // IgnoreMalformed determines if malformed numbers are ignored. If true, // malformed numbers are ignored. If false (default), malformed numbers // throw an exception and reject the whole document. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // (Optional, bool, default: true) // // Most fields are indexed by default, which makes them searchable. The // inverted index allows queries to look up the search term in unique sorted // list of terms, and from that immediately have access to the list of // documents that contain the term. // // Sorting, aggregations, and access to field values in scripts requires a // different data access pattern. Instead of looking up the term and finding // documents, we need to be able to look up the document and find the terms // that it has in a field. // // Doc values are the on-disk data structure, built at document index time, // which makes this data access pattern possible. They store the same values // as the _source but in a column-oriented fashion that is way more // efficient for sorting and aggregations. Doc values are supported on // almost all field types, with the notable exception of text and // annotated_text fields. // // All fields which support doc values have them enabled by default. If you // are sure that you don’t need to sort or aggregate on a field, or access // the field value from a script, you can disable doc values in order to // save disk space // // https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html DocValues interface{} `json:"doc_values,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool) Index interface{} `json:"index,omitempty"` // NullValue parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched NullValue interface{} `json:"null_value,omitempty"` // WithStore is a mapping with a store paramter. // // By default, field values are indexed to make them searchable, but they // are not stored. This means that the field can be queried, but the // original field value cannot be retrieved. // // Usually this doesn’t matter. The field value is already part of the // _source field, which is stored by default. If you only want to retrieve // the value of a single field or of a few fields, instead of the whole // _source, then this can be achieved with source filtering. // // In certain situations it can make sense to store a field. For instance, // if you have a document with a title, a date, and a very large content // field, you may want to retrieve just the title and the date without // having to extract those fields from a large _source field // // Stored fields returned as arrays // // For consistency, stored fields are always returned as an array because // there is no way of knowing if the original field value was a single // value, multiple values, or an empty array. // // The original value can be retrieved from the _source field instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html Store interface{} `json:"store,omitempty"` // Metadata attached to the field. This metadata is opaque to Elasticsearch, // it is only useful for multiple applications that work on the same indices // to share meta information about fields such as units // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html#mapping-field-meta Meta Meta `json:"meta,omitempty"` //Format is the format(d) that the that can be parsed. Defaults to //strict_date_optional_time||epoch_millis. // // Multiple formats can be seperated by || Format string `json:"format,omitempty"` // Deprecated Boost interface{} `json:"boost,omitempty"` }
func (DateFieldParams) Date ¶
func (p DateFieldParams) Date() (*DateField, error)
func (DateFieldParams) Field ¶
func (p DateFieldParams) Field() (Field, error)
func (DateFieldParams) Type ¶
func (DateFieldParams) Type() FieldType
type DateNanoSecField ¶
type DateNanoSecField struct {
// contains filtered or unexported fields
}
DateNanoSecField is an addition to the DateField data type.
However there is an important distinction between the two. The existing date data type stores dates in millisecond resolution. The date_nanos data type stores dates in nanosecond resolution, which limits its range of dates from roughly 1970 to 2262, as dates are still stored as a long representing nanoseconds since the epoch.
Queries on nanoseconds are internally converted to range queries on this long representation, and the result of aggregations and stored fields is converted back to a string depending on the date format that is associated with the field.
Date formats can be customised, but if no format is specified then it uses the default:
"strict_date_optional_time||epoch_millis"
This means that it will accept dates with optional timestamps, which conform to the formats supported by strict_date_optional_time including up to nine second fractionals or milliseconds-since-the-epoch (thus losing precision on the nano second part). Using strict_date_optional_time will format the result up to only three second fractionals. To print and parse up to nine digits of resolution, use strict_date_optional_time_nanos.
Limitations ¶
Aggregations are still on millisecond resolution, even when using a date_nanos field. This limitation also affects transforms.
https://www.elastic.co/guide/en/elasticsearch/reference/current/date_nanos.html
func NewDateNanoSecField ¶
func NewDateNanoSecField(params DateNanoSecFieldParams) (*DateNanoSecField, error)
func (DateNanoSecField) Boost ¶
func (b DateNanoSecField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (DateNanoSecField) DocValues ¶
func (dv DateNanoSecField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*DateNanoSecField) Field ¶
func (d *DateNanoSecField) Field() (Field, error)
func (DateNanoSecField) Format ¶
func (f DateNanoSecField) Format() string
Format is the format(s) that the that can be parsed. Defaults to strict_date_optional_time||epoch_millis.
Multiple formats can be seperated by ||
func (DateNanoSecField) IgnoreMalformed ¶
func (im DateNanoSecField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (DateNanoSecField) Index ¶
func (i DateNanoSecField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (DateNanoSecField) MarshalBSON ¶
func (d DateNanoSecField) MarshalBSON() ([]byte, error)
func (DateNanoSecField) MarshalJSON ¶
func (d DateNanoSecField) MarshalJSON() ([]byte, error)
func (DateNanoSecField) Meta ¶
func (m DateNanoSecField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (DateNanoSecField) NullValue ¶
func (nv DateNanoSecField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*DateNanoSecField) SetBoost ¶
func (b *DateNanoSecField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*DateNanoSecField) SetDocValues ¶
func (dv *DateNanoSecField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*DateNanoSecField) SetIgnoreMalformed ¶
func (im *DateNanoSecField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*DateNanoSecField) SetIndex ¶
func (i *DateNanoSecField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*DateNanoSecField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*DateNanoSecField) SetNullValue ¶
func (nv *DateNanoSecField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*DateNanoSecField) SetStore ¶
func (sa *DateNanoSecField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (DateNanoSecField) Store ¶
func (sa DateNanoSecField) Store() bool
Store returns the StoreAttr Value or false
func (DateNanoSecField) Type ¶
func (d DateNanoSecField) Type() FieldType
func (*DateNanoSecField) UnmarshalBSON ¶
func (d *DateNanoSecField) UnmarshalBSON(data []byte) error
func (*DateNanoSecField) UnmarshalJSON ¶
func (d *DateNanoSecField) UnmarshalJSON(data []byte) error
type DateNanoSecFieldParams ¶
type DateNanoSecFieldParams DateFieldParams
func (DateNanoSecFieldParams) DateNanoSec ¶
func (p DateNanoSecFieldParams) DateNanoSec() (*DateNanoSecField, error)
func (DateNanoSecFieldParams) Field ¶
func (p DateNanoSecFieldParams) Field() (Field, error)
func (DateNanoSecFieldParams) Type ¶
func (p DateNanoSecFieldParams) Type() FieldType
type DateRangeField ¶
type DateRangeField struct {
// contains filtered or unexported fields
}
DateRangeField is a range of date values. Date ranges support various date formats through the format mapping parameter. Regardless of the format used, date values are parsed into an unsigned 64-bit integer representing milliseconds since the Unix epoch in UTC. Values containing the now date math expression are not supported.
func NewDateRangeField ¶
func NewDateRangeField(params DateRangeFieldParams) (*DateRangeField, error)
func (DateRangeField) Coerce ¶
func (cp DateRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*DateRangeField) Field ¶
func (r *DateRangeField) Field() (Field, error)
func (DateRangeField) Format ¶
func (f DateRangeField) Format() string
Format is the format(s) that the that can be parsed. Defaults to strict_date_optional_time||epoch_millis.
Multiple formats can be seperated by ||
func (DateRangeField) Index ¶
func (i DateRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (DateRangeField) MarshalBSON ¶
func (r DateRangeField) MarshalBSON() ([]byte, error)
func (DateRangeField) MarshalJSON ¶
func (r DateRangeField) MarshalJSON() ([]byte, error)
func (*DateRangeField) SetCoerce ¶
func (cp *DateRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*DateRangeField) SetIndex ¶
func (i *DateRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*DateRangeField) SetStore ¶
func (sa *DateRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (DateRangeField) Store ¶
func (sa DateRangeField) Store() bool
Store returns the StoreAttr Value or false
func (DateRangeField) Type ¶
func (DateRangeField) Type() FieldType
func (*DateRangeField) UnmarshalBSON ¶
func (r *DateRangeField) UnmarshalBSON(data []byte) error
func (*DateRangeField) UnmarshalJSON ¶
func (r *DateRangeField) UnmarshalJSON(data []byte) error
type DateRangeFieldParams ¶
type DateRangeFieldParams struct { // Coercion attempts to clean up dirty values to fit the data type of a // field. (Optional, bool) Defaults to false. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/coerce.html Coerce interface{} `json:"coerce,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool) Index interface{} `json:"index,omitempty"` // WithStore is a mapping with a store paramter. // // By default, field values are indexed to make them searchable, but they are // not stored. This means that the field can be queried, but the original field // value cannot be retrieved. // // Usually this doesn’t matter. The field value is already part of the _source // field, which is stored by default. If you only want to retrieve the value of // a single field or of a few fields, instead of the whole _source, then this // can be achieved with source filtering. // // In certain situations it can make sense to store a field. For instance, if // you have a document with a title, a date, and a very large content field, you // may want to retrieve just the title and the date without having to extract // those fields from a large _source field // // Stored fields returned as arrays // // For consistency, stored fields are always returned as an array because there // is no way of knowing if the original field value was a single value, multiple // values, or an empty array. // // The original value can be retrieved from the _source field instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html Store interface{} `json:"store,omitempty"` Format string `json:"format,omitempty"` }
func (DateRangeFieldParams) DateRange ¶
func (p DateRangeFieldParams) DateRange() (*DateRangeField, error)
func (DateRangeFieldParams) Field ¶
func (p DateRangeFieldParams) Field() (Field, error)
func (DateRangeFieldParams) Type ¶
func (DateRangeFieldParams) Type() FieldType
type DecayFunction ¶
type DecayFunction interface { Function Field() string Origin() interface{} SetOrigin(interface{}) error Offset() dynamic.StringNumberOrTime SetOffset(interface{}) error Scale() dynamic.StringOrNumber SetScale(interface{}) error SetField(string) error Decay() dynamic.Number SetDecay(v interface{}) error }
type DeleteByQuerier ¶
type DeleteByQuerier interface {
DeleteByQuery() (*DeleteByQuery, error)
}
type DeleteByQuery ¶
type DeleteByQuery struct {
// contains filtered or unexported fields
}
func NewDeleteByQuery ¶
func NewDeleteByQuery(params DeleteByQueryParams) (*DeleteByQuery, error)
func (DeleteByQuery) MarshalBSON ¶
func (d DeleteByQuery) MarshalBSON() ([]byte, error)
func (DeleteByQuery) MarshalJSON ¶
func (d DeleteByQuery) MarshalJSON() ([]byte, error)
func (*DeleteByQuery) Query ¶
func (d *DeleteByQuery) Query() *Query
func (*DeleteByQuery) UnmarshalBSON ¶
func (d *DeleteByQuery) UnmarshalBSON(data []byte) error
func (*DeleteByQuery) UnmarshalJSON ¶
func (d *DeleteByQuery) UnmarshalJSON(data []byte) error
type DeleteByQueryParams ¶
type DeleteByQueryParams struct {
Query Querier
}
func (DeleteByQueryParams) DeleteByQuery ¶
func (p DeleteByQueryParams) DeleteByQuery() (*DeleteByQuery, error)
type DeleteByQueryResponse ¶
type DeleteByQueryResponse struct { Took int64 `json:"took"` TimedOut bool `json:"timed_out"` Total int64 `json:"total"` Updated int64 `json:"updated"` Deleted int64 `json:"deleted"` Batches int64 `json:"batches"` VersionConflicts int64 `json:"version_conflicts"` Noops int64 `json:"noops"` Retries Retries `json:"retries"` ThrottledMillis int64 `json:"throttled_millis"` RequestsPerSecond float64 `json:"requests_per_second"` Failures []interface{} `json:"failures"` ThrottledUntilMillis int64 `json:"throttled_until_millis"` }
func DecodeDeleteByQueryResponse ¶
func DecodeDeleteByQueryResponse(body io.Reader) (*DeleteByQueryResponse, error)
type DenseVectorField ¶
type DenseVectorField struct {
// contains filtered or unexported fields
}
DenseVectorField stores dense vectors of float values. The maximum number of dimensions that can be in a vector should not exceed 2048. A dense_vector field is a single-valued field.
! X-Pack
These vectors can be used for document scoring. For example, a document score can represent a distance between a given query vector and the indexed document vector.
You index a dense vector as an array of floats.
https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html
func NewDenseVectorField ¶
func NewDenseVectorField(params DenseVectorFieldParams) (*DenseVectorField, error)
func (DenseVectorField) Dimensions ¶
func (d DenseVectorField) Dimensions() int
func (*DenseVectorField) Field ¶
func (dv *DenseVectorField) Field() (Field, error)
func (DenseVectorField) MarshalJSON ¶
func (dv DenseVectorField) MarshalJSON() ([]byte, error)
func (*DenseVectorField) SetDimensions ¶
func (d *DenseVectorField) SetDimensions(v interface{}) error
func (DenseVectorField) Type ¶
func (DenseVectorField) Type() FieldType
func (*DenseVectorField) UnmarshalJSON ¶
func (dv *DenseVectorField) UnmarshalJSON(data []byte) error
type DenseVectorFieldParams ¶
type DenseVectorFieldParams struct {
// Dimensions is the number of dimensions in the vector, required parameter.
Dimensions interface{} `json:"dims,omitempty"`
}
func (DenseVectorFieldParams) DenseVector ¶
func (p DenseVectorFieldParams) DenseVector() (*DenseVectorField, error)
func (DenseVectorFieldParams) Field ¶
func (p DenseVectorFieldParams) Field() (Field, error)
func (DenseVectorFieldParams) Type ¶
func (DenseVectorFieldParams) Type() FieldType
type DisjunctionMaxQuery ¶
type DisjunctionMaxQuery struct {
// contains filtered or unexported fields
}
func (*DisjunctionMaxQuery) Clause ¶
func (dm *DisjunctionMaxQuery) Clause() (QueryClause, error)
func (*DisjunctionMaxQuery) Clear ¶
func (dm *DisjunctionMaxQuery) Clear()
func (*DisjunctionMaxQuery) DisjunectionMax ¶
func (dm *DisjunctionMaxQuery) DisjunectionMax() (*DisjunctionMaxQuery, error)
func (*DisjunctionMaxQuery) IsEmpty ¶
func (dm *DisjunctionMaxQuery) IsEmpty() bool
func (DisjunctionMaxQuery) Kind ¶
func (DisjunctionMaxQuery) Kind() QueryKind
func (DisjunctionMaxQuery) MarshalJSON ¶
func (dm DisjunctionMaxQuery) MarshalJSON() ([]byte, error)
func (DisjunctionMaxQuery) Queries ¶
func (dm DisjunctionMaxQuery) Queries() Queries
func (*DisjunctionMaxQuery) SetQueries ¶
func (dm *DisjunctionMaxQuery) SetQueries(queries Queryset) error
func (*DisjunctionMaxQuery) SetTieBreaker ¶
func (dm *DisjunctionMaxQuery) SetTieBreaker(v float64) error
func (DisjunctionMaxQuery) TieBreaker ¶
func (dm DisjunctionMaxQuery) TieBreaker() float64
func (*DisjunctionMaxQuery) UnmarshalJSON ¶
func (dm *DisjunctionMaxQuery) UnmarshalJSON(data []byte) error
type DisjunctionMaxQueryParams ¶
func (DisjunctionMaxQueryParams) Clause ¶
func (p DisjunctionMaxQueryParams) Clause() (QueryClause, error)
func (DisjunctionMaxQueryParams) DisjunctionMax ¶
func (p DisjunctionMaxQueryParams) DisjunctionMax() (*DisjunctionMaxQuery, error)
func (DisjunctionMaxQueryParams) Kind ¶
func (DisjunctionMaxQueryParams) Kind() QueryKind
type DisjunctionMaxer ¶
type DisjunctionMaxer interface {
DisjunctionMax() (*DisjunctionMaxQuery, error)
}
type DistanceFeatureQuery ¶
type DistanceFeatureQuery struct {
// contains filtered or unexported fields
}
func (DistanceFeatureQuery) Boost ¶
func (b DistanceFeatureQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*DistanceFeatureQuery) Clause ¶
func (q *DistanceFeatureQuery) Clause() (QueryClause, error)
func (*DistanceFeatureQuery) Clear ¶
func (q *DistanceFeatureQuery) Clear()
func (*DistanceFeatureQuery) DistanceFeature ¶
func (q *DistanceFeatureQuery) DistanceFeature() (*DistanceFeatureQuery, error)
func (*DistanceFeatureQuery) IsEmpty ¶
func (q *DistanceFeatureQuery) IsEmpty() bool
func (DistanceFeatureQuery) Kind ¶
func (DistanceFeatureQuery) Kind() QueryKind
func (DistanceFeatureQuery) MarshalBSON ¶
func (q DistanceFeatureQuery) MarshalBSON() ([]byte, error)
func (DistanceFeatureQuery) MarshalJSON ¶
func (q DistanceFeatureQuery) MarshalJSON() ([]byte, error)
func (DistanceFeatureQuery) Origin ¶
func (q DistanceFeatureQuery) Origin() string
func (DistanceFeatureQuery) Pivot ¶
func (q DistanceFeatureQuery) Pivot() string
func (*DistanceFeatureQuery) SetBoost ¶
func (b *DistanceFeatureQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*DistanceFeatureQuery) SetOrigin ¶
func (q *DistanceFeatureQuery) SetOrigin(origin string) error
func (*DistanceFeatureQuery) SetPivot ¶
func (q *DistanceFeatureQuery) SetPivot(pivot string) error
func (*DistanceFeatureQuery) UnmarshalBSON ¶
func (q *DistanceFeatureQuery) UnmarshalBSON(data []byte) error
func (*DistanceFeatureQuery) UnmarshalJSON ¶
func (q *DistanceFeatureQuery) UnmarshalJSON(data []byte) error
type DistanceFeatureQueryParams ¶
type DistanceFeatureQueryParams struct { Name string // (Required, string) Name of the field used to calculate distances. // // This field must meet the following criteria: // // - Be a date, date_nanos or geo_point field // // - Have an index mapping parameter value of true, which is the default // // - Have an doc_values mapping parameter value of true, which is the // default Field string // (Required, string) Date or point of origin used to calculate distances. // // If the field value is a date or date_nanos field, the origin value must // be a date. Date Math, such as now-1h, is supported. // // If the field value is a geo_point field, the origin value must be a // geopoint. Origin string // (Required, time unit or distance unit) Distance from the origin at which // relevance scores receive half of the boost value. // // If the field value is a date or date_nanos field, the pivot value must be a // time unit, such as 1h or 10d. // // If the field value is a geo_point field, the pivot value must be a distance // unit, such as 1km or 12m. Pivot string // (Optional, float) Floating point number used to multiply the relevance // score of matching documents. This value cannot be negative. Defaults to // 1.0. Boost interface{} // contains filtered or unexported fields }
func (DistanceFeatureQueryParams) Clause ¶
func (p DistanceFeatureQueryParams) Clause() (QueryClause, error)
func (DistanceFeatureQueryParams) DistanceFeature ¶
func (p DistanceFeatureQueryParams) DistanceFeature() (*DistanceFeatureQuery, error)
func (DistanceFeatureQueryParams) Kind ¶
func (DistanceFeatureQueryParams) Kind() QueryKind
type DistanceFeaturer ¶
type DistanceFeaturer interface {
DistanceFeature() (*DistanceFeatureQuery, error)
}
type DistanceType ¶
type DistanceType string
type DoubleField ¶
type DoubleField struct {
// contains filtered or unexported fields
}
A DoubleField is a double-precision 64-bit IEEE 754 floating point number, restricted to finite values.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewDoubleField ¶
func NewDoubleField(params DoubleFieldParams) (*DoubleField, error)
func (DoubleField) Boost ¶
func (b DoubleField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (DoubleField) Coerce ¶
func (cp DoubleField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (DoubleField) DocValues ¶
func (dv DoubleField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*DoubleField) Field ¶
func (d *DoubleField) Field() (Field, error)
func (DoubleField) IgnoreMalformed ¶
func (im DoubleField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (DoubleField) Index ¶
func (i DoubleField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (DoubleField) MarshalBSON ¶
func (d DoubleField) MarshalBSON() ([]byte, error)
func (DoubleField) MarshalJSON ¶
func (d DoubleField) MarshalJSON() ([]byte, error)
func (DoubleField) Meta ¶
func (m DoubleField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (DoubleField) NullValue ¶
func (nv DoubleField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*DoubleField) SetBoost ¶
func (b *DoubleField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*DoubleField) SetCoerce ¶
func (cp *DoubleField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*DoubleField) SetDocValues ¶
func (dv *DoubleField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*DoubleField) SetIgnoreMalformed ¶
func (im *DoubleField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*DoubleField) SetIndex ¶
func (i *DoubleField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*DoubleField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*DoubleField) SetNullValue ¶
func (nv *DoubleField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*DoubleField) SetStore ¶
func (sa *DoubleField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (DoubleField) Store ¶
func (sa DoubleField) Store() bool
Store returns the StoreAttr Value or false
func (DoubleField) Type ¶
func (DoubleField) Type() FieldType
func (*DoubleField) UnmarshalBSON ¶
func (d *DoubleField) UnmarshalBSON(data []byte) error
func (*DoubleField) UnmarshalJSON ¶
func (d *DoubleField) UnmarshalJSON(data []byte) error
type DoubleFieldParams ¶
type DoubleFieldParams numberFieldParams
func (DoubleFieldParams) Double ¶
func (d DoubleFieldParams) Double() (*DoubleField, error)
func (DoubleFieldParams) Field ¶
func (d DoubleFieldParams) Field() (Field, error)
func (DoubleFieldParams) Type ¶
func (DoubleFieldParams) Type() FieldType
type DoubleRangeField ¶
type DoubleRangeField struct {
// contains filtered or unexported fields
}
DoubleRangeField is a range of double-precision 64-bit IEEE 754 floating point values.
func NewDoubleRangeField ¶
func NewDoubleRangeField(params DoubleRangeFieldParams) (*DoubleRangeField, error)
func (DoubleRangeField) Coerce ¶
func (cp DoubleRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*DoubleRangeField) Field ¶
func (r *DoubleRangeField) Field() (Field, error)
func (DoubleRangeField) Index ¶
func (i DoubleRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (DoubleRangeField) MarshalBSON ¶
func (r DoubleRangeField) MarshalBSON() ([]byte, error)
func (DoubleRangeField) MarshalJSON ¶
func (r DoubleRangeField) MarshalJSON() ([]byte, error)
func (*DoubleRangeField) SetCoerce ¶
func (cp *DoubleRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*DoubleRangeField) SetIndex ¶
func (i *DoubleRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*DoubleRangeField) SetStore ¶
func (sa *DoubleRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (DoubleRangeField) Store ¶
func (sa DoubleRangeField) Store() bool
Store returns the StoreAttr Value or false
func (DoubleRangeField) Type ¶
func (DoubleRangeField) Type() FieldType
func (*DoubleRangeField) UnmarshalBSON ¶
func (r *DoubleRangeField) UnmarshalBSON(data []byte) error
func (*DoubleRangeField) UnmarshalJSON ¶
func (r *DoubleRangeField) UnmarshalJSON(data []byte) error
type DoubleRangeFieldParams ¶
type DoubleRangeFieldParams rangeFieldParams
func (DoubleRangeFieldParams) DoubleRange ¶
func (p DoubleRangeFieldParams) DoubleRange() (*DoubleRangeField, error)
func (DoubleRangeFieldParams) Field ¶
func (p DoubleRangeFieldParams) Field() (Field, error)
func (DoubleRangeFieldParams) Type ¶
func (DoubleRangeFieldParams) Type() FieldType
type Exister ¶
type Exister interface {
Exists() (*ExistsQuery, error)
}
type ExistsQuery ¶
type ExistsQuery struct {
// contains filtered or unexported fields
}
ExistsQuery returns documents that contain an indexed value for a field.
An indexed value may not exist for a document’s field due to a variety of reasons:
- The field in the source JSON is null or []
- The field has "index" : false set in the mapping
- The length of the field value exceeded an ignore_above setting in the mapping
- The field value was malformed and ignore_malformed was defined in the mapping
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html
func (*ExistsQuery) Clause ¶
func (e *ExistsQuery) Clause() (QueryClause, error)
func (*ExistsQuery) Clear ¶
func (e *ExistsQuery) Clear()
func (*ExistsQuery) Field ¶
func (e *ExistsQuery) Field() string
func (*ExistsQuery) IsEmpty ¶
func (e *ExistsQuery) IsEmpty() bool
func (ExistsQuery) Kind ¶
func (e ExistsQuery) Kind() QueryKind
func (ExistsQuery) MarshalBSON ¶
func (e ExistsQuery) MarshalBSON() ([]byte, error)
func (ExistsQuery) MarshalJSON ¶
func (e ExistsQuery) MarshalJSON() ([]byte, error)
func (*ExistsQuery) SetField ¶
func (e *ExistsQuery) SetField(field string) error
func (*ExistsQuery) UnmarshalBSON ¶
func (e *ExistsQuery) UnmarshalBSON(data []byte) error
func (*ExistsQuery) UnmarshalJSON ¶
func (e *ExistsQuery) UnmarshalJSON(data []byte) error
type ExistsQueryParams ¶
type ExistsQueryParams struct { Field string Name string // contains filtered or unexported fields }
ExistsQueryParams returns documents that contain an indexed value for a field.
An indexed value may not exist for a document’s field due to a variety of reasons:
- The field in the source JSON is null or []
- The field has "index" : false set in the mapping
- The length of the field value exceeded an ignore_above setting in the mapping
- The field value was malformed and ignore_malformed was defined in the mapping
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html
func (ExistsQueryParams) Clause ¶
func (e ExistsQueryParams) Clause() (QueryClause, error)
func (ExistsQueryParams) Exists ¶
func (e ExistsQueryParams) Exists() (*ExistsQuery, error)
type ExpDecayFunction ¶
type ExpDecayFunction struct {
// contains filtered or unexported fields
}
func (*ExpDecayFunction) Decay ¶
func (e *ExpDecayFunction) Decay() dynamic.Number
func (*ExpDecayFunction) Field ¶
func (e *ExpDecayFunction) Field() string
func (ExpDecayFunction) Filter ¶
func (e ExpDecayFunction) Filter() QueryClause
func (ExpDecayFunction) FuncKind ¶
func (ExpDecayFunction) FuncKind() FuncKind
func (ExpDecayFunction) MarshalBSON ¶
func (e ExpDecayFunction) MarshalBSON() ([]byte, error)
func (ExpDecayFunction) MarshalJSON ¶
func (e ExpDecayFunction) MarshalJSON() ([]byte, error)
func (*ExpDecayFunction) Offset ¶
func (e *ExpDecayFunction) Offset() dynamic.StringNumberOrTime
func (ExpDecayFunction) Origin ¶
func (e ExpDecayFunction) Origin() interface{}
func (ExpDecayFunction) Scale ¶
func (e ExpDecayFunction) Scale() dynamic.StringOrNumber
func (*ExpDecayFunction) SetDecay ¶
func (e *ExpDecayFunction) SetDecay(value interface{}) error
func (*ExpDecayFunction) SetField ¶
func (e *ExpDecayFunction) SetField(field string) error
func (*ExpDecayFunction) SetFilter ¶
func (e *ExpDecayFunction) SetFilter(c CompleteClauser) error
func (*ExpDecayFunction) SetOffset ¶
func (e *ExpDecayFunction) SetOffset(offset interface{}) error
func (*ExpDecayFunction) SetOrigin ¶
func (e *ExpDecayFunction) SetOrigin(origin interface{}) error
func (*ExpDecayFunction) SetScale ¶
func (e *ExpDecayFunction) SetScale(scale interface{}) error
type ExpDecayFunctionParams ¶
type ExpDecayFunctionParams struct { // Field Field string // Weight (float) Weight interface{} // The point of origin used for calculating distance. Must be given as a // number for numeric field, date for date fields and geo point for geo // fields. Required for geo and numeric field. For date fields the default // is now. Date math (for example now-1h) is supported for origin. Origin interface{} // Required for all types. Defines the distance from origin + offset at // which the computed score will equal decay parameter. For geo fields: Can // be defined as number+unit (1km, 12m,…). Default unit is meters. For date // fields: Can to be defined as a number+unit ("1h", "10d",…). Default unit // is milliseconds. For numeric field: Any number. Scale interface{} // If an offset is defined, the decay function will only compute the decay // function for documents with a distance greater than the defined offset. // The default is 0. Offset interface{} // The decay parameter defines how documents are scored at the distance // given at scale. If no decay is defined, documents at the distance scale // will be scored 0.5. Decay interface{} Filter CompleteClauser }
func (ExpDecayFunctionParams) FuncKind ¶
func (ExpDecayFunctionParams) FuncKind() FuncKind
func (ExpDecayFunctionParams) Function ¶
func (e ExpDecayFunctionParams) Function() (Function, error)
type Field ¶
type Field interface { Fielder json.Marshaler json.Unmarshaler }
Field is an elasticsearch field mapping
type FieldDataFrequencyFilter ¶
type FieldDataFrequencyFilter struct { Min float64 `bson:"min" json:"min"` Max float64 `bson:"max" json:"max"` MinSegmentSize int `bson:"min_segment_size" json:"min_segment_size"` }
FieldDataFrequencyFilter is utilized with mappings
type FieldError ¶
func (*FieldError) Error ¶
func (e *FieldError) Error() string
func (*FieldError) Unwrap ¶
func (e *FieldError) Unwrap() error
type FieldMappings ¶
type FieldMappings struct {
Properties Fields `json:"properties"`
}
type FieldMaskingSpanQuery ¶
type FieldMaskingSpanQuery struct {
// contains filtered or unexported fields
}
func (*FieldMaskingSpanQuery) Clause ¶
func (q *FieldMaskingSpanQuery) Clause() (QueryClause, error)
func (*FieldMaskingSpanQuery) Clear ¶
func (q *FieldMaskingSpanQuery) Clear()
func (*FieldMaskingSpanQuery) FieldMaskingSpan ¶
func (q *FieldMaskingSpanQuery) FieldMaskingSpan() (*FieldMaskingSpanQuery, error)
func (*FieldMaskingSpanQuery) IsEmpty ¶
func (q *FieldMaskingSpanQuery) IsEmpty() bool
func (FieldMaskingSpanQuery) Kind ¶
func (FieldMaskingSpanQuery) Kind() QueryKind
func (FieldMaskingSpanQuery) MarshalBSON ¶
func (q FieldMaskingSpanQuery) MarshalBSON() ([]byte, error)
func (FieldMaskingSpanQuery) MarshalJSON ¶
func (q FieldMaskingSpanQuery) MarshalJSON() ([]byte, error)
func (*FieldMaskingSpanQuery) UnmarshalBSON ¶
func (q *FieldMaskingSpanQuery) UnmarshalBSON(data []byte) error
func (*FieldMaskingSpanQuery) UnmarshalJSON ¶
func (q *FieldMaskingSpanQuery) UnmarshalJSON(data []byte) error
type FieldMaskingSpanQueryParams ¶
type FieldMaskingSpanQueryParams struct { Name string // contains filtered or unexported fields }
func (FieldMaskingSpanQueryParams) Clause ¶
func (p FieldMaskingSpanQueryParams) Clause() (QueryClause, error)
func (FieldMaskingSpanQueryParams) FieldMaskingSpan ¶
func (p FieldMaskingSpanQueryParams) FieldMaskingSpan() (*FieldMaskingSpanQuery, error)
func (FieldMaskingSpanQueryParams) Kind ¶
func (FieldMaskingSpanQueryParams) Kind() QueryKind
type FieldType ¶
type FieldType string
FieldType of ElasticSearch Mapping
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html#mapping-types
const ( // FieldTypeBinary is a value encoded as a Base64 string. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/binary.html FieldTypeBinary FieldType = "binary" // FieldTypeBoolean is for true and false values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/boolean.html FieldTypeBoolean FieldType = "boolean" // FieldTypeKeyword is used for structured content such as // IDs, email addresses, hostnames, status codes, zip codes, or tags. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#keyword-field-type FieldTypeKeyword FieldType = "keyword" // FieldTypeConstant is for keyword fields that always contain the same value. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#constant-keyword-field-type FieldTypeConstant FieldType = "constant_keyword" // FieldTypeWildcardKeyword optimizes log lines and similar keyword values for grep-like wildcard queries. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#wildcard-field-type FieldTypeWildcardKeyword FieldType = "wildcard" // FieldTypeLong is a signed 64-bit integer with a minimum value of -263 and a maximum value of 263-1. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeLong FieldType = "long" // FieldTypeInteger is a signed 32-bit integer with a minimum value of -231 and a maximum value of 231-1. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeInteger FieldType = "integer" // FieldTypeShort is a signed 16-bit integer with a minimum value of -32,768 and a maximum value of 32,767. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeShort FieldType = "short" // FieldTypeByte is a signed 8-bit integer with a minimum value of -128 and a maximum value of 127. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeByte FieldType = "byte" // FieldTypeDouble is a double-precision 64-bit IEEE 754 floating point number, restricted to finite values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeDouble FieldType = "double" // FieldTypeFloat is a single-precision 32-bit IEEE 754 floating point number, restricted to finite values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeFloat FieldType = "float" // FieldTypeHalfFloat is a half-precision 16-bit IEEE 754 floating point number, restricted to finite values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeHalfFloat FieldType = "half_float" // FieldTypeScaledFloat is a floating point number that is backed by a long, scaled by a fixed double scaling factor. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeScaledFloat FieldType = "scaled_float" // FieldTypeUnsignedLong is an unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html FieldTypeUnsignedLong FieldType = "unsigned_long" // FieldTypeDateNanos is an addition to the date data type. However there is an important // distinction between the two. The existing date data type stores dates in millisecond // resolution. The date_nanos data type stores dates in nanosecond resolution, which // limits its range of dates from roughly 1970 to 2262, as dates are still stored as a // long representing nanoseconds since the epoch. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/date_nanos.html FieldTypeDateNanos FieldType = "date_nanos" // FieldTypeDate is a date in one of the following formats: // // - strings containing formatted dates, e.g. "2015-01-01" or "2015/01/01 12:10:30". // // - a long number representing milliseconds-since-the-epoch. // // - an integer representing seconds-since-the-epoch. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html FieldTypeDate FieldType = "date" // FieldTypeAlias defines an alias for an existing field. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/alias.html FieldTypeAlias FieldType = "alias" // FieldTypeObject is a JSON object. // // Options: // // dynamic - Whether or not new properties should be added dynamically to an // existing object. Accepts true (default), false and strict. // // enabled - Whether the JSON value given for the object field should be parsed // and indexed (true, default) or completely ignored (false). // // properties - The fields within the object, which can be of any data type, // including object. New properties may be added to an existing object. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/object.html FieldTypeObject FieldType = "object" // FieldTypeFlattened is an entire JSON object as a single field value. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/flattened.html FieldTypeFlattened FieldType = "flattened" // FieldTypeNested is a JSON object that preserves the relationship between its subfields. // // The nested type is a specialised version of the object data type that allows arrays // of objects to be indexed in a way that they can be queried independently of each other. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html FieldTypeNested FieldType = "nested" //FieldTypeJoin defines a parent/child relationship for documents in the same index. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html FieldTypeJoin FieldType = "join" // FieldTypeLongRange is a range of signed 64-bit integers with a minimum value of -263 // and maximum of 263-1. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeLongRange FieldType = "long_range" // FieldTypeIntegerRange is range of signed 32-bit integers with a minimum value of -231 // and maximum of 231-1. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeIntegerRange FieldType = "integer_range" // FieldTypeFloatRange is a range of single-precision 32-bit IEEE 754 floating point values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeFloatRange FieldType = "float_range" // FieldTypeDoubleRange is a range of double-precision 64-bit IEEE 754 floating point values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeDoubleRange FieldType = "double_range" // FieldTypeDateRange is a range of date values. Date ranges support various date formats // through the format mapping parameter. Regardless of the format used, date values // are parsed into an unsigned 64-bit integer representing milliseconds since the // Unix epoch in UTC. Values containing the now date math expression are not supported. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeDateRange FieldType = "date_range" // FieldTypeIPRange is a range of ip values supporting either IPv4 or IPv6 (or mixed) addresses. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/range.html FieldTypeIPRange FieldType = "ip_range" // FieldTypeIP is IPv4 and IPv6 addresses. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/ip.html FieldTypeIP FieldType = "ip" // FieldTypeVersion is a software version. Supports Semantic Versioning precedence rules. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/version.html FieldTypeVersion FieldType = "version" // FieldTypeMurmur3 compute and stores hashes of values. // // https://www.elastic.co/guide/en/elasticsearch/plugins/7.11/mapper-murmur3.html FieldTypeMurmur3 FieldType = "murmur3" // FieldTypeAggregateMetricDouble is a pre-aggregated metric values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/aggregate-metric-double.html FieldTypeAggregateMetricDouble FieldType = "aggregate_metric_double" // FieldTypeHistogram is a pre-aggregated numerical values in the form of a histogram. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/histogram.html FieldTypeHistogram FieldType = "histogram" // FieldTypeText is analyzed, unstructured text. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html FieldTypeText FieldType = "text" // FieldTypeAnnotatedText is text containing special markup. Used for identifying named entities. // // https://www.elastic.co/guide/en/elasticsearch/plugins/7.11/mapper-annotated-text.html FieldTypeAnnotatedText FieldType = "annotated-text" // FieldTypeCompletion is used for auto-complete suggestions. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html#completion-suggester FieldTypeCompletion FieldType = "completion" // FieldTypeSearchAsYouType is text-like type for as-you-type completion. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-as-you-type.html FieldTypeSearchAsYouType FieldType = "search_as_you_type" // FieldTypeTokenCount is a count of tokens in a text. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html FieldTypeTokenCount FieldType = "token_count" // FieldTypeDenseVector is a Document Ranking Type that records dense vectors of float values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html FieldTypeDenseVector FieldType = "dense_vector" //float64 FieldTypeRankFeature is a Document Ranking Type that can index numbers so that they can later // be used to boost documents in queries with a rank_feature query // // https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-feature.html FieldTypeRankFeature FieldType = "rank_feature" // FieldTypeRankFeatures is a Document Ranking Type that can index numeric feature vectors, // so that they can later be used to boost documents in queries with a rank_feature query. // // It is analogous to the rank_feature data type but is better suited when the list of // features is sparse so that it wouldn’t be reasonable to add one field to the mappings // for each of them. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-features.html FieldTypeRankFeatures FieldType = "rank_features" // FieldTypeGeoPoint is a latitude and longitude points. // // Fields of type geo_point accept latitude-longitude pairs, which can be used: // // - to find geo-points within a bounding box, within a certain distance of a central point, or within a polygon or within a geo_shape query. // // - to aggregate documents geographically or by distance from a central point. // // - to integrate distance into a document’s relevance score. // // - to sort documents by distance. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html FieldTypeGeoPoint FieldType = "geo_point" // FieldTypeGeoShape are complex shapes, such as polygons. // // The geo_shape data type facilitates the indexing of and searching with arbitrary // geo shapes such as rectangles and polygons. It should be used when either the // data being indexed or the queries being executed contain shapes other than just // points. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html FieldTypeGeoShape FieldType = "geo_shape" // FieldTypePoint is an arbitrary cartesian points. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/point.html FieldTypePoint FieldType = "point" // FieldTypeShape data type facilitates the indexing of and searching with arbitrary // x, y cartesian shapes such as rectangles and polygons. It can be used to // index and query geometries whose coordinates fall in a 2-dimensional planar // coordinate system. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/shape.html FieldTypeShape FieldType = "shape" // FieldTypePercolator indexes queries written in Query DSL. // // The percolator field type parses a json structure into a native query and stores that // query, so that the percolate query can use it to match provided documents. // // Any field that contains a json object can be configured to be a percolator field. // The percolator field type has no settings. Just configuring the percolator field type // is sufficient to instruct Elasticsearch to treat a field as a query. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/percolator.html FieldTypePercolator FieldType = "percolator" )
type FieldValueFactorFunc ¶
type FieldValueFactorFunc struct { // Field to be extracted from the document. Field string // Optional factor to multiply the field value with, defaults to 1. Factor interface{} // Modifier to apply to the field value, can be one of: none, log, log1p, log2p, ln, ln1p, ln2p, square, sqrt, or reciprocal. Defaults to none. Modifier Modifier // Value used if the document doesn’t have that field. The modifier and factor are still applied to it as though it were read from the document. Missing interface{} // (optional) Query to filter (such as picker.TermQuery, picker.MatchQuery, and so on) Filter CompleteClauser // Float Weight interface{} }
func (FieldValueFactorFunc) FieldValueFactorFunction ¶
func (fvf FieldValueFactorFunc) FieldValueFactorFunction() (*FieldValueFactorFunction, error)
func (FieldValueFactorFunc) FuncKind ¶
func (FieldValueFactorFunc) FuncKind() FuncKind
func (FieldValueFactorFunc) Function ¶
func (fvf FieldValueFactorFunc) Function() (Function, error)
type FieldValueFactorFunction ¶
type FieldValueFactorFunction struct {
// contains filtered or unexported fields
}
func (FieldValueFactorFunction) Factor ¶
func (fvf FieldValueFactorFunction) Factor() float64
func (FieldValueFactorFunction) Field ¶
func (fvf FieldValueFactorFunction) Field() string
func (FieldValueFactorFunction) Filter ¶
func (fvf FieldValueFactorFunction) Filter() QueryClause
func (FieldValueFactorFunction) FuncKind ¶
func (FieldValueFactorFunction) FuncKind() FuncKind
func (FieldValueFactorFunction) MarshalJSON ¶
func (fvf FieldValueFactorFunction) MarshalJSON() ([]byte, error)
func (FieldValueFactorFunction) Missing ¶
func (fvf FieldValueFactorFunction) Missing() interface{}
func (FieldValueFactorFunction) SetFactor ¶
func (fvf FieldValueFactorFunction) SetFactor(v interface{}) error
func (*FieldValueFactorFunction) SetField ¶
func (fvf *FieldValueFactorFunction) SetField(field string)
func (*FieldValueFactorFunction) SetFilter ¶
func (fvf *FieldValueFactorFunction) SetFilter(filter CompleteClauser) error
func (*FieldValueFactorFunction) SetMissing ¶
func (fvf *FieldValueFactorFunction) SetMissing(missing interface{})
func (*FieldValueFactorFunction) SetModifier ¶
type Fields ¶
Fields are a collection of Field mappings
func (*Fields) UnmarshalBSON ¶
func (*Fields) UnmarshalJSON ¶
type FlattenedField ¶
type FlattenedField struct {
// contains filtered or unexported fields
}
FlattenedField maps an entire object as a single field.
By default, each subfield in an object is mapped and indexed separately. If the names or types of the subfields are not known in advance, then they are mapped dynamically.
The flattened type provides an alternative approach, where the entire object is mapped as a single field. Given an object, the flattened mapping will parse out its leaf values and index them into one field as keywords. The object’s contents can then be searched through simple queries and aggregations.
This data type can be useful for indexing objects with a large or unknown number of unique keys. Only one field mapping is created for the whole JSON object, which can help prevent a mappings explosion from having too many distinct field mappings.
On the other hand, flattened object fields present a trade-off in terms of search functionality. Only basic queries are allowed, with no support for numeric range queries or highlighting. Further information on the limitations can be found in the Supported operations section.
! X-Pack
https://www.elastic.co/guide/en/elasticsearch/reference/current/flattened.html
func NewFlattenedField ¶
func NewFlattenedField(params FlattenedFieldParams) (*FlattenedField, error)
func (FlattenedField) DepthLimit ¶
func (dl FlattenedField) DepthLimit() float64
func (FlattenedField) DocValues ¶
func (dv FlattenedField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (FlattenedField) EagerGlobalOrdinals ¶
func (ego FlattenedField) EagerGlobalOrdinals() bool
To support aggregations and other operations that require looking up field values on a per-document basis, Elasticsearch uses a data structure called doc values. Term-based field types such as keyword store their doc values using an ordinal mapping for a more compact representation. This mapping works by assigning each term an incremental integer or ordinal based on its lexicographic order. The field’s doc values store only the ordinals for each document instead of the original terms, with a separate lookup structure to convert between ordinals and terms.
When used during aggregations, ordinals can greatly improve performance. As an example, the terms aggregation relies only on ordinals to collect documents into buckets at the shard-level, then converts the ordinals back to their original term values when combining results across shards.
Each index segment defines its own ordinal mapping, but aggregations collect data across an entire shard. So to be able to use ordinals for shard-level operations like aggregations, Elasticsearch creates a unified mapping called global ordinals. The global ordinal mapping is built on top of segment ordinals, and works by maintaining a map from global ordinal to the local ordinal for each segment.
Global ordinals are used if a search contains any of the following components:
- Certain bucket aggregations on keyword, ip, and flattened fields. This includes terms aggregations as mentioned above, as well as composite, diversified_sampler, and significant_terms.
- Bucket aggregations on text fields that require fielddata to be enabled.
- Operations on parent and child documents from a join field, including has_child queries and parent aggregations.
https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html
func (*FlattenedField) Field ¶
func (f *FlattenedField) Field() (Field, error)
func (FlattenedField) IgnoreAbove ¶
func (ia FlattenedField) IgnoreAbove() float64
IgnoreAbove signals to not index any string longer than this value. Defaults to 2147483647 so that all values would be accepted. Please however note that default dynamic mapping rules create a sub keyword field that overrides this default by setting ignore_above: 256.
func (FlattenedField) Index ¶
func (i FlattenedField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (FlattenedField) IndexOptions ¶
func (io FlattenedField) IndexOptions() IndexOptions
IndexOptions parameter controls what information is added to the inverted index for search and highlighting purposes.
func (FlattenedField) MarshalBSON ¶
func (f FlattenedField) MarshalBSON() ([]byte, error)
func (FlattenedField) MarshalJSON ¶
func (f FlattenedField) MarshalJSON() ([]byte, error)
func (FlattenedField) NullValue ¶
func (nv FlattenedField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (FlattenedField) SetDepthLimit ¶
func (dl FlattenedField) SetDepthLimit(v interface{}) error
func (*FlattenedField) SetDocValues ¶
func (dv *FlattenedField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*FlattenedField) SetEagerGlobalOrdinals ¶
func (ego *FlattenedField) SetEagerGlobalOrdinals(v interface{}) error
SetEagerGlobalOrdinals sets the eager_global_ordinals value to v
func (FlattenedField) SetIgnoreAbove ¶
func (ia FlattenedField) SetIgnoreAbove(v interface{}) error
SetIgnoreAbove sets the IgnoreAbove value to v
func (*FlattenedField) SetIndex ¶
func (i *FlattenedField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*FlattenedField) SetIndexOptions ¶
func (io *FlattenedField) SetIndexOptions(v IndexOptions) error
SetIndexOptions sets IndexOptions value to v
func (*FlattenedField) SetNullValue ¶
func (nv *FlattenedField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*FlattenedField) SetSimilarity ¶
func (s *FlattenedField) SetSimilarity(v Similarity) error
SetSimilarity sets the Similarity Value to v
func (*FlattenedField) SetSplitQueriesOnWhitespace ¶
func (sq *FlattenedField) SetSplitQueriesOnWhitespace(v interface{}) error
SetSplitQueriesOnWhitespace sets the SplitQueriesOnWhitespace Value to v
func (FlattenedField) Similarity ¶
func (s FlattenedField) Similarity() Similarity
Similarity is mostly useful for text fields, but can also apply to other field types.
func (FlattenedField) SplitQueriesOnWhitespace ¶
func (sq FlattenedField) SplitQueriesOnWhitespace() bool
SplitQueriesOnWhitespace determines whether full text queries should split the input on whitespace when building a query for this field. Accepts true or false (default).
func (FlattenedField) Type ¶
func (FlattenedField) Type() FieldType
func (*FlattenedField) UnmarshalBSON ¶
func (f *FlattenedField) UnmarshalBSON(data []byte) error
func (*FlattenedField) UnmarshalJSON ¶
func (f *FlattenedField) UnmarshalJSON(data []byte) error
type FlattenedFieldParams ¶
type FlattenedFieldParams struct { // The maximum allowed depth of the flattened object field, in terms of // nested inner objects. If a flattened object field exceeds this limit, // then an error will be thrown. Defaults to 20. Note that depth_limit can // be updated dynamically through the update mapping API. DepthLimit interface{} `json:"depth_limit,omitempty"` // Should the field be stored on disk in a column-stride fashion, so that it // can later be used for sorting, aggregations, or scripting? Accepts true // (default) or false. DocValues interface{} `json:"doc_values,omitempty"` // Should global ordinals be loaded eagerly on refresh? Accepts true or // false (default). Enabling this is a good idea on fields that are // frequently used for terms aggregations. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html EagerGlobalOrdinals interface{} `json:"eager_global_ordinals,omitempty"` // Leaf values longer than this limit will not be indexed. By default, there // is no limit and all values will be indexed. Note that this limit applies // to the leaf values within the flattened object field, and not the length // of the entire field. IgnoreAbove interface{} `json:"ignore_above,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool or string that can be parsed as a bool) Index interface{} `bson:"index,omitempty" json:"index,omitempty"` // What information should be stored in the index for scoring purposes. // Defaults to docs but can also be set to freqs to take term frequency into // account when computing scores. IndexOptions IndexOptions `json:"index_options,omitempty"` // A string value which is substituted for any explicit null values within // the flattened object field. Defaults to null, which means null sields are // treated as if it were missing. NullValue interface{} `json:"null_value,omitempty"` // Which scoring algorithm or similarity should be used. Defaults to BM25. Similarity Similarity `json:"similarity,omitempty"` // Whether full text queries should split the input on whitespace when // building a query for this field. Accepts true or false (default). SplitQueriesOnWhitespace interface{} `json:"split_queries_on_whitespace,omitempty"` }
func (FlattenedFieldParams) Field ¶
func (p FlattenedFieldParams) Field() (Field, error)
func (FlattenedFieldParams) Flattened ¶
func (p FlattenedFieldParams) Flattened() (*FlattenedField, error)
func (FlattenedFieldParams) Type ¶
func (FlattenedFieldParams) Type() FieldType
type FloatField ¶
type FloatField struct {
// contains filtered or unexported fields
}
A FloatField is a single-precision 32-bit IEEE 754 floating point number, restricted to finite values.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewFloatField ¶
func NewFloatField(params FloatFieldParams) (*FloatField, error)
func (FloatField) Boost ¶
func (b FloatField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (FloatField) Coerce ¶
func (cp FloatField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (FloatField) DocValues ¶
func (dv FloatField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*FloatField) Field ¶
func (f *FloatField) Field() (Field, error)
func (FloatField) IgnoreMalformed ¶
func (im FloatField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (FloatField) Index ¶
func (i FloatField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (FloatField) MarshalBSON ¶
func (f FloatField) MarshalBSON() ([]byte, error)
func (FloatField) MarshalJSON ¶
func (f FloatField) MarshalJSON() ([]byte, error)
func (FloatField) Meta ¶
func (m FloatField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (FloatField) NullValue ¶
func (nv FloatField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*FloatField) SetBoost ¶
func (b *FloatField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*FloatField) SetCoerce ¶
func (cp *FloatField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*FloatField) SetDocValues ¶
func (dv *FloatField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*FloatField) SetIgnoreMalformed ¶
func (im *FloatField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*FloatField) SetIndex ¶
func (i *FloatField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*FloatField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*FloatField) SetNullValue ¶
func (nv *FloatField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*FloatField) SetStore ¶
func (sa *FloatField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (FloatField) Store ¶
func (sa FloatField) Store() bool
Store returns the StoreAttr Value or false
func (FloatField) Type ¶
func (FloatField) Type() FieldType
func (*FloatField) UnmarshalBSON ¶
func (f *FloatField) UnmarshalBSON(data []byte) error
func (*FloatField) UnmarshalJSON ¶
func (f *FloatField) UnmarshalJSON(data []byte) error
type FloatFieldParams ¶
type FloatFieldParams numberFieldParams
func (FloatFieldParams) Field ¶
func (p FloatFieldParams) Field() (Field, error)
func (FloatFieldParams) Float ¶
func (p FloatFieldParams) Float() (*FloatField, error)
func (FloatFieldParams) Type ¶
func (FloatFieldParams) Type() FieldType
type FloatRangeField ¶
type FloatRangeField struct {
// contains filtered or unexported fields
}
FloatRangeField is a range of single-precision 32-bit IEEE 754 floating point values.
func NewFloatRangeField ¶
func NewFloatRangeField(params FloatRangeFieldParams) (*FloatRangeField, error)
func (FloatRangeField) Coerce ¶
func (cp FloatRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*FloatRangeField) Field ¶
func (r *FloatRangeField) Field() (Field, error)
func (FloatRangeField) Index ¶
func (i FloatRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (FloatRangeField) MarshalBSON ¶
func (r FloatRangeField) MarshalBSON() ([]byte, error)
func (FloatRangeField) MarshalJSON ¶
func (r FloatRangeField) MarshalJSON() ([]byte, error)
func (*FloatRangeField) SetCoerce ¶
func (cp *FloatRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*FloatRangeField) SetIndex ¶
func (i *FloatRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*FloatRangeField) SetStore ¶
func (sa *FloatRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (FloatRangeField) Store ¶
func (sa FloatRangeField) Store() bool
Store returns the StoreAttr Value or false
func (FloatRangeField) Type ¶
func (FloatRangeField) Type() FieldType
func (*FloatRangeField) UnmarshalBSON ¶
func (r *FloatRangeField) UnmarshalBSON(data []byte) error
func (*FloatRangeField) UnmarshalJSON ¶
func (r *FloatRangeField) UnmarshalJSON(data []byte) error
type FloatRangeFieldParams ¶
type FloatRangeFieldParams rangeFieldParams
func (FloatRangeFieldParams) Field ¶
func (p FloatRangeFieldParams) Field() (Field, error)
func (FloatRangeFieldParams) FloatRange ¶
func (p FloatRangeFieldParams) FloatRange() (*FloatRangeField, error)
func (FloatRangeFieldParams) Type ¶
func (FloatRangeFieldParams) Type() FieldType
type FuncKind ¶
type FuncKind string
const ( // ScoreExp is an exponential decay function // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay FuncKindExp FuncKind = "exp" // ScoreGause is normal decay // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay FuncKindGauss FuncKind = "gauss" // FuncKindLinearDecay decay // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-decay FuncKindLinear FuncKind = "linear" // FuncKindWeight allows you to multiply the score by the provided weight. This // can sometimes be desired since boost value set on specific queries gets // normalized, while for this score function it does not. The number value // is of type float. // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-weight FuncKindWeight FuncKind = "weight" // FuncKindScriptScore allows you to wrap another query and customize the // scoring of it optionally with a computation derived from other numeric // field values in the doc using a script expression. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-script-score FuncKindScriptScore FuncKind = "script_score" // FuncKindRandomScore generates scores that are uniformly distributed from 0 up to // but not including 1. By default, it uses the internal Lucene doc ids as a // source of randomness, which is very efficient but unfortunately not // reproducible since documents might be renumbered by merges. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-random FuncKindRandomScore FuncKind = "random_score" // FuncKindFieldValueFactor function allows you to use a field from a document // to influence the score. It’s similar to using the script_score function, // however, it avoids the overhead of scripting. If used on a multi-valued // field, only the first value of the field is used in calculations // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-field-value-factor FuncKindFieldValueFactor FuncKind = "field_value_factor" )
type Funcs ¶
type Funcs []Functioner
Funcs is a slice of Functioners, valid options are:
- picker.WeightFunc,
- picker.LinearFunc,
- picker.ExpFunc,
- picker.GaussFunc,
- picker.RandomScoreFunc,
- picker.ScriptScoreFunc,
- picker.FieldValueFactorFunc
type Function ¶
type Function interface { FuncKind() FuncKind Weight() float64 SetWeight(interface{}) error Filter() QueryClause SetFilter(CompleteClauser) error json.Marshaler }
type FunctionScoreQuery ¶
type FunctionScoreQuery struct {
// contains filtered or unexported fields
}
FunctionScoreQuery allows you to modify the score of documents that are retrieved by a query. This can be useful if, for example, a score function is computationally expensive and it is sufficient to compute the score on a filtered set of documents.
To use function_score, the user has to define a query and one or more functions, that compute a new score for each document returned by the query.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html
func (FunctionScoreQuery) Boost ¶
func (b FunctionScoreQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*FunctionScoreQuery) Clause ¶
func (fs *FunctionScoreQuery) Clause() (QueryClause, error)
func (*FunctionScoreQuery) Clear ¶
func (fs *FunctionScoreQuery) Clear()
func (*FunctionScoreQuery) Functions ¶
func (fs *FunctionScoreQuery) Functions() Functions
func (*FunctionScoreQuery) IsEmpty ¶
func (fs *FunctionScoreQuery) IsEmpty() bool
func (FunctionScoreQuery) Kind ¶
func (FunctionScoreQuery) Kind() QueryKind
func (FunctionScoreQuery) MarshalJSON ¶
func (fs FunctionScoreQuery) MarshalJSON() ([]byte, error)
func (*FunctionScoreQuery) Name ¶
func (fs *FunctionScoreQuery) Name() string
func (*FunctionScoreQuery) Query ¶
func (fs *FunctionScoreQuery) Query() *Query
func (*FunctionScoreQuery) SetBoost ¶
func (b *FunctionScoreQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*FunctionScoreQuery) SetBoostMode ¶
func (*FunctionScoreQuery) SetFunctions ¶
func (fs *FunctionScoreQuery) SetFunctions(funcs Funcs) error
func (FunctionScoreQuery) SetMaxBoost ¶
func (mb FunctionScoreQuery) SetMaxBoost(v float64)
func (*FunctionScoreQuery) SetMinScore ¶
func (ms *FunctionScoreQuery) SetMinScore(v float64)
func (*FunctionScoreQuery) SetQuery ¶
func (fs *FunctionScoreQuery) SetQuery(query *QueryParams) error
func (*FunctionScoreQuery) SetScoreMode ¶
func (*FunctionScoreQuery) UnmarshalJSON ¶
func (fs *FunctionScoreQuery) UnmarshalJSON(data []byte) error
type FunctionScoreQueryParams ¶
type FunctionScoreQueryParams struct { Query *QueryParams Boost interface{} // Documents with a score lower than this floating point number are excluded // from the search results. (Optional) MinScore float64 MaxBoost float64 BoostMode BoostMode ScoreMode ScoreMode Functions Funcs Name string }
FunctionScoreQueryParams allows you to modify the score of documents that are retrieved by a query. This can be useful if, for example, a score function is computationally expensive and it is sufficient to compute the score on a filtered set of documents.
To use function_score, the user has to define a query and one or more functions, that compute a new score for each document returned by the query.
func (*FunctionScoreQueryParams) Clause ¶
func (fs *FunctionScoreQueryParams) Clause() (QueryClause, error)
func (*FunctionScoreQueryParams) FunctionScore ¶
func (fs *FunctionScoreQueryParams) FunctionScore() (*FunctionScoreQuery, error)
type FunctionScorer ¶
type FunctionScorer interface {
FunctionScore() (*FunctionScoreQuery, error)
}
type Functioner ¶
type Functions ¶
type Functions []Function
func (*Functions) UnmarshalBSON ¶
func (*Functions) UnmarshalJSON ¶
type Fuzzier ¶
type Fuzzier interface {
Fuzzy() (*FuzzyQuery, error)
}
type FuzzyQuery ¶
type FuzzyQuery struct {
// contains filtered or unexported fields
}
FuzzyQuery returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
An edit distance is the number of one-character changes needed to turn one term into another. These changes can include:
- Changing a character (box → fox)
- Removing a character (black → lack)
- Inserting a character (sic → sick)
- Transposing two adjacent characters (act → cat)
To find similar terms, the fuzzy query creates a set of all possible variations, or expansions, of the search term within a specified edit distance. The query then returns exact matches for each expansion.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html
func (*FuzzyQuery) Clause ¶
func (f *FuzzyQuery) Clause() (QueryClause, error)
func (*FuzzyQuery) Clear ¶
func (f *FuzzyQuery) Clear()
func (FuzzyQuery) DefaultFuzzyRewrite ¶
func (f FuzzyQuery) DefaultFuzzyRewrite() Rewrite
func (FuzzyQuery) Field ¶
func (f FuzzyQuery) Field() string
func (FuzzyQuery) Fuzziness ¶
func (f FuzzyQuery) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (FuzzyQuery) FuzzyRewrite ¶
func (f FuzzyQuery) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (*FuzzyQuery) IsEmpty ¶
func (f *FuzzyQuery) IsEmpty() bool
func (FuzzyQuery) Kind ¶
func (f FuzzyQuery) Kind() QueryKind
func (FuzzyQuery) MarshalBSON ¶
func (f FuzzyQuery) MarshalBSON() ([]byte, error)
func (FuzzyQuery) MarshalJSON ¶
func (f FuzzyQuery) MarshalJSON() ([]byte, error)
func (FuzzyQuery) MaxExpansions ¶
func (me FuzzyQuery) MaxExpansions() int
MaxExpansions is the maximum number of variations created. Defaults to 50.
func (FuzzyQuery) PrefixLength ¶
func (pl FuzzyQuery) PrefixLength() int
func (*FuzzyQuery) SetFuzziness ¶
func (f *FuzzyQuery) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*FuzzyQuery) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*FuzzyQuery) SetMaxExpansions ¶
func (me *FuzzyQuery) SetMaxExpansions(v interface{}) error
func (*FuzzyQuery) SetPrefixLength ¶
func (pl *FuzzyQuery) SetPrefixLength(v interface{}) error
func (*FuzzyQuery) SetRewrite ¶
func (*FuzzyQuery) SetTranspositions ¶
func (t *FuzzyQuery) SetTranspositions(v interface{}) error
SetTranspositions sets the value of Transpositions to v
func (FuzzyQuery) Transpositions ¶
func (t FuzzyQuery) Transpositions() bool
Transpositions indicates whether edits include transpositions of two adjacent characters (ab → ba). Defaults to true.
func (*FuzzyQuery) UnmarshalBSON ¶
func (f *FuzzyQuery) UnmarshalBSON(data []byte) error
func (*FuzzyQuery) UnmarshalJSON ¶
func (f *FuzzyQuery) UnmarshalJSON(data []byte) error
func (*FuzzyQuery) Vale ¶
func (f *FuzzyQuery) Vale() string
type FuzzyQueryParams ¶
type FuzzyQueryParams struct { // Value or term to find in the provided <field>. (Required) Value string // Field which is being queried against. // // This will be ignored if set through a mutator Field string // Maximum edit distance allowed for matching. See Fuzziness for valid // values and more information. (Optional) // // https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness Fuzziness string // PrefixLength is the number of beginning characters left unchanged when // creating expansions. Defaults to 0. (Optional) PrefixLength int // Transpositions indicates whether edits include transpositions of two // adjacent characters (ab → ba). (Optional) // Transpositions interface{} // Rewrite method used to rewrite the query. (Optional) // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-term-rewrite.html Rewrite Rewrite // Maximum number of variations created. Defaults to 50. (Optional) // // Avoid using a high value in the max_expansions parameter, especially if // the prefix_length parameter value is 0. High values in the max_expansions // parameter can cause poor performance due to the high number of variations // examined. MaxExpansions interface{} // Name of the query (Optional) Name string }
FuzzyQueryParams returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
An edit distance is the number of one-character changes needed to turn one term into another. These changes can include:
- Changing a character (box → fox)
- Removing a character (black → lack)
- Inserting a character (sic → sick)
- Transposing two adjacent characters (act → cat)
To find similar terms, the fuzzy query creates a set of all possible variations, or expansions, of the search term within a specified edit distance. The query then returns exact matches for each expansion.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html
func (FuzzyQueryParams) Clause ¶
func (f FuzzyQueryParams) Clause() (QueryClause, error)
func (FuzzyQueryParams) Fuzzy ¶
func (f FuzzyQueryParams) Fuzzy() (*FuzzyQuery, error)
type FuzzyRule ¶
type FuzzyRule struct {
// contains filtered or unexported fields
}
func (FuzzyRule) Analyzer ¶
func (ap FuzzyRule) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (FuzzyRule) DefaultFuzzyRewrite ¶
func (f FuzzyRule) DefaultFuzzyRewrite() Rewrite
func (FuzzyRule) Filter ¶
func (r FuzzyRule) Filter() *RuleFilter
func (FuzzyRule) Fuzziness ¶
func (f FuzzyRule) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (FuzzyRule) FuzzyRewrite ¶
func (f FuzzyRule) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (FuzzyRule) MarshalBSON ¶
func (FuzzyRule) MarshalJSON ¶
func (FuzzyRule) PrefixLength ¶
func (pl FuzzyRule) PrefixLength() int
func (*FuzzyRule) SetAnalyzer ¶
func (ap *FuzzyRule) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*FuzzyRule) SetFilter ¶
func (r *FuzzyRule) SetFilter(filter RuleFilterer) error
func (*FuzzyRule) SetFuzziness ¶
func (f *FuzzyRule) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*FuzzyRule) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*FuzzyRule) SetPrefixLength ¶
func (pl *FuzzyRule) SetPrefixLength(v interface{}) error
func (*FuzzyRule) SetTranspositions ¶
func (t *FuzzyRule) SetTranspositions(v interface{}) error
SetTranspositions sets the value of Transpositions to v
func (*FuzzyRule) SetUseField ¶
func (uf *FuzzyRule) SetUseField(field string)
func (FuzzyRule) Transpositions ¶
func (t FuzzyRule) Transpositions() bool
Transpositions indicates whether edits include transpositions of two adjacent characters (ab → ba). Defaults to true.
func (*FuzzyRule) UnmarshalBSON ¶
func (*FuzzyRule) UnmarshalJSON ¶
type FuzzyRuleParams ¶
type FuzzyRuleParams struct { // (Required) The term to match Term string `json:"term"` // (Optional, string) analyzer used to analyze terms in the query. Defaults // to the top-level <field>'s analyzer. Analyzer string `json:"analyzer,omitempty"` // (Optional) An optional interval filter. Filter RuleFilterer `json:"filter,omitempty"` // (Optional) If specified, then match intervals from this field // rather than the top-level <field>. // // The fuzzy is normalized using the search analyzer from this field, // unless a separate analyzer is specified. UseField string `json:"use_field,omitempty"` // (Optional, integer) Number of beginning characters left unchanged when creating expansions. Defaults to 0. PrefixLength int `json:"prefix_length,omitempty"` // (Optional, string) Maximum edit distance allowed for matching. See // Fuzziness for valid values and more information. Defaults to auto. Fuzziness string `json:"fuzziness,omitempty"` // (Optional, Boolean) Indicates whether edits include transpositions of two // adjacent characters (ab → ba). Defaults to true. Transpositions interface{} `json:"transpositions,omitempty"` }
func (FuzzyRuleParams) FuzzyRule ¶
func (p FuzzyRuleParams) FuzzyRule() (*FuzzyRule, error)
func (FuzzyRuleParams) Rule ¶
func (p FuzzyRuleParams) Rule() (Rule, error)
func (FuzzyRuleParams) Type ¶
func (FuzzyRuleParams) Type() RuleType
type FuzzyRuler ¶
type GaussFunction ¶
type GaussFunction struct {
// contains filtered or unexported fields
}
func (*GaussFunction) Decay ¶
func (g *GaussFunction) Decay() dynamic.Number
func (*GaussFunction) Field ¶
func (g *GaussFunction) Field() string
func (GaussFunction) Filter ¶
func (g GaussFunction) Filter() QueryClause
func (GaussFunction) FuncKind ¶
func (GaussFunction) FuncKind() FuncKind
func (GaussFunction) MarshalBSON ¶
func (g GaussFunction) MarshalBSON() ([]byte, error)
func (GaussFunction) MarshalJSON ¶
func (g GaussFunction) MarshalJSON() ([]byte, error)
func (*GaussFunction) Offset ¶
func (g *GaussFunction) Offset() dynamic.StringNumberOrTime
func (GaussFunction) Origin ¶
func (g GaussFunction) Origin() interface{}
func (GaussFunction) Scale ¶
func (g GaussFunction) Scale() dynamic.StringOrNumber
func (*GaussFunction) SetDecay ¶
func (g *GaussFunction) SetDecay(value interface{}) error
func (*GaussFunction) SetField ¶
func (g *GaussFunction) SetField(field string) error
func (*GaussFunction) SetFilter ¶
func (g *GaussFunction) SetFilter(c CompleteClauser) error
func (*GaussFunction) SetOffset ¶
func (g *GaussFunction) SetOffset(offset interface{}) error
func (*GaussFunction) SetOrigin ¶
func (g *GaussFunction) SetOrigin(origin interface{}) error
func (*GaussFunction) SetScale ¶
func (g *GaussFunction) SetScale(scale interface{}) error
type GaussFunctionParams ¶
type GaussFunctionParams struct { // Field Field string // Weight (float) Weight interface{} // The point of origin used for calculating distance. Must be given as a // number for numeric field, date for date fields and geo point for geo // fields. Required for geo and numeric field. For date fields the default // is now. Date math (for example now-1h) is supported for origin. Origin interface{} // Required for all types. Defines the distance from origin + offset at // which the computed score will equal decay parameter. For geo fields: Can // be defined as number+unit (1km, 12m,…). Default unit is meters. For date // fields: Can to be defined as a number+unit ("1h", "10d",…). Default unit // is milliseconds. For numeric field: Any number. Scale interface{} // If an offset is defined, the decay function will only compute the decay // function for documents with a distance greater than the defined offset. // The default is 0. Offset interface{} // The decay parameter defines how documents are scored at the distance // given at scale. If no decay is defined, documents at the distance scale // will be scored 0.5. Decay interface{} Filter CompleteClauser }
func (GaussFunctionParams) FuncKind ¶
func (GaussFunctionParams) FuncKind() FuncKind
func (GaussFunctionParams) Function ¶
func (g GaussFunctionParams) Function() (Function, error)
type GeoBoundingBoxQuery ¶
type GeoBoundingBoxQuery struct {
// contains filtered or unexported fields
}
func (GeoBoundingBoxQuery) BoundingBox ¶
func (g GeoBoundingBoxQuery) BoundingBox() interface{}
func (*GeoBoundingBoxQuery) Clause ¶
func (g *GeoBoundingBoxQuery) Clause() (QueryClause, error)
func (*GeoBoundingBoxQuery) Clear ¶
func (g *GeoBoundingBoxQuery) Clear()
func (GeoBoundingBoxQuery) DecodeBoundingBox ¶
func (g GeoBoundingBoxQuery) DecodeBoundingBox(v interface{}) error
func (*GeoBoundingBoxQuery) GeoBoundingBox ¶
func (g *GeoBoundingBoxQuery) GeoBoundingBox() (*GeoBoundingBoxQuery, error)
func (*GeoBoundingBoxQuery) IsEmpty ¶
func (g *GeoBoundingBoxQuery) IsEmpty() bool
func (GeoBoundingBoxQuery) Kind ¶
func (GeoBoundingBoxQuery) Kind() QueryKind
func (GeoBoundingBoxQuery) MarshalBSON ¶
func (g GeoBoundingBoxQuery) MarshalBSON() ([]byte, error)
func (GeoBoundingBoxQuery) MarshalJSON ¶
func (g GeoBoundingBoxQuery) MarshalJSON() ([]byte, error)
func (*GeoBoundingBoxQuery) SetBoundingBox ¶
func (g *GeoBoundingBoxQuery) SetBoundingBox(bb BoundingBoxer)
func (*GeoBoundingBoxQuery) SetType ¶
func (g *GeoBoundingBoxQuery) SetType(typ string)
func (GeoBoundingBoxQuery) Type ¶
func (g GeoBoundingBoxQuery) Type() string
func (*GeoBoundingBoxQuery) UnmarshalBSON ¶
func (g *GeoBoundingBoxQuery) UnmarshalBSON(data []byte) error
func (*GeoBoundingBoxQuery) UnmarshalJSON ¶
func (g *GeoBoundingBoxQuery) UnmarshalJSON(data []byte) error
type GeoBoundingBoxQueryParams ¶
type GeoBoundingBoxQueryParams struct { Type string `json:"type,omitempty"` BoundingBox BoundingBoxer `json:"bounding_box"` Field string `json:"field"` Name string `json:"_name,omitempty"` // contains filtered or unexported fields }
func (GeoBoundingBoxQueryParams) Clause ¶
func (p GeoBoundingBoxQueryParams) Clause() (QueryClause, error)
func (GeoBoundingBoxQueryParams) GeoBoundingBox ¶
func (p GeoBoundingBoxQueryParams) GeoBoundingBox() (*GeoBoundingBoxQuery, error)
func (GeoBoundingBoxQueryParams) Kind ¶
func (GeoBoundingBoxQueryParams) Kind() QueryKind
type GeoBoundingBoxer ¶
type GeoBoundingBoxer interface {
GeoBoundingBox() (*GeoBoundingBoxQuery, error)
}
type GeoDistanceQuery ¶
type GeoDistanceQuery struct {
// contains filtered or unexported fields
}
func (*GeoDistanceQuery) Clause ¶
func (q *GeoDistanceQuery) Clause() (QueryClause, error)
func (*GeoDistanceQuery) Clear ¶
func (q *GeoDistanceQuery) Clear()
func (GeoDistanceQuery) DecodeGeoPoint ¶
func (q GeoDistanceQuery) DecodeGeoPoint(v interface{}) error
func (GeoDistanceQuery) Distance ¶
func (q GeoDistanceQuery) Distance() string
func (GeoDistanceQuery) DistanceType ¶
func (q GeoDistanceQuery) DistanceType() DistanceType
func (*GeoDistanceQuery) GeoDistance ¶
func (q *GeoDistanceQuery) GeoDistance() (*GeoDistanceQuery, error)
func (GeoDistanceQuery) GeoPoint ¶
func (q GeoDistanceQuery) GeoPoint() interface{}
func (*GeoDistanceQuery) IsEmpty ¶
func (q *GeoDistanceQuery) IsEmpty() bool
func (GeoDistanceQuery) Kind ¶
func (GeoDistanceQuery) Kind() QueryKind
func (GeoDistanceQuery) MarshalBSON ¶
func (q GeoDistanceQuery) MarshalBSON() ([]byte, error)
func (GeoDistanceQuery) MarshalJSON ¶
func (q GeoDistanceQuery) MarshalJSON() ([]byte, error)
func (*GeoDistanceQuery) SetDistance ¶
func (q *GeoDistanceQuery) SetDistance(distance string) error
func (*GeoDistanceQuery) SetDistanceType ¶
func (q *GeoDistanceQuery) SetDistanceType(typ DistanceType) error
func (*GeoDistanceQuery) SetGeoPoint ¶
func (q *GeoDistanceQuery) SetGeoPoint(v interface{}) error
func (*GeoDistanceQuery) SetValidationMethod ¶
func (q *GeoDistanceQuery) SetValidationMethod(method ValidationMethod) error
func (*GeoDistanceQuery) UnmarshalBSON ¶
func (q *GeoDistanceQuery) UnmarshalBSON(data []byte) error
func (*GeoDistanceQuery) UnmarshalJSON ¶
func (q *GeoDistanceQuery) UnmarshalJSON(data []byte) error
func (GeoDistanceQuery) ValidationMethod ¶
func (q GeoDistanceQuery) ValidationMethod() ValidationMethod
type GeoDistanceQueryParams ¶
type GeoDistanceQueryParams struct { Distance string Field string DistanceType DistanceType Name string ValidationMethod ValidationMethod GeoPoint interface{} // contains filtered or unexported fields }
func (GeoDistanceQueryParams) Clause ¶
func (p GeoDistanceQueryParams) Clause() (QueryClause, error)
func (GeoDistanceQueryParams) GeoDistance ¶
func (p GeoDistanceQueryParams) GeoDistance() (*GeoDistanceQuery, error)
func (GeoDistanceQueryParams) Kind ¶
func (GeoDistanceQueryParams) Kind() QueryKind
type GeoDistancer ¶
type GeoDistancer interface {
GeoDistance() (*GeoDistanceQuery, error)
}
type GeoPointField ¶
type GeoPointField struct {
// contains filtered or unexported fields
}
A GeoPointField accepts latitude-longitude pairs, which can be used:
- to find geo-points within a bounding box, within a certain distance of a central point, or within a polygon or within a geo_shape query.
- to aggregate documents geographically or by distance from a central point.
- to integrate distance into a document’s relevance score.
- to sort documents by distance.
Geo-points expressed as an array or string ¶
Please note that string geo-points are ordered as lat,lon, while array geo-points are ordered as the reverse: lon,lat.
Originally, lat,lon was used for both array and string, but the array format was changed early on to conform to the format used by GeoJSON.
A point can be expressed as a geohash. Geohashes are base32 encoded strings of the bits of the latitude and longitude interleaved. Each character in a geohash adds additional 5 bits to the precision. So the longer the hash, the more precise it is. For the indexing purposed geohashs are translated into latitude-longitude pairs. During this process only first 12 characters are used, so specifying more than 12 characters in a geohash doesn’t increase the precision. The 12 characters provide 60 bits, which should reduce a possible error to less than 2cm.
https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html
func NewGeoPointField ¶
func NewGeoPointField(params GeoPointFieldParams) (*GeoPointField, error)
func (*GeoPointField) Field ¶
func (gp *GeoPointField) Field() (Field, error)
func (GeoPointField) IgnoreMalformed ¶
func (im GeoPointField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (GeoPointField) IgnoreZValue ¶
func (z GeoPointField) IgnoreZValue() bool
IgnoreZValue determines whether three dimension points will be indexed.
If true (default) three dimension points will be accepted (stored in source) but only latitude and longitude values will be indexed; the third dimension is ignored. If false, geo-points containing any more than latitude and longitude (two dimensions) values throw an exception and reject the whole document.
func (GeoPointField) MarshalJSON ¶
func (gp GeoPointField) MarshalJSON() ([]byte, error)
func (GeoPointField) NullValue ¶
func (nv GeoPointField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*GeoPointField) SetIgnoreMalformed ¶
func (im *GeoPointField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*GeoPointField) SetIgnoreZValue ¶
func (z *GeoPointField) SetIgnoreZValue(v interface{}) error
SetIgnoreZValue sets the IgnoreZValue Value to v
func (*GeoPointField) SetNullValue ¶
func (nv *GeoPointField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (GeoPointField) Type ¶
func (GeoPointField) Type() FieldType
func (*GeoPointField) UnmarshalJSON ¶
func (gp *GeoPointField) UnmarshalJSON(data []byte) error
type GeoPointFieldParams ¶
type GeoPointFieldParams struct { // If true, malformed geo-points are ignored. If false (default), malformed // geo-points throw an exception and reject the whole document. A geo-point // is considered malformed if its latitude is outside the range -90 ⇐ // latitude ⇐ 90, or if its longitude is outside the range -180 ⇐ longitude // ⇐ 180. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // If true (default) three dimension points will be accepted (stored in source) // but only latitude and longitude values will be indexed; the third dimension // is ignored. If false, geo-points containing any more than latitude and // longitude (two dimensions) values throw an exception and reject the whole // document. IgnoreZValue interface{} `json:"ignore_z_value,omitempty"` // Accepts an geopoint value which is substituted for any explicit null values. // Defaults to null, which means the field is treated as missing. NullValue interface{} `json:"null_value,omitempty"` }
func (GeoPointFieldParams) Field ¶
func (p GeoPointFieldParams) Field() (Field, error)
func (GeoPointFieldParams) GeoPoint ¶
func (p GeoPointFieldParams) GeoPoint() (*GeoPointField, error)
func (GeoPointFieldParams) Type ¶
func (GeoPointFieldParams) Type() FieldType
type GeoPolygonQuery ¶
type GeoPolygonQuery struct {
// contains filtered or unexported fields
}
func (*GeoPolygonQuery) Clause ¶
func (q *GeoPolygonQuery) Clause() (QueryClause, error)
func (*GeoPolygonQuery) Clear ¶
func (q *GeoPolygonQuery) Clear()
func (*GeoPolygonQuery) GeoPolygon ¶
func (q *GeoPolygonQuery) GeoPolygon() (*GeoPolygonQuery, error)
func (*GeoPolygonQuery) IsEmpty ¶
func (q *GeoPolygonQuery) IsEmpty() bool
func (GeoPolygonQuery) Kind ¶
func (GeoPolygonQuery) Kind() QueryKind
func (GeoPolygonQuery) MarshalBSON ¶
func (q GeoPolygonQuery) MarshalBSON() ([]byte, error)
func (GeoPolygonQuery) MarshalJSON ¶
func (q GeoPolygonQuery) MarshalJSON() ([]byte, error)
func (*GeoPolygonQuery) UnmarshalBSON ¶
func (q *GeoPolygonQuery) UnmarshalBSON(data []byte) error
func (*GeoPolygonQuery) UnmarshalJSON ¶
func (q *GeoPolygonQuery) UnmarshalJSON(data []byte) error
type GeoPolygonQueryParams ¶
type GeoPolygonQueryParams struct { Name string // contains filtered or unexported fields }
func (GeoPolygonQueryParams) Clause ¶
func (p GeoPolygonQueryParams) Clause() (QueryClause, error)
func (GeoPolygonQueryParams) GeoPolygon ¶
func (p GeoPolygonQueryParams) GeoPolygon() (*GeoPolygonQuery, error)
func (GeoPolygonQueryParams) Kind ¶
func (GeoPolygonQueryParams) Kind() QueryKind
type GeoShapeField ¶
type GeoShapeField struct {
// contains filtered or unexported fields
}
GeoShapeField facilitates the indexing of and searching with arbitrary geo shapes such as rectangles and polygons. It should be used when either the data being indexed or the queries being executed contain shapes other than just points.
https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html
func NewGeoShapeField ¶
func NewGeoShapeField(params GeoShapeFieldParams) (*GeoShapeField, error)
func (*GeoShapeField) Field ¶
func (gs *GeoShapeField) Field() (Field, error)
func (GeoShapeField) IgnoreMalformed ¶
func (im GeoShapeField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (GeoShapeField) IgnoreZValue ¶
func (z GeoShapeField) IgnoreZValue() bool
IgnoreZValue determines whether three dimension points will be indexed.
If true (default) three dimension points will be accepted (stored in source) but only latitude and longitude values will be indexed; the third dimension is ignored. If false, geo-points containing any more than latitude and longitude (two dimensions) values throw an exception and reject the whole document.
func (GeoShapeField) MarshalJSON ¶
func (gs GeoShapeField) MarshalJSON() ([]byte, error)
func (GeoShapeField) NullValue ¶
func (nv GeoShapeField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (GeoShapeField) Orientation ¶
func (o GeoShapeField) Orientation() Orientation
Orientation is the vertex order for the shape’s coordinates list.
Defaults to OrientationRight (RIGHT) to comply with OGC standards. OGC standards define outer ring vertices in counterclockwise order with inner ring (hole) vertices in clockwise order.
func (*GeoShapeField) SetIgnoreMalformed ¶
func (im *GeoShapeField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*GeoShapeField) SetIgnoreZValue ¶
func (z *GeoShapeField) SetIgnoreZValue(v interface{}) error
SetIgnoreZValue sets the IgnoreZValue Value to v
func (*GeoShapeField) SetNullValue ¶
func (nv *GeoShapeField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*GeoShapeField) SetOrientation ¶
func (o *GeoShapeField) SetOrientation(orientation Orientation) error
SetOrientation sets the Orientation Value to v
func (GeoShapeField) Type ¶
func (GeoShapeField) Type() FieldType
func (*GeoShapeField) UnmarshalJSON ¶
func (gs *GeoShapeField) UnmarshalJSON(data []byte) error
type GeoShapeFieldParams ¶
type GeoShapeFieldParams struct { // Optional. Vertex order for the shape’s coordinates list. // //œ This parameter sets and returns only a RIGHT (counterclockwise) or LEFT // (clockwise) value. However, you can specify either value in multiple // ways. // Defaults to RIGHT to comply with OGC standards. OGC standards define outer ring vertices in counterclockwise order with inner ring (hole) vertices in clockwise order. // // Individual GeoJSON or WKT documents can override this parameter. Orientation Orientation `json:"orientation,omitempty"` // If true, malformed geo-points are ignored. If false (default), malformed // geo-points throw an exception and reject the whole document. A geo-point // is considered malformed if its latitude is outside the range -90 ⇐ // latitude ⇐ 90, or if its longitude is outside the range -180 ⇐ longitude // ⇐ 180. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // If true (default) three dimension points will be accepted (stored in source) // but only latitude and longitude values will be indexed; the third dimension // is ignored. If false, geo-points containing any more than latitude and // longitude (two dimensions) values throw an exception and reject the whole // document. IgnoreZValue interface{} `json:"ignore_z_value,omitempty"` }
func (GeoShapeFieldParams) Field ¶
func (p GeoShapeFieldParams) Field() (Field, error)
func (GeoShapeFieldParams) GeoShape ¶
func (p GeoShapeFieldParams) GeoShape() (*GeoShapeField, error)
func (GeoShapeFieldParams) Type ¶
func (GeoShapeFieldParams) Type() FieldType
type GeoShapeQuery ¶
type GeoShapeQuery struct {
// contains filtered or unexported fields
}
func (*GeoShapeQuery) Clause ¶
func (q *GeoShapeQuery) Clause() (QueryClause, error)
func (*GeoShapeQuery) Clear ¶
func (q *GeoShapeQuery) Clear()
func (*GeoShapeQuery) GeoShape ¶
func (q *GeoShapeQuery) GeoShape() (*GeoShapeQuery, error)
func (GeoShapeQuery) IgnoreUnmapped ¶
func (q GeoShapeQuery) IgnoreUnmapped() bool
func (*GeoShapeQuery) IsEmpty ¶
func (q *GeoShapeQuery) IsEmpty() bool
func (GeoShapeQuery) Kind ¶
func (GeoShapeQuery) Kind() QueryKind
func (GeoShapeQuery) MarshalBSON ¶
func (q GeoShapeQuery) MarshalBSON() ([]byte, error)
func (GeoShapeQuery) MarshalJSON ¶
func (q GeoShapeQuery) MarshalJSON() ([]byte, error)
func (GeoShapeQuery) Relation ¶
func (q GeoShapeQuery) Relation() SpatialRelation
func (*GeoShapeQuery) SetIgnoreUnmapped ¶
func (q *GeoShapeQuery) SetIgnoreUnmapped(v bool)
func (*GeoShapeQuery) SetIndexedShape ¶
func (q *GeoShapeQuery) SetIndexedShape(indexed *IndexedShape) error
func (*GeoShapeQuery) SetRelation ¶
func (q *GeoShapeQuery) SetRelation(v SpatialRelation) error
func (*GeoShapeQuery) SetShape ¶
func (q *GeoShapeQuery) SetShape(shape interface{}) error
func (GeoShapeQuery) Shape ¶
func (q GeoShapeQuery) Shape() interface{}
func (*GeoShapeQuery) UnmarshalBSON ¶
func (q *GeoShapeQuery) UnmarshalBSON(data []byte) error
func (*GeoShapeQuery) UnmarshalJSON ¶
func (q *GeoShapeQuery) UnmarshalJSON(data []byte) error
type GeoShapeQueryParams ¶
type GeoShapeQueryParams struct { Field string Name string Relation SpatialRelation Shape interface{} IndexedShape *IndexedShape IgnoreUnmapped bool // contains filtered or unexported fields }
func (GeoShapeQueryParams) Clause ¶
func (p GeoShapeQueryParams) Clause() (QueryClause, error)
func (GeoShapeQueryParams) GeoShape ¶
func (p GeoShapeQueryParams) GeoShape() (*GeoShapeQuery, error)
func (GeoShapeQueryParams) Kind ¶
func (GeoShapeQueryParams) Kind() QueryKind
type GeoShaper ¶
type GeoShaper interface {
GeoShape() (*GeoShapeQuery, error)
}
type HalfFloatField ¶
type HalfFloatField struct {
// contains filtered or unexported fields
}
A HalfFloatField is a half-precision 16-bit IEEE 754 floating point number, restricted to finite values.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewHalfFloatField ¶
func NewHalfFloatField(params HalfFloatFieldParams) (*HalfFloatField, error)
func (HalfFloatField) Boost ¶
func (b HalfFloatField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (HalfFloatField) Coerce ¶
func (cp HalfFloatField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (HalfFloatField) DocValues ¶
func (dv HalfFloatField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*HalfFloatField) Field ¶
func (hf *HalfFloatField) Field() (Field, error)
func (HalfFloatField) IgnoreMalformed ¶
func (im HalfFloatField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (HalfFloatField) Index ¶
func (i HalfFloatField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (HalfFloatField) MarshalJSON ¶
func (hf HalfFloatField) MarshalJSON() ([]byte, error)
func (HalfFloatField) Meta ¶
func (m HalfFloatField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (HalfFloatField) NullValue ¶
func (nv HalfFloatField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*HalfFloatField) SetBoost ¶
func (b *HalfFloatField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*HalfFloatField) SetCoerce ¶
func (cp *HalfFloatField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*HalfFloatField) SetDocValues ¶
func (dv *HalfFloatField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*HalfFloatField) SetIgnoreMalformed ¶
func (im *HalfFloatField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*HalfFloatField) SetIndex ¶
func (i *HalfFloatField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*HalfFloatField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*HalfFloatField) SetNullValue ¶
func (nv *HalfFloatField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*HalfFloatField) SetStore ¶
func (sa *HalfFloatField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (HalfFloatField) Store ¶
func (sa HalfFloatField) Store() bool
Store returns the StoreAttr Value or false
func (HalfFloatField) Type ¶
func (HalfFloatField) Type() FieldType
func (*HalfFloatField) UnmarshalJSON ¶
func (hf *HalfFloatField) UnmarshalJSON(data []byte) error
type HalfFloatFieldParams ¶
type HalfFloatFieldParams numberFieldParams
func (HalfFloatFieldParams) Field ¶
func (l HalfFloatFieldParams) Field() (Field, error)
func (HalfFloatFieldParams) HalfFloat ¶
func (l HalfFloatFieldParams) HalfFloat() (*HalfFloatField, error)
func (HalfFloatFieldParams) Type ¶
func (HalfFloatFieldParams) Type() FieldType
type HasChildQuery ¶
type HasChildQuery struct {
// contains filtered or unexported fields
}
func (*HasChildQuery) Clause ¶
func (q *HasChildQuery) Clause() (QueryClause, error)
func (*HasChildQuery) Clear ¶
func (q *HasChildQuery) Clear()
func (*HasChildQuery) HasChild ¶
func (q *HasChildQuery) HasChild() (*HasChildQuery, error)
func (HasChildQuery) IgnoreUnmapped ¶
func (q HasChildQuery) IgnoreUnmapped() bool
func (*HasChildQuery) IsEmpty ¶
func (q *HasChildQuery) IsEmpty() bool
func (HasChildQuery) Kind ¶
func (HasChildQuery) Kind() QueryKind
func (HasChildQuery) MarshalBSON ¶
func (q HasChildQuery) MarshalBSON() ([]byte, error)
func (HasChildQuery) MarshalJSON ¶
func (q HasChildQuery) MarshalJSON() ([]byte, error)
func (*HasChildQuery) MaxChildren ¶
func (q *HasChildQuery) MaxChildren() int
func (*HasChildQuery) MinChildren ¶
func (q *HasChildQuery) MinChildren() int
func (HasChildQuery) Query ¶
func (q HasChildQuery) Query() *Query
func (HasChildQuery) ScoreMode ¶
func (q HasChildQuery) ScoreMode() ScoreMode
func (*HasChildQuery) SetIgnoreUnmapped ¶
func (q *HasChildQuery) SetIgnoreUnmapped(ignoreUnmapped interface{}) error
func (*HasChildQuery) SetMaxChildren ¶
func (q *HasChildQuery) SetMaxChildren(max interface{}) error
func (*HasChildQuery) SetMinChildren ¶
func (q *HasChildQuery) SetMinChildren(min interface{}) error
func (*HasChildQuery) SetQuery ¶
func (q *HasChildQuery) SetQuery(query Querier) error
func (*HasChildQuery) SetScoreMode ¶
func (q *HasChildQuery) SetScoreMode(sm ScoreMode) error
func (*HasChildQuery) SetType ¶
func (q *HasChildQuery) SetType(typ string) error
func (HasChildQuery) Type ¶
func (q HasChildQuery) Type() string
func (*HasChildQuery) UnmarshalBSON ¶
func (q *HasChildQuery) UnmarshalBSON(data []byte) error
func (*HasChildQuery) UnmarshalJSON ¶
func (q *HasChildQuery) UnmarshalJSON(data []byte) error
type HasChildQueryParams ¶
type HasChildQueryParams struct { // (Required, string) Name of the child relationship mapped for the join // field. Type string // (Required, query object) Query you wish to run on child documents of the // type field. If a child document matches the search, the query returns the // parent document. Query Querier // (Optional, Boolean) Indicates whether to ignore an unmapped type and not // return any documents instead of an error. Defaults to false. If false, // Elasticsearch returns an error if the type is unmapped. // // You can use this parameter to query multiple indices that may not contain // the type. IgnoreUnmapped interface{} // (Optional, integer) Maximum number of child documents that match the // query allowed for a returned parent document. If the parent document // exceeds this limit, it is excluded from the search results. MaxChildren interface{} // (Optional, integer) Minimum number of child documents that match the // query required to match the query for a returned parent document. If the // parent document does not meet this limit, it is excluded from the search // results. MinChildren interface{} // (Optional, string) Indicates how scores for matching child documents affect the root parent document’s relevance score. Valid values are: // none (Default) // Do not use the relevance scores of matching child documents. The query assigns parent documents a score of 0. // avg // Use the mean relevance score of all matching child documents. // max // Uses the highest relevance score of all matching child documents. // min // Uses the lowest relevance score of all matching child documents. // sum // Add together the relevance scores of all matching child documents. ScoreMode ScoreMode Name string // contains filtered or unexported fields }
func (HasChildQueryParams) Clause ¶
func (p HasChildQueryParams) Clause() (QueryClause, error)
func (HasChildQueryParams) HasChild ¶
func (p HasChildQueryParams) HasChild() (*HasChildQuery, error)
func (HasChildQueryParams) Kind ¶
func (HasChildQueryParams) Kind() QueryKind
type HasChilder ¶
type HasChilder interface {
HasChild() (*HasChildQuery, error)
}
type HasParentQuery ¶
type HasParentQuery struct {
// contains filtered or unexported fields
}
func (*HasParentQuery) Clause ¶
func (q *HasParentQuery) Clause() (QueryClause, error)
func (*HasParentQuery) Clear ¶
func (q *HasParentQuery) Clear()
func (*HasParentQuery) HasParent ¶
func (q *HasParentQuery) HasParent() (*HasParentQuery, error)
func (HasParentQuery) IgnoreUnmapped ¶
func (q HasParentQuery) IgnoreUnmapped() bool
func (*HasParentQuery) IsEmpty ¶
func (q *HasParentQuery) IsEmpty() bool
func (HasParentQuery) Kind ¶
func (HasParentQuery) Kind() QueryKind
func (HasParentQuery) MarshalBSON ¶
func (q HasParentQuery) MarshalBSON() ([]byte, error)
func (HasParentQuery) MarshalJSON ¶
func (q HasParentQuery) MarshalJSON() ([]byte, error)
func (HasParentQuery) ParentType ¶
func (q HasParentQuery) ParentType() string
func (HasParentQuery) Query ¶
func (q HasParentQuery) Query() *Query
func (HasParentQuery) Score ¶
func (q HasParentQuery) Score() bool
func (*HasParentQuery) SetIgnoreUnmapped ¶
func (q *HasParentQuery) SetIgnoreUnmapped(ignoreUnmapped interface{}) error
func (*HasParentQuery) SetParentType ¶
func (q *HasParentQuery) SetParentType(typ string) error
func (*HasParentQuery) SetQuery ¶
func (q *HasParentQuery) SetQuery(query Querier) error
func (*HasParentQuery) SetScore ¶
func (q *HasParentQuery) SetScore(score interface{}) error
func (*HasParentQuery) UnmarshalBSON ¶
func (q *HasParentQuery) UnmarshalBSON(data []byte) error
func (*HasParentQuery) UnmarshalJSON ¶
func (q *HasParentQuery) UnmarshalJSON(data []byte) error
type HasParentQueryParams ¶
type HasParentQueryParams struct { ParentType string // (Required, query object) Query you wish to run on parent documents of the // parent_type field. If a parent document matches the search, the query // returns its child documents. Query Querier // (Optional, Boolean) Indicates whether to ignore an unmapped parent_type // and not return any documents instead of an error. Defaults to false. // // If false, Elasticsearch returns an error if the parent_type is unmapped. // // You can use this parameter to query multiple indices that may not contain // the parent_type. IgnoreUnmapped interface{} // (Optional, Boolean) Indicates whether the relevance score of a matching // parent document is aggregated into its child documents. Defaults to // false. // // If false, Elasticsearch ignores the relevance score of the parent // document. Elasticsearch also assigns each child document a relevance // score equal to the query's boost, which defaults to 1. // // If true, the relevance score of the matching parent document is // aggregated into its child documents' relevance scores. Score interface{} Name string // contains filtered or unexported fields }
func (HasParentQueryParams) Clause ¶
func (p HasParentQueryParams) Clause() (QueryClause, error)
func (HasParentQueryParams) HasParent ¶
func (p HasParentQueryParams) HasParent() (*HasParentQuery, error)
func (HasParentQueryParams) Kind ¶
func (HasParentQueryParams) Kind() QueryKind
type HasParenter ¶
type HasParenter interface {
HasParent() (*HasParentQuery, error)
}
type HistogramField ¶
type HistogramField struct{}
func NewHistogramField ¶
func NewHistogramField(params HistograpmFieldParams) (*HistogramField, error)
func (*HistogramField) Field ¶
func (h *HistogramField) Field() (Field, error)
func (HistogramField) MarshalBSON ¶
func (h HistogramField) MarshalBSON() ([]byte, error)
func (HistogramField) MarshalJSON ¶
func (h HistogramField) MarshalJSON() ([]byte, error)
func (HistogramField) Type ¶
func (HistogramField) Type() FieldType
func (*HistogramField) UnmarshalBSON ¶
func (h *HistogramField) UnmarshalBSON(data []byte) error
func (*HistogramField) UnmarshalJSON ¶
func (h *HistogramField) UnmarshalJSON(data []byte) error
type HistograpmFieldParams ¶
type HistograpmFieldParams struct{}
func (HistograpmFieldParams) Field ¶
func (p HistograpmFieldParams) Field() (Field, error)
func (HistograpmFieldParams) Histogram ¶
func (p HistograpmFieldParams) Histogram() (*HistogramField, error)
func (HistograpmFieldParams) Type ¶
func (HistograpmFieldParams) Type() FieldType
type IDsQuery ¶
type IDsQuery struct {
// contains filtered or unexported fields
}
func (*IDsQuery) Clause ¶
func (id *IDsQuery) Clause() (QueryClause, error)
func (IDsQuery) MarshalJSON ¶
func (*IDsQuery) UnmarshalJSON ¶
type IDsQueryParams ¶
type IDsQueryParams struct { // (Required) An array of document IDs. Values []string `json:"values"` Name string `json:"_name,omitempty"` }
func (IDsQueryParams) Clause ¶
func (p IDsQueryParams) Clause() (QueryClause, error)
func (IDsQueryParams) IDs ¶
func (p IDsQueryParams) IDs() (*IDsQuery, error)
func (IDsQueryParams) Kind ¶
func (IDsQueryParams) Kind() QueryKind
type IPField ¶
type IPField struct {
// contains filtered or unexported fields
}
An IPField can index/store either IPv4 or IPv6 addresses.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ip.html
func NewIPField ¶
func NewIPField(params IPFieldParams) (*IPField, error)
func (IPField) Boost ¶
func (b IPField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (IPField) DocValues ¶
func (dv IPField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (IPField) IgnoreMalformed ¶
func (im IPField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (IPField) Index ¶
func (i IPField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (IPField) MarshalJSON ¶
func (IPField) NullValue ¶
func (nv IPField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*IPField) SetDocValues ¶
func (dv *IPField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*IPField) SetIgnoreMalformed ¶
func (im *IPField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*IPField) SetIndex ¶
func (i *IPField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*IPField) SetNullValue ¶
func (nv *IPField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*IPField) SetStore ¶
func (sa *IPField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (*IPField) UnmarshalJSON ¶
type IPFieldParams ¶
type IPFieldParams struct { // IgnoreMalformed determines if malformed numbers are ignored. If true, // malformed numbers are ignored. If false (default), malformed numbers // throw an exception and reject the whole document. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // (Optional, bool, default: true) // // Most fields are indexed by default, which makes them searchable. The // inverted index allows queries to look up the search term in unique sorted // list of terms, and from that immediately have access to the list of // documents that contain the term. // // Sorting, aggregations, and access to field values in scripts requires a // different data access pattern. Instead of looking up the term and finding // documents, we need to be able to look up the document and find the terms // that it has in a field. // // Doc values are the on-disk data structure, built at document index time, // which makes this data access pattern possible. They store the same values // as the _source but in a column-oriented fashion that is way more // efficient for sorting and aggregations. Doc values are supported on // almost all field types, with the notable exception of text and // annotated_text fields. // // All fields which support doc values have them enabled by default. If you // are sure that you don’t need to sort or aggregate on a field, or access // the field value from a script, you can disable doc values in order to // save disk space // // https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html DocValues interface{} `json:"doc_values,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool) Index interface{} `json:"index,omitempty"` // NullValue parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched NullValue interface{} `json:"null_value,omitempty"` // WithStore is a mapping with a store paramter. // // By default, field values are indexed to make them searchable, but they // are not stored. This means that the field can be queried, but the // original field value cannot be retrieved. // // Usually this doesn’t matter. The field value is already part of the // _source field, which is stored by default. If you only want to retrieve // the value of a single field or of a few fields, instead of the whole // _source, then this can be achieved with source filtering. // // In certain situations it can make sense to store a field. For instance, // if you have a document with a title, a date, and a very large content // field, you may want to retrieve just the title and the date without // having to extract those fields from a large _source field // // Stored fields returned as arrays // // For consistency, stored fields are always returned as an array because // there is no way of knowing if the original field value was a single // value, multiple values, or an empty array. // // The original value can be retrieved from the _source field instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html Store interface{} `json:"store,omitempty"` // Deprecated Boost interface{} `json:"boost,omitempty"` }
func (IPFieldParams) Field ¶
func (p IPFieldParams) Field() (Field, error)
func (IPFieldParams) IP ¶
func (p IPFieldParams) IP() (*IPField, error)
func (IPFieldParams) Type ¶
func (IPFieldParams) Type() FieldType
type IPRangeField ¶
type IPRangeField struct {
// contains filtered or unexported fields
}
IPRangeField is a range of ip values supporting either IPv4 or IPv6 (or mixed) addresses.
func NewIPRangeField ¶
func NewIPRangeField(params IPRangeFieldParams) (*IPRangeField, error)
func (IPRangeField) Coerce ¶
func (cp IPRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*IPRangeField) Field ¶
func (r *IPRangeField) Field() (Field, error)
func (IPRangeField) Index ¶
func (i IPRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (IPRangeField) MarshalBSON ¶
func (r IPRangeField) MarshalBSON() ([]byte, error)
func (IPRangeField) MarshalJSON ¶
func (r IPRangeField) MarshalJSON() ([]byte, error)
func (*IPRangeField) SetCoerce ¶
func (cp *IPRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*IPRangeField) SetIndex ¶
func (i *IPRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*IPRangeField) SetStore ¶
func (sa *IPRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (IPRangeField) Store ¶
func (sa IPRangeField) Store() bool
Store returns the StoreAttr Value or false
func (IPRangeField) Type ¶
func (IPRangeField) Type() FieldType
func (*IPRangeField) UnmarshalBSON ¶
func (r *IPRangeField) UnmarshalBSON(data []byte) error
func (*IPRangeField) UnmarshalJSON ¶
func (r *IPRangeField) UnmarshalJSON(data []byte) error
type IPRangeFieldParams ¶
type IPRangeFieldParams rangeFieldParams
func (IPRangeFieldParams) Field ¶
func (p IPRangeFieldParams) Field() (Field, error)
func (IPRangeFieldParams) IPRange ¶
func (p IPRangeFieldParams) IPRange() (*IPRangeField, error)
func (IPRangeFieldParams) Type ¶
func (IPRangeFieldParams) Type() FieldType
type Index ¶
type Index struct { Mappings FieldMappings `json:"mappings"` Settings map[string]interface{} }
func NewIndex ¶
func NewIndex(params IndexParams) (*Index, error)
func (Index) MarshalBSON ¶
func (Index) MarshalJSON ¶
func (*Index) UnmarshalBSON ¶
func (*Index) UnmarshalJSON ¶
type IndexOptions ¶
type IndexOptions string
IndexOptions controls what information is added to the inverted index for search and highlighting purposes.
const ( IndexOptionsUnspecified IndexOptions = "" // IndexOptionsDocs - Only the doc number is indexed. Can answer the // question Does this term exist in this field? IndexOptionsDocs IndexOptions = "docs" // IndexOptionsFreqs - Doc number and term frequencies are indexed. Term // frequencies are used to score repeated terms higher than single terms. IndexOptionsFreqs IndexOptions = "freqs" // IndexOptionsPositions - Doc number, term frequencies, and term positions // (or order) are indexed. Positions can be used for proximity or phrase // queries. IndexOptionsPositions IndexOptions = "positions" // IndexOptionsOffsets - Doc number, term frequencies, positions, and start and end character offsets // (which map the term back to the original string) are indexed. Offsets are // used by the unified highlighter to speed up highlighting. IndexOptionsOffsets IndexOptions = "offsets" )
func (IndexOptions) String ¶
func (io IndexOptions) String() string
type IndexParams ¶
func (IndexParams) Index ¶
func (p IndexParams) Index() (*Index, error)
type IndexPrefixes ¶
type IndexPrefixes struct { MinimumChars interface{} `json:"min_chars,omitempty"` MaximumChars interface{} `json:"max_chars,omitempty"` }
type IndexSettingsParams ¶
type IndexSettingsParams struct { // The number of primary shards that an index should have. Defaults to 1. // This setting can only be set at index creation time. It cannot be changed // on a closed index. NumberOfShards interface{} // Number of routing shards used to split an index. // // This setting’s default value depends on the number of primary shards in // the index. The default is designed to allow you to split by factors of 2 // up to a maximum of 1024 shards. // // In Elasticsearch 7.0.0 and later versions, this setting affects how // documents are distributed across shards. When reindexing an older index // with custom routing, you must explicitly set // index.number_of_routing_shards to maintain the same document // distribution. NumberOfRoutingShards interface{} // Whether or not shards should be checked for corruption before opening. // When corruption is detected, it will prevent the shard from being opened. // Accepts: // // "false" // (default) Don’t check for corruption when opening a shard. // "checksum" // Check for physical corruption. // "true" // Check for both physical and logical corruption. This is much more // expensive in terms of CPU and memory usage. ShardCheckOnStartup string // The default value compresses stored data with LZ4 compression, but this // can be set to best_compression which uses DEFLATE for a higher // compression ratio, at the expense of slower stored fields performance. If // you are updating the compression type, the new one will be applied after // segments are merged. Segment merging can be forced using force merge. Codec string // The number of shards a custom routing value can go to. Defaults to 1 and // can only be set at index creation time. This value must be less than the // index.number_of_shards unless the index.number_of_shards value is also 1. // See Routing to an index partition for more details about how this setting // is used. RoutingPartitionSize interface{} // Indicates whether soft deletes are enabled on the index. Soft deletes can // only be configured at index creation and only on indices created on or // after Elasticsearch 6.5.0. Defaults to true. // // Deprecated SoftDeletesEnabled interface{} // The maximum period to retain a shard history retention lease before it is // considered expired. Shard history retention leases ensure that soft // deletes are retained during merges on the Lucene index. If a soft delete // is merged away before it can be replicated to a follower the following // process will fail due to incomplete history on the leader. Defaults to // 12h. SoftDeletesRetentionLeasePeriod string // Indicates whether cached filters are pre-loaded for nested queries. // Possible values are true (default) and false. LoadFixedBitsetFiltersEagerly interface{} // Indicates whether the index should be hidden by default. Hidden indices // are not returned by default when using a wildcard expression. This // behavior is controlled per request through the use of the // expand_wildcards parameter. Possible values are true and false (default). Hidden interface{} // The number of replicas each primary shard has. Defaults to 1. NumberOfReplicas interface{} // Auto-expand the number of replicas based on the number of data nodes in // the cluster. Set to a dash delimited lower and upper bound (e.g. 0-5) or // use all for the upper bound (e.g. 0-all). Defaults to false (i.e. // disabled). Note that the auto-expanded number of replicas only takes // allocation filtering rules into account, but ignores any other allocation // rules such as shard allocation awareness and total shards per node, and // this can lead to the cluster health becoming YELLOW if the applicable // rules prevent all the replicas from being allocated. AutoExpandReplicas interface{} // How long a shard can not receive a search or get request until it’s // considered search idle. (default is 30s) SearchIdleAfter string // How often to perform a refresh operation, which makes recent changes to // the index visible to search. Defaults to 1s. Can be set to -1 to disable // refresh. If this setting is not explicitly set, shards that haven’t seen // search traffic for at least index.search.idle.after seconds will not // receive background refreshes until they receive a search request. // Searches that hit an idle shard where a refresh is pending will wait for // the next background refresh (within 1s). This behavior aims to // automatically optimize bulk indexing in the default case when no searches // are performed. In order to opt out of this behavior an explicit value of // 1s should set as the refresh interval. RefreshInterval string // The maximum value of from + size for searches to this index. Defaults to // 10000. Search requests take heap memory and time proportional to from + // size and this limits that memory. MaxResultWindow interface{} // The maximum value of from + size for inner hits definition and top hits // aggregations to this index. Defaults to 100. Inner hits and top hits // aggregation take heap memory and time proportional to from + size and // this limits that memory. MaxInnerResultWindow interface{} // The maximum value of window_size for rescore requests in searches of this // index. Defaults to index.max_result_window which defaults to 10000. // Search requests take heap memory and time proportional to // max(window_size, from + size) and this limits that memory. MaxRescoreWindow interface{} // The maximum number of docvalue_fields that are allowed in a query. // Defaults to 100. Doc-value fields are costly since they might incur a // per-field per-document seek. MaxDocvalueFieldsSearch interface{} // The maximum number of script_fields that are allowed in a query. Defaults // to 32. MaxScriptFields interface{} // The maximum allowed difference between min_gram and max_gram for // NGramTokenizer and NGramTokenFilter. Defaults to 1. MaxNgramDiff interface{} // The maximum allowed difference between max_shingle_size and // min_shingle_size for the shingle token filter. Defaults to 3. MaxShingleDiff interface{} // Maximum number of refresh listeners available on each shard of the index. // These listeners are used to implement refresh=wait_for. MaxRefreshListeners interface{} // The maximum number of tokens that can be produced using _analyze API. // Defaults to 10000. AnalyzeMaxTokenCount interface{} // The maximum number of characters that will be analyzed for a highlight // request. This setting is only applicable when highlighting is requested // on a text that was indexed without offsets or term vectors. Defaults to // 1000000. HighlightMaxAnalyzedOffset interface{} // The maximum number of terms that can be used in Terms Query. Defaults to // 65536. MaxTermsCount interface{} // The maximum length of regex that can be used in Regexp Query. Defaults to // 1000. MaxRegexLength interface{} // (string or array of strings) Wildcard (*) patterns matching one or more // fields. The following query types search these matching fields by // default: // // - More like this // // - Multi-match // // - Query string // // - Simple query string // // Defaults to *, which matches all fields eligible for term-level queries, // excluding metadata fields. QueryDefaultField interface{} // Controls shard allocation for this index. It can be set to: // // "all" // (default) Allows shard allocation for all shards. // "primaries" // Allows shard allocation only for primary shards. // "new_primaries" // Allows shard allocation only for newly-created primary shards. // "none" // No shard allocation is allowed. RoutingAllocationEnable string // Enables shard rebalancing for this index. It can be set to: // // "all" // (default) - Allows shard rebalancing for all shards. // "primaries" // Allows shard rebalancing only for primary shards. // "replicas" // Allows shard rebalancing only for replica shards. // "none" // No shard rebalancing is allowed. RoutingRebalanceEnable string // The length of time that a deleted document’s version number remains // available for further versioned operations. Defaults to 60s. GCDeletes interface{} // The default ingest node pipeline for this index. Index requests will fail // if the default pipeline is set and the pipeline does not exist. The // default may be overridden using the pipeline parameter. The special // pipeline name _none indicates no ingest pipeline should be run. DefaultPipeline string // The final ingest node pipeline for this index. Index requests will fail // if the final pipeline is set and the pipeline does not exist. The final // pipeline always runs after the request pipeline (if specified) and the // default pipeline (if it exists). The special pipeline name _none // indicates no ingest pipeline will run. FinalPipeline string }
type IndexedShape ¶
type IndexedShape struct { // The ID of the document that containing the pre-indexed shape. ID string `json:"id,omitempty"` // Name of the index where the pre-indexed shape is. Defaults to shapes. Index string `json:"index,omitempty"` // The field specified as path containing the pre-indexed shape. Defaults to // shape. Path string `json:"path,omitempty"` // The routing of the shape document if required. Routing string `json:"routing,omitempty"` }
IndexedShape - The shape query supports using a shape which has already been indexed in another index. This is particularly useful for when you have a pre-defined list of shapes and you want to reference the list using a logical name (for example New Zealand) rather than having to provide coordinates each time
func (IndexedShape) MarshalEasyJSON ¶
func (v IndexedShape) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (IndexedShape) MarshalJSON ¶
func (v IndexedShape) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*IndexedShape) UnmarshalEasyJSON ¶
func (v *IndexedShape) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*IndexedShape) UnmarshalJSON ¶
func (v *IndexedShape) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type IntegerField ¶
type IntegerField struct {
// contains filtered or unexported fields
}
An IntegerField is a signed 64-bit integer with a minimum value of -263 and a maximum value of 263-1.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewIntegerField ¶
func NewIntegerField(params IntegerFieldParams) (*IntegerField, error)
func (IntegerField) Boost ¶
func (b IntegerField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (IntegerField) Coerce ¶
func (cp IntegerField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (IntegerField) DocValues ¶
func (dv IntegerField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*IntegerField) Field ¶
func (i *IntegerField) Field() (Field, error)
func (IntegerField) IgnoreMalformed ¶
func (im IntegerField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (IntegerField) Index ¶
func (i IntegerField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (IntegerField) MarshalBSON ¶
func (i IntegerField) MarshalBSON() ([]byte, error)
func (IntegerField) MarshalJSON ¶
func (i IntegerField) MarshalJSON() ([]byte, error)
func (IntegerField) Meta ¶
func (m IntegerField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (IntegerField) NullValue ¶
func (nv IntegerField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*IntegerField) SetBoost ¶
func (b *IntegerField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*IntegerField) SetCoerce ¶
func (cp *IntegerField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*IntegerField) SetDocValues ¶
func (dv *IntegerField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*IntegerField) SetIgnoreMalformed ¶
func (im *IntegerField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*IntegerField) SetIndex ¶
func (i *IntegerField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*IntegerField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*IntegerField) SetNullValue ¶
func (nv *IntegerField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*IntegerField) SetStore ¶
func (sa *IntegerField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (IntegerField) Store ¶
func (sa IntegerField) Store() bool
Store returns the StoreAttr Value or false
func (IntegerField) Type ¶
func (IntegerField) Type() FieldType
func (*IntegerField) UnmarshalBSON ¶
func (i *IntegerField) UnmarshalBSON(data []byte) error
func (*IntegerField) UnmarshalJSON ¶
func (i *IntegerField) UnmarshalJSON(data []byte) error
type IntegerFieldParams ¶
type IntegerFieldParams numberFieldParams
func (IntegerFieldParams) Field ¶
func (p IntegerFieldParams) Field() (Field, error)
func (IntegerFieldParams) Integer ¶
func (p IntegerFieldParams) Integer() (*IntegerField, error)
func (IntegerFieldParams) Type ¶
func (IntegerFieldParams) Type() FieldType
type IntegerRangeField ¶
type IntegerRangeField struct {
// contains filtered or unexported fields
}
func NewIntegerRangeField ¶
func NewIntegerRangeField(params IntegerRangeFieldParams) (*IntegerRangeField, error)
func (IntegerRangeField) Coerce ¶
func (cp IntegerRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*IntegerRangeField) Field ¶
func (r *IntegerRangeField) Field() (Field, error)
func (IntegerRangeField) Index ¶
func (i IntegerRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (IntegerRangeField) MarshalBSON ¶
func (r IntegerRangeField) MarshalBSON() ([]byte, error)
func (IntegerRangeField) MarshalJSON ¶
func (r IntegerRangeField) MarshalJSON() ([]byte, error)
func (*IntegerRangeField) SetCoerce ¶
func (cp *IntegerRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*IntegerRangeField) SetIndex ¶
func (i *IntegerRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*IntegerRangeField) SetStore ¶
func (sa *IntegerRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (IntegerRangeField) Store ¶
func (sa IntegerRangeField) Store() bool
Store returns the StoreAttr Value or false
func (IntegerRangeField) Type ¶
func (IntegerRangeField) Type() FieldType
func (*IntegerRangeField) UnmarshalBSON ¶
func (r *IntegerRangeField) UnmarshalBSON(data []byte) error
func (*IntegerRangeField) UnmarshalJSON ¶
func (r *IntegerRangeField) UnmarshalJSON(data []byte) error
type IntegerRangeFieldParams ¶
type IntegerRangeFieldParams rangeFieldParams
func (IntegerRangeFieldParams) Field ¶
func (p IntegerRangeFieldParams) Field() (Field, error)
func (IntegerRangeFieldParams) IntegerRange ¶
func (p IntegerRangeFieldParams) IntegerRange() (*IntegerRangeField, error)
func (IntegerRangeFieldParams) Type ¶
func (IntegerRangeFieldParams) Type() FieldType
type IntervalsQuery ¶
type IntervalsQuery struct {
// contains filtered or unexported fields
}
func (*IntervalsQuery) Clause ¶
func (q *IntervalsQuery) Clause() (QueryClause, error)
func (*IntervalsQuery) Clear ¶
func (q *IntervalsQuery) Clear()
func (*IntervalsQuery) Intervals ¶
func (q *IntervalsQuery) Intervals() (*IntervalsQuery, error)
func (*IntervalsQuery) IsEmpty ¶
func (q *IntervalsQuery) IsEmpty() bool
func (IntervalsQuery) Kind ¶
func (IntervalsQuery) Kind() QueryKind
func (IntervalsQuery) MarshalBSON ¶
func (q IntervalsQuery) MarshalBSON() ([]byte, error)
func (IntervalsQuery) MarshalJSON ¶
func (q IntervalsQuery) MarshalJSON() ([]byte, error)
func (*IntervalsQuery) Rule ¶
func (q *IntervalsQuery) Rule() QueryRule
func (*IntervalsQuery) SetRule ¶
func (q *IntervalsQuery) SetRule(rule Ruler) error
func (*IntervalsQuery) UnmarshalBSON ¶
func (q *IntervalsQuery) UnmarshalBSON(data []byte) error
func (*IntervalsQuery) UnmarshalJSON ¶
func (q *IntervalsQuery) UnmarshalJSON(data []byte) error
type IntervalsQueryParams ¶
type IntervalsQueryParams struct { Field string `json:"field"` Name string `json:"_name,omitempty"` Rule Ruler `json:"rule"` }
func (IntervalsQueryParams) Clause ¶
func (p IntervalsQueryParams) Clause() (QueryClause, error)
func (IntervalsQueryParams) Intervals ¶
func (p IntervalsQueryParams) Intervals() (*IntervalsQuery, error)
func (IntervalsQueryParams) Kind ¶
func (IntervalsQueryParams) Kind() QueryKind
type Intervalser ¶
type Intervalser interface {
Intervals() (*IntervalsQuery, error)
}
type JoinField ¶
type JoinField struct {
// contains filtered or unexported fields
}
A JoinField is a special field that creates parent/child relation within documents of the same index. The relations section defines a set of possible relations within the documents, each relation being a parent name and a child name.
To index a document with a join, the name of the relation and the optional parent of the document must be provided in the source
When indexing parent documents, you can choose to specify just the name of the relation as a shortcut instead of encapsulating it in the normal object notation
When indexing a child, the name of the relation as well as the parent id of the document must be added in the _source.
WARNING ¶
It is required to index the lineage of a parent in the same shard so you must always route child documents using their greater parent id.
Parent-join and performance ¶
The join field shouldn’t be used like joins in a relation database. In Elasticsearch the key to good performance is to de-normalize your data into documents. Each join field, has_child or has_parent query adds a significant tax to your query performance. It can also trigger global ordinals to be built.
The only case where the join field makes sense is if your data contains a one-to-many relationship where one entity significantly outnumbers the other entity. An example of such case is a use case with products and offers for these products. In the case that offers significantly outnumbers the number of products then it makes sense to model the product as parent document and the offer as child document.
Parent-join restrictions ¶
Only one join field mapping is allowed per index.
- Parent and child documents must be indexed on the same shard. This means that the same routing value needs to be provided when getting, deleting, or updating a child document.
- An element can have multiple children but only one parent.
- It is possible to add a new relation to an existing join field.
- It is also possible to add a child to an existing element but only if the element is already a parent.
Searching with parent-join ¶
The parent-join creates one field to index the name of the relation within the document (my_parent, my_child, …).
It also creates one field per parent/child relation. The name of this field is the name of the join field followed by # and the name of the parent in the relation. So for instance for the my_parent → [my_child, another_child] relation, the join field creates an additional field named my_join_field#my_parent.
This field contains the parent _id that the document links to if the document is a child (my_child or another_child) and the _id of document if it’s a parent (my_parent).
When searching an index that contains a join field, these two fields are always returned in the search response
Parent-join queries and aggregations ¶
See the has_child and has_parent queries, the children aggregation, and inner hits for more information.
The value of the join field is accessible in aggregations and scripts, and may be queried with the parent_id query
Global ordinals ¶
The join field uses global ordinals to speed up joins. Global ordinals need to be rebuilt after any change to a shard. The more parent id values are stored in a shard, the longer it takes to rebuild the global ordinals for the join field.
Global ordinals, by default, are built eagerly: if the index has changed, global ordinals for the join field will be rebuilt as part of the refresh. This can add significant time to the refresh. However most of the times this is the right trade-off, otherwise global ordinals are rebuilt when the first parent-join query or aggregation is used. This can introduce a significant latency spike for your users and usually this is worse as multiple global ordinals for the join field may be attempt rebuilt within a single refresh interval when many writes are occurring.
When the join field is used infrequently and writes occur frequently it may make sense to disable eager loading:
Multiple children per parent ¶
It is also possible to define multiple children for a single parent ¶
Using multiple levels of relations to replicate a relational model is not recommended. Each level of relation adds an overhead at query time in terms of memory and computation. You should de-normalize your data if you care about performance.
https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
func NewJoinField ¶
func NewJoinField(params JoinFieldParams) (*JoinField, error)
func (JoinField) EagerGlobalOrdinals ¶
func (ego JoinField) EagerGlobalOrdinals() bool
To support aggregations and other operations that require looking up field values on a per-document basis, Elasticsearch uses a data structure called doc values. Term-based field types such as keyword store their doc values using an ordinal mapping for a more compact representation. This mapping works by assigning each term an incremental integer or ordinal based on its lexicographic order. The field’s doc values store only the ordinals for each document instead of the original terms, with a separate lookup structure to convert between ordinals and terms.
When used during aggregations, ordinals can greatly improve performance. As an example, the terms aggregation relies only on ordinals to collect documents into buckets at the shard-level, then converts the ordinals back to their original term values when combining results across shards.
Each index segment defines its own ordinal mapping, but aggregations collect data across an entire shard. So to be able to use ordinals for shard-level operations like aggregations, Elasticsearch creates a unified mapping called global ordinals. The global ordinal mapping is built on top of segment ordinals, and works by maintaining a map from global ordinal to the local ordinal for each segment.
Global ordinals are used if a search contains any of the following components:
- Certain bucket aggregations on keyword, ip, and flattened fields. This includes terms aggregations as mentioned above, as well as composite, diversified_sampler, and significant_terms.
- Bucket aggregations on text fields that require fielddata to be enabled.
- Operations on parent and child documents from a join field, including has_child queries and parent aggregations.
https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html
func (JoinField) MarshalBSON ¶
func (JoinField) MarshalJSON ¶
func (JoinField) Relations ¶
func (r JoinField) Relations() Relations
Relations defines a set of possible relations within the documents, each relation being a parent name and a child name.
func (*JoinField) SetEagerGlobalOrdinals ¶
func (ego *JoinField) SetEagerGlobalOrdinals(v interface{}) error
SetEagerGlobalOrdinals sets the eager_global_ordinals value to v
func (*JoinField) SetRelations ¶
func (r *JoinField) SetRelations(v Relations)
SetRelations sets the value of Relations to v
func (*JoinField) UnmarshalBSON ¶
func (*JoinField) UnmarshalJSON ¶
type JoinFieldParams ¶
type JoinFieldParams struct { // Relations defines a set of possible relations within the documents, each // relation being a parent name and a child name. // // Use like a map[string]string: // Relations{"myField": []string{"myValue"}} Relations Relations `json:"relations,omitempty"` // To support aggregations and other operations that require looking up field // values on a per-document basis, Elasticsearch uses a data structure called // doc values. Term-based field types such as keyword store their doc values // using an ordinal mapping for a more compact representation. This mapping // works by assigning each term an incremental integer or ordinal based on its // lexicographic order. The field’s doc values store only the ordinals for each // document instead of the original terms, with a separate lookup structure to // convert between ordinals and terms. // // When used during aggregations, ordinals can greatly improve performance. As // an example, the terms aggregation relies only on ordinals to collect // documents into buckets at the shard-level, then converts the ordinals back to // their original term values when combining results across shards. // // Each index segment defines its own ordinal mapping, but aggregations collect // data across an entire shard. So to be able to use ordinals for shard-level // operations like aggregations, Elasticsearch creates a unified mapping called // global ordinals. The global ordinal mapping is built on top of segment // ordinals, and works by maintaining a map from global ordinal to the local // ordinal for each segment. // // Global ordinals are used if a search contains any of the following // components: // // - Certain bucket aggregations on keyword, ip, and flattened fields. This // includes terms aggregations as mentioned above, as well as composite, // diversified_sampler, and significant_terms. // // - Bucket aggregations on text fields that require fielddata to be enabled. // // - Operations on parent and child documents from a join field, including // has_child queries and parent aggregations. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html EagerGlobalOrdinals interface{} `json:"eager_global_ordinals,omitempty"` }
func (JoinFieldParams) Field ¶
func (p JoinFieldParams) Field() (Field, error)
func (JoinFieldParams) Join ¶
func (p JoinFieldParams) Join() (*JoinField, error)
func (JoinFieldParams) Type ¶
func (JoinFieldParams) Type() FieldType
type KeywordField ¶
type KeywordField struct {
// contains filtered or unexported fields
}
KeywordField keyword, which is used for structured content such as IDs, email addresses, hostnames, status codes, zip codes, or tags.
https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#keyword-field-type
func NewKeywordField ¶
func NewKeywordField(params KeywordFieldParams) (*KeywordField, error)
func (KeywordField) Boost ¶
func (b KeywordField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (KeywordField) DocValues ¶
func (dv KeywordField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (KeywordField) EagerGlobalOrdinals ¶
func (ego KeywordField) EagerGlobalOrdinals() bool
To support aggregations and other operations that require looking up field values on a per-document basis, Elasticsearch uses a data structure called doc values. Term-based field types such as keyword store their doc values using an ordinal mapping for a more compact representation. This mapping works by assigning each term an incremental integer or ordinal based on its lexicographic order. The field’s doc values store only the ordinals for each document instead of the original terms, with a separate lookup structure to convert between ordinals and terms.
When used during aggregations, ordinals can greatly improve performance. As an example, the terms aggregation relies only on ordinals to collect documents into buckets at the shard-level, then converts the ordinals back to their original term values when combining results across shards.
Each index segment defines its own ordinal mapping, but aggregations collect data across an entire shard. So to be able to use ordinals for shard-level operations like aggregations, Elasticsearch creates a unified mapping called global ordinals. The global ordinal mapping is built on top of segment ordinals, and works by maintaining a map from global ordinal to the local ordinal for each segment.
Global ordinals are used if a search contains any of the following components:
- Certain bucket aggregations on keyword, ip, and flattened fields. This includes terms aggregations as mentioned above, as well as composite, diversified_sampler, and significant_terms.
- Bucket aggregations on text fields that require fielddata to be enabled.
- Operations on parent and child documents from a join field, including has_child queries and parent aggregations.
https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html
func (*KeywordField) Field ¶
func (t *KeywordField) Field() (Field, error)
func (KeywordField) Fields ¶
func (f KeywordField) Fields() Fields
Fields (Multi-fields) allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.
func (KeywordField) IgnoreAbove ¶
func (ia KeywordField) IgnoreAbove() float64
IgnoreAbove signals to not index any string longer than this value. Defaults to 2147483647 so that all values would be accepted. Please however note that default dynamic mapping rules create a sub keyword field that overrides this default by setting ignore_above: 256.
func (KeywordField) Index ¶
func (i KeywordField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (KeywordField) IndexOptions ¶
func (io KeywordField) IndexOptions() IndexOptions
IndexOptions parameter controls what information is added to the inverted index for search and highlighting purposes.
func (KeywordField) MarshalBSON ¶
func (t KeywordField) MarshalBSON() ([]byte, error)
func (KeywordField) MarshalJSON ¶
func (t KeywordField) MarshalJSON() ([]byte, error)
func (KeywordField) Meta ¶
func (m KeywordField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (KeywordField) Normalizer ¶
func (n KeywordField) Normalizer() string
Normalizer property of keyword fields is similar to analyzer except that it guarantees that the analysis chain produces a single token.
func (KeywordField) Norms ¶
func (n KeywordField) Norms() bool
Norms determines whether field-length should be taken into account when scoring queries. Accepts true (default) or false.
func (KeywordField) NullValue ¶
func (nv KeywordField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*KeywordField) SetBoost ¶
func (b *KeywordField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*KeywordField) SetDocValues ¶
func (dv *KeywordField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*KeywordField) SetEagerGlobalOrdinals ¶
func (ego *KeywordField) SetEagerGlobalOrdinals(v interface{}) error
SetEagerGlobalOrdinals sets the eager_global_ordinals value to v
func (KeywordField) SetIgnoreAbove ¶
func (ia KeywordField) SetIgnoreAbove(v interface{}) error
SetIgnoreAbove sets the IgnoreAbove value to v
func (*KeywordField) SetIndex ¶
func (i *KeywordField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*KeywordField) SetIndexOptions ¶
func (io *KeywordField) SetIndexOptions(v IndexOptions) error
SetIndexOptions sets IndexOptions value to v
func (*KeywordField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*KeywordField) SetNormalizer ¶
func (n *KeywordField) SetNormalizer(v string)
SetNormalizer sets the Normalizer value to v
The normalizer property of keyword fields is similar to analyzer except that it guarantees that the analysis chain produces a single token.
func (*KeywordField) SetNorms ¶
func (n *KeywordField) SetNorms(v interface{}) error
SetNorms sets the Norms value to v
func (*KeywordField) SetNullValue ¶
func (nv *KeywordField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*KeywordField) SetSimilarity ¶
func (s *KeywordField) SetSimilarity(v Similarity) error
SetSimilarity sets the Similarity Value to v
func (*KeywordField) SetSplitQueriesOnWhitespace ¶
func (sq *KeywordField) SetSplitQueriesOnWhitespace(v interface{}) error
SetSplitQueriesOnWhitespace sets the SplitQueriesOnWhitespace Value to v
func (*KeywordField) SetStore ¶
func (sa *KeywordField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (KeywordField) Similarity ¶
func (s KeywordField) Similarity() Similarity
Similarity is mostly useful for text fields, but can also apply to other field types.
func (KeywordField) SplitQueriesOnWhitespace ¶
func (sq KeywordField) SplitQueriesOnWhitespace() bool
SplitQueriesOnWhitespace determines whether full text queries should split the input on whitespace when building a query for this field. Accepts true or false (default).
func (KeywordField) Store ¶
func (sa KeywordField) Store() bool
Store returns the StoreAttr Value or false
func (KeywordField) Type ¶
func (KeywordField) Type() FieldType
func (*KeywordField) UnmarshalBSON ¶
func (t *KeywordField) UnmarshalBSON(data []byte) error
func (*KeywordField) UnmarshalJSON ¶
func (t *KeywordField) UnmarshalJSON(data []byte) error
type KeywordFieldParams ¶
type KeywordFieldParams struct { // Should the field be stored on disk in a column-stride fashion, so that it // can later be used for sorting, aggregations, or scripting? Accepts true // (default) or false. DocValues interface{} `json:"doc_values,omitempty"` // Should global ordinals be loaded eagerly on refresh? Accepts true or false // (default). Enabling this is a good idea on fields that are frequently used // for (significant) terms aggregations. EagerGlobalOrdinals interface{} `json:"eager_global_ordinals,omitempty"` // Multi-fields allow the same string value to be indexed in multiple ways // for different purposes, such as one field for search and a multi-field // for sorting and aggregations, or the same string value analyzed by // different analyzers. Fields FieldMap `json:"fields,omitempty"` // Should the field be searchable? Accepts true (default) or false. Index interface{} `json:"index,omitempty"` // What information should be stored in the index, for search and // highlighting purposes. Defaults to positions IndexOptions IndexOptions `json:"index_options,omitempty"` // Whether field-length should be taken into account when scoring queries. // Accepts true (default) or false. Norms interface{} `json:"norms,omitempty"` // Do not index any string longer than this value. Defaults to 2147483647 so // that all values would be accepted. Please however note that default // dynamic mapping rules create a sub keyword field that overrides this // default by setting ignore_above: 256. IgnoreAbove interface{} `json:"ignore_above,omitempty"` // Accepts a string value which is substituted for any explicit null values. // Defaults to null, which means the field is treated as missing. NullValue interface{} `json:"null_value,omitempty"` // Whether the field value should be stored and retrievable separately from // the _source field. Accepts true or false (default). Store interface{} `json:"store,omitempty"` // Which scoring algorithm or similarity should be used. Defaults to BM25. Similarity Similarity `json:"similarity,omitempty"` // Metadata about the field. Meta Meta `json:"meta,omitempty"` // How to pre-process the keyword prior to indexing. Defaults to null, // meaning the keyword is kept as-is. Normalizer string `json:"normalizer,omitempty"` // Whether full text queries should split the input on whitespace when // building a query for this field. Accepts true or false (default). SplitQueriesOnWhitespace interface{} `json:"split_queries_on_whitespace,omitempty"` // Deprecated // // Mapping field-level query time boosting. Accepts a floating point number, // defaults to 1.0. Boost interface{} `json:"boost,omitempty"` }
func (KeywordFieldParams) Field ¶
func (p KeywordFieldParams) Field() (Field, error)
func (KeywordFieldParams) Keyword ¶
func (p KeywordFieldParams) Keyword() (*KeywordField, error)
func (KeywordFieldParams) Type ¶
func (KeywordFieldParams) Type() FieldType
type LatLon ¶
LatLon properties
func (LatLon) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (LatLon) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*LatLon) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LatLon) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type LinearDecayFunction ¶
type LinearDecayFunction struct {
// contains filtered or unexported fields
}
func (*LinearDecayFunction) Decay ¶
func (l *LinearDecayFunction) Decay() dynamic.Number
func (*LinearDecayFunction) Field ¶
func (l *LinearDecayFunction) Field() string
func (LinearDecayFunction) Filter ¶
func (l LinearDecayFunction) Filter() QueryClause
func (LinearDecayFunction) FuncKind ¶
func (LinearDecayFunction) FuncKind() FuncKind
func (LinearDecayFunction) MarshalBSON ¶
func (l LinearDecayFunction) MarshalBSON() ([]byte, error)
func (LinearDecayFunction) MarshalJSON ¶
func (l LinearDecayFunction) MarshalJSON() ([]byte, error)
func (*LinearDecayFunction) Offset ¶
func (l *LinearDecayFunction) Offset() dynamic.StringNumberOrTime
func (LinearDecayFunction) Origin ¶
func (l LinearDecayFunction) Origin() interface{}
func (LinearDecayFunction) Scale ¶
func (l LinearDecayFunction) Scale() dynamic.StringOrNumber
func (*LinearDecayFunction) SetDecay ¶
func (l *LinearDecayFunction) SetDecay(value interface{}) error
func (*LinearDecayFunction) SetField ¶
func (l *LinearDecayFunction) SetField(field string) error
func (*LinearDecayFunction) SetFilter ¶
func (l *LinearDecayFunction) SetFilter(c CompleteClauser) error
func (*LinearDecayFunction) SetOffset ¶
func (l *LinearDecayFunction) SetOffset(offset interface{}) error
func (*LinearDecayFunction) SetOrigin ¶
func (l *LinearDecayFunction) SetOrigin(origin interface{}) error
func (*LinearDecayFunction) SetScale ¶
func (l *LinearDecayFunction) SetScale(scale interface{}) error
type LinearDecayFunctionParams ¶
type LinearDecayFunctionParams struct { // Field Field string // Weight (float) Weight interface{} // The point of origin used for calculating distance. Must be given as a // number for numeric field, date for date fields and geo point for geo // fields. Required for geo and numeric field. For date fields the default // is now. Date math (for example now-1h) is supported for origin. Origin interface{} // Required for all types. Defines the distance from origin + offset at // which the computed score will equal decay parameter. For geo fields: Can // be defined as number+unit (1km, 12m,…). Default unit is meters. For date // fields: Can to be defined as a number+unit ("1h", "10d",…). Default unit // is milliseconds. For numeric field: Any number. Scale interface{} // If an offset is defined, the decay function will only compute the decay // function for documents with a distance greater than the defined offset. // The default is 0. Offset interface{} // The decay parameter defines how documents are scored at the distance // given at scale. If no decay is defined, documents at the distance scale // will be scored 0.5. Decay interface{} Filter CompleteClauser }
func (LinearDecayFunctionParams) FuncKind ¶
func (LinearDecayFunctionParams) FuncKind() FuncKind
func (LinearDecayFunctionParams) Function ¶
func (l LinearDecayFunctionParams) Function() (Function, error)
type LinearFunction ¶
type LinearFunction struct{}
LinearFunction for RankFeatureQuery.
func (*LinearFunction) Linear ¶
func (l *LinearFunction) Linear() (*LinearFunction, error)
func (LinearFunction) MarshalBSON ¶
func (l LinearFunction) MarshalBSON() ([]byte, error)
func (LinearFunction) MarshalJSON ¶
func (l LinearFunction) MarshalJSON() ([]byte, error)
func (*LinearFunction) UnmarshalBSON ¶
func (l *LinearFunction) UnmarshalBSON(data []byte) error
func (*LinearFunction) UnmarshalJSON ¶
func (l *LinearFunction) UnmarshalJSON(data []byte) error
type LinearFunctionParams ¶
type LinearFunctionParams struct{}
func (LinearFunctionParams) Linear ¶
func (p LinearFunctionParams) Linear() (*LinearFunction, error)
type LinearFunctioner ¶
type LinearFunctioner interface {
Linear() (*LinearFunction, error)
}
type LogFunction ¶
type LogFunction struct {
// contains filtered or unexported fields
}
LogFunction is a logarithmic function used to boost relevance scores based on the value of the rank feature field.
func (*LogFunction) Log ¶
func (l *LogFunction) Log() (*LogFunction, error)
func (LogFunction) MarshalJSON ¶
func (l LogFunction) MarshalJSON() ([]byte, error)
func (LogFunction) ScalingFactor ¶
func (sf LogFunction) ScalingFactor() float64
ScalingFactor to use when encoding values. Values will be multiplied by this factor at index time and rounded to the closest long value. For instance, a scaled_float with a scaling_factor of 10 would internally store 2.34 as 23 and all search-time operations (queries, aggregations, sorting) will behave as if the document had a value of 2.3. High values of scaling_factor improve accuracy but also increase space requirements. This parameter is required.
func (*LogFunction) SetScalingFactor ¶
func (sf *LogFunction) SetScalingFactor(v interface{}) error
SetScalingFactor sets the ScalingFactorValue to v
func (*LogFunction) UnmarshalJSON ¶
func (l *LogFunction) UnmarshalJSON(data []byte) error
type LogFunctionParams ¶
type LogFunctionParams struct {
ScalingFactor interface{}
}
func (LogFunctionParams) Log ¶
func (p LogFunctionParams) Log() (*LogFunction, error)
type LogFunctioner ¶
type LogFunctioner interface {
Log() (*LogFunction, error)
}
type LongField ¶
type LongField struct {
// contains filtered or unexported fields
}
A LongField is a signed 64-bit integer with a minimum value of -263 and a maximum value of 263-1.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewLongField ¶
func NewLongField(params LongFieldParams) (*LongField, error)
func (LongField) Boost ¶
func (b LongField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (LongField) Coerce ¶
func (cp LongField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (LongField) DocValues ¶
func (dv LongField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (LongField) IgnoreMalformed ¶
func (im LongField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (LongField) Index ¶
func (i LongField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (LongField) MarshalBSON ¶
func (LongField) MarshalJSON ¶
func (LongField) Meta ¶
func (m LongField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (LongField) NullValue ¶
func (nv LongField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*LongField) SetBoost ¶
func (b *LongField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*LongField) SetCoerce ¶
func (cp *LongField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*LongField) SetDocValues ¶
func (dv *LongField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*LongField) SetIgnoreMalformed ¶
func (im *LongField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*LongField) SetIndex ¶
func (i *LongField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*LongField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*LongField) SetNullValue ¶
func (nv *LongField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*LongField) SetStore ¶
func (sa *LongField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (LongField) Store ¶
func (sa LongField) Store() bool
Store returns the StoreAttr Value or false
func (*LongField) UnmarshalBSON ¶
func (*LongField) UnmarshalJSON ¶
type LongFieldParams ¶
type LongFieldParams numberFieldParams
LongFieldParams - field for a signed 64-bit integer with a minimum value of -263 and a maximum value of 263-1.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func (LongFieldParams) Field ¶
func (l LongFieldParams) Field() (Field, error)
func (LongFieldParams) Long ¶
func (l LongFieldParams) Long() (*LongField, error)
func (LongFieldParams) Type ¶
func (LongFieldParams) Type() FieldType
type LongRangeField ¶
type LongRangeField struct {
// contains filtered or unexported fields
}
LongRangeField is a range of signed 64-bit integers with a minimum value of -263 and maximum of 263-1.
func NewLongRangeField ¶
func NewLongRangeField(params LongRangeFieldParams) (*LongRangeField, error)
func (LongRangeField) Coerce ¶
func (cp LongRangeField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (*LongRangeField) Field ¶
func (r *LongRangeField) Field() (Field, error)
func (LongRangeField) Index ¶
func (i LongRangeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (LongRangeField) MarshalBSON ¶
func (r LongRangeField) MarshalBSON() ([]byte, error)
func (LongRangeField) MarshalJSON ¶
func (r LongRangeField) MarshalJSON() ([]byte, error)
func (*LongRangeField) SetCoerce ¶
func (cp *LongRangeField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*LongRangeField) SetIndex ¶
func (i *LongRangeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*LongRangeField) SetStore ¶
func (sa *LongRangeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (LongRangeField) Store ¶
func (sa LongRangeField) Store() bool
Store returns the StoreAttr Value or false
func (LongRangeField) Type ¶
func (LongRangeField) Type() FieldType
func (*LongRangeField) UnmarshalBSON ¶
func (r *LongRangeField) UnmarshalBSON(data []byte) error
func (*LongRangeField) UnmarshalJSON ¶
func (r *LongRangeField) UnmarshalJSON(data []byte) error
type LongRangeFieldParams ¶
type LongRangeFieldParams rangeFieldParams
func (LongRangeFieldParams) Field ¶
func (p LongRangeFieldParams) Field() (Field, error)
func (LongRangeFieldParams) LongRange ¶
func (p LongRangeFieldParams) LongRange() (*LongRangeField, error)
func (LongRangeFieldParams) Type ¶
func (LongRangeFieldParams) Type() FieldType
type Lookup ¶
type Lookup struct { Field string // Name of the index from which to fetch field // values.(Required) Index string // ID of the document from which to fetch field // values. (Required) ID string // Path of the field from which to fetch field values. Elasticsearch // uses these values as search terms for the query.(Required) // // If the field values include an array of nested inner objects, you can // access those objects using dot notation syntax. Path string // Routing value of the document from which to fetch term values. If a // custom routing value was provided when the document was indexed, this // parameter is required. (Optional) Routing string Boost interface{} CaseInsensitive bool QueryName string }
func (Lookup) Clause ¶
func (l Lookup) Clause() (QueryClause, error)
func (Lookup) Terms ¶
func (l Lookup) Terms() (*TermsQuery, error)
type LookupValues ¶
type LookupValues struct {
// contains filtered or unexported fields
}
func (LookupValues) ID ¶
func (l LookupValues) ID() string
func (*LookupValues) Index ¶
func (l *LookupValues) Index() string
func (LookupValues) IsEmpty ¶
func (l LookupValues) IsEmpty() bool
func (LookupValues) MarshalBSON ¶
func (l LookupValues) MarshalBSON() ([]byte, error)
func (LookupValues) MarshalJSON ¶
func (l LookupValues) MarshalJSON() ([]byte, error)
func (*LookupValues) Path ¶
func (l *LookupValues) Path() string
func (LookupValues) Routing ¶
func (l LookupValues) Routing() string
func (*LookupValues) SetID ¶
func (l *LookupValues) SetID(id string) error
func (*LookupValues) SetIndex ¶
func (l *LookupValues) SetIndex(index string) error
func (*LookupValues) SetPath ¶
func (l *LookupValues) SetPath(path string) error
func (LookupValues) SetRouting ¶
func (l LookupValues) SetRouting(routing string)
func (*LookupValues) UnmarshalBSON ¶
func (l *LookupValues) UnmarshalBSON(data []byte) error
func (*LookupValues) UnmarshalJSON ¶
func (l *LookupValues) UnmarshalJSON(data []byte) error
type MappingError ¶
type MappingError struct {
Errors []error
}
func (*MappingError) Append ¶
func (e *MappingError) Append(err error)
func (*MappingError) Error ¶
func (e *MappingError) Error() string
func (*MappingError) ErrorOrNil ¶
func (e *MappingError) ErrorOrNil() error
ErrorOrNil returns an error interface if this Error represents a list of errors, or returns nil if the list of errors is empty. This function is useful at the end of accumulation to make sure that the value returned represents the existence of errors.
func (*MappingError) GoString ¶
func (e *MappingError) GoString() string
func (*MappingError) Unwrap ¶
func (e *MappingError) Unwrap() error
Unwrap returns an error from Error (or nil if there are no errors). This error returned will further support Unwrap to get the next error, etc. The order will match the order of Errors in the multierror.Error at the time of calling.
The resulting error supports errors.As/Is/Unwrap so you can continue to use the stdlib errors package to introspect further.
This will perform a shallow copy of the errors slice. Any errors appended to this error after calling Unwrap will not be available until a new Unwrap is called on the multierror.Error.
func (*MappingError) WrappedErrors ¶
func (e *MappingError) WrappedErrors() []error
WrappedErrors returns the list of errors that this Error is wrapping. It is an implementation of the errwrap.Wrapper interface so that multierror.Error can be used with that library.
This method is not safe to be called concurrently. Unlike accessing the Errors field directly, this function also checks if the multierror is nil to prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface.
type Mappings ¶
type Mappings struct {
Properties FieldMap `json:"properties"`
}
func (Mappings) FieldMappings ¶
func (m Mappings) FieldMappings() (FieldMappings, error)
func (*Mappings) MarshalJSON ¶
func (*Mappings) UnmarshalBSON ¶
func (*Mappings) UnmarshalJSON ¶
type MatchAllQuery ¶
type MatchAllQuery struct {
// contains filtered or unexported fields
}
MatchAllQuery matches all documents, giving them all a _score of 1.0.
func (MatchAllQuery) Boost ¶
func (b MatchAllQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (MatchAllQuery) Clause ¶
func (ma MatchAllQuery) Clause() (QueryClause, error)
func (*MatchAllQuery) Clear ¶
func (ma *MatchAllQuery) Clear()
func (*MatchAllQuery) Disable ¶
func (ma *MatchAllQuery) Disable()
func (*MatchAllQuery) Enable ¶
func (ma *MatchAllQuery) Enable()
func (*MatchAllQuery) IsEmpty ¶
func (ma *MatchAllQuery) IsEmpty() bool
func (MatchAllQuery) Kind ¶
func (MatchAllQuery) Kind() QueryKind
func (MatchAllQuery) MarshalJSON ¶
func (ma MatchAllQuery) MarshalJSON() ([]byte, error)
func (*MatchAllQuery) MatchAll ¶
func (ma *MatchAllQuery) MatchAll() (*MatchAllQuery, error)
func (*MatchAllQuery) SetBoost ¶
func (b *MatchAllQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*MatchAllQuery) UnmarshalJSON ¶
func (ma *MatchAllQuery) UnmarshalJSON(data []byte) error
type MatchAllQueryParams ¶
type MatchAllQueryParams struct { Boost interface{} Name string // contains filtered or unexported fields }
MatchAllQueryParams matches all documents, giving them all a _score of 1.0.
func (MatchAllQueryParams) Clause ¶
func (ma MatchAllQueryParams) Clause() (QueryClause, error)
func (MatchAllQueryParams) Kind ¶
func (ma MatchAllQueryParams) Kind() QueryKind
func (MatchAllQueryParams) MatchAll ¶
func (ma MatchAllQueryParams) MatchAll() (*MatchAllQuery, error)
type MatchBoolPrefixQuery ¶
type MatchBoolPrefixQuery struct {
// contains filtered or unexported fields
}
func (MatchBoolPrefixQuery) Analyzer ¶
func (ap MatchBoolPrefixQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (*MatchBoolPrefixQuery) Clause ¶
func (m *MatchBoolPrefixQuery) Clause() (QueryClause, error)
func (*MatchBoolPrefixQuery) Clear ¶
func (m *MatchBoolPrefixQuery) Clear()
func (MatchBoolPrefixQuery) DefaultFuzzyRewrite ¶
func (f MatchBoolPrefixQuery) DefaultFuzzyRewrite() Rewrite
func (MatchBoolPrefixQuery) Fuzziness ¶
func (f MatchBoolPrefixQuery) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (MatchBoolPrefixQuery) FuzzyRewrite ¶
func (f MatchBoolPrefixQuery) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (MatchBoolPrefixQuery) FuzzyTranspositions ¶
func (ft MatchBoolPrefixQuery) FuzzyTranspositions() bool
FuzzyTranspositions edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
func (*MatchBoolPrefixQuery) IsEmpty ¶
func (m *MatchBoolPrefixQuery) IsEmpty() bool
func (MatchBoolPrefixQuery) Kind ¶
func (MatchBoolPrefixQuery) Kind() QueryKind
func (MatchBoolPrefixQuery) MarshalBSON ¶
func (m MatchBoolPrefixQuery) MarshalBSON() ([]byte, error)
func (MatchBoolPrefixQuery) MarshalJSON ¶
func (m MatchBoolPrefixQuery) MarshalJSON() ([]byte, error)
func (*MatchBoolPrefixQuery) MatchBoolPrefix ¶
func (m *MatchBoolPrefixQuery) MatchBoolPrefix() (*MatchBoolPrefixQuery, error)
func (MatchBoolPrefixQuery) MaxExpansions ¶
func (me MatchBoolPrefixQuery) MaxExpansions() int
MaxExpansions is the maximum number of variations created. Defaults to 50.
func (MatchBoolPrefixQuery) MinimumShouldMatch ¶
func (msm MatchBoolPrefixQuery) MinimumShouldMatch() string
func (MatchBoolPrefixQuery) Operator ¶
func (o MatchBoolPrefixQuery) Operator() Operator
Operator is the boolean logic used to interpret text in the query value. Defaults to Or
func (MatchBoolPrefixQuery) PrefixLength ¶
func (pl MatchBoolPrefixQuery) PrefixLength() int
func (MatchBoolPrefixQuery) Query ¶
func (m MatchBoolPrefixQuery) Query() string
func (*MatchBoolPrefixQuery) SetAnalyzer ¶
func (ap *MatchBoolPrefixQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MatchBoolPrefixQuery) SetFuzziness ¶
func (f *MatchBoolPrefixQuery) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*MatchBoolPrefixQuery) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*MatchBoolPrefixQuery) SetFuzzyTranspositions ¶
func (ft *MatchBoolPrefixQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
SetFuzzyTranspositions sets FuzzyTranspositions to v
func (*MatchBoolPrefixQuery) SetMaxExpansions ¶
func (me *MatchBoolPrefixQuery) SetMaxExpansions(v interface{}) error
func (*MatchBoolPrefixQuery) SetMinimumShouldMatch ¶
func (msm *MatchBoolPrefixQuery) SetMinimumShouldMatch(v string)
func (*MatchBoolPrefixQuery) SetOperator ¶
SetOperator sets the Operator to v
func (*MatchBoolPrefixQuery) SetPrefixLength ¶
func (pl *MatchBoolPrefixQuery) SetPrefixLength(v interface{}) error
func (*MatchBoolPrefixQuery) SetQuery ¶
func (m *MatchBoolPrefixQuery) SetQuery(query string) error
func (*MatchBoolPrefixQuery) UnmarshalBSON ¶
func (m *MatchBoolPrefixQuery) UnmarshalBSON(data []byte) error
func (*MatchBoolPrefixQuery) UnmarshalJSON ¶
func (m *MatchBoolPrefixQuery) UnmarshalJSON(data []byte) error
type MatchBoolPrefixQueryParams ¶
type MatchBoolPrefixQueryParams struct { Query string Field string MinimumShouldMatch string Operator Operator Analyzer string Fuzziness string PrefixLength interface{} FuzzyTranspositions interface{} FuzzyRewrite Rewrite MaxExpansions interface{} Name string // contains filtered or unexported fields }
func (MatchBoolPrefixQueryParams) Clause ¶
func (p MatchBoolPrefixQueryParams) Clause() (QueryClause, error)
func (MatchBoolPrefixQueryParams) Kind ¶
func (MatchBoolPrefixQueryParams) Kind() QueryKind
func (MatchBoolPrefixQueryParams) MatchBoolPrefix ¶
func (p MatchBoolPrefixQueryParams) MatchBoolPrefix() (*MatchBoolPrefixQuery, error)
type MatchBoolPrefixer ¶
type MatchBoolPrefixer interface {
MatchBoolPrefix() (*MatchBoolPrefixQuery, error)
}
type MatchNoneQuery ¶
type MatchNoneQuery struct {
// contains filtered or unexported fields
}
MatchNoneQuery is the inverse of the match_all query, which matches no documents.
func (MatchNoneQuery) Boost ¶
func (b MatchNoneQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*MatchNoneQuery) Clause ¶
func (mn *MatchNoneQuery) Clause() (QueryClause, error)
func (*MatchNoneQuery) Clear ¶
func (mn *MatchNoneQuery) Clear()
func (*MatchNoneQuery) Disable ¶
func (mn *MatchNoneQuery) Disable()
func (*MatchNoneQuery) Enable ¶
func (mn *MatchNoneQuery) Enable()
func (*MatchNoneQuery) IsEmpty ¶
func (mn *MatchNoneQuery) IsEmpty() bool
func (MatchNoneQuery) Kind ¶
func (MatchNoneQuery) Kind() QueryKind
func (MatchNoneQuery) MarshalJSON ¶
func (mn MatchNoneQuery) MarshalJSON() ([]byte, error)
func (*MatchNoneQuery) SetBoost ¶
func (b *MatchNoneQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*MatchNoneQuery) UnmarshalJSON ¶
func (mn *MatchNoneQuery) UnmarshalJSON(data []byte) error
type MatchNoneQueryParams ¶
type MatchNoneQueryParams struct {
Name string
}
MatchNoneQueryParams is the inverse of the match_all query, which matches no documents.
func (MatchNoneQueryParams) Clause ¶
func (mn MatchNoneQueryParams) Clause() (QueryClause, error)
func (MatchNoneQueryParams) Kind ¶
func (mn MatchNoneQueryParams) Kind() QueryKind
func (MatchNoneQueryParams) MatchNone ¶
func (mn MatchNoneQueryParams) MatchNone() (*MatchNoneQuery, error)
type MatchPhrasePrefixQuery ¶
type MatchPhrasePrefixQuery struct {
// contains filtered or unexported fields
}
MatchPhrasePrefixQuery returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
func (MatchPhrasePrefixQuery) Analyzer ¶
func (ap MatchPhrasePrefixQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (*MatchPhrasePrefixQuery) Clause ¶
func (m *MatchPhrasePrefixQuery) Clause() (QueryClause, error)
func (*MatchPhrasePrefixQuery) Clear ¶
func (m *MatchPhrasePrefixQuery) Clear()
func (*MatchPhrasePrefixQuery) IsEmpty ¶
func (m *MatchPhrasePrefixQuery) IsEmpty() bool
func (MatchPhrasePrefixQuery) Kind ¶
func (MatchPhrasePrefixQuery) Kind() QueryKind
func (MatchPhrasePrefixQuery) MarshalBSON ¶
func (m MatchPhrasePrefixQuery) MarshalBSON() ([]byte, error)
func (MatchPhrasePrefixQuery) MarshalJSON ¶
func (m MatchPhrasePrefixQuery) MarshalJSON() ([]byte, error)
func (*MatchPhrasePrefixQuery) MatchPhrasePrefix ¶
func (m *MatchPhrasePrefixQuery) MatchPhrasePrefix() (*MatchPhrasePrefixQuery, error)
func (MatchPhrasePrefixQuery) MaxExpansions ¶
func (me MatchPhrasePrefixQuery) MaxExpansions() int
MaxExpansions is the maximum number of variations created. Defaults to 50.
func (MatchPhrasePrefixQuery) Query ¶
func (m MatchPhrasePrefixQuery) Query() string
func (*MatchPhrasePrefixQuery) SetAnalyzer ¶
func (ap *MatchPhrasePrefixQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MatchPhrasePrefixQuery) SetMaxExpansions ¶
func (me *MatchPhrasePrefixQuery) SetMaxExpansions(v interface{}) error
func (*MatchPhrasePrefixQuery) SetQuery ¶
func (m *MatchPhrasePrefixQuery) SetQuery(query string) error
func (*MatchPhrasePrefixQuery) SetSlop ¶
func (s *MatchPhrasePrefixQuery) SetSlop(v interface{}) error
func (*MatchPhrasePrefixQuery) SetZeroTermsQuery ¶
func (*MatchPhrasePrefixQuery) UnmarshalBSON ¶
func (m *MatchPhrasePrefixQuery) UnmarshalBSON(data []byte) error
func (*MatchPhrasePrefixQuery) UnmarshalJSON ¶
func (m *MatchPhrasePrefixQuery) UnmarshalJSON(data []byte) error
func (MatchPhrasePrefixQuery) ZeroTermsQuery ¶
func (ztq MatchPhrasePrefixQuery) ZeroTermsQuery() ZeroTerms
ZeroTermsQuery indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter
type MatchPhrasePrefixQueryParams ¶
type MatchPhrasePrefixQueryParams struct { // (Required, string) Text you wish to find in the provided <field>. // // The match_phrase_prefix query analyzes any provided text into tokens before // performing a search. The last term of this text is treated as a prefix, // matching any words that begin with that term. Query string // Field to query Field string // (Optional, integer) Maximum number of terms to which the last provided // term of the query value will expand. Defaults to 50. MaxExpansions interface{} // (Optional, integer) Maximum number of positions allowed between matching // tokens. Defaults to 0. Transposed terms have a slop of 2. Slop interface{} // (Optional, string) Indicates whether no documents are returned if the // analyzer removes all tokens, such as when using a stop filter. Valid // values are: ZeroTermsQuery ZeroTerms // (Optional, string) Analyzer used to convert text in the query value into // tokens. Defaults to the index-time analyzer mapped for the <field>. If no // analyzer is mapped, the index’s default analyzer is used. Analyzer string Name string // contains filtered or unexported fields }
func (MatchPhrasePrefixQueryParams) Clause ¶
func (p MatchPhrasePrefixQueryParams) Clause() (QueryClause, error)
func (MatchPhrasePrefixQueryParams) Kind ¶
func (MatchPhrasePrefixQueryParams) Kind() QueryKind
func (MatchPhrasePrefixQueryParams) MatchPhrasePrefix ¶
func (p MatchPhrasePrefixQueryParams) MatchPhrasePrefix() (*MatchPhrasePrefixQuery, error)
type MatchPhrasePrefixer ¶
type MatchPhrasePrefixer interface {
MatchPhrasePrefix() (*MatchPhrasePrefixQuery, error)
}
type MatchPhraseQuery ¶
type MatchPhraseQuery struct {
// contains filtered or unexported fields
}
func (MatchPhraseQuery) Analyzer ¶
func (ap MatchPhraseQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (*MatchPhraseQuery) Clause ¶
func (m *MatchPhraseQuery) Clause() (QueryClause, error)
func (*MatchPhraseQuery) Clear ¶
func (m *MatchPhraseQuery) Clear()
func (*MatchPhraseQuery) IsEmpty ¶
func (m *MatchPhraseQuery) IsEmpty() bool
func (MatchPhraseQuery) Kind ¶
func (MatchPhraseQuery) Kind() QueryKind
func (MatchPhraseQuery) MarshalBSON ¶
func (m MatchPhraseQuery) MarshalBSON() ([]byte, error)
func (MatchPhraseQuery) MarshalJSON ¶
func (m MatchPhraseQuery) MarshalJSON() ([]byte, error)
func (*MatchPhraseQuery) MatchPhrase ¶
func (m *MatchPhraseQuery) MatchPhrase() (*MatchPhraseQuery, error)
func (MatchPhraseQuery) Query ¶
func (m MatchPhraseQuery) Query() string
func (*MatchPhraseQuery) SetAnalyzer ¶
func (ap *MatchPhraseQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MatchPhraseQuery) SetQuery ¶
func (m *MatchPhraseQuery) SetQuery(query string) error
func (*MatchPhraseQuery) SetZeroTermsQuery ¶
func (*MatchPhraseQuery) UnmarshalBSON ¶
func (m *MatchPhraseQuery) UnmarshalBSON(data []byte) error
func (*MatchPhraseQuery) UnmarshalJSON ¶
func (m *MatchPhraseQuery) UnmarshalJSON(data []byte) error
func (MatchPhraseQuery) ZeroTermsQuery ¶
func (ztq MatchPhraseQuery) ZeroTermsQuery() ZeroTerms
ZeroTermsQuery indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter
type MatchPhraseQueryParams ¶
type MatchPhraseQueryParams struct { Query string Field string Analyzer string ZeroTermsQuery ZeroTerms Name string // contains filtered or unexported fields }
func (MatchPhraseQueryParams) Clause ¶
func (p MatchPhraseQueryParams) Clause() (QueryClause, error)
func (MatchPhraseQueryParams) Kind ¶
func (MatchPhraseQueryParams) Kind() QueryKind
func (MatchPhraseQueryParams) MatchPhrase ¶
func (p MatchPhraseQueryParams) MatchPhrase() (*MatchPhraseQuery, error)
type MatchPhraser ¶
type MatchPhraser interface {
MatchPhrase() (*MatchPhraseQuery, error)
}
type MatchQuery ¶
type MatchQuery struct {
// contains filtered or unexported fields
}
MatchQuery returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
The match query is the standard query for performing a full-text search, including options for fuzzy matching.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
func (MatchQuery) Analyzer ¶
func (ap MatchQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (MatchQuery) AutoGenerateSynonymsPhraseQuery ¶
func (a MatchQuery) AutoGenerateSynonymsPhraseQuery() bool
AutoGenerateSynonymsPhraseQuery determines if match phrase queries are automatically created for multi-term synonyms. Defaults to true.
func (*MatchQuery) Clause ¶
func (m *MatchQuery) Clause() (QueryClause, error)
func (*MatchQuery) Clear ¶
func (m *MatchQuery) Clear()
func (MatchQuery) CutoffFrequency ¶
func (MatchQuery) DefaultFuzzyRewrite ¶
func (f MatchQuery) DefaultFuzzyRewrite() Rewrite
func (MatchQuery) Fuzziness ¶
func (f MatchQuery) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (MatchQuery) FuzzyRewrite ¶
func (f MatchQuery) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (MatchQuery) FuzzyTranspositions ¶
func (ft MatchQuery) FuzzyTranspositions() bool
FuzzyTranspositions edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
func (*MatchQuery) IsEmpty ¶
func (m *MatchQuery) IsEmpty() bool
func (MatchQuery) Kind ¶
func (m MatchQuery) Kind() QueryKind
func (MatchQuery) Lenient ¶
func (l MatchQuery) Lenient() bool
Lenient determines whether format-based errors, such as providing a text query value for a numeric field, are ignored. Defaults to false.
func (MatchQuery) MarshalBSON ¶
func (m MatchQuery) MarshalBSON() ([]byte, error)
func (MatchQuery) MarshalJSON ¶
func (m MatchQuery) MarshalJSON() ([]byte, error)
func (*MatchQuery) Match ¶
func (m *MatchQuery) Match() (*MatchQuery, error)
func (MatchQuery) MaxExpansions ¶
func (me MatchQuery) MaxExpansions() int
MaxExpansions is the maximum number of variations created. Defaults to 50.
func (MatchQuery) MinimumShouldMatch ¶
func (msm MatchQuery) MinimumShouldMatch() string
func (MatchQuery) Operator ¶
func (o MatchQuery) Operator() Operator
Operator is the boolean logic used to interpret text in the query value. Defaults to Or
func (MatchQuery) PrefixLength ¶
func (pl MatchQuery) PrefixLength() int
func (*MatchQuery) Query ¶
func (m *MatchQuery) Query() *dynamic.StringNumberBoolOrTime
func (*MatchQuery) SetAnalyzer ¶
func (ap *MatchQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MatchQuery) SetAutoGenerateSynonymsPhraseQuery ¶
func (a *MatchQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
SetAutoGenerateSynonymsPhraseQuery sets AutoGenerateSynonymsPhraseQueryValue to v
func (*MatchQuery) SetCutoffFreuency ¶
func (*MatchQuery) SetFuzziness ¶
func (f *MatchQuery) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*MatchQuery) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*MatchQuery) SetFuzzyTranspositions ¶
func (ft *MatchQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
SetFuzzyTranspositions sets FuzzyTranspositions to v
func (*MatchQuery) SetLenient ¶
func (l *MatchQuery) SetLenient(v bool)
SetLenient sets Lenient to v
func (*MatchQuery) SetMaxExpansions ¶
func (me *MatchQuery) SetMaxExpansions(v interface{}) error
func (*MatchQuery) SetMinimumShouldMatch ¶
func (msm *MatchQuery) SetMinimumShouldMatch(v string)
func (*MatchQuery) SetOperator ¶
SetOperator sets the Operator to v
func (*MatchQuery) SetPrefixLength ¶
func (pl *MatchQuery) SetPrefixLength(v interface{}) error
func (*MatchQuery) SetQuery ¶
func (m *MatchQuery) SetQuery(query interface{}) error
SetQuery sets the Match's query param. It returns an error if it is nil or empty. If you need to clear match, use Clear()
func (*MatchQuery) SetZeroTermsQuery ¶
func (*MatchQuery) UnmarshalBSON ¶
func (m *MatchQuery) UnmarshalBSON(data []byte) error
func (*MatchQuery) UnmarshalJSON ¶
func (m *MatchQuery) UnmarshalJSON(data []byte) error
func (MatchQuery) ZeroTermsQuery ¶
func (ztq MatchQuery) ZeroTermsQuery() ZeroTerms
ZeroTermsQuery indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter
type MatchQueryParams ¶
type MatchQueryParams struct { // Each query accepts a _name in its top level definition. You can use named // queries to track which queries matched returned documents. If named // queries are used, the response includes a matched_queries property for // each hit. Name string // The field which is being matched. // // If you are setting Match explicitly, this does not need to be set. It // does, however, if you are adding it to a set of Clauses. Field string // (Required) Text, number, boolean or date you wish to find in the // provided <field>. // // The match query analyzes any provided text before performing a picker. // This means the match query can search text fields for analyzed tokens // rather than an exact term. Query interface{} // Analyzer used to convert the text in the query value into tokens. // Defaults to the index-time analyzer mapped for the <field>. If no // analyzer is mapped, the index’s default analyzer is used. Analyzer string // If true, match phrase queries are NOT automatically created for // multi-term synonyms. AutoGenerateSynonymsPhraseQuery interface{} // If true, edits for fuzzy matching DO NOT include transpositions of two // adjacent characters (ab → ba). FuzzyTranspositions interface{} // Maximum edit distance allowed for matching. Fuzziness string FuzzyRewrite Rewrite // If true, format-based errors, such as providing a text query value for a // numeric field, are ignored. Defaults to false. Lenient bool // Boolean logic used to interpret text in the query value. Defaults to OR Operator Operator // Maximum number of terms to which the query will expand. Defaults to 50. MaxExpansions interface{} // Number of beginning characters left unchanged for fuzzy matching. // Defaults to 0. PrefixLength interface{} // Minimum number of clauses that must match for a document to be returned // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html MinimumShouldMatchParam string // Indicates whether no documents are returned if the analyzer removes all // tokens, such as when using a stop filter. ZeroTermsQuery ZeroTerms // The match query supports a cutoff_frequency that allows specifying an // absolute or relative document frequency where high frequency terms are // moved into an optional subquery and are only scored if one of the low // frequency (below the cutoff) terms in the case of an or operator or all // of the low frequency terms in the case of an and operator match. // // DEPRECATED in 7.3.0 // // This option can be omitted as the Match can skip blocks of documents // efficiently, without any configuration, provided that the total number of // hits is not tracked. CutoffFrequency interface{} // contains filtered or unexported fields }
MatchQueryParams returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
The match query is the standard query for performing a full-text search, including options for fuzzy matching.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
func (MatchQueryParams) Clause ¶
func (m MatchQueryParams) Clause() (QueryClause, error)
func (MatchQueryParams) Kind ¶
func (m MatchQueryParams) Kind() QueryKind
func (MatchQueryParams) Match ¶
func (m MatchQueryParams) Match() (*MatchQuery, error)
type MatchRule ¶
type MatchRule struct {
// contains filtered or unexported fields
}
func (MatchRule) Analyzer ¶
func (ap MatchRule) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (MatchRule) Filter ¶
func (r MatchRule) Filter() *RuleFilter
func (MatchRule) MarshalBSON ¶
func (MatchRule) MarshalJSON ¶
func (*MatchRule) SetAnalyzer ¶
func (ap *MatchRule) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MatchRule) SetFilter ¶
func (r *MatchRule) SetFilter(filter RuleFilterer) error
func (*MatchRule) SetMaxGaps ¶
func (mg *MatchRule) SetMaxGaps(maxGaps interface{}) error
func (*MatchRule) SetOrdered ¶
func (o *MatchRule) SetOrdered(ordered interface{}) error
func (*MatchRule) SetUseField ¶
func (uf *MatchRule) SetUseField(field string)
func (*MatchRule) UnmarshalBSON ¶
func (*MatchRule) UnmarshalJSON ¶
type MatchRuleParams ¶
type MatchRuleParams struct { // (Required) Text you wish to find in the provided <field>. Query string `json:"query"` // (Optional, integer) Maximum number of positions between the matching // terms. Terms further apart than this are not considered matches. Defaults // to -1. // // If unspecified or set to -1, there is no width restriction on the match. // If set to 0, the terms must appear next to each other. MaxGaps interface{} `json:"max_gaps,omitempty"` // (Optional, Boolean) If true, matching terms must appear in their // specified order. Defaults to false. Ordered interface{} `json:"ordered,omitempty"` // (Optional, string) analyzer used to analyze terms in the query. Defaults // to the top-level <field>'s analyzer. Analyzer string `json:"analyzer,omitempty"` // (Optional, interval filter rule object) An optional interval filter. Filter RuleFilterer `json:"filter,omitempty"` // (Optional, string) If specified, then match intervals from this field // rather than the top-level <field>. Terms are analyzed using the search // analyzer from this field. This allows you to search across multiple // fields as if they were all the same field; for example, you could index // the same text into stemmed and unstemmed fields, and search for stemmed // tokens near unstemmed ones. UseField string `json:"use_field,omitempty"` }
func (MatchRuleParams) MatchRule ¶
func (p MatchRuleParams) MatchRule() (*MatchRule, error)
func (MatchRuleParams) Rule ¶
func (p MatchRuleParams) Rule() (QueryRule, error)
func (MatchRuleParams) Type ¶
func (MatchRuleParams) Type() RuleType
type MatchRuler ¶
type Matcher ¶
type Matcher interface {
Match() (*MatchQuery, error)
}
type Meta ¶
func (*Meta) MetricType ¶
MetricType is the type of a numeric field: "gauge" || "counter". A gauge is a single-value measurement that can go up or down over time, such as a temperature. A counter is a single-value cumulative counter that only goes up, such as the number of requests processed by a web server. By default, no metric type is associated with a field. Only valid for numeric fields.
func (*Meta) SetMetricType ¶
type Modifier ¶
type Modifier string
const ( ModifierUnspecified Modifier = "" // Do not apply any multiplier to the field value ModifierNone Modifier = "none" // Take the common logarithm of the field value. Because this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use log1p instead. ModifierLog Modifier = "log" // Add 1 to the field value and take the common logarithm ModifierLog1P Modifier = "log1p" //Add 2 to the field value and take the common logarithm ModifierLog2P Modifier = "log2p" // Take the natural logarithm of the field value. Because this function will return a negative value and cause an error if used on values between 0 and 1, it is recommended to use ln1p instead. ModifierLn Modifier = "ln" // Add 1 to the field value and take the natural logarithm ModifierLn1P Modifier = "ln1p" // Add 2 to the field value and take the natural logarithm ModifierLn2P Modifier = "ln2p" // Square the field value (multiply it by itself) ModifierSquare Modifier = "square" // Take the square root of the field value ModifierSqrt Modifier = "sqrt" //Reciprocate the field value, same as 1/x where x is the field’s value ModifierReciprocal Modifier = "reciprocal" )
type MoreLikeThisQuery ¶
type MoreLikeThisQuery struct {
// contains filtered or unexported fields
}
func (MoreLikeThisQuery) Analyzer ¶
func (ap MoreLikeThisQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (MoreLikeThisQuery) Boost ¶
func (b MoreLikeThisQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (MoreLikeThisQuery) BoostTerms ¶
func (q MoreLikeThisQuery) BoostTerms() float64
func (*MoreLikeThisQuery) Clause ¶
func (q *MoreLikeThisQuery) Clause() (QueryClause, error)
func (*MoreLikeThisQuery) Clear ¶
func (q *MoreLikeThisQuery) Clear()
func (MoreLikeThisQuery) FailOnUnsupportedField ¶
func (q MoreLikeThisQuery) FailOnUnsupportedField() bool
func (MoreLikeThisQuery) Fields ¶
func (q MoreLikeThisQuery) Fields() []string
func (MoreLikeThisQuery) Include ¶
func (q MoreLikeThisQuery) Include() bool
func (*MoreLikeThisQuery) IsEmpty ¶
func (q *MoreLikeThisQuery) IsEmpty() bool
func (MoreLikeThisQuery) Kind ¶
func (MoreLikeThisQuery) Kind() QueryKind
func (MoreLikeThisQuery) Like ¶
func (q MoreLikeThisQuery) Like() interface{}
func (MoreLikeThisQuery) MarshalBSON ¶
func (q MoreLikeThisQuery) MarshalBSON() ([]byte, error)
func (MoreLikeThisQuery) MarshalJSON ¶
func (q MoreLikeThisQuery) MarshalJSON() ([]byte, error)
func (MoreLikeThisQuery) MaxDocFrequency ¶
func (q MoreLikeThisQuery) MaxDocFrequency() float64
func (MoreLikeThisQuery) MaxQueryTerms ¶
func (q MoreLikeThisQuery) MaxQueryTerms() int
func (MoreLikeThisQuery) MaxWordLength ¶
func (q MoreLikeThisQuery) MaxWordLength() int
func (MoreLikeThisQuery) MinDocFrequency ¶
func (q MoreLikeThisQuery) MinDocFrequency() float64
func (MoreLikeThisQuery) MinTermFrequency ¶
func (q MoreLikeThisQuery) MinTermFrequency() float64
func (MoreLikeThisQuery) MinWordLength ¶
func (q MoreLikeThisQuery) MinWordLength() int
func (MoreLikeThisQuery) MinimumShouldMatch ¶
func (msm MoreLikeThisQuery) MinimumShouldMatch() string
func (*MoreLikeThisQuery) MoreLikeThis ¶
func (q *MoreLikeThisQuery) MoreLikeThis() (*MoreLikeThisQuery, error)
func (*MoreLikeThisQuery) SetAnalyzer ¶
func (ap *MoreLikeThisQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MoreLikeThisQuery) SetBoost ¶
func (b *MoreLikeThisQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*MoreLikeThisQuery) SetBoostTerms ¶
func (q *MoreLikeThisQuery) SetBoostTerms(v interface{}) error
func (*MoreLikeThisQuery) SetFailOnUnsupportedField ¶
func (q *MoreLikeThisQuery) SetFailOnUnsupportedField(v interface{}) error
func (*MoreLikeThisQuery) SetFields ¶
func (q *MoreLikeThisQuery) SetFields(fields []string)
func (*MoreLikeThisQuery) SetInclude ¶
func (q *MoreLikeThisQuery) SetInclude(v interface{}) error
func (*MoreLikeThisQuery) SetLike ¶
func (q *MoreLikeThisQuery) SetLike(like interface{}) error
func (*MoreLikeThisQuery) SetMaxDocFrequency ¶
func (q *MoreLikeThisQuery) SetMaxDocFrequency(v interface{}) error
func (*MoreLikeThisQuery) SetMaxQueryTerms ¶
func (q *MoreLikeThisQuery) SetMaxQueryTerms(v interface{}) error
func (*MoreLikeThisQuery) SetMaxWordLength ¶
func (q *MoreLikeThisQuery) SetMaxWordLength(v interface{}) error
func (*MoreLikeThisQuery) SetMinDocFrequency ¶
func (q *MoreLikeThisQuery) SetMinDocFrequency(v interface{}) error
func (*MoreLikeThisQuery) SetMinTermFrequency ¶
func (q *MoreLikeThisQuery) SetMinTermFrequency(v interface{}) error
func (*MoreLikeThisQuery) SetMinWordLength ¶
func (q *MoreLikeThisQuery) SetMinWordLength(v interface{}) error
func (*MoreLikeThisQuery) SetMinimumShouldMatch ¶
func (msm *MoreLikeThisQuery) SetMinimumShouldMatch(v string)
func (*MoreLikeThisQuery) SetStopWords ¶
func (q *MoreLikeThisQuery) SetStopWords(stopWords []string)
func (*MoreLikeThisQuery) SetUnlike ¶
func (q *MoreLikeThisQuery) SetUnlike(unlike interface{})
func (MoreLikeThisQuery) StopWords ¶
func (q MoreLikeThisQuery) StopWords() []string
func (MoreLikeThisQuery) Unlike ¶
func (q MoreLikeThisQuery) Unlike() interface{}
func (*MoreLikeThisQuery) UnmarshalBSON ¶
func (q *MoreLikeThisQuery) UnmarshalBSON(data []byte) error
func (*MoreLikeThisQuery) UnmarshalJSON ¶
func (q *MoreLikeThisQuery) UnmarshalJSON(data []byte) error
type MoreLikeThisQueryParams ¶
type MoreLikeThisQueryParams struct { Name string // The only required parameter of the MLT query is like and follows a // versatile syntax, in which the user can specify free form text and/or a // single or multiple documents (see examples above). The syntax to specify // documents is similar to the one used by the Multi GET API. When // specifying documents, the text is fetched from fields unless overridden // in each document request. The text is analyzed by the analyzer at the // field, but could also be overridden. The syntax to override the analyzer // at the field follows a similar syntax to the per_field_analyzer parameter // of the Term Vectors API. Additionally, to provide documents not // necessarily present in the index, artificial documents are also // supported. Like interface{} // The unlike parameter is used in conjunction with like in order not to // select terms found in a chosen set of documents. In other words, we could // ask for documents like: "Apple", but unlike: "cake crumble tree". The // syntax is the same as like. Unlike interface{} // A list of fields to fetch and analyze the text from. Defaults to the // index.query.default_field index setting, which has a default value of *. // The * value matches all fields eligible for term-level queries, excluding // metadata fields. Fields []string // The maximum number of query terms that will be selected. Increasing this // value gives greater accuracy at the expense of query execution speed. // Defaults to 25. MaxQueryTerms interface{} // The minimum term frequency below which the terms will be ignored from the // input document. Defaults to 2. MinTermFrequency interface{} // The minimum document frequency below which the terms will be ignored from // the input document. Defaults to 5. MinDocFrequency interface{} // The maximum document frequency above which the terms will be ignored from // the input document. This could be useful in order to ignore highly // frequent words such as stop words. Defaults to unbounded // (Integer.MAX_VALUE, which is 2^31-1 or 2147483647). MaxDocFrequency interface{} // The minimum word length below which the terms will be ignored. Defaults // to 0. MinWordLength interface{} // The maximum word length above which the terms will be ignored. Defaults // to unbounded (0). MaxWordLength interface{} // An array of stop words. Any word in this set is considered // "uninteresting" and ignored. If the analyzer allows for stop words, you // might want to tell MLT to explicitly ignore them, as for the purposes of // document similarity it seems reasonable to assume that "a stop word is // never interesting". StopWords []string // The analyzer that is used to analyze the free form text. Defaults to the // analyzer associated with the first field in fields. Analyzer string // After the disjunctive query has been formed, this parameter controls the // number of terms that must match. The syntax is the same as the minimum // should match. (Defaults to "30%"). MinimumShouldMatch string // Controls whether the query should fail (throw an exception) if any of the // specified fields are not of the supported types (text or keyword). Set // this to false to ignore the field and continue processing. Defaults to // true. FailOnUnsupportedField interface{} // Each term in the formed query could be further boosted by their tf-idf // score. This sets the boost factor to use when using this feature. // Defaults to deactivated (0). Any other positive value activates terms // boosting with the given boost factor. BoostTerms interface{} // Specifies whether the input documents should also be included in the // search results returned. Defaults to false. Include interface{} // Sets the boost value of the whole query. Defaults to 1.0. Boost interface{} // contains filtered or unexported fields }
func (MoreLikeThisQueryParams) Clause ¶
func (p MoreLikeThisQueryParams) Clause() (QueryClause, error)
func (MoreLikeThisQueryParams) Kind ¶
func (MoreLikeThisQueryParams) Kind() QueryKind
func (MoreLikeThisQueryParams) MoreLikeThis ¶
func (p MoreLikeThisQueryParams) MoreLikeThis() (*MoreLikeThisQuery, error)
type MoreLikeThiser ¶
type MoreLikeThiser interface {
MoreLikeThis() (*MoreLikeThisQuery, error)
}
type MultiMatchQuery ¶
type MultiMatchQuery struct {
// contains filtered or unexported fields
}
func (MultiMatchQuery) Analyzer ¶
func (ap MultiMatchQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (MultiMatchQuery) AutoGenerateSynonymsPhraseQuery ¶
func (a MultiMatchQuery) AutoGenerateSynonymsPhraseQuery() bool
AutoGenerateSynonymsPhraseQuery determines if match phrase queries are automatically created for multi-term synonyms. Defaults to true.
func (MultiMatchQuery) Boost ¶
func (b MultiMatchQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*MultiMatchQuery) Clause ¶
func (q *MultiMatchQuery) Clause() (QueryClause, error)
func (*MultiMatchQuery) Clear ¶
func (q *MultiMatchQuery) Clear()
func (MultiMatchQuery) CutoffFrequency ¶
func (MultiMatchQuery) DefaultFuzzyRewrite ¶
func (f MultiMatchQuery) DefaultFuzzyRewrite() Rewrite
func (MultiMatchQuery) Fields ¶
func (q MultiMatchQuery) Fields() []string
func (MultiMatchQuery) Fuzziness ¶
func (f MultiMatchQuery) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (MultiMatchQuery) FuzzyRewrite ¶
func (f MultiMatchQuery) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (MultiMatchQuery) FuzzyTranspositions ¶
func (ft MultiMatchQuery) FuzzyTranspositions() bool
FuzzyTranspositions edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
func (*MultiMatchQuery) IsEmpty ¶
func (q *MultiMatchQuery) IsEmpty() bool
func (MultiMatchQuery) Kind ¶
func (MultiMatchQuery) Kind() QueryKind
func (MultiMatchQuery) Lenient ¶
func (l MultiMatchQuery) Lenient() bool
Lenient determines whether format-based errors, such as providing a text query value for a numeric field, are ignored. Defaults to false.
func (MultiMatchQuery) MarshalBSON ¶
func (q MultiMatchQuery) MarshalBSON() ([]byte, error)
func (MultiMatchQuery) MarshalJSON ¶
func (q MultiMatchQuery) MarshalJSON() ([]byte, error)
func (MultiMatchQuery) MaxExpansions ¶
func (me MultiMatchQuery) MaxExpansions() int
MaxExpansions is the maximum number of variations created. Defaults to 50.
func (MultiMatchQuery) MinimumShouldMatch ¶
func (msm MultiMatchQuery) MinimumShouldMatch() string
func (*MultiMatchQuery) MultiMatch ¶
func (q *MultiMatchQuery) MultiMatch() (*MultiMatchQuery, error)
func (MultiMatchQuery) Operator ¶
func (o MultiMatchQuery) Operator() Operator
Operator is the boolean logic used to interpret text in the query value. Defaults to Or
func (MultiMatchQuery) PrefixLength ¶
func (pl MultiMatchQuery) PrefixLength() int
func (MultiMatchQuery) Query ¶
func (q MultiMatchQuery) Query() string
func (*MultiMatchQuery) SetAnalyzer ¶
func (ap *MultiMatchQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*MultiMatchQuery) SetAutoGenerateSynonymsPhraseQuery ¶
func (a *MultiMatchQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
SetAutoGenerateSynonymsPhraseQuery sets AutoGenerateSynonymsPhraseQueryValue to v
func (*MultiMatchQuery) SetBoost ¶
func (b *MultiMatchQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*MultiMatchQuery) SetCutoffFreuency ¶
func (*MultiMatchQuery) SetFields ¶
func (q *MultiMatchQuery) SetFields(fields []string) error
func (*MultiMatchQuery) SetFuzziness ¶
func (f *MultiMatchQuery) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*MultiMatchQuery) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*MultiMatchQuery) SetFuzzyTranspositions ¶
func (ft *MultiMatchQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
SetFuzzyTranspositions sets FuzzyTranspositions to v
func (*MultiMatchQuery) SetLenient ¶
func (l *MultiMatchQuery) SetLenient(v bool)
SetLenient sets Lenient to v
func (*MultiMatchQuery) SetMaxExpansions ¶
func (me *MultiMatchQuery) SetMaxExpansions(v interface{}) error
func (*MultiMatchQuery) SetMinimumShouldMatch ¶
func (msm *MultiMatchQuery) SetMinimumShouldMatch(v string)
func (*MultiMatchQuery) SetOperator ¶
SetOperator sets the Operator to v
func (*MultiMatchQuery) SetPrefixLength ¶
func (pl *MultiMatchQuery) SetPrefixLength(v interface{}) error
func (*MultiMatchQuery) SetQuery ¶
func (q *MultiMatchQuery) SetQuery(query string) error
func (*MultiMatchQuery) SetTieBreaker ¶
func (tb *MultiMatchQuery) SetTieBreaker(tieBreaker interface{}) error
func (*MultiMatchQuery) SetType ¶
func (mm *MultiMatchQuery) SetType(typ MultiMatchType) error
SetType sets type to typ https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#multi-match-types
func (*MultiMatchQuery) SetZeroTermsQuery ¶
func (*MultiMatchQuery) UnmarshalBSON ¶
func (q *MultiMatchQuery) UnmarshalBSON(data []byte) error
func (*MultiMatchQuery) UnmarshalJSON ¶
func (q *MultiMatchQuery) UnmarshalJSON(data []byte) error
func (MultiMatchQuery) ZeroTermsQuery ¶
func (ztq MultiMatchQuery) ZeroTermsQuery() ZeroTerms
ZeroTermsQuery indicates whether no documents are returned if the analyzer removes all tokens, such as when using a stop filter
type MultiMatchQueryParams ¶
type MultiMatchQueryParams struct { // Each query accepts a _name in its top level definition. You can use named // queries to track which queries matched returned documents. If named // queries are used, the response includes a matched_queries property for // each hit. Name string // The fields which are being matched. Fields []string // (Required) The query string Query string // Analyzer used to convert the text in the query value into tokens. // Defaults to the index-time analyzer mapped for the <field>. If no // analyzer is mapped, the index’s default analyzer is used. Analyzer string // If true, match phrase queries are NOT automatically created for // multi-term synonyms. // // If true, auto_generate_synonyms_phrase_query is set to false AutoGenerateSynonymsPhraseQuery interface{} // If true, edits for fuzzy matching DO NOT include transpositions of two // adjacent characters (ab → ba). FuzzyTranspositions interface{} // Maximum edit distance allowed for matching. Fuzziness string FuzzyRewrite Rewrite // If true, format-based errors, such as providing a text query value for a // numeric field, are ignored. Defaults to false. Lenient bool // Boolean logic used to interpret text in the query value. Defaults to OR Operator Operator // Maximum number of terms to which the query will expand. Defaults to 50. MaxExpansions interface{} // Number of beginning characters left unchanged for fuzzy matching. // Defaults to 0. PrefixLength interface{} // Minimum number of clauses that must match for a document to be returned // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html MinimumShouldMatchParam string // Indicates whether no documents are returned if the analyzer removes all // tokens, such as when using a stop filter. ZeroTermsQuery ZeroTerms // The match query supports a cutoff_frequency that allows specifying an // absolute or relative document frequency where high frequency terms are // moved into an optional subquery and are only scored if one of the low // frequency (below the cutoff) terms in the case of an or operator or all // of the low frequency terms in the case of an and operator match. // // DEPRECATED in 7.3.0 // // This option can be omitted as the Match can skip blocks of documents // efficiently, without any configuration, provided that the total number of // hits is not tracked. CutoffFrequency interface{} // contains filtered or unexported fields }
func (MultiMatchQueryParams) Clause ¶
func (p MultiMatchQueryParams) Clause() (QueryClause, error)
func (MultiMatchQueryParams) Kind ¶
func (MultiMatchQueryParams) Kind() QueryKind
func (MultiMatchQueryParams) MultiMatch ¶
func (p MultiMatchQueryParams) MultiMatch() (*MultiMatchQuery, error)
type MultiMatchType ¶
type MultiMatchType string
const ( MultiMatchTypeUnspecified MultiMatchType = "" // (default) Finds documents which match any field, but uses the _score from // the best field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-best-fields MultiMatchBestFields MultiMatchType = "best_fields" // Finds documents which match any field and combines the _score from each // field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-most-fields MultiMatchMostFields MultiMatchType = "most_fields" // Treats fields with the same analyzer as though they were one big field. // Looks for each word in any field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-cross-fields MultiMatchCrossFields MultiMatchType = "cross_fields" // Runs a match_phrase query on each field and uses the _score from the best // field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-phrase MultiMatchPhrase MultiMatchType = "phrase" // Runs a match_phrase_prefix query on each field and uses the _score from // the best field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-phrase MultiMatchPhrasePrefix MultiMatchType = "phrase_prefix" // Creates a match_bool_prefix query on each field and combines the _score // from each field. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#type-bool-prefix MultiMatchBoolPrefix MultiMatchType = "bool_prefix" )
func (*MultiMatchType) IsValid ¶
func (mm *MultiMatchType) IsValid() bool
func (MultiMatchType) String ¶
func (mm MultiMatchType) String() string
func (MultiMatchType) Validate ¶
func (mm MultiMatchType) Validate() error
type MultiMatcher ¶
type MultiMatcher interface {
MultiMatch() (*MultiMatchQuery, error)
}
type NestedField ¶
type NestedField struct {
// contains filtered or unexported fields
}
NestedField is a specialised version of the object data type that allows arrays of objects to be indexed in a way that they can be queried independently of each other.
When ingesting key-value pairs with a large, arbitrary set of keys, you might consider modeling each key-value pair as its own nested document with key and value fields. Instead, consider using the flattened data type, which maps an entire object as a single field and allows for simple searches over its contents. Nested documents and queries are typically expensive, so using the flattened data type for this use case is a better option.
Interacting with nested documents ¶
Nested documents can be:
- queried with the nested query.
- analyzed with the nested and reverse_nested aggregations.
- sorted with nested sorting.
- retrieved and highlighted with nested inner hits.
IMPORTANT ¶
Because nested documents are indexed as separate documents, they can only be accessed within the scope of the nested query, the nested/reverse_nested aggregations, or nested inner hits.
For instance, if a string field within a nested document has index_options set to offsets to allow use of the postings during the highlighting, these offsets will not be available during the main highlighting phase. Instead, highlighting needs to be performed via nested inner hits. The same consideration applies when loading fields during a search through docvalue_fields or stored_fields.
Limits on nested mappings and objects ¶
As described earlier, each nested object is indexed as a separate Lucene document. Continuing with the previous example, if we indexed a single document containing 100 user objects, then 101 Lucene documents would be created: one for the parent document, and one for each nested object. Because of the expense associated with nested mappings, Elasticsearch puts settings in place to guard against performance problems:
index.mapping.nested_fields.limit
The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this setting limits the number of unique nested types per index. Default is 50.
index.mapping.nested_objects.limit
The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.
To illustrate how this setting works, consider adding another nested type called comments to the previous example mapping. For each document, the combined number of user and comment objects it contains must be below the limit.
See Settings to prevent mapping explosion regarding additional settings for preventing mappings explosion. https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html
func NewNestedField ¶
func NewNestedField(params NestedFieldParams) (*NestedField, error)
func (NestedField) Dynamic ¶
func (dp NestedField) Dynamic() Dynamic
Dynamic determines whether or not new properties should be added dynamically to an existing object. Accepts true (default), false and strict.
func (*NestedField) Field ¶
func (n *NestedField) Field() (Field, error)
func (NestedField) IncludeInParent ¶
func (iip NestedField) IncludeInParent() bool
IncludeInParent (Optional, Boolean) If true, all fields in the nested object are also added to the parent document as standard (flat) fields. Defaults to false.
func (NestedField) IncludeInRoot ¶
func (iir NestedField) IncludeInRoot() bool
IncludeInRoot deteremines if all fields in the nested object are also added to the root document as standard (flat) fields. Defaults to false
func (NestedField) MarshalBSON ¶
func (n NestedField) MarshalBSON() ([]byte, error)
func (NestedField) MarshalJSON ¶
func (n NestedField) MarshalJSON() ([]byte, error)
func (NestedField) Properties ¶
func (p NestedField) Properties() Fields
Properties are fields within the object, which can be of any data type, including object. New properties may be added to an existing object.
func (*NestedField) SetDynamic ¶
SetDynamic sets the value of Dynamic to v.
func (*NestedField) SetIncludeInParent ¶
func (iip *NestedField) SetIncludeInParent(v interface{}) error
SetIncludeInParent sets the IncludeInParent Value to v
func (*NestedField) SetIncludeInRoot ¶
func (iir *NestedField) SetIncludeInRoot(v interface{}) error
SetIncludeInRoot sets the IncludeInRoot Value to v
func (*NestedField) SetProperties ¶
SetProperties sets the Properties value to v
func (NestedField) Type ¶
func (NestedField) Type() FieldType
func (*NestedField) UnmarshalBSON ¶
func (n *NestedField) UnmarshalBSON(data []byte) error
func (*NestedField) UnmarshalJSON ¶
func (n *NestedField) UnmarshalJSON(data []byte) error
type NestedFieldParams ¶
type NestedFieldParams struct { // (Optional) Whether or not new properties should be added dynamically to an existing nested object. Accepts true (default), false and strict. Dynamic Dynamic `json:"dynamic,omitempty"` // (Optional) The fields within the nested object, which can be of // any data type, including nested. New properties may be added to an // existing nested object. Properties Fieldset `json:"properties,omitempty"` // (Optional, Boolean) If true, all fields in the nested object are also // added to the parent document as standard (flat) fields. Defaults to // false. IncludeInParent interface{} `json:"include_in_parent,omitempty"` // (Optional, Boolean) If true, all fields in the nested object are also // added to the root document as standard (flat) fields. Defaults to false. IncludeInRoot interface{} `json:"include_in_root,omitempty"` }
func (NestedFieldParams) Field ¶
func (p NestedFieldParams) Field() (Field, error)
func (NestedFieldParams) Nested ¶
func (p NestedFieldParams) Nested() (*NestedField, error)
func (NestedFieldParams) Type ¶
func (NestedFieldParams) Type() FieldType
type NestedQuerier ¶
type NestedQuerier interface {
Nested() (*NestedQuery, error)
}
type NestedQuery ¶
type NestedQuery struct {
// contains filtered or unexported fields
}
func (*NestedQuery) Clause ¶
func (q *NestedQuery) Clause() (QueryClause, error)
func (*NestedQuery) Clear ¶
func (q *NestedQuery) Clear()
func (NestedQuery) IgnoreUnmapped ¶
func (q NestedQuery) IgnoreUnmapped() bool
func (*NestedQuery) IsEmpty ¶
func (q *NestedQuery) IsEmpty() bool
func (NestedQuery) Kind ¶
func (NestedQuery) Kind() QueryKind
func (NestedQuery) MarshalBSON ¶
func (q NestedQuery) MarshalBSON() ([]byte, error)
func (NestedQuery) MarshalJSON ¶
func (q NestedQuery) MarshalJSON() ([]byte, error)
func (*NestedQuery) Nested ¶
func (q *NestedQuery) Nested() (*NestedQuery, error)
func (NestedQuery) Path ¶
func (q NestedQuery) Path() string
func (NestedQuery) Query ¶
func (q NestedQuery) Query(query Querier) *Query
func (*NestedQuery) SetIgnoreUnmapped ¶
func (q *NestedQuery) SetIgnoreUnmapped(v interface{}) error
func (*NestedQuery) SetPath ¶
func (q *NestedQuery) SetPath(v string) error
func (*NestedQuery) SetQuery ¶
func (q *NestedQuery) SetQuery(query Querier) error
func (*NestedQuery) SetScoreMode ¶
func (*NestedQuery) UnmarshalBSON ¶
func (q *NestedQuery) UnmarshalBSON(data []byte) error
func (*NestedQuery) UnmarshalJSON ¶
func (q *NestedQuery) UnmarshalJSON(data []byte) error
type NestedQueryParams ¶
type NestedQueryParams struct { Name string Query Querier Path string ScoreMode ScoreMode IgnoreUnmapped interface{} // contains filtered or unexported fields }
func (NestedQueryParams) Clause ¶
func (p NestedQueryParams) Clause() (QueryClause, error)
func (NestedQueryParams) Kind ¶
func (NestedQueryParams) Kind() QueryKind
func (NestedQueryParams) Nested ¶
func (p NestedQueryParams) Nested() (*NestedQuery, error)
type NumberField ¶
type NumberField interface { Field WithCoerce WithIgnoreMalformed WithDocValues WithNullValue WithMeta WithIndex WithStore }
type ObjectField ¶
type ObjectField struct {
// contains filtered or unexported fields
}
An ObjectField is a field type that contains other documents
JSON documents are hierarchical in nature: the document may contain inner objects which, in turn, may contain inner objects themselves
https://www.elastic.co/guide/en/elasticsearch/reference/7.12/object.html
func NewObjectField ¶
func NewObjectField(params ObjectFieldParams) (*ObjectField, error)
func (ObjectField) Dynamic ¶
func (dp ObjectField) Dynamic() Dynamic
Dynamic determines whether or not new properties should be added dynamically to an existing object. Accepts true (default), false and strict.
func (ObjectField) Enabled ¶
func (ep ObjectField) Enabled() bool
Enabled determines whether the JSON value given for the object field should be parsed and indexed (true, default) or completely ignored (false).
func (*ObjectField) Field ¶
func (o *ObjectField) Field() (Field, error)
func (ObjectField) MarshalBSON ¶
func (o ObjectField) MarshalBSON() ([]byte, error)
func (ObjectField) MarshalJSON ¶
func (o ObjectField) MarshalJSON() ([]byte, error)
func (ObjectField) Properties ¶
func (p ObjectField) Properties() Fields
Properties are fields within the object, which can be of any data type, including object. New properties may be added to an existing object.
func (*ObjectField) SetDynamic ¶
SetDynamic sets the value of Dynamic to v.
func (*ObjectField) SetEnabled ¶
func (ep *ObjectField) SetEnabled(v interface{}) error
SetEnabled sets Enabled to v
func (*ObjectField) SetProperties ¶
SetProperties sets the Properties value to v
func (ObjectField) Type ¶
func (ObjectField) Type() FieldType
func (*ObjectField) UnmarshalBSON ¶
func (o *ObjectField) UnmarshalBSON(data []byte) error
func (*ObjectField) UnmarshalJSON ¶
func (o *ObjectField) UnmarshalJSON(data []byte) error
type ObjectFieldParams ¶
type ObjectFieldParams struct { Properties FieldMap `json:"properties,omitempty"` Enabled interface{} `json:"enabled,omitempty"` Dynamic Dynamic `json:"dynamic,omitempty"` }
func (ObjectFieldParams) Field ¶
func (p ObjectFieldParams) Field() (Field, error)
func (ObjectFieldParams) Object ¶
func (p ObjectFieldParams) Object() (*ObjectField, error)
func (ObjectFieldParams) Type ¶
func (ObjectFieldParams) Type() FieldType
type Orientation ¶
type Orientation string
const ( OrientationUnspecified Orientation = "" // OrientationRight - Counter-Clockwise Orientation (RIGHT) OrientationRight Orientation = "right" // OrientationCounterClockwise - Counter-Cloockwise orientation (RIGHT) OrientationCounterClockwise Orientation = "counterclockwise" // OrientationCCW - Counter-clockwise orientation (RIGHT) OrientationCCW Orientation = "ccw" // OrientationLeft - Clockwise Orientation OrientationLeft Orientation = "left" // OrientationClockwise - Clockwise Oreintation (LEFT) OrientationClockwise Orientation = "clockwise" // OrientationCW Clockwise Orientation (LEFT) OrientationCW Orientation = "cw" )
func (Orientation) IsClockwise ¶
func (o Orientation) IsClockwise() bool
IsClockwise indicates whether the Orientation is Clockwise
func (Orientation) IsCounterClockwise ¶
func (o Orientation) IsCounterClockwise() bool
IsCounterClockwise indicates whether the Orientation is Counter-Clockwise
func (*Orientation) IsValid ¶
func (o *Orientation) IsValid() bool
func (Orientation) String ¶
func (o Orientation) String() string
func (*Orientation) Validate ¶
func (o *Orientation) Validate() error
type ParentIDQuery ¶
type ParentIDQuery struct {
// contains filtered or unexported fields
}
func (*ParentIDQuery) Clause ¶
func (q *ParentIDQuery) Clause() (QueryClause, error)
func (*ParentIDQuery) Clear ¶
func (q *ParentIDQuery) Clear()
func (ParentIDQuery) ID ¶
func (q ParentIDQuery) ID() string
func (ParentIDQuery) IgnoreUnmapped ¶
func (q ParentIDQuery) IgnoreUnmapped() bool
func (*ParentIDQuery) IsEmpty ¶
func (q *ParentIDQuery) IsEmpty() bool
func (ParentIDQuery) Kind ¶
func (ParentIDQuery) Kind() QueryKind
func (ParentIDQuery) MarshalBSON ¶
func (q ParentIDQuery) MarshalBSON() ([]byte, error)
func (ParentIDQuery) MarshalJSON ¶
func (q ParentIDQuery) MarshalJSON() ([]byte, error)
func (*ParentIDQuery) ParentID ¶
func (q *ParentIDQuery) ParentID() (*ParentIDQuery, error)
func (*ParentIDQuery) SetID ¶
func (q *ParentIDQuery) SetID(id string) error
func (*ParentIDQuery) SetIgnoreUnmapped ¶
func (q *ParentIDQuery) SetIgnoreUnmapped(ignore interface{}) error
func (*ParentIDQuery) SetType ¶
func (q *ParentIDQuery) SetType(typ string) error
func (ParentIDQuery) Type ¶
func (q ParentIDQuery) Type() string
func (*ParentIDQuery) UnmarshalBSON ¶
func (q *ParentIDQuery) UnmarshalBSON(data []byte) error
func (*ParentIDQuery) UnmarshalJSON ¶
func (q *ParentIDQuery) UnmarshalJSON(data []byte) error
type ParentIDQueryParams ¶
type ParentIDQueryParams struct { Name string // (Required) ID of the parent document. The query will return child documents of this parent docume ID string // (Required, string) Name of the child relationship mapped for the join field. Type string // (Optional, Boolean) Indicates whether to ignore an unmapped type and not // return any documents instead of an error. Defaults to false. // // If false, Elasticsearch returns an error if the type is unmapped. // // You can use this parameter to query multiple indices that may not contain the // type. IgnoreUnmapped interface{} // contains filtered or unexported fields }
func (ParentIDQueryParams) Clause ¶
func (p ParentIDQueryParams) Clause() (QueryClause, error)
func (ParentIDQueryParams) Kind ¶
func (ParentIDQueryParams) Kind() QueryKind
func (ParentIDQueryParams) ParentID ¶
func (p ParentIDQueryParams) ParentID() (*ParentIDQuery, error)
type ParentIDer ¶
type ParentIDer interface {
ParentID() (*ParentIDQuery, error)
}
type PercolateDocumentQueryParams ¶
type PercolateDocumentQueryParams struct { // The field of type percolator that holds the indexed queries. This is a // required parameter. Field string // The suffix to be used for the _percolator_document_slot field in case // multiple percolate queries have been specified. This is an optional // parameter. Name string Document interface{} // The type / mapping of the document being percolated. // // Deprecated and will be removed in Elasticsearch 8.0. DocumentType string // contains filtered or unexported fields }
func (PercolateDocumentQueryParams) Clause ¶
func (p PercolateDocumentQueryParams) Clause() (QueryClause, error)
func (PercolateDocumentQueryParams) Kind ¶
func (PercolateDocumentQueryParams) Kind() QueryKind
func (PercolateDocumentQueryParams) Percolate ¶
func (p PercolateDocumentQueryParams) Percolate() (*PercolateQuery, error)
type PercolateDocumentsQueryParams ¶
type PercolateDocumentsQueryParams struct { // The field of type percolator that holds the indexed queries. This is a // required parameter. Field string // The suffix to be used for the _percolator_document_slot field in case // multiple percolate queries have been specified. This is an optional // parameter. Name string // Like the document parameter, but accepts multiple documents via a json // array. Documents interface{} // The type / mapping of the document being percolated. // // Deprecated and will be removed in Elasticsearch 8.0. DocumentType string // contains filtered or unexported fields }
func (PercolateDocumentsQueryParams) Clause ¶
func (p PercolateDocumentsQueryParams) Clause() (QueryClause, error)
func (PercolateDocumentsQueryParams) Kind ¶
func (PercolateDocumentsQueryParams) Kind() QueryKind
func (PercolateDocumentsQueryParams) Percolate ¶
func (p PercolateDocumentsQueryParams) Percolate() (*PercolateQuery, error)
type PercolateQuery ¶
type PercolateQuery struct {
// contains filtered or unexported fields
}
func (*PercolateQuery) Clause ¶
func (q *PercolateQuery) Clause() (QueryClause, error)
func (*PercolateQuery) Clear ¶
func (q *PercolateQuery) Clear()
func (PercolateQuery) Document ¶
func (q PercolateQuery) Document() interface{}
func (PercolateQuery) DocumentType ¶
func (q PercolateQuery) DocumentType() string
func (PercolateQuery) Documents ¶
func (q PercolateQuery) Documents() interface{}
func (PercolateQuery) ID ¶
func (q PercolateQuery) ID() string
func (PercolateQuery) Index ¶
func (q PercolateQuery) Index() string
func (*PercolateQuery) IsEmpty ¶
func (q *PercolateQuery) IsEmpty() bool
func (PercolateQuery) Kind ¶
func (PercolateQuery) Kind() QueryKind
func (PercolateQuery) MarshalBSON ¶
func (q PercolateQuery) MarshalBSON() ([]byte, error)
func (PercolateQuery) MarshalJSON ¶
func (q PercolateQuery) MarshalJSON() ([]byte, error)
func (*PercolateQuery) Percolate ¶
func (q *PercolateQuery) Percolate() (*PercolateQuery, error)
func (PercolateQuery) Preference ¶
func (q PercolateQuery) Preference() string
func (PercolateQuery) Routing ¶
func (q PercolateQuery) Routing() string
func (*PercolateQuery) SetDocument ¶
func (q *PercolateQuery) SetDocument(doc interface{}) error
func (*PercolateQuery) SetDocumentType ¶
func (q *PercolateQuery) SetDocumentType(typ string)
func (*PercolateQuery) SetDocuments ¶
func (q *PercolateQuery) SetDocuments(docs interface{}) error
func (*PercolateQuery) SetID ¶
func (q *PercolateQuery) SetID(id string)
func (*PercolateQuery) SetIndex ¶
func (q *PercolateQuery) SetIndex(index string)
func (*PercolateQuery) SetPreference ¶
func (q *PercolateQuery) SetPreference(pref string)
func (*PercolateQuery) SetRouting ¶
func (q *PercolateQuery) SetRouting(routing string)
func (*PercolateQuery) SetType ¶
func (q *PercolateQuery) SetType(typ string)
func (*PercolateQuery) SetVersion ¶
func (q *PercolateQuery) SetVersion(vers int)
func (PercolateQuery) Type ¶
func (q PercolateQuery) Type() string
func (*PercolateQuery) UnmarshalBSON ¶
func (q *PercolateQuery) UnmarshalBSON(data []byte) error
func (*PercolateQuery) UnmarshalJSON ¶
func (q *PercolateQuery) UnmarshalJSON(data []byte) error
func (PercolateQuery) Version ¶
func (q PercolateQuery) Version() int
type PercolateStoredDocumentQuery ¶
type PercolateStoredDocumentQuery struct { // The suffix to be used for the _percolator_document_slot field in case // multiple percolate queries have been specified. This is an optional // parameter. Name string // The field of type percolator that holds the indexed queries. This is a required parameter. Field string // The id of the document to fetch. This is a required parameter. ID string // The index the document resides in. This is a required parameter. Index string // Optionally, routing to be used to fetch document to percolate. Routing string // The type of the document to fetch. This parameter is deprecated and will // be removed in Elasticsearch 8.0. Type string // Optionally, preference to be used to fetch document to percolate. Preference string // Optionally, the expected version of the document to be fetched. Version int // contains filtered or unexported fields }
func (PercolateStoredDocumentQuery) Clause ¶
func (p PercolateStoredDocumentQuery) Clause() (QueryClause, error)
func (PercolateStoredDocumentQuery) Kind ¶
func (PercolateStoredDocumentQuery) Kind() QueryKind
func (PercolateStoredDocumentQuery) Percolate ¶
func (p PercolateStoredDocumentQuery) Percolate() (*PercolateQuery, error)
type Percolater ¶
type Percolater interface {
Percolate() (*PercolateQuery, error)
}
type PercolatorField ¶
type PercolatorField struct{}
The PercolatorField type parses a json structure into a native query and stores that query, so that the percolate query can use it to match provided documents.
Any field that contains a json object can be configured to be a percolator field. The percolator field type has no settings. Just configuring the percolator field type is sufficient to instruct Elasticsearch to treat a field as a query.
https://www.elastic.co/guide/en/elasticsearch/reference/current/percolator.html
func NewPercolatorField ¶
func NewPercolatorField() (*PercolatorField, error)
func (*PercolatorField) Field ¶
func (p *PercolatorField) Field() (Field, error)
func (PercolatorField) MarshalJSON ¶
func (PercolatorField) MarshalJSON() ([]byte, error)
func (PercolatorField) Type ¶
func (PercolatorField) Type() FieldType
func (PercolatorField) UnmarshalJSON ¶
func (PercolatorField) UnmarshalJSON(data []byte) error
type PercolatorFieldParams ¶
type PercolatorFieldParams struct{}
func (PercolatorFieldParams) Field ¶
func (p PercolatorFieldParams) Field() (Field, error)
func (PercolatorFieldParams) Percolator ¶
func (PercolatorFieldParams) Percolator() (*PercolatorField, error)
func (PercolatorFieldParams) Type ¶
func (PercolatorFieldParams) Type() FieldType
type PinnedQuery ¶
type PinnedQuery struct {
// contains filtered or unexported fields
}
func (*PinnedQuery) Clause ¶
func (q *PinnedQuery) Clause() (QueryClause, error)
func (*PinnedQuery) Clear ¶
func (q *PinnedQuery) Clear()
func (*PinnedQuery) IsEmpty ¶
func (q *PinnedQuery) IsEmpty() bool
func (PinnedQuery) Kind ¶
func (PinnedQuery) Kind() QueryKind
func (PinnedQuery) MarshalBSON ¶
func (q PinnedQuery) MarshalBSON() ([]byte, error)
func (PinnedQuery) MarshalJSON ¶
func (q PinnedQuery) MarshalJSON() ([]byte, error)
func (*PinnedQuery) Pinned ¶
func (q *PinnedQuery) Pinned() (*PinnedQuery, error)
func (*PinnedQuery) UnmarshalBSON ¶
func (q *PinnedQuery) UnmarshalBSON(data []byte) error
func (*PinnedQuery) UnmarshalJSON ¶
func (q *PinnedQuery) UnmarshalJSON(data []byte) error
type PinnedQueryParams ¶
type PinnedQueryParams struct { Name string // contains filtered or unexported fields }
func (PinnedQueryParams) Clause ¶
func (p PinnedQueryParams) Clause() (QueryClause, error)
func (PinnedQueryParams) Kind ¶
func (PinnedQueryParams) Kind() QueryKind
func (PinnedQueryParams) Pinned ¶
func (p PinnedQueryParams) Pinned() (*PinnedQuery, error)
type PointField ¶
type PointField struct {
// contains filtered or unexported fields
}
A PointField accepts latitude-longitude pairs, which can be used:
- to find geo-points within a bounding box, within a certain distance of a central point, or within a polygon or within a geo_shape query.
- to aggregate documents geographically or by distance from a central point.
- to integrate distance into a document’s relevance score.
- to sort documents by distance.
Geo-points expressed as an array or string ¶
Please note that string geo-points are ordered as lat,lon, while array geo-points are ordered as the reverse: lon,lat.
Originally, lat,lon was used for both array and string, but the array format was changed early on to conform to the format used by GeoJSON.
A point can be expressed as a geohash. Geohashes are base32 encoded strings of the bits of the latitude and longitude interleaved. Each character in a geohash adds additional 5 bits to the precision. So the longer the hash, the more precise it is. For the indexing purposed geohashs are translated into latitude-longitude pairs. During this process only first 12 characters are used, so specifying more than 12 characters in a geohash doesn’t increase the precision. The 12 characters provide 60 bits, which should reduce a possible error to less than 2cm.
https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html
func NewPointField ¶
func NewPointField(params PointFieldParams) (*PointField, error)
func (*PointField) Field ¶
func (gp *PointField) Field() (Field, error)
func (PointField) IgnoreMalformed ¶
func (im PointField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (PointField) IgnoreZValue ¶
func (z PointField) IgnoreZValue() bool
IgnoreZValue determines whether three dimension points will be indexed.
If true (default) three dimension points will be accepted (stored in source) but only latitude and longitude values will be indexed; the third dimension is ignored. If false, geo-points containing any more than latitude and longitude (two dimensions) values throw an exception and reject the whole document.
func (PointField) MarshalJSON ¶
func (gp PointField) MarshalJSON() ([]byte, error)
func (PointField) NullValue ¶
func (nv PointField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*PointField) SetIgnoreMalformed ¶
func (im *PointField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*PointField) SetIgnoreZValue ¶
func (z *PointField) SetIgnoreZValue(v interface{}) error
SetIgnoreZValue sets the IgnoreZValue Value to v
func (*PointField) SetNullValue ¶
func (nv *PointField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (PointField) Type ¶
func (PointField) Type() FieldType
func (*PointField) UnmarshalJSON ¶
func (gp *PointField) UnmarshalJSON(data []byte) error
type PointFieldParams ¶
type PointFieldParams struct { // If true, malformed points are ignored. If false (default), malformed // points throw an exception and reject the whole document. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // If true (default) three dimension points will be accepted (stored in // source) but only x and y values will be indexed; the third dimension is // ignored. If false, points containing any more than x and y (two // dimensions) values throw an exception and reject the whole document. IgnoreZValue interface{} `json:"ignore_z_value,omitempty"` // Accepts an point value which is substituted for any explicit null values. // Defaults to null, which means the field is treated as missing. NullValue interface{} `json:"null_value,omitempty"` }
func (PointFieldParams) Field ¶
func (p PointFieldParams) Field() (Field, error)
func (PointFieldParams) Point ¶
func (p PointFieldParams) Point() (*PointField, error)
func (PointFieldParams) Type ¶
func (PointFieldParams) Type() FieldType
type PointInTime ¶
type PointInTime struct { ID string `bson:"id" json:"id"` KeepAlive *time.Time `bson:"keep_alive,omitempty" json:"keep_alive,omitempty"` }
PointInTime is a lightweight view into the state of the data as it existed when initiated.
! X-Pack
A search request by default executes against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between search_after requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time.
Prerequisites ¶
- If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or index alias.
- To search a point in time (PIT) for an index alias, you must have the read index privilege for the alias’s concrete indices.
https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html
func (*PointInTime) Clone ¶
func (pit *PointInTime) Clone() *PointInTime
func (PointInTime) MarshalEasyJSON ¶
func (v PointInTime) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PointInTime) MarshalJSON ¶
func (v PointInTime) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PointInTime) UnmarshalEasyJSON ¶
func (v *PointInTime) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PointInTime) UnmarshalJSON ¶
func (v *PointInTime) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PrefixQuery ¶
type PrefixQuery struct {
// contains filtered or unexported fields
}
PrefixQuery returns documents that contain a specific prefix in a provided field.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
func (PrefixQuery) CaseInsensitive ¶
func (ci PrefixQuery) CaseInsensitive() bool
func (*PrefixQuery) Clause ¶
func (p *PrefixQuery) Clause() (QueryClause, error)
func (*PrefixQuery) Clear ¶
func (p *PrefixQuery) Clear()
func (*PrefixQuery) IsEmpty ¶
func (p *PrefixQuery) IsEmpty() bool
func (PrefixQuery) Kind ¶
func (p PrefixQuery) Kind() QueryKind
func (PrefixQuery) MarshalBSON ¶
func (p PrefixQuery) MarshalBSON() ([]byte, error)
func (PrefixQuery) MarshalJSON ¶
func (p PrefixQuery) MarshalJSON() ([]byte, error)
func (*PrefixQuery) Set ¶
func (p *PrefixQuery) Set(field string, prefixer Prefixer) error
Set sets the value of PrefixQuery.
Valid values:
- picker.Prefix
- picker.String
- nil (clears PrefixQuery)
func (*PrefixQuery) SetCaseInsensitive ¶
func (ci *PrefixQuery) SetCaseInsensitive(v bool)
func (*PrefixQuery) SetRewrite ¶
func (*PrefixQuery) UnmarshalBSON ¶
func (p *PrefixQuery) UnmarshalBSON(data []byte) error
func (*PrefixQuery) UnmarshalJSON ¶
func (p *PrefixQuery) UnmarshalJSON(data []byte) error
func (PrefixQuery) Value ¶
func (p PrefixQuery) Value() string
type PrefixQueryParams ¶
type PrefixQueryParams struct { // Field which the query is being performed. This is not needed if setting explicitly // but is required if the query is being added to a compound query. Field string // Beginning characters of terms you wish to find in the provided <field>. (Required) Value string // Method used to rewrite the query. For valid values and more information, // see the rewrite parameter. (Optional) Rewrite Rewrite // Allows ASCII case insensitive matching of the value with the indexed // field values when set to true. Default is false which means the case // sensitivity of matching depends on the underlying field’s mapping. (Optional) CaseInsensitive bool // Name of the query (Optional) Name string // contains filtered or unexported fields }
PrefixQueryParams returns documents that contain a specific prefix in a provided field.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
func (PrefixQueryParams) Clause ¶
func (p PrefixQueryParams) Clause() (QueryClause, error)
func (PrefixQueryParams) Kind ¶
func (p PrefixQueryParams) Kind() QueryKind
func (PrefixQueryParams) Prefix ¶
func (p PrefixQueryParams) Prefix() (*PrefixQuery, error)
type PrefixRule ¶
type PrefixRule struct {
// contains filtered or unexported fields
}
func (PrefixRule) Analyzer ¶
func (ap PrefixRule) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (PrefixRule) Filter ¶
func (r PrefixRule) Filter() *RuleFilter
func (PrefixRule) MarshalBSON ¶
func (p PrefixRule) MarshalBSON() ([]byte, error)
func (PrefixRule) MarshalJSON ¶
func (p PrefixRule) MarshalJSON() ([]byte, error)
func (PrefixRule) Prefix ¶
func (p PrefixRule) Prefix() string
func (*PrefixRule) Rule ¶
func (p *PrefixRule) Rule() (QueryRule, error)
func (*PrefixRule) SetAnalyzer ¶
func (ap *PrefixRule) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*PrefixRule) SetFilter ¶
func (r *PrefixRule) SetFilter(filter RuleFilterer) error
func (*PrefixRule) SetPrefix ¶
func (p *PrefixRule) SetPrefix(prefix string) error
func (*PrefixRule) SetUseField ¶
func (uf *PrefixRule) SetUseField(field string)
func (PrefixRule) Type ¶
func (PrefixRule) Type() RuleType
func (*PrefixRule) UnmarshalBSON ¶
func (p *PrefixRule) UnmarshalBSON(data []byte) error
func (*PrefixRule) UnmarshalJSON ¶
func (p *PrefixRule) UnmarshalJSON(data []byte) error
type PrefixRuleParams ¶
type PrefixRuleParams struct { // (Required) Beginning characters of terms you wish to find in the // top-level <field>. Prefix string `json:"prefix"` // (Optional, string) analyzer used to analyze terms in the query. Defaults // to the top-level <field>'s analyzer. Analyzer string `json:"analyzer,omitempty"` // (Optional) An optional interval filter. Filter RuleFilterer `json:"filter,omitempty"` // (Optional) If specified, then match intervals from this field // rather than the top-level <field>. // // The prefix is normalized using the search analyzer from this field, // unless a separate analyzer is specified. UseField string `json:"use_field,omitempty"` }
func (PrefixRuleParams) PrefixRule ¶
func (p PrefixRuleParams) PrefixRule() (*PrefixRule, error)
func (PrefixRuleParams) Rule ¶
func (p PrefixRuleParams) Rule() (Rule, error)
func (PrefixRuleParams) Type ¶
func (PrefixRuleParams) Type() RuleType
type Prefixer ¶
type Prefixer interface {
Prefix() (*PrefixQuery, error)
}
type Processor ¶
type Processor interface {
Kind() ProcessorKind
}
Processor is a standin until I can get around to writing out all the various processors
type ProcessorKind ¶
type ProcessorKind string
const ( ProcessorKindAppend ProcessorKind = "append" ProcessorKindBytes ProcessorKind = "bytes" ProcessorKindCircle ProcessorKind = "cirlce" ProcessorKindCommunityID ProcessorKind = "community_id" ProcessorKindConvert ProcessorKind = "convert" ProcessorKindCSV ProcessorKind = "csv" ProcessorKindDate ProcessorKind = "date" ProcessorKindDateIndexName ProcessorKind = "date_index_name" ProcessorKindDissect ProcessorKind = "dissect" ProcessorKindDotExpander ProcessorKind = "dot_expander" ProcessorKindDrop ProcessorKind = "drop" ProcessorKindEnrich ProcessorKind = "enrich" ProcessorKindFail ProcessorKind = "fail" ProcessorKindFingerprint ProcessorKind = "fingerprint" ProcessorKindForeach ProcessorKind = "foreach" ProcessorKindGeoIP ProcessorKind = "geoip" ProcessorKindGrok ProcessorKind = "grok" ProcessorKindGsub ProcessorKind = "gsub" ProcessorKindHTMLStrip ProcessorKind = "html_strip" ProcessorKindInference ProcessorKind = "inference" ProcessorKindJoin ProcessorKind = "join" ProcessorKindJSON ProcessorKind = "json" ProcessorKindKV ProcessorKind = "kv" ProcessorKindLowercase ProcessorKind = "lowercase" ProcessorKindNetworkDirection ProcessorKind = "network_direction" ProcessorKindPipeline ProcessorKind = "pipeline" ProcessorKindRemove ProcessorKind = "remove" ProcessorKindRename ProcessorKind = "rename" ProcessorKindScript ProcessorKind = "script" ProcessorKindSet ProcessorKind = "set" ProcessorKindSetSecurityUser ProcessorKind = "set_security_user" ProcessorKindSort ProcessorKind = "sort" ProcessorKindSplit ProcessorKind = "split" ProcessorKindTrim ProcessorKind = "trim" ProcessorKindUppercase ProcessorKind = "uppercase" ProcessorKindURLDecode ProcessorKind = "urldecode" ProcessorKindURIParts ProcessorKind = "uri_parts" ProcessorKindUserAgent ProcessorKind = "user_agent" )
type Processorer ¶
type Processors ¶
type Processors []Processor
func (Processors) UnmarshalJSON ¶
func (ps Processors) UnmarshalJSON([]byte) error
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query defines the search definition using the ElasticSearch Query DSL
Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST (Abstract Syntax Tree) of queries, consisting of two types of clauses:
Leaf query clauses ¶
Leaf query clauses look for a particular value in a particular field, such as the match, term or range queries. These queries can be used by themselves.
Compound query clauses ¶
Compound query clauses wrap other leaf or compound queries and are used to combine multiple queries in a logical fashion (such as the bool or dis_max query), or to alter their behaviour (such as the constant_score query).
Query clauses behave differently depending on whether they are used in query context or filter context.
func (*Query) Boosting ¶
func (q *Query) Boosting() *BoostingQuery
func (*Query) ConstantScore ¶
func (q *Query) ConstantScore() *ConstantScoreQuery
func (*Query) DisjunctionMax ¶
func (q *Query) DisjunctionMax() *DisjunctionMaxQuery
func (*Query) DistanceFeature ¶
func (q *Query) DistanceFeature() *DistanceFeatureQuery
func (*Query) Exists ¶
func (q *Query) Exists() *ExistsQuery
func (*Query) FunctionScore ¶
func (q *Query) FunctionScore() *FunctionScoreQuery
func (*Query) Fuzzy ¶
func (q *Query) Fuzzy() *FuzzyQuery
func (*Query) GeoBoundingBox ¶
func (q *Query) GeoBoundingBox() *GeoBoundingBoxQuery
func (*Query) GeoDistance ¶
func (q *Query) GeoDistance() *GeoDistanceQuery
func (*Query) GeoShape ¶
func (q *Query) GeoShape() *GeoShapeQuery
func (*Query) HasChild ¶
func (q *Query) HasChild() *HasChildQuery
func (*Query) HasParent ¶
func (q *Query) HasParent() *HasParentQuery
func (*Query) Intervals ¶
func (q *Query) Intervals() *IntervalsQuery
func (Query) MarshalBSON ¶
func (Query) MarshalJSON ¶
func (*Query) Match ¶
func (q *Query) Match() *MatchQuery
func (*Query) MatchAll ¶
func (q *Query) MatchAll() *MatchAllQuery
func (*Query) MatchBoolPrefix ¶
func (q *Query) MatchBoolPrefix() *MatchBoolPrefixQuery
func (*Query) MatchNone ¶
func (q *Query) MatchNone() *MatchNoneQuery
func (*Query) MatchPhrase ¶
func (q *Query) MatchPhrase() *MatchPhraseQuery
func (*Query) MatchPhrasePrefix ¶
func (q *Query) MatchPhrasePrefix() *MatchPhrasePrefixQuery
func (*Query) MoreLikeThis ¶
func (q *Query) MoreLikeThis() *MoreLikeThisQuery
func (*Query) MultiMatch ¶
func (q *Query) MultiMatch() *MultiMatchQuery
func (*Query) Nested ¶
func (q *Query) Nested() *NestedQuery
func (*Query) ParentID ¶
func (q *Query) ParentID() *ParentIDQuery
func (*Query) Percolate ¶
func (q *Query) Percolate() *PercolateQuery
func (*Query) Prefix ¶
func (q *Query) Prefix() *PrefixQuery
func (*Query) QueryString ¶
func (q *Query) QueryString() *QueryStringQuery
func (*Query) Range ¶
func (q *Query) Range() *RangeQuery
func (*Query) RankFeature ¶
func (q *Query) RankFeature() *RankFeatureQuery
func (*Query) Script ¶
func (q *Query) Script() *ScriptQuery
func (*Query) ScriptScore ¶
func (q *Query) ScriptScore() *ScriptScoreQuery
func (*Query) Shape ¶
func (q *Query) Shape() *ShapeQuery
func (*Query) SimpleQueryString ¶
func (q *Query) SimpleQueryString() *SimpleQueryStringQuery
func (*Query) Terms ¶
func (q *Query) Terms() *TermsQuery
func (*Query) TermsSet ¶
func (q *Query) TermsSet() *TermsSetQuery
func (*Query) UnmarshalBSON ¶
func (*Query) UnmarshalJSON ¶
func (*Query) Wildcard ¶
func (q *Query) Wildcard() *WildcardQuery
type QueryClause ¶
type QueryClause interface { Name() string Clear() IsEmpty() bool CompleteClauser json.Marshaler json.Unmarshaler }
type QueryClauses ¶
type QueryClauses struct {
// contains filtered or unexported fields
}
func (*QueryClauses) Add ¶
func (qc *QueryClauses) Add(clause CompleteClauser, clauses ...CompleteClauser) error
func (*QueryClauses) AddMany ¶
func (qc *QueryClauses) AddMany(clauses Clauses) error
func (*QueryClauses) Clauses ¶
func (qc *QueryClauses) Clauses() []QueryClause
func (QueryClauses) ForEach ¶
func (qc QueryClauses) ForEach(fn func(query QueryClause) error) error
ForEach calls fn for each QueryClause in the QueryClauses set or until an error is returned. If the error is dynamic.Done or an error which returns "done" from Error(), iteration is haulted and nil is returned.
func (QueryClauses) IsEmpty ¶
func (qc QueryClauses) IsEmpty() bool
func (QueryClauses) Len ¶
func (qc QueryClauses) Len() int
func (QueryClauses) MarshalJSON ¶
func (qc QueryClauses) MarshalJSON() ([]byte, error)
func (*QueryClauses) RemoveAllForField ¶
func (qc *QueryClauses) RemoveAllForField(field string) []QueryClause
func (*QueryClauses) RemoveAllOfKind ¶
func (qc *QueryClauses) RemoveAllOfKind(kind QueryKind) []QueryClause
func (*QueryClauses) RemoveAllWithName ¶
func (qc *QueryClauses) RemoveAllWithName(name string) []QueryClause
func (*QueryClauses) Set ¶
func (qc *QueryClauses) Set(clauses Clauses) error
func (*QueryClauses) UnmarshalJSON ¶
func (qc *QueryClauses) UnmarshalJSON(data []byte) error
type QueryError ¶
func (QueryError) Error ¶
func (s QueryError) Error() string
func (QueryError) Unwrap ¶
func (s QueryError) Unwrap() error
type QueryKind ¶
type QueryKind string
const ( QueryKindPrefix QueryKind = "prefix" QueryKindMatch QueryKind = "match" QueryKindMatchAll QueryKind = "match_all" QueryKindMatchNone QueryKind = "match_none" QueryKindTerm QueryKind = "term" QueryKindExists QueryKind = "exists" QueryKindTerms QueryKind = "terms" QueryKindRange QueryKind = "range" QueryKindBoosting QueryKind = "boosting" QueryKindBoolean QueryKind = "bool" QueryKindConstantScore QueryKind = "constant_score" QueryKindFunctionScore QueryKind = "function_score" QueryKindDisjunctionMax QueryKind = "dis_max" QueryKindAllOf QueryKind = "all_of" QueryKindFuzzy QueryKind = "fuzzy" QueryKindScriptScore QueryKind = "script_score" QueryKindScript QueryKind = "script" QueryKindIDs QueryKind = "ids" QueryKindIntervals QueryKind = "intervals" QueryKindMatchBoolPrefix QueryKind = "match_bool_prefix" QueryKindMatchPhrase QueryKind = "match_phrase" QueryKindMatchPhrasePrefix QueryKind = "match_phrase_prefix" QueryKindMultiMatch QueryKind = "multi_match" QueryKindQueryString QueryKind = "query_string" QueryKindSimpleQueryString QueryKind = "simple_query_string" QueryKindGeoBoundingBox QueryKind = "geo_bounding_box" QueryKindGeoDistance QueryKind = "geo_distance" QueryKindGeoPolygon QueryKind = "geo_polygon" QueryKindGeoShape QueryKind = "geo_shape" QueryKindShape QueryKind = "shape" QueryKindNested QueryKind = "nested" QueryKindHasChild QueryKind = "has_child" QueryKindHasParent QueryKind = "has_parent" QueryKindParentID QueryKind = "parent_id" QueryKindDistanceFeature QueryKind = "distance_feature" QueryKindMoreLikeThis QueryKind = "more_like_this" QueryKindPercolate QueryKind = "percolate" QueryKindRankFeature QueryKind = "rank_feature" QueryKindWrapper QueryKind = "wrapper" QueryKindPinned QueryKind = "pinned" QueryKindSpanContaining QueryKind = "span_containing" QueryKindFieldMaskingSpan QueryKind = "field_masking_span" QueryKindSpanFirst QueryKind = "span_first" QueryKindSpanMulti QueryKind = "span_multi" QueryKindSpanNear QueryKind = "span_near" QueryKindSpanNot QueryKind = "span_not" QueryKindSpanOr QueryKind = "span_or" QueryKindSpanTerm QueryKind = "span_term" QueryKindSpanWithin QueryKind = "span_within" QueryKindCommon QueryKind = "common" QueryKindRegexp QueryKind = "regexp" QueryKindTermsSet QueryKind = "terms_set" QueryKindType QueryKind = "type" QueryKindWildcard QueryKind = "wildcard" )
type QueryParams ¶
type QueryParams struct { // Term returns documents that contain an exact term in a provided field. // // You can use the term query to find documents based on a precise value // such as a price, a product ID, or a username. // // Avoid using the term query for text fields. // // By default, Elasticsearch changes the values of text fields as part of // analysis. This can make finding exact matches for text field values // difficult. // // To search text field values, use the match query instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html Term CompleteTermer // Terms returns documents that contain one or more exact terms in a provided // field. // // The terms query is the same as the term query, except you can search for // multiple values. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-terms-query.html Terms CompleteTermser // Match returns documents that match a provided text, number, date or // boolean value. The provided text is analyzed before matching. // // The match query is the standard query for performing a full-text search, // including options for fuzzy matching. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html Match CompleteMatcher // Bool is a query that matches documents matching boolean combinations // of other queries. The bool query maps to Lucene BooleanQuery. It is built // using one or more boolean clauses, each clause with a typed occurrence. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html Bool Booler // Fuzzy returns documents that contain terms similar to the search term, as // measured by a Levenshtein edit distance. // // An edit distance is the number of one-character changes needed to turn // one term into another. These changes can include: // // - Changing a character (box → fox) // // - Removing a character (black → lack) // // - Inserting a character (sic → sick) // // - Transposing two adjacent characters (act → cat) // // To find similar terms, the fuzzy query creates a set of all possible // variations, or expansions, of the search term within a specified edit // distance. The query then returns exact matches for each expansion. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html Fuzzy CompleteFuzzier // Prefix returns documents that contain a specific prefix in a provided // field. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html Prefix CompletePrefixer // FunctionScore allows you to modify the score of documents that are // retrieved by a query. This can be useful if, for example, a score // function is computationally expensive and it is sufficient to compute the // score on a filtered set of documents. // // To use function_score, the user has to define a query and one or more // functions, that compute a new score for each document returned by the // query. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-function-score-query.html FunctionScore FunctionScorer // ScoreScript uses a script to provide a custom score for returned // documents. // // The script_score query is useful if, for example, a scoring function is // expensive and you only need to calculate the score of a filtered set of // documents. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-score-query.html ScriptScore ScriptScorer // Filters documents based on a provided script. The script query is // typically used in a filter context. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-query.html Script Scripter // Range returns documents that contain terms within a provided range. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range Ranger // MatchAll matches all documents, giving them all a _score of 1.0. MatchAll *MatchAllQueryParams // MatchNone is the inverse of the match_all query, which matches no documents. MatchNone *MatchNoneQueryParams // Exists returns documents that contain an indexed value for a field. // // An indexed value may not exist for a document’s field due to a variety of // reasons: // // - The field in the source JSON is null or [] // // - The field has "index" : false set in the mapping // // - The length of the field value exceeded an ignore_above setting in the // mapping // // - The field value was malformed and ignore_malformed was defined in the // mapping // // https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html Exists Exister // Returns documents matching a positive query while reducing the relevance // score of documents that also match a negative query. // // You can use the boosting query to demote certain documents without // excluding them from the search results. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-boosting-query.html Boosting Boostinger // A query which wraps another query, but executes it in filter context. All // matching documents are given the same “constant” _score. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-constant-score-query.html ConstantScore ConstantScorer // Returns documents matching one or more wrapped queries, called query // clauses or clauses. // // If a returned document matches multiple query clauses, the dis_max query // assigns the document the highest relevance score from any matching // clause, plus a tie breaking increment for any additional matching // subqueries. // // You can use the dis_max to search for a term in fields mapped with // different boost factors. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-dis-max-query.html DisjunctionMax DisjunctionMaxer // Returns documents based on their IDs. This query uses document IDs stored // in the _id field. IDs IDser // Returns documents based on the order and proximity of matching terms. // // The intervals query uses matching rules, constructed from a small set of // definitions. These rules are then applied to terms from a specified // field. // // The definitions produce sequences of minimal intervals that span terms in // a body of text. These intervals can be further combined and filtered by // parent sources. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-intervals-query.html#intervals-all_of Intervals Intervalser // A match_bool_prefix query analyzes its input and constructs a bool query // from the terms. Each term except the last is used in a term query. The // last term is used in a prefix. MatchBoolPrefix MatchBoolPrefixer // The match_phrase query analyzes the text and creates a phrase query out // of the analyzed text. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-match-query-phrase.html MatchPhrase MatchPhraser // The multi-field version of the match query. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-multi-match-query.html#multi-match-types MultiMatch MultiMatcher // Returns documents based on a provided query string, using a parser with a strict syntax. // // This query uses a syntax to parse and split the provided query string based // on operators, such as AND or NOT. The query then analyzes each split text // independently before returning matching documents. // // You can use the query_string query to create a complex search that includes // wildcard characters, searches across multiple fields, and more. While // versatile, the query is strict and returns an error if the query string // includes any invalid syntax. QueryString QueryStringer // Returns documents based on a provided query string, using a parser with a // limited but fault-tolerant syntax. // // This query uses a simple syntax to parse and split the provided query // string into terms based on special operators. The query then analyzes // each term independently before returning matching documents. // // While its syntax is more limited than the query_string query, the // simple_query_string query does not return errors for invalid syntax. // Instead, it ignores any invalid parts of the query string. SimpleQueryString SimpleQueryStringer MatchPhrasePrefix MatchPhrasePrefixer GeoBoundingBox GeoBoundingBoxer GeoDistance GeoDistancer GeoShape GeoShaper Shape ShapeQuerier Nested NestedQuerier HasChild HasChilder HasParent HasParenter ParentID ParentIDer DistanceFeature DistanceFeaturer MoreLikeThis MoreLikeThiser Percolate Percolater TermsSet TermsSetter Wildcard Wildcarder RankFeature RankFeaturer }
func (*QueryParams) Query ¶
func (q *QueryParams) Query() (*Query, error)
type QueryRule ¶
func UnmarshalRule ¶
type QueryStringQuery ¶
type QueryStringQuery struct {
// contains filtered or unexported fields
}
func (QueryStringQuery) AllowLeadingWildcard ¶
func (cp QueryStringQuery) AllowLeadingWildcard() bool
func (QueryStringQuery) AnalyzeWildcard ¶
func (cp QueryStringQuery) AnalyzeWildcard() bool
If true, the query attempts to analyze wildcard terms in the query string. Defaults to false.
func (QueryStringQuery) Analyzer ¶
func (ap QueryStringQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (QueryStringQuery) AutoGenerateSynonymsPhraseQuery ¶
func (a QueryStringQuery) AutoGenerateSynonymsPhraseQuery() bool
AutoGenerateSynonymsPhraseQuery determines if match phrase queries are automatically created for multi-term synonyms. Defaults to true.
func (QueryStringQuery) Boost ¶
func (b QueryStringQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*QueryStringQuery) Clause ¶
func (qs *QueryStringQuery) Clause() (QueryClause, error)
func (*QueryStringQuery) Clear ¶
func (qs *QueryStringQuery) Clear()
func (QueryStringQuery) DefaultField ¶
func (qs QueryStringQuery) DefaultField() string
func (QueryStringQuery) DefaultFuzzyRewrite ¶
func (f QueryStringQuery) DefaultFuzzyRewrite() Rewrite
func (QueryStringQuery) DefaultOperator ¶
func (o QueryStringQuery) DefaultOperator() Operator
func (QueryStringQuery) EnablePositionIncrements ¶
func (epi QueryStringQuery) EnablePositionIncrements() bool
EnablePositionIncrements deteremines if all fields in the nested object are also added to the root document as standard (flat) fields. Defaults to false
func (QueryStringQuery) Fields ¶
func (qs QueryStringQuery) Fields() []string
func (QueryStringQuery) Fuzziness ¶
func (f QueryStringQuery) Fuzziness() string
Fuzziness is the maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
func (QueryStringQuery) FuzzyMaxExpansions ¶
func (me QueryStringQuery) FuzzyMaxExpansions() int
FuzzyMaxExpansions is the maximum number of variations created. Defaults to 50.
func (QueryStringQuery) FuzzyRewrite ¶
func (f QueryStringQuery) FuzzyRewrite() Rewrite
FuzzyRewrite is the method used to rewrite the query. See the rewrite parameter for valid values and more information.
If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of top_terms_blended_freqs_${max_expansions} by default.
func (QueryStringQuery) FuzzyTranspositions ¶
func (ft QueryStringQuery) FuzzyTranspositions() bool
FuzzyTranspositions edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
func (*QueryStringQuery) IsEmpty ¶
func (qs *QueryStringQuery) IsEmpty() bool
func (QueryStringQuery) Kind ¶
func (QueryStringQuery) Kind() QueryKind
func (QueryStringQuery) Lenient ¶
func (l QueryStringQuery) Lenient() bool
Lenient determines whether format-based errors, such as providing a text query value for a numeric field, are ignored. Defaults to false.
func (QueryStringQuery) MarshalJSON ¶
func (qs QueryStringQuery) MarshalJSON() ([]byte, error)
func (QueryStringQuery) MaxDeterminizedStates ¶
func (mds QueryStringQuery) MaxDeterminizedStates() int
func (QueryStringQuery) MinimumShouldMatch ¶
func (msm QueryStringQuery) MinimumShouldMatch() string
func (QueryStringQuery) PhraseSlop ¶
func (mds QueryStringQuery) PhraseSlop() int
func (QueryStringQuery) Query ¶
func (qs QueryStringQuery) Query() string
func (*QueryStringQuery) QueryString ¶
func (qs *QueryStringQuery) QueryString() (*QueryStringQuery, error)
func (QueryStringQuery) QuoteAnalyzer ¶
func (sq QueryStringQuery) QuoteAnalyzer() string
QuoteAnalyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
func (QueryStringQuery) QuoteFieldSuffix ¶
func (qf QueryStringQuery) QuoteFieldSuffix() string
func (*QueryStringQuery) SetAllowLeadingWildcard ¶
func (cp *QueryStringQuery) SetAllowLeadingWildcard(v interface{}) error
func (*QueryStringQuery) SetAnalyzeWildcard ¶
func (cp *QueryStringQuery) SetAnalyzeWildcard(v interface{}) error
SetAnalyzeWildcard sets analyze_wildcard to v
func (*QueryStringQuery) SetAnalyzer ¶
func (ap *QueryStringQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*QueryStringQuery) SetAutoGenerateSynonymsPhraseQuery ¶
func (a *QueryStringQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
SetAutoGenerateSynonymsPhraseQuery sets AutoGenerateSynonymsPhraseQueryValue to v
func (*QueryStringQuery) SetBoost ¶
func (b *QueryStringQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*QueryStringQuery) SetDefaultField ¶
func (qs *QueryStringQuery) SetDefaultField(field string)
func (*QueryStringQuery) SetDefaultOperator ¶
func (*QueryStringQuery) SetEnablePositionIncrements ¶
func (epi *QueryStringQuery) SetEnablePositionIncrements(v interface{}) error
SetEnablePositionIncrements sets the EnablePositionIncrements Value to v
func (*QueryStringQuery) SetFields ¶
func (qs *QueryStringQuery) SetFields(fields []string)
func (*QueryStringQuery) SetFuzziness ¶
func (f *QueryStringQuery) SetFuzziness(v string)
SetFuzziness sets the fuzzinessValue to v
func (*QueryStringQuery) SetFuzzyMaxExpansions ¶
func (me *QueryStringQuery) SetFuzzyMaxExpansions(v interface{}) error
func (*QueryStringQuery) SetFuzzyRewrite ¶
SetFuzzyRewrite sets the value of FuzzyRewrite to v
func (*QueryStringQuery) SetFuzzyTranspositions ¶
func (ft *QueryStringQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
SetFuzzyTranspositions sets FuzzyTranspositions to v
func (*QueryStringQuery) SetLenient ¶
func (l *QueryStringQuery) SetLenient(v bool)
SetLenient sets Lenient to v
func (*QueryStringQuery) SetMaxDeterminizedStates ¶
func (mds *QueryStringQuery) SetMaxDeterminizedStates(v interface{}) error
func (*QueryStringQuery) SetMinimumShouldMatch ¶
func (msm *QueryStringQuery) SetMinimumShouldMatch(v string)
func (*QueryStringQuery) SetPhraseSlop ¶
func (mds *QueryStringQuery) SetPhraseSlop(v interface{}) error
func (*QueryStringQuery) SetQuery ¶
func (qs *QueryStringQuery) SetQuery(q string) error
func (QueryStringQuery) SetQuoteAnalyzer ¶
func (sq QueryStringQuery) SetQuoteAnalyzer(v string)
SetQuoteAnalyzer sets search_quote_analyzer to v
func (*QueryStringQuery) SetQuoteFieldSuffix ¶
func (qf *QueryStringQuery) SetQuoteFieldSuffix(quoteFieldSuffix string)
func (*QueryStringQuery) SetRewrite ¶
func (*QueryStringQuery) SetTieBreaker ¶
func (tb *QueryStringQuery) SetTieBreaker(tieBreaker interface{}) error
func (*QueryStringQuery) SetTimeZone ¶
func (tz *QueryStringQuery) SetTimeZone(v string)
func (*QueryStringQuery) UnmarshalJSON ¶
func (qs *QueryStringQuery) UnmarshalJSON(data []byte) error
type QueryStringQueryParams ¶
type QueryStringQueryParams struct { // (Required, string) Query string you wish to parse and use for search. See // Query string syntax. Query string `json:"query"` // (Optional, string) Default field you wish to search if no field is // provided in the query string. // // Defaults to the index.query.default_field index setting, which has a // default value of *. The * value extracts all fields that are eligible for // term queries and filters the metadata fields. All extracted fields are // then combined to build a query if no prefix is specified. // // Searching across all eligible fields does not include nested documents. // Use a nested query to search those documents. // // For mappings with a large number of fields, searching across all eligible // fields could be expensive. // // There is a limit on the number of fields that can be queried at once. It // is defined by the indices.query.bool.max_clause_count search setting, // which defaults to 1024. DefaultField string `json:"default_field,omitempty"` // (Optional, Boolean) If true, the wildcard characters * and ? are allowed // as the first character of the query string. Defaults to true. AllowLeadingWildcard interface{} `json:"allow_leading_wildcard,omitempty"` // (Optional, Boolean) If true, the query attempts to analyze wildcard terms // in the query string. Defaults to false. AnalyzeWildcard interface{} `json:"analyze_wildcard,omitempty"` // (Optional, string) Analyzer used to convert text in the query string into // tokens. Defaults to the index-time analyzer mapped for the default_field. // If no analyzer is mapped, the index’s default analyzer is used. Analyzer string `json:"analyzer,omitempty"` // (Optional, Boolean) If true, match phrase queries are automatically // created for multi-term synonyms. Defaults to true. AutoGenerateSynonymsPhraseQuery interface{} `json:"auto_generate_synonyms_phrase_query,omitempty"` // (Optional, float) Floating point number used to decrease or increase the // relevance scores of the query. Defaults to 1.0. // // Boost values are relative to the default value of 1.0. A boost value // between 0 and 1.0 decreases the relevance score. A value greater than 1.0 // increases the relevance score. Boost interface{} `json:"boost,omitempty"` // (Optional, string) Default boolean logic used to interpret text in the // query string if no operators are specified. Valid values are: // // - OR (Default) // // - AND DefaultOperator Operator `json:"default_operator,omitempty"` // (Optional, Boolean) If true, enable position increments in queries // constructed from a query_string search. Defaults to true. EnablePositionIncrements interface{} `json:"enable_position_increments,omitempty"` // (Optional, array of strings) Array of fields you wish to search. // // You can use this parameter query to search across multiple fields. See // Search multiple fields. Fields []string `json:"fields,omitempty"` // (Optional, string) Maximum edit distance allowed for matching. See // Fuzziness for valid values and more information. Fuzziness string `json:"fuzziness,omitempty"` // (Optional, integer) Maximum number of terms to which the query expands // for fuzzy matching. Defaults to 50. FuzzyMaxExpansions interface{} `json:"fuzzy_max_expansions,omitempty"` // (Optional, Boolean) If true, edits for fuzzy matching include // transpositions of two adjacent characters (ab → ba). Defaults to true. FuzzyTranspositions interface{} `json:"fuzzy_transpositions,omitempty"` // (Optional, Boolean) If true, format-based errors, such as providing a // text value for a numeric field, are ignored. Defaults to false. Lenient bool `json:"lenient,omitempty"` // (Optional, integer) Maximum number of automaton states required for the // query. Default is 10000. // // Elasticsearch uses Apache Lucene internally to parse regular expressions. // Lucene converts each regular expression to a finite automaton containing // a number of determinized states. // // You can use this parameter to prevent that conversion from // unintentionally consuming too many resources. You may need to increase // this limit to run complex regular expressions. MaxDeterminizedStates interface{} `json:"max_determinized_states,omitempty"` // (Optional, string) Minimum number of clauses that must match for a // document to be returned. See the minimum_should_match parameter for valid // values and more information. See How minimum_should_match works for an // example. MinimumShouldMatch string `json:"minimum_should_match,omitempty"` // (Optional, string) Analyzer used to convert quoted text in the query // string into tokens. Defaults to the search_quote_analyzer mapped for the // default_field. // // For quoted text, this parameter overrides the analyzer specified in the // analyzer parameter. QuoteAnalyzer string `json:"quote_analyzer,omitempty"` // (Optional, integer) Maximum number of positions allowed between matching // tokens for phrases. Defaults to 0. If 0, exact phrase matches are // required. Transposed terms have a slop of 2. PhraseSlop interface{} `json:"phrase_slop,omitempty"` // (Optional, string) Suffix appended to quoted text in the query string. // // You can use this suffix to use a different analysis method for exact // matches. See Mixing exact search with stemming. QuoteFieldSuffix string `json:"quote_field_suffix,omitempty"` // (Optional, string) Method used to rewrite the query. For valid values and // more information, see the rewrite parameß Rewrite Rewrite `json:"rewrite,omitempty"` // (Optional, string) Coordinated Universal Time (UTC) offset or IANA time // zone used to convert date values in the query string to UTC. // // Valid values are ISO 8601 UTC offsets, such as +01:00 or -08:00, and IANA // time zone IDs, such as America/Los_Angeles. TimeZone string `json:"time_zone,omitempty"` TieBreaker interface{} `json:"tie_breaker,omitempty"` Name string `json:"_name,omitempty"` // contains filtered or unexported fields }
func (QueryStringQueryParams) Clause ¶
func (p QueryStringQueryParams) Clause() (QueryClause, error)
func (QueryStringQueryParams) Kind ¶
func (QueryStringQueryParams) Kind() QueryKind
func (QueryStringQueryParams) QueryString ¶
func (p QueryStringQueryParams) QueryString() (*QueryStringQuery, error)
type QueryStringer ¶
type QueryStringer interface {
QueryString() (*QueryStringQuery, error)
}
type RandomScoreFunc ¶
type RandomScoreFunc struct { Field string // float (Optional) Weight interface{} // In case you want scores to be reproducible, it is possible to provide a // seed and field. The final score will then be computed based on this seed, // the minimum value of field for the considered document and a salt that is // computed based on the index name and shard id so that documents that have // the same value but are stored in different indexes get different scores. // Note that documents that are within the same shard and have the same // value for field will however get the same score, so it is usually // desirable to use a field that has unique values for all documents. A good // default choice might be to use the _seq_no field, whose only drawback is // that scores will change if the document is updated since update // operations also update the value of the _seq_no field. // // It was possible to set a seed without setting a field, but this has been // deprecated as this requires loading fielddata on the _id field which // consumes a lot of memory. Seed interface{} Filter CompleteClauser }
RandomScoreFunc generates scores that are uniformly distributed from 0 up to but not including 1. By default, it uses the internal Lucene doc ids as a source of randomness, which is very efficient but unfortunately not reproducible since documents might be renumbered by merges.
In case you want scores to be reproducible, it is possible to provide a seed and field. The final score will then be computed based on this seed, the minimum value of field for the considered document and a salt that is computed based on the index name and shard id so that documents that have the same value but are stored in different indexes get different scores. Note that documents that are within the same shard and have the same value for field will however get the same score, so it is usually desirable to use a field that has unique values for all documents. A good default choice might be to use the _seq_no field, whose only drawback is that scores will change if the document is updated since update operations also update the value of the _seq_no field.
func (RandomScoreFunc) FuncKind ¶
func (RandomScoreFunc) FuncKind() FuncKind
func (RandomScoreFunc) Function ¶
func (rs RandomScoreFunc) Function() (Function, error)
func (RandomScoreFunc) RandomScoreFunction ¶
func (rs RandomScoreFunc) RandomScoreFunction() (*RandomScoreFunction, error)
type RandomScoreFunction ¶
type RandomScoreFunction struct {
// contains filtered or unexported fields
}
func (*RandomScoreFunction) Filter ¶
func (rs *RandomScoreFunction) Filter() QueryClause
func (*RandomScoreFunction) FuncKind ¶
func (rs *RandomScoreFunction) FuncKind() FuncKind
func (RandomScoreFunction) MarshalJSON ¶
func (rs RandomScoreFunction) MarshalJSON() ([]byte, error)
func (*RandomScoreFunction) SetField ¶
func (rs *RandomScoreFunction) SetField(field string)
func (*RandomScoreFunction) SetFilter ¶
func (rs *RandomScoreFunction) SetFilter(filter CompleteClauser) error
func (*RandomScoreFunction) SetSeed ¶
func (rs *RandomScoreFunction) SetSeed(seed interface{}) error
type RangeField ¶
type RangeField interface { Field WithCoerce WithIndex WithStore }
type RangeQuery ¶
type RangeQuery struct {
// contains filtered or unexported fields
}
func (RangeQuery) Boost ¶
func (b RangeQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*RangeQuery) Clause ¶
func (r *RangeQuery) Clause() (QueryClause, error)
func (*RangeQuery) Clear ¶
func (r *RangeQuery) Clear()
func (RangeQuery) Format ¶
func (f RangeQuery) Format() string
Format is the format(s) that the that can be parsed. Defaults to strict_date_optional_time||epoch_millis.
Multiple formats can be seperated by ||
func (RangeQuery) GreaterThan ¶
func (r RangeQuery) GreaterThan() dynamic.StringNumberOrTime
func (RangeQuery) GreaterThanOrEqualTo ¶
func (r RangeQuery) GreaterThanOrEqualTo() dynamic.StringNumberOrTime
func (*RangeQuery) IsEmpty ¶
func (r *RangeQuery) IsEmpty() bool
func (RangeQuery) Kind ¶
func (RangeQuery) Kind() QueryKind
func (RangeQuery) LessThan ¶
func (r RangeQuery) LessThan() dynamic.StringNumberOrTime
func (RangeQuery) LessThanOrEqualTo ¶
func (r RangeQuery) LessThanOrEqualTo() dynamic.StringNumberOrTime
func (RangeQuery) MarshalBSON ¶
func (r RangeQuery) MarshalBSON() ([]byte, error)
func (RangeQuery) MarshalJSON ¶
func (r RangeQuery) MarshalJSON() ([]byte, error)
func (RangeQuery) Relation ¶
func (r RangeQuery) Relation() Relation
Relation indicates how the range query matches values for range fields.
func (*RangeQuery) SetBoost ¶
func (b *RangeQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*RangeQuery) SetRelation ¶
SetRelation sets Relation to v
func (*RangeQuery) SetTimeZone ¶
func (tz *RangeQuery) SetTimeZone(v string)
func (*RangeQuery) UnmarshalBSON ¶
func (r *RangeQuery) UnmarshalBSON(data []byte) error
func (*RangeQuery) UnmarshalJSON ¶
func (r *RangeQuery) UnmarshalJSON(data []byte) error
type RangeQueryParams ¶
type RangeQueryParams struct { Field string GreaterThan interface{} GreaterThanOrEqualTo interface{} LessThan interface{} LessThanOrEqualTo interface{} Format string TimeZone string Boost interface{} Name string Relation Relation // contains filtered or unexported fields }
RangeQueryParams returns documents that contain terms within a provided range.
func (RangeQueryParams) Clause ¶
func (r RangeQueryParams) Clause() (QueryClause, error)
func (RangeQueryParams) Kind ¶
func (r RangeQueryParams) Kind() QueryKind
func (RangeQueryParams) Range ¶
func (r RangeQueryParams) Range() (*RangeQuery, error)
type Ranger ¶
type Ranger interface {
Range() (*RangeQuery, error)
}
type RankFeatureField ¶
type RankFeatureField struct {
// contains filtered or unexported fields
}
A RankFeatureField can index numbers so that they can later be used to boost documents in queries with a rank_feature query.
Rank features that correlate negatively with the score should set positive_score_impact to false (defaults to true). This will be used by the rank_feature query to modify the scoring formula in such a way that the score decreases with the value of the feature instead of increasing. For instance in web search, the url length is a commonly used feature which correlates negatively with scores.
https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-feature.html
func NewRankFeatureField ¶
func NewRankFeatureField(params RankFeatureFieldParams) (*RankFeatureField, error)
func (*RankFeatureField) Field ¶
func (f *RankFeatureField) Field() (Field, error)
func (RankFeatureField) MarshalBSON ¶
func (f RankFeatureField) MarshalBSON() ([]byte, error)
func (RankFeatureField) MarshalJSON ¶
func (f RankFeatureField) MarshalJSON() ([]byte, error)
func (RankFeatureField) PositiveScoreImpact ¶
func (psi RankFeatureField) PositiveScoreImpact() bool
PositiveScoreImpact is used by rank_feature queries to modify the scoring formula in such a way that the score increases or decreases the value of the feature
func (*RankFeatureField) SetPositiveScoreImpact ¶
func (psi *RankFeatureField) SetPositiveScoreImpact(v interface{}) error
SetPositiveScoreImpact sets the PositiveScoreImpact Value to v
func (RankFeatureField) Type ¶
func (RankFeatureField) Type() FieldType
func (*RankFeatureField) UnmarshalBSON ¶
func (f *RankFeatureField) UnmarshalBSON(data []byte) error
func (*RankFeatureField) UnmarshalJSON ¶
func (f *RankFeatureField) UnmarshalJSON(data []byte) error
type RankFeatureFieldParams ¶
type RankFeatureFieldParams struct { // PositiveScoreImpact is used by rank_feature queries to modify the scoring // formula in such a way that the score increases or decreases the value of // the feature // // (Bool, optional) PositiveScoreImpact interface{} `json:"positive_score_impact,omitempty"` }
func (RankFeatureFieldParams) Field ¶
func (p RankFeatureFieldParams) Field() (Field, error)
func (RankFeatureFieldParams) RankFeature ¶
func (p RankFeatureFieldParams) RankFeature() (*RankFeatureField, error)
func (RankFeatureFieldParams) Type ¶
func (RankFeatureFieldParams) Type() FieldType
type RankFeatureQuery ¶
type RankFeatureQuery struct {
// contains filtered or unexported fields
}
func (RankFeatureQuery) Boost ¶
func (b RankFeatureQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*RankFeatureQuery) Clause ¶
func (q *RankFeatureQuery) Clause() (QueryClause, error)
func (*RankFeatureQuery) Clear ¶
func (q *RankFeatureQuery) Clear()
func (RankFeatureQuery) Funcs ¶
func (q RankFeatureQuery) Funcs() []string
func (*RankFeatureQuery) IsEmpty ¶
func (q *RankFeatureQuery) IsEmpty() bool
func (RankFeatureQuery) Kind ¶
func (RankFeatureQuery) Kind() QueryKind
func (*RankFeatureQuery) Linear ¶
func (q *RankFeatureQuery) Linear() *LinearFunction
func (*RankFeatureQuery) Log ¶
func (q *RankFeatureQuery) Log() *LogFunction
func (RankFeatureQuery) MarshalBSON ¶
func (q RankFeatureQuery) MarshalBSON() ([]byte, error)
func (RankFeatureQuery) MarshalJSON ¶
func (q RankFeatureQuery) MarshalJSON() ([]byte, error)
func (*RankFeatureQuery) RankFeature ¶
func (q *RankFeatureQuery) RankFeature() (*RankFeatureQuery, error)
func (*RankFeatureQuery) Saturation ¶
func (q *RankFeatureQuery) Saturation() *SaturationFunction
func (*RankFeatureQuery) SetBoost ¶
func (b *RankFeatureQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*RankFeatureQuery) SetLinear ¶
func (q *RankFeatureQuery) SetLinear(sat LinearFunctioner) error
func (*RankFeatureQuery) SetLog ¶
func (q *RankFeatureQuery) SetLog(log LogFunctioner) error
func (*RankFeatureQuery) SetSaturation ¶
func (q *RankFeatureQuery) SetSaturation(sat SaturationFunctioner) error
func (*RankFeatureQuery) SetSigmoid ¶
func (q *RankFeatureQuery) SetSigmoid(sig SigmoidFunctioner) error
func (*RankFeatureQuery) Sigmoid ¶
func (q *RankFeatureQuery) Sigmoid() *SigmoidFunction
func (*RankFeatureQuery) UnmarshalBSON ¶
func (q *RankFeatureQuery) UnmarshalBSON(data []byte) error
func (*RankFeatureQuery) UnmarshalJSON ¶
func (q *RankFeatureQuery) UnmarshalJSON(data []byte) error
type RankFeatureQueryParams ¶
type RankFeatureQueryParams struct { // (Required) rank_feature or rank_features field used to boost // relevance scores. Field string // (Optional, float) Floating point number used to decrease or increase // relevance scores. Defaults to 1.0. // // Boost values are relative to the default value of 1.0. A boost value // between 0 and 1.0 decreases the relevance score. A value greater than 1.0 // increases the relevance score. Boost interface{} // (Optional) Saturation function used to boost relevance // scores based on the value of the rank feature field. If no function is // provided, the rank_feature query defaults to the saturation function. // // Only one function saturation, log, sigmoid or linear can be provided. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-rank-feature-query.html#rank-feature-query-logarithm Saturation SaturationFunctioner // (Optional) Logarithmic function used to boost relevance scores based on // the value of the rank feature field. // // Only one function saturation, log, sigmoid or linear can be provided. Log LogFunctioner // (Optional) Sigmoid function used to boost relevance scores based on the // value of the rank feature field. See Sigmoid for more information. // // Only one function saturation, log, sigmoid or linear can be provided. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-rank-feature-query.html#rank-feature-query-sigmoid Sigmoid SigmoidFunctioner // (Optional) Linear function used to boost relevance scores based on the // value of the rank feature field. See Linear for more information. // // Only one function saturation, log, sigmoid or linear can be provided. // // https://www.elastic.co/guide/en/elasticsearch/reference/7.12/query-dsl-rank-feature-query.html#rank-feature-query-linear Linear LinearFunctioner Name string // contains filtered or unexported fields }
func (RankFeatureQueryParams) Clause ¶
func (p RankFeatureQueryParams) Clause() (QueryClause, error)
func (RankFeatureQueryParams) Kind ¶
func (RankFeatureQueryParams) Kind() QueryKind
func (RankFeatureQueryParams) RankFeature ¶
func (p RankFeatureQueryParams) RankFeature() (*RankFeatureQuery, error)
type RankFeaturer ¶
type RankFeaturer interface {
RankFeature() (*RankFeatureQuery, error)
}
type RankFeaturesField ¶
type RankFeaturesField struct {
// contains filtered or unexported fields
}
A RankFeaturesField can index numeric feature vectors, so that they can later be used to boost documents in queries with a rank_feature query.
It is analogous to the RankFeature data type but is better suited when the list of features is sparse so that it wouldn’t be reasonable to add one field to the mappings for each of them.
https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-features.html
func NewRankFeaturesField ¶
func NewRankFeaturesField(params RankFeaturesFieldParams) (*RankFeaturesField, error)
func (*RankFeaturesField) Field ¶
func (f *RankFeaturesField) Field() (Field, error)
func (RankFeaturesField) MarshalBSON ¶
func (f RankFeaturesField) MarshalBSON() ([]byte, error)
func (RankFeaturesField) MarshalJSON ¶
func (f RankFeaturesField) MarshalJSON() ([]byte, error)
func (RankFeaturesField) PositiveScoreImpact ¶
func (psi RankFeaturesField) PositiveScoreImpact() bool
PositiveScoreImpact is used by rank_feature queries to modify the scoring formula in such a way that the score increases or decreases the value of the feature
func (*RankFeaturesField) SetPositiveScoreImpact ¶
func (psi *RankFeaturesField) SetPositiveScoreImpact(v interface{}) error
SetPositiveScoreImpact sets the PositiveScoreImpact Value to v
func (RankFeaturesField) Type ¶
func (RankFeaturesField) Type() FieldType
func (*RankFeaturesField) UnmarshalBSON ¶
func (f *RankFeaturesField) UnmarshalBSON(data []byte) error
func (*RankFeaturesField) UnmarshalJSON ¶
func (f *RankFeaturesField) UnmarshalJSON(data []byte) error
type RankFeaturesFieldParams ¶
type RankFeaturesFieldParams struct { // PositiveScoreImpact is used by rank_feature queries to modify the scoring // formula in such a way that the score increases or decreases the value of // the feature // // (Bool, optional) PositiveScoreImpact interface{} `json:"positive_score_impact,omitempty"` }
func (RankFeaturesFieldParams) Field ¶
func (p RankFeaturesFieldParams) Field() (Field, error)
func (RankFeaturesFieldParams) RankFeatures ¶
func (p RankFeaturesFieldParams) RankFeatures() (*RankFeaturesField, error)
func (RankFeaturesFieldParams) Type ¶
func (RankFeaturesFieldParams) Type() FieldType
type RegexpQuery ¶
type RegexpQuery struct {
// contains filtered or unexported fields
}
func (*RegexpQuery) Clause ¶
func (q *RegexpQuery) Clause() (QueryClause, error)
func (*RegexpQuery) Clear ¶
func (q *RegexpQuery) Clear()
func (*RegexpQuery) IsEmpty ¶
func (q *RegexpQuery) IsEmpty() bool
func (RegexpQuery) Kind ¶
func (RegexpQuery) Kind() QueryKind
func (RegexpQuery) MarshalBSON ¶
func (q RegexpQuery) MarshalBSON() ([]byte, error)
func (RegexpQuery) MarshalJSON ¶
func (q RegexpQuery) MarshalJSON() ([]byte, error)
func (*RegexpQuery) Regexp ¶
func (q *RegexpQuery) Regexp() (*RegexpQuery, error)
func (*RegexpQuery) UnmarshalBSON ¶
func (q *RegexpQuery) UnmarshalBSON(data []byte) error
func (*RegexpQuery) UnmarshalJSON ¶
func (q *RegexpQuery) UnmarshalJSON(data []byte) error
type RegexpQueryParams ¶
type RegexpQueryParams struct { Name string // contains filtered or unexported fields }
func (RegexpQueryParams) Clause ¶
func (p RegexpQueryParams) Clause() (QueryClause, error)
func (RegexpQueryParams) Kind ¶
func (RegexpQueryParams) Kind() QueryKind
func (RegexpQueryParams) Regexp ¶
func (p RegexpQueryParams) Regexp() (*RegexpQuery, error)
type Regexper ¶
type Regexper interface {
Regexp() (*RegexpQuery, error)
}
type Relation ¶
type Relation string
const ( RelationUnspecified Relation = "" //RelationIntersects matches documents with a range field value that //intersects the query’s range. RelationIntersects Relation = "INTERSECTS" // RelationContains matches documents with a range field value that entirely // contains the query’s range. RelationContains Relation = "CONTAINS" // RelationWithin matches documents with a range field value entirely within // the query’s range. RelationWithin Relation = "WITHIN" )
func (Relation) MarshalBSON ¶
func (Relation) MarshalJSON ¶
func (*Relation) UnmarshalBSON ¶
func (*Relation) UnmarshalJSON ¶
type Relations ¶
type Relations map[string]dynamic.StringOrArrayOfStrings
Relations are used on JoinFields
https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
you can treat this like a map[string][]string
r := picker.Relations{"myField": []string{"abc"}} r["myOtherField"] = []string{"other", "relation"}
type Rewrite ¶
type Rewrite string
Rewrite as defined by:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-term-rewrite.html
const ( // RewriteKindConstantScore uses the constant_score_boolean method for fewer matching // terms. Otherwise, this method finds all matching terms in sequence and // returns matching documents using a bit set. RewriteConstantScore Rewrite = "constant_score" // RewriteKindConstantScoreBoolean assigns each document a relevance score equal to the // boost parameter. // // This method changes the original query to a bool query. This bool query // contains a should clause and term query for each matching term. // // This method can cause the final bool query to exceed the clause limit in the // indices.query.bool.max_clause_count setting. If the query exceeds this limit, // Elasticsearch returns an error. RewriteConstantScoreBoolean Rewrite = "constant_score_boolean" // RewriteKindScoringBoolean calculates a relevance score for each matching document. // // This method changes the original query to a bool query. This bool query // contains a should clause and term query for each matching term. // // This method can cause the final bool query to exceed the clause limit in the // indices.query.bool.max_clause_count setting. If the query exceeds this limit, // Elasticsearch returns an error. RewriteScoringBoolean Rewrite = "scoring_boolean" // RewriteKindTopTermsBlendedFreqsN calculates a relevance score for each // matching document as if all terms had the same frequency. This frequency // is the maximum frequency of all matching terms. // // This method changes the original query to a bool query. This bool query // contains a should clause and term query for each matching term. // // The final bool query only includes term queries for the top N scoring // terms. // // You can use this method to avoid exceeding the clause limit in the // indices.query.bool.max_clause_count setting. // RewriteTopTermsBlendedFreqsN Rewrite = "top_terms_blended_freqs_N" // RewriteKindTopTermsBoostN Assigns each matching document a relevance // score equal to the boost parameter. // // This method changes the original query to a bool query. This bool query // contains a should clause and term query for each matching term. // // The final bool query only includes term queries for the top N terms. // // You can use this method to avoid exceeding the clause limit in the // indices.query.bool.max_clause_count setting. RewriteTopTermsBoostN Rewrite = "top_terms_boost_N" // RewriteTopTermsN calculates a relevance score for each matching document. // // This method changes the original query to a bool query. This bool query // contains a should clause and term query for each matching term. // // The final bool query only includes term queries for the top N scoring terms. // // You can use this method to avoid exceeding the clause limit in the // indices.query.bool.max_clause_count setting. RewriteTopTermsN Rewrite = "top_terms_N" )
type RuleFilter ¶
type RuleFilter struct {
// contains filtered or unexported fields
}
func (*RuleFilter) After ¶
func (r *RuleFilter) After() *Query
After - Query used to return intervals that follow an interval from the filter rule.
func (*RuleFilter) Before ¶
func (r *RuleFilter) Before() *Query
Before - Query used to return intervals that occur before an interval from the filter rule.
func (*RuleFilter) ContainedBy ¶
func (r *RuleFilter) ContainedBy() *Query
ContainedBy - Query used to return intervals contained by an interval from the filter rule.
func (*RuleFilter) Containing ¶
func (r *RuleFilter) Containing() *Query
Containing - Query used to return intervals that contain an interval from the filter rule.
func (RuleFilter) MarshalBSON ¶
func (r RuleFilter) MarshalBSON() ([]byte, error)
func (RuleFilter) MarshalJSON ¶
func (r RuleFilter) MarshalJSON() ([]byte, error)
func (*RuleFilter) NotContainedBy ¶
func (r *RuleFilter) NotContainedBy() *Query
NotContainedBy - Query used to return intervals that are not contained by an interval from the filter rule.
func (*RuleFilter) NotContaining ¶
func (r *RuleFilter) NotContaining() *Query
NotContaining - Query used to return intervals that do not contain an interval from the filter rule.
func (*RuleFilter) NotOverlapping ¶
func (r *RuleFilter) NotOverlapping() *Query
NotOverlapping - Query used to return intervals that do not overlap with an interval from the filter rule.
func (*RuleFilter) Overlapping ¶
func (r *RuleFilter) Overlapping() *Query
Overlapping - Query used to return intervals that overlap with an interval from the filter rule.
func (*RuleFilter) RuleFilter ¶
func (r *RuleFilter) RuleFilter() (*RuleFilter, error)
func (*RuleFilter) Script ¶
func (r *RuleFilter) Script() *Script
func (*RuleFilter) SetAfter ¶
func (r *RuleFilter) SetAfter(query Querier) error
func (*RuleFilter) SetBefore ¶
func (r *RuleFilter) SetBefore(query Querier) error
func (*RuleFilter) SetContainedBy ¶
func (r *RuleFilter) SetContainedBy(query Querier) error
func (*RuleFilter) SetContaining ¶
func (r *RuleFilter) SetContaining(query Querier) error
func (*RuleFilter) SetNotContainedBy ¶
func (r *RuleFilter) SetNotContainedBy(query Querier) error
func (*RuleFilter) SetNotContaining ¶
func (r *RuleFilter) SetNotContaining(query Querier) error
func (*RuleFilter) SetNotOverlapping ¶
func (r *RuleFilter) SetNotOverlapping(query Querier) error
func (*RuleFilter) SetOverlapping ¶
func (r *RuleFilter) SetOverlapping(query Querier) error
func (*RuleFilter) SetScript ¶
func (r *RuleFilter) SetScript(script *Script) error
func (*RuleFilter) UnmarshalBSON ¶
func (r *RuleFilter) UnmarshalBSON(data []byte) error
func (*RuleFilter) UnmarshalJSON ¶
func (r *RuleFilter) UnmarshalJSON(data []byte) error
type RuleFilterParams ¶
type RuleFilterParams struct { // (Optional) Query used to return intervals that follow an // interval from the filter rule. After Querier // (Optional) Query used to return intervals that occur before // an interval from the filter rule. Before Querier // (Optional) Query used to return intervals contained by an // interval from the filter rule. ContainedBy Querier // (Optional) Query used to return intervals that contain an // interval from the filter rule. Containing Querier // (Optional) Query used to return intervals that are not // contained by an interval from the filter rule. NotContainedBy Querier // (Optional) Query used to return intervals that do not // contain an interval from the filter rule. NotContaining Querier // (Optional) Query used to return intervals that do not overlap with an interval from the filter rule. NotOverlapping Querier // (Optional) Query used to return intervals that overlap with an interval from the filter rule. Overlapping Querier // Optional) Script used to return matching documents. This script must return a boolean value, true or false. See Script filters for an example. Script *Script }
func (RuleFilterParams) RuleFilter ¶
func (p RuleFilterParams) RuleFilter() (*RuleFilter, error)
type RuleFilterer ¶
type RuleFilterer interface {
RuleFilter() (*RuleFilter, error)
}
type RuntimeMappingField ¶
type RuntimeMappingField struct { Kind RuntimeMappingKind `bson:"type" json:"type"` Script string `bson:"script,omitempty" json:"script,omitempty"` }
type RuntimeMappingKind ¶
type RuntimeMappingKind string
const ( RMTBoolean RuntimeMappingKind = "boolean" RMTDate RuntimeMappingKind = "date" RMTDouble RuntimeMappingKind = "double" RMTGeoPoint RuntimeMappingKind = "geo_point" RMTIP RuntimeMappingKind = "ip" RMTKeyword RuntimeMappingKind = "keyword" RMTLong RuntimeMappingKind = "long" )
type RuntimeMappings ¶
type RuntimeMappings map[string]RuntimeMappingField
type SaturationFunction ¶
type SaturationFunction struct {
// contains filtered or unexported fields
}
SaturationFunction gives a score equal to S / (S + pivot), where S is the value of the rank feature field and pivot is a configurable pivot value so that the result will be less than 0.5 if S is less than pivot and greater than 0.5 otherwise. Scores are always (0,1).
If the rank feature has a negative score impact then the function will be computed as pivot / (S + pivot), which decreases when S increases.
If a pivot value is not provided, Elasticsearch computes a default value equal to the approximate geometric mean of all rank feature values in the index.
func (SaturationFunction) MarshalBSON ¶
func (s SaturationFunction) MarshalBSON() ([]byte, error)
func (SaturationFunction) MarshalJSON ¶
func (s SaturationFunction) MarshalJSON() ([]byte, error)
func (SaturationFunction) Pivot ¶
func (s SaturationFunction) Pivot() float64
func (*SaturationFunction) Saturation ¶
func (s *SaturationFunction) Saturation() (*SaturationFunction, error)
func (*SaturationFunction) SetPivot ¶
func (s *SaturationFunction) SetPivot(pivot interface{}) error
func (*SaturationFunction) UnmarshalBSON ¶
func (s *SaturationFunction) UnmarshalBSON(data []byte) error
func (*SaturationFunction) UnmarshalJSON ¶
func (s *SaturationFunction) UnmarshalJSON(data []byte) error
type SaturationFunctionParams ¶
type SaturationFunctionParams struct {
// (Optional, number)
Pivot interface{}
}
SaturationFunctionParams gives a score equal to S / (S + pivot), where S is the value of the rank feature field and pivot is a configurable pivot value so that the result will be less than 0.5 if S is less than pivot and greater than 0.5 otherwise. Scores are always (0,1).
If the rank feature has a negative score impact then the function will be computed as pivot / (S + pivot), which decreases when S increases.
If a pivot value is not provided, Elasticsearch computes a default value equal to the approximate geometric mean of all rank feature values in the index.
If a pivot value is not provided, Elasticsearch computes a default value equal to the approximate geometric mean of all rank feature values in the index. We recommend using this default value if you haven’t had the opportunity to train a good pivot value.
func (SaturationFunctionParams) Saturation ¶
func (p SaturationFunctionParams) Saturation() (*SaturationFunction, error)
type SaturationFunctioner ¶
type SaturationFunctioner interface {
Saturation() (*SaturationFunction, error)
}
type ScaledFloatField ¶
type ScaledFloatField struct {
// contains filtered or unexported fields
}
func NewScaledFloatField ¶
func NewScaledFloatField(params ScaledFloatFieldParams) (*ScaledFloatField, error)
func (ScaledFloatField) Boost ¶
func (b ScaledFloatField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (ScaledFloatField) Coerce ¶
func (cp ScaledFloatField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (ScaledFloatField) DocValues ¶
func (dv ScaledFloatField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*ScaledFloatField) Field ¶
func (sf *ScaledFloatField) Field() (Field, error)
func (ScaledFloatField) IgnoreMalformed ¶
func (im ScaledFloatField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (ScaledFloatField) Index ¶
func (i ScaledFloatField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (ScaledFloatField) MarshalJSON ¶
func (sf ScaledFloatField) MarshalJSON() ([]byte, error)
func (ScaledFloatField) Meta ¶
func (m ScaledFloatField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (ScaledFloatField) NullValue ¶
func (nv ScaledFloatField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (ScaledFloatField) ScalingFactor ¶
func (sf ScaledFloatField) ScalingFactor() float64
ScalingFactor to use when encoding values. Values will be multiplied by this factor at index time and rounded to the closest long value. For instance, a scaled_float with a scaling_factor of 10 would internally store 2.34 as 23 and all search-time operations (queries, aggregations, sorting) will behave as if the document had a value of 2.3. High values of scaling_factor improve accuracy but also increase space requirements. This parameter is required.
func (*ScaledFloatField) SetBoost ¶
func (b *ScaledFloatField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*ScaledFloatField) SetCoerce ¶
func (cp *ScaledFloatField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*ScaledFloatField) SetDocValues ¶
func (dv *ScaledFloatField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*ScaledFloatField) SetIgnoreMalformed ¶
func (im *ScaledFloatField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*ScaledFloatField) SetIndex ¶
func (i *ScaledFloatField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*ScaledFloatField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*ScaledFloatField) SetNullValue ¶
func (nv *ScaledFloatField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*ScaledFloatField) SetScalingFactor ¶
func (sf *ScaledFloatField) SetScalingFactor(v interface{}) error
SetScalingFactor sets the ScalingFactorValue to v
func (*ScaledFloatField) SetStore ¶
func (sa *ScaledFloatField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (ScaledFloatField) Store ¶
func (sa ScaledFloatField) Store() bool
Store returns the StoreAttr Value or false
func (ScaledFloatField) Type ¶
func (ScaledFloatField) Type() FieldType
func (*ScaledFloatField) UnmarshalJSON ¶
func (sf *ScaledFloatField) UnmarshalJSON(data []byte) error
type ScaledFloatFieldParams ¶
type ScaledFloatFieldParams struct { // A ScaledFloatField is a floating point number that is backed by a long, // scaled by a fixed double scaling factor. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html ScalingFactor interface{} `json:"scaling_factor"` // Coercion attempts to clean up dirty values to fit the data type of a // field. (Optional, bool) Defaults to false. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/coerce.html Coerce interface{} `json:"coerce,omitempty"` // IgnoreMalformed determines if malformed numbers are ignored. If true, // malformed numbers are ignored. If false (default), malformed numbers // throw an exception and reject the whole document. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // (Optional, bool, default: true) // // Most fields are indexed by default, which makes them searchable. The // inverted index allows queries to look up the search term in unique sorted // list of terms, and from that immediately have access to the list of // documents that contain the term. // // Sorting, aggregations, and access to field values in scripts requires a // different data access pattern. Instead of looking up the term and finding // documents, we need to be able to look up the document and find the terms // that it has in a field. // // Doc values are the on-disk data structure, built at document index time, // which makes this data access pattern possible. They store the same values // as the _source but in a column-oriented fashion that is way more // efficient for sorting and aggregations. Doc values are supported on // almost all field types, with the notable exception of text and // annotated_text fields. // // All fields which support doc values have them enabled by default. If you // are sure that you don’t need to sort or aggregate on a field, or access // the field value from a script, you can disable doc values in order to // save disk space // // https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html DocValues interface{} `json:"doc_values,omitempty"` // Index controls whether field values are indexed. It accepts true or false // and defaults to true. Fields that are not indexed are not queryable. // (Optional, bool) Index interface{} `json:"index,omitempty"` // NullValue parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched NullValue interface{} `json:"null_value,omitempty"` // WithStore is a mapping with a store paramter. // // By default, field values are indexed to make them searchable, but they are // not stored. This means that the field can be queried, but the original field // value cannot be retrieved. // // Usually this doesn’t matter. The field value is already part of the _source // field, which is stored by default. If you only want to retrieve the value of // a single field or of a few fields, instead of the whole _source, then this // can be achieved with source filtering. // // In certain situations it can make sense to store a field. For instance, if // you have a document with a title, a date, and a very large content field, you // may want to retrieve just the title and the date without having to extract // those fields from a large _source field // // Stored fields returned as arrays // // For consistency, stored fields are always returned as an array because there // is no way of knowing if the original field value was a single value, multiple // values, or an empty array. // // The original value can be retrieved from the _source field instead. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html Store interface{} `json:"store,omitempty"` // Metadata attached to the field. This metadata is opaque to Elasticsearch, it // is only useful for multiple applications that work on the same indices to // share meta information about fields such as units // // https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-field-meta.html#mapping-field-meta Meta Meta `json:"meta,omitempty"` // Deprecated Boost interface{} `json:"boost,omitempty"` }
func (ScaledFloatFieldParams) Field ¶
func (p ScaledFloatFieldParams) Field() (Field, error)
func (ScaledFloatFieldParams) ScaledFloat ¶
func (p ScaledFloatFieldParams) ScaledFloat() (*ScaledFloatField, error)
func (ScaledFloatFieldParams) Type ¶
func (ScaledFloatFieldParams) Type() FieldType
type ScoreMode ¶
type ScoreMode string
const ( ScoreModeUnspecified ScoreMode = "" // ScoreModeMultiply - scores are multiplied (default) ScoreModeMultiply ScoreMode = "multiply" // ScoreModeSum - scores are summed ScoreModeSum ScoreMode = "sum" // ScoreModeAvg scores are averaged ScoreModeAvg ScoreMode = "avg" // ScoreModeFirst - the first function that has a matching filter is applied ScoreModeFirst ScoreMode = "first" // ScoreModeMax - maximum score is used ScoreModeMax ScoreMode = "max" // ScoreModeMin - minimum score is used ScoreModeMin ScoreMode = "min" ScoreModeNone ScoreMode = "none" )
type ScriptQuery ¶
type ScriptQuery struct {
// contains filtered or unexported fields
}
func (*ScriptQuery) Clause ¶
func (s *ScriptQuery) Clause() (QueryClause, error)
func (*ScriptQuery) Clear ¶
func (s *ScriptQuery) Clear()
func (*ScriptQuery) DecodeParams ¶
func (s *ScriptQuery) DecodeParams(val interface{}) error
func (*ScriptQuery) IsEmpty ¶
func (s *ScriptQuery) IsEmpty() bool
func (ScriptQuery) Kind ¶
func (ScriptQuery) Kind() QueryKind
func (ScriptQuery) MarshalBSON ¶
func (s ScriptQuery) MarshalBSON() ([]byte, error)
func (ScriptQuery) MarshalJSON ¶
func (s ScriptQuery) MarshalJSON() ([]byte, error)
func (*ScriptQuery) Set ¶
func (s *ScriptQuery) Set(script Scripter) error
Set sets the ScriptQuery Options include:
- picker.ScriptQuery
func (*ScriptQuery) UnmarshalBSON ¶
func (s *ScriptQuery) UnmarshalBSON(data []byte) error
func (*ScriptQuery) UnmarshalJSON ¶
func (s *ScriptQuery) UnmarshalJSON(data []byte) error
type ScriptQueryParams ¶
type ScriptQueryParams struct { // Name of the query (Optional) Name string // Script to run as a query. This script must return a boolean value, true or false. (Required) Lang string Source string Params interface{} }
ScriptQueryParams filters documents based on a provided script. The script query is typically used in a filter context.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-query.html
func (ScriptQueryParams) Clause ¶
func (s ScriptQueryParams) Clause() (QueryClause, error)
func (ScriptQueryParams) Kind ¶
func (ScriptQueryParams) Kind() QueryKind
func (ScriptQueryParams) Script ¶
func (s ScriptQueryParams) Script() (*ScriptQuery, error)
type ScriptScoreFunc ¶
type ScriptScoreFunc struct { Filter CompleteClauser // float Weight interface{} Script *Script }
func (ScriptScoreFunc) Function ¶
func (ss ScriptScoreFunc) Function() (Function, error)
func (*ScriptScoreFunc) ScriptScore ¶
func (ss *ScriptScoreFunc) ScriptScore() (*ScriptScoreFunction, error)
type ScriptScoreFunction ¶
type ScriptScoreFunction struct {
// contains filtered or unexported fields
}
func (*ScriptScoreFunction) DecodeParams ¶
func (s *ScriptScoreFunction) DecodeParams(val interface{}) error
func (*ScriptScoreFunction) Filter ¶
func (ss *ScriptScoreFunction) Filter() QueryClause
func (ScriptScoreFunction) FuncKind ¶
func (ScriptScoreFunction) FuncKind() FuncKind
func (ScriptScoreFunction) MarshalJSON ¶
func (ss ScriptScoreFunction) MarshalJSON() ([]byte, error)
func (*ScriptScoreFunction) SetFilter ¶
func (ss *ScriptScoreFunction) SetFilter(filter CompleteClauser) error
func (*ScriptScoreFunction) SetParams ¶
func (s *ScriptScoreFunction) SetParams(params interface{}) error
type ScriptScoreQuery ¶
type ScriptScoreQuery struct {
// contains filtered or unexported fields
}
func (ScriptScoreQuery) Boost ¶
func (b ScriptScoreQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*ScriptScoreQuery) Clause ¶
func (s *ScriptScoreQuery) Clause() (QueryClause, error)
func (*ScriptScoreQuery) Clear ¶
func (s *ScriptScoreQuery) Clear()
func (*ScriptScoreQuery) DecodeParams ¶
func (s *ScriptScoreQuery) DecodeParams(val interface{}) error
func (*ScriptScoreQuery) IsEmpty ¶
func (s *ScriptScoreQuery) IsEmpty() bool
func (ScriptScoreQuery) Kind ¶
func (ScriptScoreQuery) Kind() QueryKind
func (ScriptScoreQuery) MarshalBSON ¶
func (s ScriptScoreQuery) MarshalBSON() ([]byte, error)
func (ScriptScoreQuery) MarshalJSON ¶
func (s ScriptScoreQuery) MarshalJSON() ([]byte, error)
func (*ScriptScoreQuery) Set ¶
func (s *ScriptScoreQuery) Set(scriptScore *ScriptScoreQueryParams) error
Set sets the ScriptScoreQuery Options include:
- picker.ScriptScoreQuery
func (*ScriptScoreQuery) SetBoost ¶
func (b *ScriptScoreQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*ScriptScoreQuery) SetMinScore ¶
func (ms *ScriptScoreQuery) SetMinScore(v float64)
func (*ScriptScoreQuery) UnmarshalBSON ¶
func (s *ScriptScoreQuery) UnmarshalBSON(data []byte) error
func (*ScriptScoreQuery) UnmarshalJSON ¶
func (s *ScriptScoreQuery) UnmarshalJSON(data []byte) error
type ScriptScoreQueryParams ¶
type ScriptScoreQueryParams struct { // Query used to return documents. (Required) Query *QueryParams // Documents with a score lower than this floating point number are excluded // from the search results. (Optional) MinScore float64 // Documents scores produced by script are multiplied by boost to produce // final documents' scores. Defaults to 1.0. (Optional) Boost interface{} Name string Script *Script }
ScriptScoreQueryParams uses a script to provide a custom score for returned documents.
The script_score query is useful if, for example, a scoring function is expensive and you only need to calculate the score of a filtered set of documents.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-score-query.html
func (ScriptScoreQueryParams) Clause ¶
func (s ScriptScoreQueryParams) Clause() (QueryClause, error)
func (ScriptScoreQueryParams) Kind ¶
func (ScriptScoreQueryParams) Kind() QueryKind
func (ScriptScoreQueryParams) ScriptScore ¶
func (s ScriptScoreQueryParams) ScriptScore() (*ScriptScoreQuery, error)
type ScriptScorer ¶
type ScriptScorer interface {
ScriptScore() (*ScriptScoreQuery, error)
}
type Scripter ¶
type Scripter interface {
Script() (*ScriptQuery, error)
}
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
func NewSearch ¶
func NewSearch(p SearchParams) (*Search, error)
func (Search) DocValueFields ¶
func (s Search) DocValueFields() SearchFields
DocValueFields is used to return return doc values for one or more fields in the search response.
(Optional, array of strings and objects) Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.
You can specify items in the array as a string or object.
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields
func (Search) Explain ¶
Explain indicates whether the search returns detailed information about score computation as part of a hit. Defaults to false.
func (*Search) Fields ¶
func (s *Search) Fields() SearchFields
Fields allows for retrieving a list of document fields in the search response. It consults both the document _source and the index mappings to return each value in a standardized way that matches its mapping type. By default, date fields are formatted according to the date format parameter in their mappings. You can also use the fields parameter to retrieve runtime field values.
func (Search) From ¶
From sets the starting document offset. Defaults to 0.
By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.
func (*Search) IndicesBoost ¶
IndicesBoost buusts the _score of documents from specified indices
func (Search) MarshalBSON ¶
func (Search) MarshalJSON ¶
func (*Search) MinScore ¶
MinScore is the minimum _score for matching documents. Documents with a lower _score are not included in the search results.
func (Search) PITKeepAlive ¶
func (Search) PointInTime ¶
func (s Search) PointInTime() *PointInTime
PointInTime is a lightweight view into the state of the data as it existed when initiated
https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html
func (Search) PointInTimeID ¶
func (Search) PointInTimeKeepAlive ¶
func (*Search) Query ¶
Query defines the search definition using the Query DSL.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
func (Search) RuntimeMappings ¶
func (s Search) RuntimeMappings() RuntimeMappings
func (Search) SeqNoPrimaryTerm ¶
SeqNoPrimaryTerm https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html
func (*Search) SetDocValueFields ¶
func (s *Search) SetDocValueFields(v SearchFields) *Search
SetDocValueFields sets DocValueFieldsValue to v
func (*Search) SetExplain ¶
SetExplain sets the ExplainValue to v
func (*Search) SetFields ¶
func (s *Search) SetFields(v SearchFields)
SetFields sets the FieldsValue to v
func (*Search) SetIndicesBoost ¶
SetIndicesBoost sets IndicesBoostValue to v
func (*Search) SetMinScore ¶
SetMinScore sets the MinScoreValue to v
func (*Search) SetPointInTime ¶
func (s *Search) SetPointInTime(v *PointInTime)
SetPointInTime sets the PointInTimeValue to v
func (*Search) SetRuntimeMappings ¶
func (s *Search) SetRuntimeMappings(v RuntimeMappings)
func (*Search) SetSeqNoPrimaryTerm ¶
func (*Search) SetTerminateAfter ¶
func (*Search) SetVersion ¶
func (Search) Size ¶
Size is number of hits to return. Defaults to 10.
By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.
func (Search) Source ¶
func (s Search) Source() interface{}
Source indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response. Defaults to true.
func (Search) Stats ¶
Stats groups to associate with the picker. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API (Optional).
func (Search) TerminateAfter ¶
TerminateAfter is maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
Defaults to 0, which does not terminate query execution early.
func (Search) Timeout ¶
Timeout specifies the period of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.
func (*Search) UnmarshalBSON ¶
func (*Search) UnmarshalJSON ¶
type SearchAsYouTypeField ¶
type SearchAsYouTypeField struct {
// contains filtered or unexported fields
}
SearchAsYouTypeField is a text-like field that is optimized to provide out-of-the-box support for queries that serve an as-you-type completion use case. It creates a series of subfields that are analyzed to index terms that can be efficiently matched by a query that partially matches the entire indexed text value. Both prefix completion (i.e matching terms starting at the beginning of the input) and infix completion (i.e. matching terms at any position within the input) are supported.
The size of shingles in subfields can be configured with the max_shingle_size mapping parameter. The default is 3, and valid values for this parameter are integer values 2 - 4 inclusive. Shingle subfields will be created for each shingle size from 2 up to and including the max_shingle_size. The my_field._index_prefix subfield will always use the analyzer from the shingle subfield with the max_shingle_size when constructing its own analyzer.
Increasing the max_shingle_size will improve matches for queries with more consecutive terms, at the cost of larger index size. The default max_shingle_size should usually be sufficient.
The same input text is indexed into each of these fields automatically, with their differing analysis chains, when an indexed document has a value for the root field my_field.
The most efficient way of querying to serve a search-as-you-type use case is usually a multi_match query of type bool_prefix that targets the root search_as_you_type field and its shingle subfields. This can match the query terms in any order, but will score documents higher if they contain the terms in order in a shingle subfield.
To search for documents that strictly match the query terms in order, or to search using other properties of phrase queries, use a match_phrase_prefix query on the root field. A match_phrase query can also be used if the last term should be matched exactly, and not as a prefix. Using phrase queries may be less efficient than using the match_bool_prefix query.
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-as-you-type.html
func NewSearchAsYouTypeField ¶
func NewSearchAsYouTypeField(params SearchAsYouTypeFieldParams) (*SearchAsYouTypeField, error)
func (SearchAsYouTypeField) Analyzer ¶
func (ap SearchAsYouTypeField) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (*SearchAsYouTypeField) Field ¶
func (s *SearchAsYouTypeField) Field() (Field, error)
func (SearchAsYouTypeField) Index ¶
func (i SearchAsYouTypeField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (SearchAsYouTypeField) IndexOptions ¶
func (io SearchAsYouTypeField) IndexOptions() IndexOptions
IndexOptions parameter controls what information is added to the inverted index for search and highlighting purposes.
func (SearchAsYouTypeField) MarshalBSON ¶
func (s SearchAsYouTypeField) MarshalBSON() ([]byte, error)
func (SearchAsYouTypeField) MarshalJSON ¶
func (s SearchAsYouTypeField) MarshalJSON() ([]byte, error)
func (SearchAsYouTypeField) MaxShingleSize ¶
func (mss SearchAsYouTypeField) MaxShingleSize() int
MaxShingleSize is the largest shingle size to create. Valid values are 2 (inclusive) to 4 (inclusive). Defaults to 3.
func (SearchAsYouTypeField) Norms ¶
func (n SearchAsYouTypeField) Norms() bool
Norms determines whether field-length should be taken into account when scoring queries. Accepts true (default) or false.
func (SearchAsYouTypeField) SearchAnalyzer ¶
func (sa SearchAsYouTypeField) SearchAnalyzer() string
SearchAnalyzer overrides Analyzer for search analysis
func (SearchAsYouTypeField) SearchQuoteAnalyzer ¶
func (sq SearchAsYouTypeField) SearchQuoteAnalyzer() string
SearchQuoteAnalyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
func (*SearchAsYouTypeField) SetAnalyzer ¶
func (ap *SearchAsYouTypeField) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*SearchAsYouTypeField) SetIndex ¶
func (i *SearchAsYouTypeField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*SearchAsYouTypeField) SetIndexOptions ¶
func (io *SearchAsYouTypeField) SetIndexOptions(v IndexOptions) error
SetIndexOptions sets IndexOptions value to v
func (*SearchAsYouTypeField) SetMaxShingleSize ¶
SetMaxShingleSize sets the MaxShingleSize to v
Valid values are 2 (inclusive) to 4 (inclusive). Defaults to 3.
func (*SearchAsYouTypeField) SetNorms ¶
func (n *SearchAsYouTypeField) SetNorms(v interface{}) error
SetNorms sets the Norms value to v
func (*SearchAsYouTypeField) SetSearchAnalyzer ¶
func (sa *SearchAsYouTypeField) SetSearchAnalyzer(v string)
SetSearchAnalyzer sets search_analyzer to v
func (SearchAsYouTypeField) SetSearchQuoteAnalyzer ¶
func (sq SearchAsYouTypeField) SetSearchQuoteAnalyzer(v string)
SetSearchQuoteAnalyzer sets search_quote_analyzer to v
func (*SearchAsYouTypeField) SetSimilarity ¶
func (s *SearchAsYouTypeField) SetSimilarity(v Similarity) error
SetSimilarity sets the Similarity Value to v
func (*SearchAsYouTypeField) SetStore ¶
func (sa *SearchAsYouTypeField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (*SearchAsYouTypeField) SetTermVector ¶
func (tv *SearchAsYouTypeField) SetTermVector(v TermVector) error
SetTermVector sets the TermVector Value to v
func (SearchAsYouTypeField) Similarity ¶
func (s SearchAsYouTypeField) Similarity() Similarity
Similarity is mostly useful for text fields, but can also apply to other field types.
func (SearchAsYouTypeField) Store ¶
func (sa SearchAsYouTypeField) Store() bool
Store returns the StoreAttr Value or false
func (SearchAsYouTypeField) TermVector ¶
func (tv SearchAsYouTypeField) TermVector() TermVector
TermVector determines whether term vectors should be stored for the field. Defaults to "no" / TermVectorNone.
func (SearchAsYouTypeField) Type ¶
func (SearchAsYouTypeField) Type() FieldType
func (*SearchAsYouTypeField) UnmarshalBSON ¶
func (s *SearchAsYouTypeField) UnmarshalBSON(data []byte) error
func (*SearchAsYouTypeField) UnmarshalJSON ¶
func (s *SearchAsYouTypeField) UnmarshalJSON(data []byte) error
type SearchAsYouTypeFieldParams ¶
type SearchAsYouTypeFieldParams struct { // (Optional, integer) Largest shingle size to create. Valid values are 2 // (inclusive) to 4 (inclusive). Defaults to 3. MaxShingleSize int `json:"max_shingle_size,omitempty"` // The analyzer which should be used for the text field, both at index-time // and at search-time (unless overridden by the search_analyzer). Defaults // to the default index analyzer, or the standard analyzer. Analyzer string `json:"analyzer,omitempty"` // Should the field be searchable? Accepts true (default) or false. Index interface{} `json:"index,omitempty"` // What information should be stored in the index, for search and // highlighting purposes. Defaults to positions IndexOptions IndexOptions `json:"index_options,omitempty"` // Whether field-length should be taken into account when scoring queries. // Accepts true (default) or false. Norms interface{} `json:"norms,omitempty"` // Whether the field value should be stored and retrievable separately from // the _source field. Accepts true or false (default). Store interface{} `json:"store,omitempty"` // The analyzer that should be used at search time on the text field. Defaults to the analyzer setting. SearchAnalyzer string `json:"search_analyzer,omitempty"` // The analyzer that should be used at search time when a phrase is // encountered. Defaults to the search_analyzer setting. SearchQuoteAnalyzer string `json:"search_quote_analyzer,omitempty"` // Which scoring algorithm or similarity should be used. Defaults to BM25. Similarity Similarity `json:"similarity,omitempty"` // Whether term vectors should be stored for the field. Defaults to no. This // option configures the root field and shingle subfields, but not the // prefix subfield. TermVector TermVector `json:"term_vector,omitempty"` }
func (SearchAsYouTypeFieldParams) Field ¶
func (p SearchAsYouTypeFieldParams) Field() (Field, error)
func (SearchAsYouTypeFieldParams) SearchAsYouType ¶
func (p SearchAsYouTypeFieldParams) SearchAsYouType() (*SearchAsYouTypeField, error)
func (SearchAsYouTypeFieldParams) Type ¶
func (SearchAsYouTypeFieldParams) Type() FieldType
type SearchField ¶
type SearchField struct { // Wildcard pattern. The request returns doc values for // field names matching this pattern. (Required) Field string // Format in which the doc values are returned. // // For date fields, you can specify a date date format. For numeric fields // fields, you can specify a DecimalFormat pattern. (Optional) // // For other field data types, this parameter is not supported. Format string }
func (SearchField) MarshalBSON ¶
func (f SearchField) MarshalBSON() ([]byte, error)
func (SearchField) MarshalJSON ¶
func (f SearchField) MarshalJSON() ([]byte, error)
func (*SearchField) UnmarshalBSON ¶
func (f *SearchField) UnmarshalBSON(data []byte) error
func (*SearchField) UnmarshalJSON ¶
func (f *SearchField) UnmarshalJSON(data []byte) error
type SearchFields ¶
type SearchFields []SearchField
SearchFields allows for retrieving a list of document fields in the search response. It consults both the document _source and the index mappings to return each value in a standardized way that matches its mapping type. By default, date fields are formatted according to the date format parameter in their mappings. You can also use the fields parameter to retrieve runtime field values.
(Optional, array of strings and objects) Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.
You can specify items in the array as a string or object. See Fields for more details.
type SearchParams ¶
type SearchParams struct { Query Querier Sort Sort Aggregations map[string]interface{} // Array of wildcard (*) patterns. The request returns doc values for field // names matching these patterns in the hits.fields property of the response // (Optional) . // // You can specify items in the array as a string or object. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields // // See also: // // https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html DocValueFields SearchFields // Array of wildcard (*) patterns. The request returns values for field // names matching these patterns in the hits.fields property of the response // (Optional). // // You can specify items in the array as a string or object. Fields SearchFields // If true, returns detailed information about score computation as part of // a hit. Defaults to false. (Optional) Explain bool // Starting document offset. Defaults to 0. // // By default, you cannot page through more than 10,000 hits using the from // and size parameters. To page through more hits, use the search_after // parameter. (Optional) From int // Boosts the _score of documents from specified indices (Optional). IndicesBoost map[string]float64 // Minimum _score for matching documents. Documents with a lower _score are // not included in the search results (Optional). MinScore float64 // Limits the search to a point in time (PIT). If you provide a pit, you // cannot specify a <target> in the request path. (Optional) PointInTime *PointInTime // Defines a runtime field in the search request that exist only as part of // the query. Fields defined in the search request take precedence over // fields defined with the same name in the index mappings. (Optional) RuntimeMappings RuntimeMappings // If true, returns sequence number and primary term of the last // modification of each hit. See Optimistic concurrency control. (Optional) SeqNoPrimaryTerm bool // The number of hits to return. Defaults to 10. (Optional) // // By default, you cannot page through more than 10,000 hits using the from // and size parameters. To page through more hits, use the search_after // parameter. Size int // Indicates which source fields are returned for matching documents. These // fields are returned in the hits._source property of the search response. // Defaults to true. (Optional) Source interface{} // Stats groups to associate with the picker. Each group maintains a // statistics aggregation for its associated searches. You can retrieve // these stats using the indices stats API (Optional). Stats []string // The maximum number of documents to collect for each shard, upon reaching // which the query execution will terminate early. (Optional) // // Defaults to 0, which does not terminate query execution early. TerminateAfter int // Specifies the period of time to wait for a response. If no response is // received before the timeout expires, the request fails and returns an // error. Defaults to no timeout. (Optional) Timeout time.Duration // If true, returns document version as part of a hit. Defaults to false. (Optional) Version bool Highlight interface{} }
SearchParams are the initial params passed to NewSearch
type SearchSource ¶
type SearchSource struct {
// contains filtered or unexported fields
}
func (*SearchSource) SetValue ¶
func (s *SearchSource) SetValue(v interface{}) error
SetValue sets the value of Source
The options are:
string []string dynamic.StringOrArrayOfStrings *dynamic.StringOrArrayOfStrings SourceSpecifications *SourceSpecifications bool *bool nil
SetValue returns an error if v is not one of the types listed above.
func (SearchSource) Value ¶
func (s SearchSource) Value() interface{}
Value indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response. Defaults to true.
type SearchSourceParams ¶
type SearchSourceParams struct{}
type Shape ¶
type Shape struct { Coordinates interface{} `json:"coordinates"` Type string `json:"type"` }
type ShapeField ¶
type ShapeField struct {
// contains filtered or unexported fields
}
ShapeField facilitates the indexing of and searching with arbitrary geo shapes such as rectangles and polygons. It should be used when either the data being indexed or the queries being executed contain shapes other than just points.
https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html
func NewShapeField ¶
func NewShapeField(params ShapeFieldParams) (*ShapeField, error)
func (*ShapeField) Field ¶
func (gs *ShapeField) Field() (Field, error)
func (ShapeField) IgnoreMalformed ¶
func (im ShapeField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (ShapeField) IgnoreZValue ¶
func (z ShapeField) IgnoreZValue() bool
IgnoreZValue determines whether three dimension points will be indexed.
If true (default) three dimension points will be accepted (stored in source) but only latitude and longitude values will be indexed; the third dimension is ignored. If false, geo-points containing any more than latitude and longitude (two dimensions) values throw an exception and reject the whole document.
func (ShapeField) MarshalJSON ¶
func (gs ShapeField) MarshalJSON() ([]byte, error)
func (ShapeField) NullValue ¶
func (nv ShapeField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (ShapeField) Orientation ¶
func (o ShapeField) Orientation() Orientation
Orientation is the vertex order for the shape’s coordinates list.
Defaults to OrientationRight (RIGHT) to comply with OGC standards. OGC standards define outer ring vertices in counterclockwise order with inner ring (hole) vertices in clockwise order.
func (*ShapeField) SetIgnoreMalformed ¶
func (im *ShapeField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*ShapeField) SetIgnoreZValue ¶
func (z *ShapeField) SetIgnoreZValue(v interface{}) error
SetIgnoreZValue sets the IgnoreZValue Value to v
func (*ShapeField) SetNullValue ¶
func (nv *ShapeField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*ShapeField) SetOrientation ¶
func (o *ShapeField) SetOrientation(orientation Orientation) error
SetOrientation sets the Orientation Value to v
func (ShapeField) Type ¶
func (ShapeField) Type() FieldType
func (*ShapeField) UnmarshalJSON ¶
func (gs *ShapeField) UnmarshalJSON(data []byte) error
type ShapeFieldParams ¶
type ShapeFieldParams struct { // Optionally define how to interpret vertex order for polygons / // multipolygons. This parameter defines one of two coordinate system rules // (Right-hand or Left-hand) each of which can be specified in three // different ways. 1. Right-hand rule: right, ccw, counterclockwise, 2. // Left-hand rule: left, cw, clockwise. The default orientation // (counterclockwise) complies with the OGC standard which defines outer // ring vertices in counterclockwise order with inner ring(s) vertices // (holes) in clockwise order. Setting this parameter in the geo_shape // mapping explicitly sets vertex order for the coordinate list of a // geo_shape field but can be overridden in each individual GeoJSON or WKT // document. Orientation Orientation `json:"orientation,omitempty"` // If true, malformed GeoJSON or WKT shapes are ignored. If false (default), // malformed GeoJSON and WKT shapes throw an exception and reject the entire // document. IgnoreMalformed interface{} `json:"ignore_malformed,omitempty"` // If true (default) three dimension points will be accepted (stored in // source) but only latitude and longitude values will be indexed; the third // dimension is ignored. If false, geo-points containing any more than // latitude and longitude (two dimensions) values throw an exception and // reject the whole document. IgnoreZValue interface{} `json:"ignore_z_value,omitempty"` }
func (ShapeFieldParams) Field ¶
func (p ShapeFieldParams) Field() (Field, error)
func (ShapeFieldParams) Shape ¶
func (p ShapeFieldParams) Shape() (*ShapeField, error)
func (ShapeFieldParams) Type ¶
func (ShapeFieldParams) Type() FieldType
type ShapeQuerier ¶
type ShapeQuerier interface {
ShapeQuery() (*ShapeQuery, error)
}
type ShapeQuery ¶
type ShapeQuery struct {
// contains filtered or unexported fields
}
func (*ShapeQuery) Clause ¶
func (q *ShapeQuery) Clause() (QueryClause, error)
func (*ShapeQuery) Clear ¶
func (q *ShapeQuery) Clear()
func (ShapeQuery) IgnoreUnmapped ¶
func (q ShapeQuery) IgnoreUnmapped() bool
func (*ShapeQuery) IsEmpty ¶
func (q *ShapeQuery) IsEmpty() bool
func (ShapeQuery) Kind ¶
func (ShapeQuery) Kind() QueryKind
func (ShapeQuery) MarshalBSON ¶
func (q ShapeQuery) MarshalBSON() ([]byte, error)
func (ShapeQuery) MarshalJSON ¶
func (q ShapeQuery) MarshalJSON() ([]byte, error)
func (ShapeQuery) Relation ¶
func (q ShapeQuery) Relation() SpatialRelation
func (*ShapeQuery) SetIgnoreUnmapped ¶
func (q *ShapeQuery) SetIgnoreUnmapped(v bool)
func (*ShapeQuery) SetIndexedShape ¶
func (q *ShapeQuery) SetIndexedShape(indexed *IndexedShape) error
func (*ShapeQuery) SetRelation ¶
func (q *ShapeQuery) SetRelation(v SpatialRelation) error
func (*ShapeQuery) SetShape ¶
func (q *ShapeQuery) SetShape(shape interface{}) error
func (ShapeQuery) Shape ¶
func (q ShapeQuery) Shape() interface{}
func (*ShapeQuery) ShapeQuery ¶
func (q *ShapeQuery) ShapeQuery() (*ShapeQuery, error)
func (*ShapeQuery) UnmarshalBSON ¶
func (q *ShapeQuery) UnmarshalBSON(data []byte) error
func (*ShapeQuery) UnmarshalJSON ¶
func (q *ShapeQuery) UnmarshalJSON(data []byte) error
type ShapeQueryParams ¶
type ShapeQueryParams struct { Field string Name string Relation SpatialRelation Shape interface{} IndexedShape *IndexedShape IgnoreUnmapped bool // contains filtered or unexported fields }
func (ShapeQueryParams) Clause ¶
func (p ShapeQueryParams) Clause() (QueryClause, error)
func (ShapeQueryParams) Kind ¶
func (ShapeQueryParams) Kind() QueryKind
func (ShapeQueryParams) ShapeQuery ¶
func (p ShapeQueryParams) ShapeQuery() (*ShapeQuery, error)
type ShortField ¶
type ShortField struct {
// contains filtered or unexported fields
}
A ShortField is signed 16-bit integer with a minimum value of -32,768 and a maximum value of 32,767.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewShortField ¶
func NewShortField(params ShortFieldParams) (*ShortField, error)
func (ShortField) Boost ¶
func (b ShortField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (ShortField) Coerce ¶
func (cp ShortField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (ShortField) DocValues ¶
func (dv ShortField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*ShortField) Field ¶
func (s *ShortField) Field() (Field, error)
func (ShortField) IgnoreMalformed ¶
func (im ShortField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (ShortField) Index ¶
func (i ShortField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (ShortField) MarshalBSON ¶
func (s ShortField) MarshalBSON() ([]byte, error)
func (ShortField) MarshalJSON ¶
func (s ShortField) MarshalJSON() ([]byte, error)
func (ShortField) Meta ¶
func (m ShortField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (ShortField) NullValue ¶
func (nv ShortField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*ShortField) SetBoost ¶
func (b *ShortField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*ShortField) SetCoerce ¶
func (cp *ShortField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*ShortField) SetDocValues ¶
func (dv *ShortField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*ShortField) SetIgnoreMalformed ¶
func (im *ShortField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*ShortField) SetIndex ¶
func (i *ShortField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*ShortField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*ShortField) SetNullValue ¶
func (nv *ShortField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*ShortField) SetStore ¶
func (sa *ShortField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (ShortField) Store ¶
func (sa ShortField) Store() bool
Store returns the StoreAttr Value or false
func (ShortField) Type ¶
func (ShortField) Type() FieldType
func (*ShortField) UnmarshalBSON ¶
func (s *ShortField) UnmarshalBSON(data []byte) error
func (*ShortField) UnmarshalJSON ¶
func (s *ShortField) UnmarshalJSON(data []byte) error
type ShortFieldParams ¶
type ShortFieldParams numberFieldParams
func (ShortFieldParams) Field ¶
func (p ShortFieldParams) Field() (Field, error)
func (ShortFieldParams) Short ¶
func (p ShortFieldParams) Short() (*ShortField, error)
func (ShortFieldParams) Type ¶
func (ShortFieldParams) Type() FieldType
type SigmoidFunction ¶
type SigmoidFunction struct {
// contains filtered or unexported fields
}
func (SigmoidFunction) Exponent ¶
func (s SigmoidFunction) Exponent() float64
func (SigmoidFunction) MarshalBSON ¶
func (s SigmoidFunction) MarshalBSON() ([]byte, error)
func (SigmoidFunction) MarshalJSON ¶
func (s SigmoidFunction) MarshalJSON() ([]byte, error)
func (SigmoidFunction) Pivot ¶
func (s SigmoidFunction) Pivot() float64
func (*SigmoidFunction) SetExponent ¶
func (s *SigmoidFunction) SetExponent(exponent interface{}) error
func (*SigmoidFunction) SetPivot ¶
func (s *SigmoidFunction) SetPivot(pivot interface{}) error
func (*SigmoidFunction) Sigmoid ¶
func (s *SigmoidFunction) Sigmoid() (*SigmoidFunction, error)
func (*SigmoidFunction) UnmarshalBSON ¶
func (s *SigmoidFunction) UnmarshalBSON(data []byte) error
func (*SigmoidFunction) UnmarshalJSON ¶
func (s *SigmoidFunction) UnmarshalJSON(data []byte) error
type SigmoidFunctionParams ¶
type SigmoidFunctionParams struct { Pivot interface{} Exponent interface{} }
func (SigmoidFunctionParams) Sigmoid ¶
func (p SigmoidFunctionParams) Sigmoid() (*SigmoidFunction, error)
type SigmoidFunctioner ¶
type SigmoidFunctioner interface {
Sigmoid() (*SigmoidFunction, error)
}
type Similarity ¶
type Similarity string
Similarity is mostly useful for text fields, but can also apply to other field types.
const ( // The Okapi BM25 algorithm. The algorithm used by default in Elasticsearch and Lucene. // // https://en.wikipedia.org/wiki/Okapi_BM25 SimilarityBM25 Similarity = "BM25" // SimilarityClassic is the former default in ElasticSsearch and Lucene that has since been deprecated // // Deprecated: TF/IDF algorithm, the former default in Elasticsearch and Lucene. SimilarityClassic Similarity = "classic" // SimilarityBoolean is a simple boolean similarity, which is used when // full-text ranking is not needed and the score should only be based on // whether the query terms match or not. Boolean similarity gives terms a // score equal to their query boost. SimilarityBoolean Similarity = "boolean" )
func (Similarity) String ¶
func (s Similarity) String() string
type SimpleQueryStringQuery ¶
type SimpleQueryStringQuery struct {
// contains filtered or unexported fields
}
func (SimpleQueryStringQuery) AnalyzeWildcard ¶
func (cp SimpleQueryStringQuery) AnalyzeWildcard() bool
If true, the query attempts to analyze wildcard terms in the query string. Defaults to false.
func (SimpleQueryStringQuery) Analyzer ¶
func (ap SimpleQueryStringQuery) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery ¶
func (a SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery() bool
AutoGenerateSynonymsPhraseQuery determines if match phrase queries are automatically created for multi-term synonyms. Defaults to true.
func (SimpleQueryStringQuery) Boost ¶
func (b SimpleQueryStringQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*SimpleQueryStringQuery) Clause ¶
func (qs *SimpleQueryStringQuery) Clause() (QueryClause, error)
func (*SimpleQueryStringQuery) Clear ¶
func (qs *SimpleQueryStringQuery) Clear()
func (SimpleQueryStringQuery) DefaultOperator ¶
func (o SimpleQueryStringQuery) DefaultOperator() Operator
func (SimpleQueryStringQuery) Fields ¶
func (qs SimpleQueryStringQuery) Fields() []string
func (SimpleQueryStringQuery) Flags ¶
func (qs SimpleQueryStringQuery) Flags() string
func (SimpleQueryStringQuery) FuzzyMaxExpansions ¶
func (me SimpleQueryStringQuery) FuzzyMaxExpansions() int
FuzzyMaxExpansions is the maximum number of variations created. Defaults to 50.
func (SimpleQueryStringQuery) FuzzyPrefixLength ¶
func (me SimpleQueryStringQuery) FuzzyPrefixLength() int
func (SimpleQueryStringQuery) FuzzyTranspositions ¶
func (ft SimpleQueryStringQuery) FuzzyTranspositions() bool
FuzzyTranspositions edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
func (*SimpleQueryStringQuery) IsEmpty ¶
func (qs *SimpleQueryStringQuery) IsEmpty() bool
func (SimpleQueryStringQuery) Kind ¶
func (SimpleQueryStringQuery) Kind() QueryKind
func (SimpleQueryStringQuery) Lenient ¶
func (l SimpleQueryStringQuery) Lenient() bool
Lenient determines whether format-based errors, such as providing a text query value for a numeric field, are ignored. Defaults to false.
func (SimpleQueryStringQuery) MarshalJSON ¶
func (qs SimpleQueryStringQuery) MarshalJSON() ([]byte, error)
func (SimpleQueryStringQuery) MaxDeterminizedStates ¶
func (mds SimpleQueryStringQuery) MaxDeterminizedStates() int
func (SimpleQueryStringQuery) MinimumShouldMatch ¶
func (msm SimpleQueryStringQuery) MinimumShouldMatch() string
func (SimpleQueryStringQuery) PhraseSlop ¶
func (mds SimpleQueryStringQuery) PhraseSlop() int
func (SimpleQueryStringQuery) Query ¶
func (qs SimpleQueryStringQuery) Query() string
func (SimpleQueryStringQuery) QuoteAnalyzer ¶
func (sq SimpleQueryStringQuery) QuoteAnalyzer() string
QuoteAnalyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
func (SimpleQueryStringQuery) QuoteFieldSuffix ¶
func (qf SimpleQueryStringQuery) QuoteFieldSuffix() string
func (*SimpleQueryStringQuery) SetAnalyzeWildcard ¶
func (cp *SimpleQueryStringQuery) SetAnalyzeWildcard(v interface{}) error
SetAnalyzeWildcard sets analyze_wildcard to v
func (*SimpleQueryStringQuery) SetAnalyzer ¶
func (ap *SimpleQueryStringQuery) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*SimpleQueryStringQuery) SetAutoGenerateSynonymsPhraseQuery ¶
func (a *SimpleQueryStringQuery) SetAutoGenerateSynonymsPhraseQuery(v interface{}) error
SetAutoGenerateSynonymsPhraseQuery sets AutoGenerateSynonymsPhraseQueryValue to v
func (*SimpleQueryStringQuery) SetBoost ¶
func (b *SimpleQueryStringQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*SimpleQueryStringQuery) SetDefaultOperator ¶
func (*SimpleQueryStringQuery) SetFields ¶
func (qs *SimpleQueryStringQuery) SetFields(fields []string)
func (*SimpleQueryStringQuery) SetFlags ¶
func (qs *SimpleQueryStringQuery) SetFlags(field string)
func (*SimpleQueryStringQuery) SetFuzzyMaxExpansions ¶
func (me *SimpleQueryStringQuery) SetFuzzyMaxExpansions(v interface{}) error
func (*SimpleQueryStringQuery) SetFuzzyPrefixLength ¶
func (me *SimpleQueryStringQuery) SetFuzzyPrefixLength(v interface{}) error
func (*SimpleQueryStringQuery) SetFuzzyTranspositions ¶
func (ft *SimpleQueryStringQuery) SetFuzzyTranspositions(fuzzyTranspositions interface{}) error
SetFuzzyTranspositions sets FuzzyTranspositions to v
func (*SimpleQueryStringQuery) SetLenient ¶
func (l *SimpleQueryStringQuery) SetLenient(v bool)
SetLenient sets Lenient to v
func (*SimpleQueryStringQuery) SetMaxDeterminizedStates ¶
func (mds *SimpleQueryStringQuery) SetMaxDeterminizedStates(v interface{}) error
func (*SimpleQueryStringQuery) SetMinimumShouldMatch ¶
func (msm *SimpleQueryStringQuery) SetMinimumShouldMatch(v string)
func (*SimpleQueryStringQuery) SetPhraseSlop ¶
func (mds *SimpleQueryStringQuery) SetPhraseSlop(v interface{}) error
func (*SimpleQueryStringQuery) SetQuery ¶
func (qs *SimpleQueryStringQuery) SetQuery(q string) error
func (SimpleQueryStringQuery) SetQuoteAnalyzer ¶
func (sq SimpleQueryStringQuery) SetQuoteAnalyzer(v string)
SetQuoteAnalyzer sets search_quote_analyzer to v
func (*SimpleQueryStringQuery) SetQuoteFieldSuffix ¶
func (qf *SimpleQueryStringQuery) SetQuoteFieldSuffix(quoteFieldSuffix string)
func (*SimpleQueryStringQuery) SimpleQueryString ¶
func (qs *SimpleQueryStringQuery) SimpleQueryString() (*SimpleQueryStringQuery, error)
func (*SimpleQueryStringQuery) UnmarshalJSON ¶
func (qs *SimpleQueryStringQuery) UnmarshalJSON(data []byte) error
type SimpleQueryStringQueryParams ¶
type SimpleQueryStringQueryParams struct { // (Required, string) Query string you wish to parse and use for search. See // Query string syntax. Query string `json:"query"` // (Optional, string) List of enabled operators for the simple query string // syntax. Defaults to ALL (all operators). Flags string `json:"flags,omitempty"` // (Optional, Boolean) If true, the query attempts to analyze wildcard terms // in the query string. Defaults to false. AnalyzeWildcard interface{} `json:"analyze_wildcard,omitempty"` // (Optional, string) Analyzer used to convert text in the query string into // tokens. Defaults to the index-time analyzer mapped for the default_field. // If no analyzer is mapped, the index’s default analyzer is used. Analyzer string `json:"analyzer,omitempty"` // (Optional, Boolean) If true, match phrase queries are automatically // created for multi-term synonyms. Defaults to true. AutoGenerateSynonymsPhraseQuery interface{} `json:"auto_generate_synonyms_phrase_query,omitempty"` // (Optional, float) Floating point number used to decrease or increase the // relevance scores of the query. Defaults to 1.0. // // Boost values are relative to the default value of 1.0. A boost value // between 0 and 1.0 decreases the relevance score. A value greater than 1.0 // increases the relevance score. Boost interface{} `json:"boost,omitempty"` // (Optional, string) Default boolean logic used to interpret text in the // query string if no operators are specified. Valid values are: // // - OR (Default) // // - AND DefaultOperator Operator `json:"default_operator,omitempty"` // (Optional, array of strings) Array of fields you wish to search. // // You can use this parameter query to search across multiple fields. See // Search multiple fields. Fields []string `json:"fields,omitempty"` FuzzyPrefixLength interface{} `json:"fuzzy_prefix_length,omitempty"` // (Optional, integer) Maximum number of terms to which the query expands // for fuzzy matching. Defaults to 50. FuzzyMaxExpansions interface{} `json:"fuzzy_max_expansions,omitempty"` // (Optional, Boolean) If true, edits for fuzzy matching include // transpositions of two adjacent characters (ab → ba). Defaults to true. FuzzyTranspositions interface{} `json:"fuzzy_transpositions,omitempty"` // (Optional, Boolean) If true, format-based errors, such as providing a // text value for a numeric field, are ignored. Defaults to false. Lenient bool `json:"lenient,omitempty"` // (Optional, integer) Maximum number of automaton states required for the // query. Default is 10000. // // Elasticsearch uses Apache Lucene internally to parse regular expressions. // Lucene converts each regular expression to a finite automaton containing // a number of determinized states. // // You can use this parameter to prevent that conversion from // unintentionally consuming too many resources. You may need to increase // this limit to run complex regular expressions. MaxDeterminizedStates interface{} `json:"max_determinized_states,omitempty"` // (Optional, string) Minimum number of clauses that must match for a // document to be returned. See the minimum_should_match parameter for valid // values and more information. See How minimum_should_match works for an // example. MinimumShouldMatch string `json:"minimum_should_match,omitempty"` // (Optional, string) Analyzer used to convert quoted text in the query // string into tokens. Defaults to the search_quote_analyzer mapped for the // default_field. // // For quoted text, this parameter overrides the analyzer specified in the // analyzer parameter. QuoteAnalyzer string `json:"quote_analyzer,omitempty"` // (Optional, integer) Maximum number of positions allowed between matching // tokens for phrases. Defaults to 0. If 0, exact phrase matches are // required. Transposed terms have a slop of 2. PhraseSlop interface{} `json:"phrase_slop,omitempty"` // (Optional, string) Suffix appended to quoted text in the query string. // // You can use this suffix to use a different analysis method for exact // matches. See Mixing exact search with stemming. QuoteFieldSuffix string `json:"quote_field_suffix,omitempty"` Name string `json:"_name,omitempty"` // contains filtered or unexported fields }
func (SimpleQueryStringQueryParams) Clause ¶
func (p SimpleQueryStringQueryParams) Clause() (QueryClause, error)
func (SimpleQueryStringQueryParams) Kind ¶
func (SimpleQueryStringQueryParams) Kind() QueryKind
func (SimpleQueryStringQueryParams) SimpleQueryString ¶
func (p SimpleQueryStringQueryParams) SimpleQueryString() (*SimpleQueryStringQuery, error)
type SimpleQueryStringer ¶
type SimpleQueryStringer interface {
SimpleQueryString() (*SimpleQueryStringQuery, error)
}
type SortEntry ¶
type SortEntry struct { Field string `json:"-"` Order SortOrder `json:"order,omitempty"` Mode SortMode `json:"mode,omitempty"` NumericType string `json:"numeric_type,omitempty"` Missing string `json:"missing,omitempty"` Type string `json:"type,omitempty"` Script *Script `json:"script,omitempty"` Nested *SortNested `json:"nested,omitempty"` }
func (SortEntry) MarshalJSON ¶
func (*SortEntry) UnmarshalJSON ¶
type SortNested ¶
type SortNested struct { // A filter that the inner objects inside the nested path should match with // in order for its field values to be taken into account by sorting. Common // case is to repeat the query / filter inside the nested filter or query. // By default no nested_filter is active. Filter *Query `json:"filter,omitempty"` // Defines on which nested object to sort. The actual sort field must be a // direct field inside this nested object. When sorting by nested field, // this field is mandatory. Path string `json:"path,omitempty"` // Same as top-level nested but applies to another nested path within the // current nested object. Nested *SortNested `json:"nested,omitempty"` // The maximum number of children to consider per root document when picking // the sort value. Defaults to unlimited. MaxChildren int64 `json:"max_children,omitempty"` }
type SourceSpecifications ¶
type SourceSpecifications struct { Includes dynamic.StringOrArrayOfStrings Excludes dynamic.StringOrArrayOfStrings }
type SpanContainingQuery ¶
type SpanContainingQuery struct {
// contains filtered or unexported fields
}
func (*SpanContainingQuery) Clause ¶
func (q *SpanContainingQuery) Clause() (QueryClause, error)
func (*SpanContainingQuery) Clear ¶
func (q *SpanContainingQuery) Clear()
func (*SpanContainingQuery) IsEmpty ¶
func (q *SpanContainingQuery) IsEmpty() bool
func (SpanContainingQuery) Kind ¶
func (SpanContainingQuery) Kind() QueryKind
func (SpanContainingQuery) MarshalBSON ¶
func (q SpanContainingQuery) MarshalBSON() ([]byte, error)
func (SpanContainingQuery) MarshalJSON ¶
func (q SpanContainingQuery) MarshalJSON() ([]byte, error)
func (*SpanContainingQuery) SpanContaining ¶
func (q *SpanContainingQuery) SpanContaining() (*SpanContainingQuery, error)
func (*SpanContainingQuery) UnmarshalBSON ¶
func (q *SpanContainingQuery) UnmarshalBSON(data []byte) error
func (*SpanContainingQuery) UnmarshalJSON ¶
func (q *SpanContainingQuery) UnmarshalJSON(data []byte) error
type SpanContainingQueryParams ¶
type SpanContainingQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanContainingQueryParams) Clause ¶
func (p SpanContainingQueryParams) Clause() (QueryClause, error)
func (SpanContainingQueryParams) Kind ¶
func (SpanContainingQueryParams) Kind() QueryKind
func (SpanContainingQueryParams) SpanContaining ¶
func (p SpanContainingQueryParams) SpanContaining() (*SpanContainingQuery, error)
type SpanFirstQuery ¶
type SpanFirstQuery struct {
// contains filtered or unexported fields
}
func (*SpanFirstQuery) Clause ¶
func (q *SpanFirstQuery) Clause() (QueryClause, error)
func (*SpanFirstQuery) Clear ¶
func (q *SpanFirstQuery) Clear()
func (*SpanFirstQuery) IsEmpty ¶
func (q *SpanFirstQuery) IsEmpty() bool
func (SpanFirstQuery) Kind ¶
func (SpanFirstQuery) Kind() QueryKind
func (SpanFirstQuery) MarshalBSON ¶
func (q SpanFirstQuery) MarshalBSON() ([]byte, error)
func (SpanFirstQuery) MarshalJSON ¶
func (q SpanFirstQuery) MarshalJSON() ([]byte, error)
func (*SpanFirstQuery) SpanFirst ¶
func (q *SpanFirstQuery) SpanFirst() (*SpanFirstQuery, error)
func (*SpanFirstQuery) UnmarshalBSON ¶
func (q *SpanFirstQuery) UnmarshalBSON(data []byte) error
func (*SpanFirstQuery) UnmarshalJSON ¶
func (q *SpanFirstQuery) UnmarshalJSON(data []byte) error
type SpanFirstQueryParams ¶
type SpanFirstQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanFirstQueryParams) Clause ¶
func (p SpanFirstQueryParams) Clause() (QueryClause, error)
func (SpanFirstQueryParams) Kind ¶
func (SpanFirstQueryParams) Kind() QueryKind
func (SpanFirstQueryParams) SpanFirst ¶
func (p SpanFirstQueryParams) SpanFirst() (*SpanFirstQuery, error)
type SpanMultiQuery ¶
type SpanMultiQuery struct {
// contains filtered or unexported fields
}
func (*SpanMultiQuery) Clause ¶
func (q *SpanMultiQuery) Clause() (QueryClause, error)
func (*SpanMultiQuery) Clear ¶
func (q *SpanMultiQuery) Clear()
func (*SpanMultiQuery) IsEmpty ¶
func (q *SpanMultiQuery) IsEmpty() bool
func (SpanMultiQuery) Kind ¶
func (SpanMultiQuery) Kind() QueryKind
func (SpanMultiQuery) MarshalBSON ¶
func (q SpanMultiQuery) MarshalBSON() ([]byte, error)
func (SpanMultiQuery) MarshalJSON ¶
func (q SpanMultiQuery) MarshalJSON() ([]byte, error)
func (*SpanMultiQuery) SpanMulti ¶
func (q *SpanMultiQuery) SpanMulti() (*SpanMultiQuery, error)
func (*SpanMultiQuery) UnmarshalBSON ¶
func (q *SpanMultiQuery) UnmarshalBSON(data []byte) error
func (*SpanMultiQuery) UnmarshalJSON ¶
func (q *SpanMultiQuery) UnmarshalJSON(data []byte) error
type SpanMultiQueryParams ¶
type SpanMultiQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanMultiQueryParams) Clause ¶
func (p SpanMultiQueryParams) Clause() (QueryClause, error)
func (SpanMultiQueryParams) Kind ¶
func (SpanMultiQueryParams) Kind() QueryKind
func (SpanMultiQueryParams) SpanMulti ¶
func (p SpanMultiQueryParams) SpanMulti() (*SpanMultiQuery, error)
type SpanNearQuery ¶
type SpanNearQuery struct {
// contains filtered or unexported fields
}
func (*SpanNearQuery) Clause ¶
func (q *SpanNearQuery) Clause() (QueryClause, error)
func (*SpanNearQuery) Clear ¶
func (q *SpanNearQuery) Clear()
func (*SpanNearQuery) IsEmpty ¶
func (q *SpanNearQuery) IsEmpty() bool
func (SpanNearQuery) Kind ¶
func (SpanNearQuery) Kind() QueryKind
func (SpanNearQuery) MarshalBSON ¶
func (q SpanNearQuery) MarshalBSON() ([]byte, error)
func (SpanNearQuery) MarshalJSON ¶
func (q SpanNearQuery) MarshalJSON() ([]byte, error)
func (*SpanNearQuery) SpanNear ¶
func (q *SpanNearQuery) SpanNear() (*SpanNearQuery, error)
func (*SpanNearQuery) UnmarshalBSON ¶
func (q *SpanNearQuery) UnmarshalBSON(data []byte) error
func (*SpanNearQuery) UnmarshalJSON ¶
func (q *SpanNearQuery) UnmarshalJSON(data []byte) error
type SpanNearQueryParams ¶
type SpanNearQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanNearQueryParams) Clause ¶
func (p SpanNearQueryParams) Clause() (QueryClause, error)
func (SpanNearQueryParams) Kind ¶
func (SpanNearQueryParams) Kind() QueryKind
func (SpanNearQueryParams) SpanNear ¶
func (p SpanNearQueryParams) SpanNear() (*SpanNearQuery, error)
type SpanNotQuery ¶
type SpanNotQuery struct {
// contains filtered or unexported fields
}
func (*SpanNotQuery) Clause ¶
func (q *SpanNotQuery) Clause() (QueryClause, error)
func (*SpanNotQuery) Clear ¶
func (q *SpanNotQuery) Clear()
func (*SpanNotQuery) IsEmpty ¶
func (q *SpanNotQuery) IsEmpty() bool
func (SpanNotQuery) Kind ¶
func (SpanNotQuery) Kind() QueryKind
func (SpanNotQuery) MarshalBSON ¶
func (q SpanNotQuery) MarshalBSON() ([]byte, error)
func (SpanNotQuery) MarshalJSON ¶
func (q SpanNotQuery) MarshalJSON() ([]byte, error)
func (*SpanNotQuery) SpanNot ¶
func (q *SpanNotQuery) SpanNot() (*SpanNotQuery, error)
func (*SpanNotQuery) UnmarshalBSON ¶
func (q *SpanNotQuery) UnmarshalBSON(data []byte) error
func (*SpanNotQuery) UnmarshalJSON ¶
func (q *SpanNotQuery) UnmarshalJSON(data []byte) error
type SpanNotQueryParams ¶
type SpanNotQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanNotQueryParams) Clause ¶
func (p SpanNotQueryParams) Clause() (QueryClause, error)
func (SpanNotQueryParams) Kind ¶
func (SpanNotQueryParams) Kind() QueryKind
func (SpanNotQueryParams) SpanNot ¶
func (p SpanNotQueryParams) SpanNot() (*SpanNotQuery, error)
type SpanOrQuery ¶
type SpanOrQuery struct {
// contains filtered or unexported fields
}
func (*SpanOrQuery) Clause ¶
func (q *SpanOrQuery) Clause() (QueryClause, error)
func (*SpanOrQuery) Clear ¶
func (q *SpanOrQuery) Clear()
func (*SpanOrQuery) IsEmpty ¶
func (q *SpanOrQuery) IsEmpty() bool
func (SpanOrQuery) Kind ¶
func (SpanOrQuery) Kind() QueryKind
func (SpanOrQuery) MarshalBSON ¶
func (q SpanOrQuery) MarshalBSON() ([]byte, error)
func (SpanOrQuery) MarshalJSON ¶
func (q SpanOrQuery) MarshalJSON() ([]byte, error)
func (*SpanOrQuery) SpanOr ¶
func (q *SpanOrQuery) SpanOr() (*SpanOrQuery, error)
func (*SpanOrQuery) UnmarshalBSON ¶
func (q *SpanOrQuery) UnmarshalBSON(data []byte) error
func (*SpanOrQuery) UnmarshalJSON ¶
func (q *SpanOrQuery) UnmarshalJSON(data []byte) error
type SpanOrQueryParams ¶
type SpanOrQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanOrQueryParams) Clause ¶
func (p SpanOrQueryParams) Clause() (QueryClause, error)
func (SpanOrQueryParams) Kind ¶
func (SpanOrQueryParams) Kind() QueryKind
func (SpanOrQueryParams) SpanOr ¶
func (p SpanOrQueryParams) SpanOr() (*SpanOrQuery, error)
type SpanTermQuery ¶
type SpanTermQuery struct {
// contains filtered or unexported fields
}
func (*SpanTermQuery) Clause ¶
func (q *SpanTermQuery) Clause() (QueryClause, error)
func (*SpanTermQuery) Clear ¶
func (q *SpanTermQuery) Clear()
func (*SpanTermQuery) IsEmpty ¶
func (q *SpanTermQuery) IsEmpty() bool
func (SpanTermQuery) Kind ¶
func (SpanTermQuery) Kind() QueryKind
func (SpanTermQuery) MarshalBSON ¶
func (q SpanTermQuery) MarshalBSON() ([]byte, error)
func (SpanTermQuery) MarshalJSON ¶
func (q SpanTermQuery) MarshalJSON() ([]byte, error)
func (*SpanTermQuery) SpanTerm ¶
func (q *SpanTermQuery) SpanTerm() (*SpanTermQuery, error)
func (*SpanTermQuery) UnmarshalBSON ¶
func (q *SpanTermQuery) UnmarshalBSON(data []byte) error
func (*SpanTermQuery) UnmarshalJSON ¶
func (q *SpanTermQuery) UnmarshalJSON(data []byte) error
type SpanTermQueryParams ¶
type SpanTermQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanTermQueryParams) Clause ¶
func (p SpanTermQueryParams) Clause() (QueryClause, error)
func (SpanTermQueryParams) Kind ¶
func (SpanTermQueryParams) Kind() QueryKind
func (SpanTermQueryParams) SpanTerm ¶
func (p SpanTermQueryParams) SpanTerm() (*SpanTermQuery, error)
type SpanWithinQuery ¶
type SpanWithinQuery struct {
// contains filtered or unexported fields
}
func (*SpanWithinQuery) Clause ¶
func (q *SpanWithinQuery) Clause() (QueryClause, error)
func (*SpanWithinQuery) Clear ¶
func (q *SpanWithinQuery) Clear()
func (*SpanWithinQuery) IsEmpty ¶
func (q *SpanWithinQuery) IsEmpty() bool
func (SpanWithinQuery) Kind ¶
func (SpanWithinQuery) Kind() QueryKind
func (SpanWithinQuery) MarshalBSON ¶
func (q SpanWithinQuery) MarshalBSON() ([]byte, error)
func (SpanWithinQuery) MarshalJSON ¶
func (q SpanWithinQuery) MarshalJSON() ([]byte, error)
func (*SpanWithinQuery) SpanWithin ¶
func (q *SpanWithinQuery) SpanWithin() (*SpanWithinQuery, error)
func (*SpanWithinQuery) UnmarshalBSON ¶
func (q *SpanWithinQuery) UnmarshalBSON(data []byte) error
func (*SpanWithinQuery) UnmarshalJSON ¶
func (q *SpanWithinQuery) UnmarshalJSON(data []byte) error
type SpanWithinQueryParams ¶
type SpanWithinQueryParams struct { Name string // contains filtered or unexported fields }
func (SpanWithinQueryParams) Clause ¶
func (p SpanWithinQueryParams) Clause() (QueryClause, error)
func (SpanWithinQueryParams) Kind ¶
func (SpanWithinQueryParams) Kind() QueryKind
func (SpanWithinQueryParams) SpanWithin ¶
func (p SpanWithinQueryParams) SpanWithin() (*SpanWithinQuery, error)
type SpatialRelation ¶
type SpatialRelation string
const ( // SpatialRelationIntersects - (default) Return all documents whose // geo_shape or geo_point field intersects the query geometry. SpatialRelationIntersects SpatialRelation = "INTERSECTS" // SpatialRelationDisjoint - Return all documents whose geo_shape or // geo_point field has nothing in common with the query geometry. SpatialRelationDisjoint SpatialRelation = "DISJOINT" // SpatialRelationWithin - Return all documents whose geo_shape or // geo_point field is within the query geometry. Line geometries are not // supported. SpatialRelationWithin SpatialRelation = "WITHIN" // SpatialRelationContains - Return all documents whose geo_shape or // geo_point field contains the query geometry. SpatialRelationContains SpatialRelation = "CONTAINS" )
type String ¶
type String string
func (String) Match ¶
func (s String) Match() (MatchQuery, error)
func (String) Terms ¶
func (s String) Terms() (TermsQuery, error)
type Strings ¶
type Strings []string
func (Strings) Terms ¶
func (s Strings) Terms() (TermsQuery, error)
type TermQuery ¶
type TermQuery struct {
// contains filtered or unexported fields
}
TermQuery returns documents that contain an exact term in a provided field.
You can use the term query to find documents based on a precise value such as a price, a product ID, or a username.
Avoid using the term query for text fields.
By default, Elasticsearch changes the values of text fields as part of analysis. This can make finding exact matches for text field values difficult.
To search text field values, use the match query instead.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
func NewTermQuery ¶
func NewTermQuery(params TermQueryParams) (*TermQuery, error)
NewTermQuery creates a new TermQuery
TermQuery returns documents that contain an exact term in a provided field.
You can use the term query to find documents based on a precise value such as a price, a product ID, or a username.
Avoid using the term query for text fields.
By default, Elasticsearch changes the values of text fields as part of analysis. This can make finding exact matches for text field values difficult.
To search text field values, use the match query instead.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
func (TermQuery) Boost ¶
func (b TermQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (TermQuery) CaseInsensitive ¶
func (ci TermQuery) CaseInsensitive() bool
func (*TermQuery) Clause ¶
func (t *TermQuery) Clause() (QueryClause, error)
func (TermQuery) MarshalBSON ¶
func (TermQuery) MarshalJSON ¶
func (*TermQuery) SetBoost ¶
func (b *TermQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*TermQuery) SetCaseInsensitive ¶
func (ci *TermQuery) SetCaseInsensitive(v bool)
func (*TermQuery) UnmarshalBSON ¶
func (*TermQuery) UnmarshalJSON ¶
type TermQueryParams ¶
type TermQueryParams struct { // The field which is being queried against. // // This will be ignored if set through a mutator Field string Value string Boost interface{} CaseInsensitive bool Name string // contains filtered or unexported fields }
func (TermQueryParams) Clause ¶
func (t TermQueryParams) Clause() (QueryClause, error)
func (TermQueryParams) Kind ¶
func (t TermQueryParams) Kind() QueryKind
func (TermQueryParams) Term ¶
func (t TermQueryParams) Term() (*TermQuery, error)
type TermVector ¶
type TermVector string
TermVector indicates which Term vectors, which contain information about the terms produced by the analysis process, including:
- a list of terms.
- the position (or order) of each term.
- the start and end character offsets mapping the term to its origin in the original string.
- payloads (if they are available) — user-defined binary data associated with each term position.
- These term vectors can be stored so that they can be retrieved for a particular document.
https://www.elastic.co/guide/en/elasticsearch/reference/current/term-vector.html
const ( // TermVectorNone - No term vectors are stored. (default) TermVectorNo TermVector = "no" // TermVectorYes - Just the terms in the field are stored. TermVectorYes TermVector = "yes" // TermVectorWithPositions - Terms and positions are stored. TermVectorWithPositions TermVector = "with_positions" // TermVectorWithOffsets - Terms and character offsets are stored. TermVectorWithOffsets TermVector = "with_offsets" // TermVectorWithPositionsOffsets - Terms, positions, and character offsets are stored. TermVectorWithPositionsOffsets TermVector = "with_positions_offsets" // TermVectorWithPoisitionsPayloads - Terms, positions, and payloads are stored. TermVectorWithPoisitionsPayloads TermVector = "with_positions_payloads" // TTermVectorPositionsOffsetsPayloads - Terms, positions, offsets and payloads are stored TermVectorPositionsOffsetsPayloads TermVector = "with_positions_offsets_payloads" )
func (*TermVector) IsValid ¶
func (tv *TermVector) IsValid() bool
func (TermVector) String ¶
func (tv TermVector) String() string
func (*TermVector) Validate ¶
func (tv *TermVector) Validate() error
type TermsLookup ¶
type TermsLookup = LookupValues
type TermsQuery ¶
type TermsQuery struct {
// contains filtered or unexported fields
}
func (TermsQuery) Boost ¶
func (b TermsQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (TermsQuery) CaseInsensitive ¶
func (ci TermsQuery) CaseInsensitive() bool
func (*TermsQuery) Clause ¶
func (t *TermsQuery) Clause() (QueryClause, error)
func (*TermsQuery) Clear ¶
func (t *TermsQuery) Clear()
func (TermsQuery) Field ¶
func (t TermsQuery) Field() string
func (*TermsQuery) IsEmpty ¶
func (t *TermsQuery) IsEmpty() bool
func (TermsQuery) Kind ¶
func (t TermsQuery) Kind() QueryKind
func (TermsQuery) Lookup ¶
func (t TermsQuery) Lookup() *TermsLookup
func (TermsQuery) MarshalBSON ¶
func (t TermsQuery) MarshalBSON() ([]byte, error)
func (TermsQuery) MarshalJSON ¶
func (t TermsQuery) MarshalJSON() ([]byte, error)
func (*TermsQuery) SetBoost ¶
func (b *TermsQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*TermsQuery) SetCaseInsensitive ¶
func (ci *TermsQuery) SetCaseInsensitive(v bool)
func (*TermsQuery) SetField ¶
func (t *TermsQuery) SetField(field string)
func (*TermsQuery) SetValue ¶
func (t *TermsQuery) SetValue(value []string) error
func (*TermsQuery) Terms ¶
func (t *TermsQuery) Terms() (*TermsQuery, error)
func (*TermsQuery) UnmarshalBSON ¶
func (t *TermsQuery) UnmarshalBSON(data []byte) error
func (*TermsQuery) UnmarshalJSON ¶
func (t *TermsQuery) UnmarshalJSON(data []byte) error
func (TermsQuery) Value ¶
func (t TermsQuery) Value() []string
type TermsQueryParams ¶
type TermsQueryParams struct { Field string Value []string Boost interface{} CaseInsensitive bool // contains filtered or unexported fields }
TermsQueryParams returns documents that contain one or more exact terms in a provided field.
The terms query is the same as the term query, except you can search for multiple values.
func (TermsQueryParams) Clause ¶
func (t TermsQueryParams) Clause() (QueryClause, error)
func (TermsQueryParams) Kind ¶
func (t TermsQueryParams) Kind() QueryKind
func (TermsQueryParams) Terms ¶
func (t TermsQueryParams) Terms() (*TermsQuery, error)
type TermsSetQuery ¶
type TermsSetQuery struct {
// contains filtered or unexported fields
}
func (TermsSetQuery) Boost ¶
func (b TermsSetQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (*TermsSetQuery) Clause ¶
func (q *TermsSetQuery) Clause() (QueryClause, error)
func (*TermsSetQuery) Clear ¶
func (q *TermsSetQuery) Clear()
func (*TermsSetQuery) IsEmpty ¶
func (q *TermsSetQuery) IsEmpty() bool
func (TermsSetQuery) Kind ¶
func (TermsSetQuery) Kind() QueryKind
func (TermsSetQuery) MarshalBSON ¶
func (q TermsSetQuery) MarshalBSON() ([]byte, error)
func (TermsSetQuery) MarshalJSON ¶
func (q TermsSetQuery) MarshalJSON() ([]byte, error)
func (TermsSetQuery) MinimumShouldMatchField ¶
func (q TermsSetQuery) MinimumShouldMatchField() string
func (TermsSetQuery) MinimumShouldMatchScript ¶
func (q TermsSetQuery) MinimumShouldMatchScript() *Script
func (*TermsSetQuery) SetBoost ¶
func (b *TermsSetQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*TermsSetQuery) SetMinimumShouldMatchField ¶
func (q *TermsSetQuery) SetMinimumShouldMatchField(v string)
func (*TermsSetQuery) SetMinimumShouldMatchScript ¶
func (q *TermsSetQuery) SetMinimumShouldMatchScript(script *Script)
func (*TermsSetQuery) SetTerms ¶
func (q *TermsSetQuery) SetTerms(terms []string) error
func (TermsSetQuery) Terms ¶
func (q TermsSetQuery) Terms() []string
func (*TermsSetQuery) TermsSet ¶
func (q *TermsSetQuery) TermsSet() (*TermsSetQuery, error)
func (*TermsSetQuery) UnmarshalBSON ¶
func (q *TermsSetQuery) UnmarshalBSON(data []byte) error
func (*TermsSetQuery) UnmarshalJSON ¶
func (q *TermsSetQuery) UnmarshalJSON(data []byte) error
type TermsSetQueryParams ¶
type TermsSetQueryParams struct { Name string // (Required) Field you wish to search. Field string // (Required, array of strings) Array of terms you wish to find in the // provided <field>. To return a document, a required number of terms must // exactly match the field values, including whitespace and capitalization. // // The required number of matching terms is defined in the // minimum_should_match_field or minimum_should_match_script parameter. Terms []string // (Optional, string) Numeric field containing the number of matching terms // required to return a document. MinimumShouldMatchField string // Custom script containing the number of matching terms required to return // a document. MinimumShouldMatchScript *Script Boost interface{} // contains filtered or unexported fields }
func (TermsSetQueryParams) Clause ¶
func (p TermsSetQueryParams) Clause() (QueryClause, error)
func (TermsSetQueryParams) Kind ¶
func (TermsSetQueryParams) Kind() QueryKind
func (TermsSetQueryParams) TermsSet ¶
func (p TermsSetQueryParams) TermsSet() (*TermsSetQuery, error)
type TermsSetter ¶
type TermsSetter interface {
TermsSet() (*TermsSetQuery, error)
}
type Termser ¶
type Termser interface {
Terms() (*TermsQuery, error)
}
Termser can be:
*picker.Terms *picker.Lookup picker.String picker.Strings
type TextField ¶
type TextField struct {
// contains filtered or unexported fields
}
A TextField is a field to index full-text values, such as the body of an email or the description of a product. These fields are analyzed, that is they are passed through an analyzer to convert the string into a list of individual terms before being indexed. The analysis process allows Elasticsearch to search for individual words within each full text field. Text fields are not used for sorting and seldom used for aggregations (although the significant text aggregation is a notable exception).
text fields are best suited for unstructured but human-readable content. If you need to index unstructured machine-generated content, see Mapping unstructured content.
If you need to index structured content such as email addresses, hostnames, status codes, or tags, it is likely that you should rather use a keyword field.
Use a field as both text and keyword ¶
Sometimes it is useful to have both a full text (text) and a keyword (keyword) version of the same field: one for full text search and the other for aggregations and sorting. This can be achieved with multi-fields.
https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html
func NewTextField ¶
func NewTextField(params TextFieldParams) (*TextField, error)
func (TextField) Analyzer ¶
func (ap TextField) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (TextField) Boost ¶
func (b TextField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (TextField) EagerGlobalOrdinals ¶
func (ego TextField) EagerGlobalOrdinals() bool
To support aggregations and other operations that require looking up field values on a per-document basis, Elasticsearch uses a data structure called doc values. Term-based field types such as keyword store their doc values using an ordinal mapping for a more compact representation. This mapping works by assigning each term an incremental integer or ordinal based on its lexicographic order. The field’s doc values store only the ordinals for each document instead of the original terms, with a separate lookup structure to convert between ordinals and terms.
When used during aggregations, ordinals can greatly improve performance. As an example, the terms aggregation relies only on ordinals to collect documents into buckets at the shard-level, then converts the ordinals back to their original term values when combining results across shards.
Each index segment defines its own ordinal mapping, but aggregations collect data across an entire shard. So to be able to use ordinals for shard-level operations like aggregations, Elasticsearch creates a unified mapping called global ordinals. The global ordinal mapping is built on top of segment ordinals, and works by maintaining a map from global ordinal to the local ordinal for each segment.
Global ordinals are used if a search contains any of the following components:
- Certain bucket aggregations on keyword, ip, and flattened fields. This includes terms aggregations as mentioned above, as well as composite, diversified_sampler, and significant_terms.
- Bucket aggregations on text fields that require fielddata to be enabled.
- Operations on parent and child documents from a join field, including has_child queries and parent aggregations.
https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html
func (TextField) FieldData ¶
func (fd TextField) FieldData() bool
FieldData determines whether the field use in-memory fielddata for sorting, aggregations, or scripting. Accepts true or false (default).
func (TextField) FieldDataFrequencyFilter ¶
func (fd TextField) FieldDataFrequencyFilter() *FieldDataFrequencyFilter
FieldDataFrequencyFilter can be used to reduce the number of terms loaded into memory, and thus reduce memory usage when using FieldData filtering.
func (TextField) Fields ¶
func (f TextField) Fields() Fields
Fields (Multi-fields) allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.
func (TextField) Index ¶
func (i TextField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (TextField) IndexOptions ¶
func (io TextField) IndexOptions() IndexOptions
IndexOptions parameter controls what information is added to the inverted index for search and highlighting purposes.
func (TextField) IndexPhrases ¶
func (cp TextField) IndexPhrases() bool
IndexPhrases is a param that if enabled, two-term word combinations (shingles) are indexed into a separate field. This allows exact phrase queries (no slop) to run more efficiently, at the expense of a larger index.
Note that this works best when stopwords are not removed, as phrases containing stopwords will not use the subsidiary field and will fall back to a standard phrase query. Accepts true or false (default).
func (TextField) IndexPrefixes ¶
func (ip TextField) IndexPrefixes() *IndexPrefixes
func (TextField) MarshalBSON ¶
func (TextField) MarshalJSON ¶
func (TextField) Meta ¶
func (m TextField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (TextField) Norms ¶
func (n TextField) Norms() bool
Norms determines whether field-length should be taken into account when scoring queries. Accepts true (default) or false.
func (TextField) PositionIncrementGap ¶
func (pig TextField) PositionIncrementGap() float64
PositionIncrementGap is the number of fake term position which should be inserted between each element of an array of strings. Defaults to the position_increment_gap configured on the analyzer which defaults to 100. 100 was chosen because it prevents phrase queries with reasonably large slops (less than 100) from matching terms across field values.
func (TextField) SearchAnalyzer ¶
func (sa TextField) SearchAnalyzer() string
SearchAnalyzer overrides Analyzer for search analysis
func (TextField) SearchQuoteAnalyzer ¶
func (sq TextField) SearchQuoteAnalyzer() string
SearchQuoteAnalyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
func (*TextField) SetAnalyzer ¶
func (ap *TextField) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*TextField) SetBoost ¶
func (b *TextField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*TextField) SetEagerGlobalOrdinals ¶
func (ego *TextField) SetEagerGlobalOrdinals(v interface{}) error
SetEagerGlobalOrdinals sets the eager_global_ordinals value to v
func (*TextField) SetFieldData ¶
func (fd *TextField) SetFieldData(v interface{}) error
SetFieldData sets FieldData to v
func (*TextField) SetFieldDataFrequencyFilter ¶
func (fd *TextField) SetFieldDataFrequencyFilter(v *FieldDataFrequencyFilter) error
SetFieldDataFrequencyFilter sets the FieldDataFrequencyFilter value to v
func (*TextField) SetIndex ¶
func (i *TextField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*TextField) SetIndexOptions ¶
func (io *TextField) SetIndexOptions(v IndexOptions) error
SetIndexOptions sets IndexOptions value to v
func (*TextField) SetIndexPhrases ¶
func (cp *TextField) SetIndexPhrases(v interface{}) error
SetIndexPhrases sets the IndexPhrases value to v
func (*TextField) SetIndexPrefixes ¶
func (ip *TextField) SetIndexPrefixes(v *IndexPrefixes) error
func (*TextField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*TextField) SetNorms ¶
func (n *TextField) SetNorms(v interface{}) error
SetNorms sets the Norms value to v
func (*TextField) SetPositionIncrementGap ¶
func (pig *TextField) SetPositionIncrementGap(v interface{}) error
SetPositionIncrementGap sets the PositionIncrementGap Value to v
func (*TextField) SetSearchAnalyzer ¶
func (sa *TextField) SetSearchAnalyzer(v string)
SetSearchAnalyzer sets search_analyzer to v
func (TextField) SetSearchQuoteAnalyzer ¶
func (sq TextField) SetSearchQuoteAnalyzer(v string)
SetSearchQuoteAnalyzer sets search_quote_analyzer to v
func (*TextField) SetSimilarity ¶
func (s *TextField) SetSimilarity(v Similarity) error
SetSimilarity sets the Similarity Value to v
func (*TextField) SetStore ¶
func (sa *TextField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (*TextField) SetTermVector ¶
func (tv *TextField) SetTermVector(v TermVector) error
SetTermVector sets the TermVector Value to v
func (TextField) Similarity ¶
func (s TextField) Similarity() Similarity
Similarity is mostly useful for text fields, but can also apply to other field types.
func (TextField) Store ¶
func (sa TextField) Store() bool
Store returns the StoreAttr Value or false
func (TextField) TermVector ¶
func (tv TextField) TermVector() TermVector
TermVector determines whether term vectors should be stored for the field. Defaults to "no" / TermVectorNone.
func (*TextField) UnmarshalBSON ¶
func (*TextField) UnmarshalJSON ¶
type TextFieldParams ¶
type TextFieldParams struct { // The analyzer which should be used for the text field, both at index-time // and at search-time (unless overridden by the search_analyzer). Defaults // to the default index analyzer, or the standard analyzer. Analyzer string `json:"analyzer,omitempty"` // Should global ordinals be loaded eagerly on refresh? Accepts true or false // (default). Enabling this is a good idea on fields that are frequently used // for (significant) terms aggregations. EagerGlobalOrdinals interface{} `json:"eager_global_ordinals,omitempty"` // Can the field use in-memory fielddata for sorting, aggregations, or // scripting? Accepts true or false (default). FieldData interface{} `json:"fielddata,omitempty"` // Expert settings which allow to decide which values to load in memory when // fielddata is enabled. By default all values are loaded. FieldDataFrequencyFilter *FieldDataFrequencyFilter `json:"fielddata_frequency_filter,omitempty"` // Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers. Fields FieldMap `json:"fields,omitempty"` // Should the field be searchable? Accepts true (default) or false. Index interface{} `json:"index,omitempty"` // What information should be stored in the index, for search and // highlighting purposes. Defaults to positions IndexOptions IndexOptions `json:"index_options,omitempty"` // If enabled, term prefixes of between 2 and 5 characters are indexed into // a separate field. This allows prefix searches to run more efficiently, at // the expense of a larger index. IndexPrefixes *IndexPrefixes `json:"index_prefixes,omitempty"` // If enabled, two-term word combinations (shingles) are indexed into a separate field. This allows exact phrase queries (no slop) to run more efficiently, at the expense of a larger index. Note that this works best when stopwords are not removed, as phrases containing stopwords will not use the subsidiary field and will fall back to a standard phrase query. Accepts true or false (default). IndexPhrases interface{} `json:"index_phrases,omitempty"` // Whether field-length should be taken into account when scoring queries. // Accepts true (default) or false. Norms interface{} `json:"norms,omitempty"` // The number of fake term position which should be inserted between each element of an array of strings. Defaults to the position_increment_gap configured on the analyzer which defaults to 100. 100 was chosen because it prevents phrase queries with reasonably large slops (less than 100) from matching terms across field values. PositionIncrementGap interface{} `json:"position_increment_gap,omitempty"` // Whether the field value should be stored and retrievable separately from // the _source field. Accepts true or false (default). Store interface{} `json:"store,omitempty"` // The analyzer that should be used at search time on the text field. Defaults to the analyzer setting. SearchAnalyzer string `json:"search_analyzer,omitempty"` // The analyzer that should be used at search time when a phrase is // encountered. Defaults to the search_analyzer setting. SearchQuoteAnalyzer string `json:"search_quote_analyzer,omitempty"` // Which scoring algorithm or similarity should be used. Defaults to BM25. Similarity Similarity `json:"similarity,omitempty"` // Whether term vectors should be stored for the field. Defaults to no. TermVector TermVector `json:"term_vector,omitempty"` // Metadata about the field. Meta Meta `json:"meta,omitempty"` // Deprecated // // Mapping field-level query time boosting. Accepts a floating point number, defaults to 1.0. Boost interface{} `json:"boost,omitempty"` }
func (TextFieldParams) Field ¶
func (p TextFieldParams) Field() (Field, error)
func (TextFieldParams) Text ¶
func (p TextFieldParams) Text() (*TextField, error)
func (TextFieldParams) Type ¶
func (TextFieldParams) Type() FieldType
type TokenCountField ¶
type TokenCountField struct {
// contains filtered or unexported fields
}
A TokenCountField is really an integer field which accepts string values, analyzes them, then indexes the number of tokens in the string.
https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html
func NewTokenCountField ¶
func NewTokenCountField(params TokenCountFieldParams) (*TokenCountField, error)
func (TokenCountField) Analyzer ¶
func (ap TokenCountField) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (TokenCountField) Boost ¶
func (b TokenCountField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (TokenCountField) DocValues ¶
func (dv TokenCountField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (TokenCountField) EnablePositionIncrements ¶
func (epi TokenCountField) EnablePositionIncrements() bool
EnablePositionIncrements deteremines if all fields in the nested object are also added to the root document as standard (flat) fields. Defaults to false
func (*TokenCountField) Field ¶
func (t *TokenCountField) Field() (Field, error)
func (TokenCountField) Index ¶
func (i TokenCountField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (TokenCountField) MarshalBSON ¶
func (t TokenCountField) MarshalBSON() ([]byte, error)
func (TokenCountField) MarshalJSON ¶
func (t TokenCountField) MarshalJSON() ([]byte, error)
func (TokenCountField) NullValue ¶
func (nv TokenCountField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*TokenCountField) SetAnalyzer ¶
func (ap *TokenCountField) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*TokenCountField) SetBoost ¶
func (b *TokenCountField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*TokenCountField) SetDocValues ¶
func (dv *TokenCountField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*TokenCountField) SetEnablePositionIncrements ¶
func (epi *TokenCountField) SetEnablePositionIncrements(v interface{}) error
SetEnablePositionIncrements sets the EnablePositionIncrements Value to v
func (*TokenCountField) SetIndex ¶
func (i *TokenCountField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*TokenCountField) SetNullValue ¶
func (nv *TokenCountField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*TokenCountField) SetStore ¶
func (sa *TokenCountField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (TokenCountField) Store ¶
func (sa TokenCountField) Store() bool
Store returns the StoreAttr Value or false
func (TokenCountField) Type ¶
func (TokenCountField) Type() FieldType
func (*TokenCountField) UnmarshalBSON ¶
func (t *TokenCountField) UnmarshalBSON(data []byte) error
func (*TokenCountField) UnmarshalJSON ¶
func (t *TokenCountField) UnmarshalJSON(data []byte) error
type TokenCountFieldParams ¶
type TokenCountFieldParams struct { // The analyzer which should be used to analyze the string value. Required. // For best performance, use an analyzer without token filters. Analyzer string `json:"analyzer,omitempty"` // Indicates if position increments should be counted. Set to false if you // don’t want to count tokens removed by analyzer filters (like stop). // Defaults to true. EnablePositionIncrements interface{} `json:"enable_position_increments,omitempty"` // Should the field be stored on disk in a column-stride fashion, so that // it can later be used for sorting, aggregations, or scripting? Accepts // true (default) or false. DocValues interface{} `json:"doc_values,omitempty"` // Should the field be searchable? Accepts true (default) and false. Index interface{} `json:"index,omitempty"` // Accepts a numeric value of the same type as the field which is // substituted for any explicit null values. Defaults to null, which means // the field is treated as missing. NullValue interface{} `json:"null_value,omitempty"` // Deprecated Boost interface{} `json:"boost,omitempty"` // Whether the field value should be stored and retrievable separately from // the _source field. Accepts true or false (default). Store interface{} `json:"store,omitempty"` }
func (TokenCountFieldParams) Field ¶
func (p TokenCountFieldParams) Field() (Field, error)
func (TokenCountFieldParams) TokenCount ¶
func (p TokenCountFieldParams) TokenCount() (*TokenCountField, error)
func (TokenCountFieldParams) Type ¶
func (TokenCountFieldParams) Type() FieldType
type TypeQuery ¶
type TypeQuery struct {
// contains filtered or unexported fields
}
func (*TypeQuery) Clause ¶
func (q *TypeQuery) Clause() (QueryClause, error)
func (TypeQuery) MarshalBSON ¶
func (TypeQuery) MarshalJSON ¶
func (*TypeQuery) UnmarshalBSON ¶
func (*TypeQuery) UnmarshalJSON ¶
type TypeQueryParams ¶
type TypeQueryParams struct { Name string // contains filtered or unexported fields }
func (TypeQueryParams) Clause ¶
func (p TypeQueryParams) Clause() (QueryClause, error)
func (TypeQueryParams) Kind ¶
func (TypeQueryParams) Kind() QueryKind
func (TypeQueryParams) Type ¶
func (p TypeQueryParams) Type() (*TypeQuery, error)
type UnsignedLongField ¶
type UnsignedLongField struct {
// contains filtered or unexported fields
}
An UnsignedLongField is an unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func NewUnsignedLongField ¶
func NewUnsignedLongField(params UnsignedLongFieldParams) (*UnsignedLongField, error)
func (UnsignedLongField) Boost ¶
func (b UnsignedLongField) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (UnsignedLongField) Coerce ¶
func (cp UnsignedLongField) Coerce() bool
Coerce attempts to clean up dirty values to fit the data type of a field.
func (UnsignedLongField) DocValues ¶
func (dv UnsignedLongField) DocValues() bool
DocValues returns DocValues, defaulted to true
func (*UnsignedLongField) Field ¶
func (ul *UnsignedLongField) Field() (Field, error)
func (UnsignedLongField) IgnoreMalformed ¶
func (im UnsignedLongField) IgnoreMalformed() bool
IgnoreMalformed determines if malformed numbers are ignored. If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception and reject the whole document.
func (UnsignedLongField) Index ¶
func (i UnsignedLongField) Index() bool
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (UnsignedLongField) MarshalJSON ¶
func (ul UnsignedLongField) MarshalJSON() ([]byte, error)
func (UnsignedLongField) Meta ¶
func (m UnsignedLongField) Meta() Meta
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (UnsignedLongField) NullValue ¶
func (nv UnsignedLongField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (*UnsignedLongField) SetBoost ¶
func (b *UnsignedLongField) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*UnsignedLongField) SetCoerce ¶
func (cp *UnsignedLongField) SetCoerce(v interface{}) error
SetCoerce sets CoerceParam to v
func (*UnsignedLongField) SetDocValues ¶
func (dv *UnsignedLongField) SetDocValues(v interface{}) error
SetDocValues sets Value to v (bool)
func (*UnsignedLongField) SetIgnoreMalformed ¶
func (im *UnsignedLongField) SetIgnoreMalformed(v interface{}) error
SetIgnoreMalformed sets ignore_malformed to v
func (*UnsignedLongField) SetIndex ¶
func (i *UnsignedLongField) SetIndex(v interface{}) error
SetIndex sets the Index value to v
Index controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
func (*UnsignedLongField) SetMeta ¶
SetMeta sets the metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
func (*UnsignedLongField) SetNullValue ¶
func (nv *UnsignedLongField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (*UnsignedLongField) SetStore ¶
func (sa *UnsignedLongField) SetStore(v interface{}) error
SetStore sets StoreAttr Value to v
func (UnsignedLongField) Store ¶
func (sa UnsignedLongField) Store() bool
Store returns the StoreAttr Value or false
func (UnsignedLongField) Type ¶
func (UnsignedLongField) Type() FieldType
func (*UnsignedLongField) UnmarshalJSON ¶
func (ul *UnsignedLongField) UnmarshalJSON(data []byte) error
type UnsignedLongFieldParams ¶
type UnsignedLongFieldParams numberFieldParams
UnsignedLongFieldParams are params for an UnsignedLongField which is an unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1.
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
func (UnsignedLongFieldParams) Field ¶
func (l UnsignedLongFieldParams) Field() (Field, error)
func (UnsignedLongFieldParams) Type ¶
func (UnsignedLongFieldParams) Type() FieldType
func (UnsignedLongFieldParams) UnsignedLong ¶
func (l UnsignedLongFieldParams) UnsignedLong() (*UnsignedLongField, error)
type UpdateByQuerier ¶
type UpdateByQuerier interface {
UpdateByQuery() (*UpdateByQuery, error)
}
type UpdateByQuery ¶
type UpdateByQuery struct {
// contains filtered or unexported fields
}
func NewUpdateByQuery ¶
func NewUpdateByQuery(params UpdateByQueryParams) (*UpdateByQuery, error)
func (*UpdateByQuery) Conflicts ¶
func (u *UpdateByQuery) Conflicts() Conflicts
func (UpdateByQuery) MarshalBSON ¶
func (u UpdateByQuery) MarshalBSON() ([]byte, error)
func (UpdateByQuery) MarshalJSON ¶
func (u UpdateByQuery) MarshalJSON() ([]byte, error)
func (*UpdateByQuery) Query ¶
func (u *UpdateByQuery) Query() *Query
func (*UpdateByQuery) Script ¶
func (u *UpdateByQuery) Script() *Script
func (*UpdateByQuery) SetConflicts ¶
func (u *UpdateByQuery) SetConflicts(c Conflicts)
func (*UpdateByQuery) SetQuery ¶
func (u *UpdateByQuery) SetQuery(query Querier) error
func (*UpdateByQuery) SetScript ¶
func (u *UpdateByQuery) SetScript(script *Script)
func (*UpdateByQuery) UnmarshalBSON ¶
func (u *UpdateByQuery) UnmarshalBSON(data []byte) error
func (*UpdateByQuery) UnmarshalJSON ¶
func (u *UpdateByQuery) UnmarshalJSON(data []byte) error
type UpdateByQueryParams ¶
func (UpdateByQueryParams) UpdateByQuery ¶
func (p UpdateByQueryParams) UpdateByQuery() (*UpdateByQuery, error)
type UpdateByQueryResponse ¶
type UpdateByQueryResponse struct { Took int64 `json:"took"` TimedOut bool `json:"timed_out"` Total int64 `json:"total"` Updated int64 `json:"updated"` Deleted int64 `json:"deleted"` Batches int64 `json:"batches"` VersionConflicts int64 `json:"version_conflicts"` Noops int64 `json:"noops"` Retries Retries `json:"retries"` ThrottledMillis int64 `json:"throttled_millis"` RequestsPerSecond float64 `json:"requests_per_second"` Failures []interface{} `json:"failures"` ThrottledUntilMillis int64 `json:"throttled_until_millis"` }
func DecodeUpdateByQueryResponse ¶
func DecodeUpdateByQueryResponse(body io.Reader) (*UpdateByQueryResponse, error)
type ValidationMethod ¶
type ValidationMethod string
const ( ValidationMethodStrict ValidationMethod = "STRICT" ValidationMethodIgnoreMalformed ValidationMethod = "IGNORE_MALFORMED" ValidationMethodCoerce ValidationMethod = "COERCE" )
type Vertices ¶
type Vertices struct { Top interface{} `json:"top"` Bottom interface{} `json:"bottom"` Left interface{} `json:"left"` Right interface{} `json:"right"` }
Vertices for GeoBoundingBoxQuery
func (Vertices) BoundingBox ¶
func (v Vertices) BoundingBox() interface{}
func (Vertices) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Vertices) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Vertices) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Vertices) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type WKT ¶
type WKT string
func (WKT) BoundingBox ¶
func (wkt WKT) BoundingBox() interface{}
func (WKT) MarshalEasyJSON ¶
func (WKT) MarshalJSON ¶
type WeightFunction ¶
type WeightFunction struct {
// contains filtered or unexported fields
}
func (WeightFunction) Filter ¶
func (w WeightFunction) Filter() QueryClause
func (WeightFunction) FuncKind ¶
func (WeightFunction) FuncKind() FuncKind
func (WeightFunction) MarshalBSON ¶
func (w WeightFunction) MarshalBSON() ([]byte, error)
func (WeightFunction) MarshalJSON ¶
func (w WeightFunction) MarshalJSON() ([]byte, error)
func (*WeightFunction) SetFilter ¶
func (w *WeightFunction) SetFilter(c CompleteClauser) error
func (*WeightFunction) SetWeight ¶
func (b *WeightFunction) SetWeight(v interface{}) error
SetWeight sets Weight to v
func (*WeightFunction) UnmarshalBSON ¶
func (w *WeightFunction) UnmarshalBSON(data []byte) error
func (*WeightFunction) UnmarshalJSON ¶
func (w *WeightFunction) UnmarshalJSON(data []byte) error
type WeightFunctionParams ¶
type WeightFunctionParams struct { // Weight Weight float64 Filter CompleteClauser }
func (WeightFunctionParams) FuncKind ¶
func (WeightFunctionParams) FuncKind() FuncKind
func (WeightFunctionParams) Function ¶
func (w WeightFunctionParams) Function() (Function, error)
type WildcardField ¶
type WildcardField struct {
// contains filtered or unexported fields
}
A WildcardField stores values optimised for wildcard grep-like queries. Wildcard queries are possible on other field types but suffer from constraints:
- text fields limit matching of any wildcard expressions to individual tokens rather than the original whole value held in a field
- keyword fields are untokenized but slow at performing wildcard queries (especially patterns with leading wildcards).
Internally the wildcard field indexes the whole field value using ngrams and stores the full string. The index is used as a rough filter to cut down the number of values that are then checked by retrieving and checking the full values. This field is especially well suited to run grep-like queries on log lines. Storage costs are typically lower than those of keyword fields but search speeds for exact matches on full terms are slower.
Limitations ¶
wildcard fields are untokenized like keyword fields, so do not support queries that rely on word positions such as phrase queries.
https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html#wildcard-field-type
func NewWildcardField ¶
func NewWildcardField(params WildcardFieldParams) (*WildcardField, error)
func (*WildcardField) Field ¶
func (w *WildcardField) Field() (Field, error)
func (WildcardField) IgnoreAbove ¶
func (ia WildcardField) IgnoreAbove() float64
IgnoreAbove signals to not index any string longer than this value. Defaults to 2147483647 so that all values would be accepted. Please however note that default dynamic mapping rules create a sub keyword field that overrides this default by setting ignore_above: 256.
func (WildcardField) MarshalBSON ¶
func (w WildcardField) MarshalBSON() ([]byte, error)
func (WildcardField) MarshalJSON ¶
func (w WildcardField) MarshalJSON() ([]byte, error)
func (WildcardField) NullValue ¶
func (nv WildcardField) NullValue() interface{}
NullValue parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
func (WildcardField) SetIgnoreAbove ¶
func (ia WildcardField) SetIgnoreAbove(v interface{}) error
SetIgnoreAbove sets the IgnoreAbove value to v
func (*WildcardField) SetNullValue ¶
func (nv *WildcardField) SetNullValue(v interface{})
SetNullValue sets the NullValue value to v
func (WildcardField) Type ¶
func (WildcardField) Type() FieldType
func (*WildcardField) UnmarshalBSON ¶
func (w *WildcardField) UnmarshalBSON(data []byte) error
func (*WildcardField) UnmarshalJSON ¶
func (w *WildcardField) UnmarshalJSON(data []byte) error
type WildcardFieldParams ¶
type WildcardFieldParams struct { // NullValue parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched NullValue interface{} `json:"null_value,omitempty"` // IgnoreAbove signiall to not index any string longer than this value. // Defaults to 2147483647 so that all values would be accepted. Please // however note that default dynamic mapping rules create a sub keyword // field that overrides this default by setting ignore_above: 256. IgnoreAbove interface{} `json:"ignore_above,omitempty"` }
func (WildcardFieldParams) Field ¶
func (p WildcardFieldParams) Field() (Field, error)
func (WildcardFieldParams) Type ¶
func (WildcardFieldParams) Type() FieldType
func (WildcardFieldParams) Wildcard ¶
func (p WildcardFieldParams) Wildcard() (*WildcardField, error)
type WildcardQuery ¶
type WildcardQuery struct {
// contains filtered or unexported fields
}
func (WildcardQuery) Boost ¶
func (b WildcardQuery) Boost() float64
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
func (WildcardQuery) CaseInsensitive ¶
func (ci WildcardQuery) CaseInsensitive() bool
func (*WildcardQuery) Clause ¶
func (q *WildcardQuery) Clause() (QueryClause, error)
func (*WildcardQuery) Clear ¶
func (q *WildcardQuery) Clear()
func (*WildcardQuery) IsEmpty ¶
func (q *WildcardQuery) IsEmpty() bool
func (WildcardQuery) Kind ¶
func (WildcardQuery) Kind() QueryKind
func (WildcardQuery) MarshalBSON ¶
func (q WildcardQuery) MarshalBSON() ([]byte, error)
func (WildcardQuery) MarshalJSON ¶
func (q WildcardQuery) MarshalJSON() ([]byte, error)
func (*WildcardQuery) SetBoost ¶
func (b *WildcardQuery) SetBoost(v interface{}) error
SetBoost sets Boost to v
func (*WildcardQuery) SetCaseInsensitive ¶
func (ci *WildcardQuery) SetCaseInsensitive(v bool)
func (*WildcardQuery) SetRewrite ¶
func (*WildcardQuery) SetValue ¶
func (q *WildcardQuery) SetValue(value string) error
func (*WildcardQuery) UnmarshalBSON ¶
func (q *WildcardQuery) UnmarshalBSON(data []byte) error
func (*WildcardQuery) UnmarshalJSON ¶
func (q *WildcardQuery) UnmarshalJSON(data []byte) error
func (WildcardQuery) Value ¶
func (q WildcardQuery) Value() string
func (*WildcardQuery) Wildcard ¶
func (q *WildcardQuery) Wildcard() (*WildcardQuery, error)
type WildcardQueryParams ¶
type WildcardQueryParams struct { Name string Boost interface{} Value string CaseInsensitive bool Field string Rewrite Rewrite // contains filtered or unexported fields }
func (WildcardQueryParams) Clause ¶
func (p WildcardQueryParams) Clause() (QueryClause, error)
func (WildcardQueryParams) Kind ¶
func (WildcardQueryParams) Kind() QueryKind
func (WildcardQueryParams) Wildcard ¶
func (p WildcardQueryParams) Wildcard() (*WildcardQuery, error)
type WildcardRule ¶
type WildcardRule struct {
// contains filtered or unexported fields
}
func (WildcardRule) Analyzer ¶
func (ap WildcardRule) Analyzer() string
Analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Unless overridden with the search_analyzer mapping parameter, this analyzer is used for both index and search analysis.
func (WildcardRule) Filter ¶
func (r WildcardRule) Filter() *RuleFilter
func (WildcardRule) MarshalBSON ¶
func (p WildcardRule) MarshalBSON() ([]byte, error)
func (WildcardRule) MarshalJSON ¶
func (p WildcardRule) MarshalJSON() ([]byte, error)
func (*WildcardRule) Rule ¶
func (w *WildcardRule) Rule() (QueryRule, error)
func (*WildcardRule) SetAnalyzer ¶
func (ap *WildcardRule) SetAnalyzer(v string)
SetAnalyzer sets Analyzer to v
func (*WildcardRule) SetFilter ¶
func (r *WildcardRule) SetFilter(filter RuleFilterer) error
func (*WildcardRule) SetUseField ¶
func (uf *WildcardRule) SetUseField(field string)
func (*WildcardRule) SetWildcard ¶
func (w *WildcardRule) SetWildcard(wildcard string) error
func (WildcardRule) Type ¶
func (WildcardRule) Type() RuleType
func (*WildcardRule) UnmarshalBSON ¶
func (p *WildcardRule) UnmarshalBSON(data []byte) error
func (*WildcardRule) UnmarshalJSON ¶
func (p *WildcardRule) UnmarshalJSON(data []byte) error
func (WildcardRule) Wildcard ¶
func (w WildcardRule) Wildcard() string
type WildcardRuleParams ¶
type WildcardRuleParams struct { // (Required) Wildcard pattern used to find matching terms. Wildcard string `json:"wildcard"` // (Optional, string) analyzer used to analyze terms in the query. Defaults // to the top-level <field>'s analyzer. Analyzer string `json:"analyzer,omitempty"` // (Optional) An optional interval filter. Filter RuleFilterer `json:"filter,omitempty"` // (Optional) If specified, then match intervals from this field // rather than the top-level <field>. // // The wildcard is normalized using the search analyzer from this field, // unless a separate analyzer is specified. UseField string `json:"use_field,omitempty"` }
func (WildcardRuleParams) Rule ¶
func (p WildcardRuleParams) Rule() (Rule, error)
func (WildcardRuleParams) Type ¶
func (WildcardRuleParams) Type() RuleType
func (WildcardRuleParams) WildcardRule ¶
func (p WildcardRuleParams) WildcardRule() (*WildcardRule, error)
type Wildcarder ¶
type Wildcarder interface {
Wildcard() (*WildcardQuery, error)
}
type WithAnalyzeWildcard ¶
type WithAnalyzer ¶
type WithAnalyzer interface { // Analyzer parameter specifies the analyzer used for text analysis when // indexing or searching a text field. Analyzer() string // SetAnalyzer sets Analyzer to v SetAnalyzer(v string) }
WithAnalyzer is a Field mapping with an analyzer
Analyzer ¶
The analyzer parameter specifies the analyzer used for text analysis when indexing or searching a text field.
Only text fields support the analyzer mapping parameter.
Search Quote Analyzer ¶
The search_quote_analyzer setting allows you to specify an analyzer for phrases, this is particularly useful when dealing with disabling stop words for phrase queries.
To disable stop words for phrases a field utilising three analyzer settings will be required:
1. An analyzer setting for indexing all terms including stop words
2. A search_analyzer setting for non-phrase queries that will remove stop words
3. A search_quote_analyzer setting for phrase queries that will not remove stop words
https://www.elastic.co/guide/en/elasticsearch/reference/current/analyzer.html
type WithAutoGenerateSynonymsPhraseQuery ¶
type WithAutoGenerateSynonymsPhraseQuery interface { // AutoGenerateSynonymsPhraseQuery determines if match phrase queries are // automatically created for multi-term synonyms. Defaults to true. AutoGenerateSynonymsPhraseQuery() bool // SetAutoGenerateSynonymsPhraseQuery sets AutoGenerateSynonymsPhraseQueryValue to v SetAutoGenerateSynonymsPhraseQuery(v interface{}) error }
WithAutoGenerateSynonymsPhraseQuery is an interface for the query mixin that adds auto_generate_synonyms_phrase_query param
type WithBoost ¶
type WithBoost interface { // Boost is a floating point number used to decrease or increase the relevance // scores of a query. Defaults to 1.0. // // You can use the boost parameter to adjust relevance scores for searches // containing two or more queries. // // Boost values are relative to the default value of 1.0. A boost value between // 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases // the relevance score. Boost() float64 SetBoost(v interface{}) error }
WithBoost is an interface for queries with the boost parameter
Boost is a floating point number used to decrease or increase the relevance scores of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
type WithBoostMode ¶
type WithCaseInsensitive ¶
WithCaseInsensitive is a query mixin that adds the case_insensitive param
(Optional, Boolean) Allows ASCII case insensitive matching of the value with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
type WithCoerce ¶
type WithCoerce interface { // Coerce attempts to clean up dirty values to fit the data type of a field. // For instance: // // Default: false Coerce() bool // SetCoerce sets CoerceParam to v SetCoerce(v interface{}) error }
WithCoerce has a Coerce param
type WithCopyTo ¶
WithCopyTo is a Field mapping with a CopyTo param
The copy_to parameter allows you to copy the values of multiple fields into a group field, which can then be queried as a single field.
https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html
type WithCutoffFrequency ¶
type WithDefaultOperator ¶
type WithDepthLimit ¶
type WithDimensions ¶
type WithDimensions interface { // Dimensions is the number of dimensions in the vector, required parameter. Dimensions() int // SetDimensions sets the dimensions to v SetDimensions(v interface{}) error }
WithDimensions is a mapping with the dims parameter
dims is the number of dimensions in the vector, required parameter for fields that have it.
https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html
type WithDocValues ¶
type WithDocValues interface { // SetDocValues sets Value to v SetDocValues(v interface{}) error // DocValues returns DocValues, defaulted to true DocValues() bool }
WithDocValues is a mapping with a DocValues parameter
Most fields are indexed by default, which makes them searchable. The inverted index allows queries to look up the search term in unique sorted list of terms, and from that immediately have access to the list of documents that contain the term.
Sorting, aggregations, and access to field values in scripts requires a different data access pattern. Instead of looking up the term and finding documents, we need to be able to look up the document and find the terms that it has in a field.
Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible. They store the same values as the _source but in a column-oriented fashion that is way more efficient for sorting and aggregations. Doc values are supported on almost all field types, with the notable exception of text and annotated_text fields.
All fields which support doc values have them enabled by default. If you are sure that you don’t need to sort or aggregate on a field, or access the field value from a script, you can disable doc values in order to save disk space
https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html
type WithEagerGlobalOrdinals ¶
type WithEagerGlobalOrdinals interface { // To support aggregations and other operations that require looking up field // values on a per-document basis, Elasticsearch uses a data structure called // doc values. Term-based field types such as keyword store their doc values // using an ordinal mapping for a more compact representation. This mapping // works by assigning each term an incremental integer or ordinal based on its // lexicographic order. The field’s doc values store only the ordinals for each // document instead of the original terms, with a separate lookup structure to // convert between ordinals and terms. // // When used during aggregations, ordinals can greatly improve performance. As // an example, the terms aggregation relies only on ordinals to collect // documents into buckets at the shard-level, then converts the ordinals back to // their original term values when combining results across shards. // // Each index segment defines its own ordinal mapping, but aggregations collect // data across an entire shard. So to be able to use ordinals for shard-level // operations like aggregations, Elasticsearch creates a unified mapping called // global ordinals. The global ordinal mapping is built on top of segment // ordinals, and works by maintaining a map from global ordinal to the local // ordinal for each segment. // // Global ordinals are used if a search contains any of the following // components: // // - Certain bucket aggregations on keyword, ip, and flattened fields. This // includes terms aggregations as mentioned above, as well as composite, // diversified_sampler, and significant_terms. // // - Bucket aggregations on text fields that require fielddata to be enabled. // // - Operations on parent and child documents from a join field, including // has_child queries and parent aggregations. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/eager-global-ordinals.html EagerGlobalOrdinals() bool // SetEagerGlobalOrdinals sets the EagerGlobalOrdinals value to v SetEagerGlobalOrdinals(v interface{}) error }
type WithEnablePositionIncrements ¶
type WithEnablePositionIncrements interface { //Indicates if position increments should be counted. Set to false if you //don’t want to count tokens removed by analyzer filters (like stop). //Defaults to true. EnablePositionIncrements() bool // SetEnablePositionIncrements sets the EnablePositionIncrements Value to v SetEnablePositionIncrements(v interface{}) error }
WithEnablePositionIncrements is a mapping with the enable_position_increments parameter
EnablePositionIncrements Indicates if position increments should be counted. Set to false if you don’t want to count tokens removed by analyzer filters (like stop). Defaults to true.
https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html#token-count-params
type WithEnabled ¶
type WithEnabled interface { // Enabled determines whether the JSON value given for the object field should be // parsed and indexed (true, default) or completely ignored (false). Enabled() bool // SetEnabled sets Enabled to v SetEnabled(v interface{}) error }
WithEnabled is a mapping with an enabled parameter
Enabled determines whether the JSON value given for the object field should be parsed and indexed (true, default) or completely ignored (false).
Elasticsearch tries to index all of the fields you give it, but sometimes you want to just store the field without indexing it. For instance, imagine that you are using Elasticsearch as a web session store. You may want to index the session ID and last update time, but you don’t need to query or run aggregations on the session data itself.
The enabled setting, which can be applied only to the top-level mapping definition and to object fields, causes Elasticsearch to skip parsing of the contents of the field entirely. The JSON can still be retrieved from the _source field, but it is not searchable or stored in any other way
https://www.elastic.co/guide/en/elasticsearch/reference/current/enabled.html
type WithFieldData ¶
type WithFieldData interface { // FieldData determines whether the field use in-memory fielddata for // sorting, aggregations, or scripting. Accepts true or false (default). FieldData() bool // SetFieldData sets FieldData to v SetFieldData(v bool) error }
WithFieldData is a mapping with the FieldData param
FieldData determines whether the field can use in-memory fielddata for sorting, aggregations, or scripting? Accepts true or false (default).
Text fields are searchable by default, but by default are not available for aggregations, sorting, or scripting. If you try to sort, aggregate, or access values from a script on a text field, you will see this exception:
Fielddata is disabled on text fields by default. Set fielddata=true on your_field_name in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.
Field data is the only way to access the analyzed tokens from a full text field in aggregations, sorting, or scripting. For example, a full text field like New York would get analyzed as new and york. To aggregate on these tokens requires field data.
IMPORTANT ¶
It usually doesn’t make sense to enable fielddata on text fields. Field data is stored in the heap with the field data cache because it is expensive to calculate. Calculating the field data can cause latency spikes, and increasing heap usage is a cause of cluster performance issues.
https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html#fielddata-mapping-param
type WithFieldDataFrequencyFilter ¶
type WithFieldDataFrequencyFilter interface { // FieldDataFrequencyFilter can be used to reduce the number of terms loaded // into memory, and thus reduce memory usage when using FieldData filtering. FieldDataFrequencyFilter() *FieldDataFrequencyFilter // SetFieldDataFrequencyFilter sets the FieldDataFrequencyFilter value to v SetFieldDataFrequencyFilter(v *FieldDataFrequencyFilter) error }
WithFieldDataFrequencyFilter is a mapping with the field_data_frequency_filter
FieldDataFrequencyFilter is an expert settings which allow to decide which values to load in memory when fielddata is enabled. By default all values are loaded.
FieldData filtering can be used to reduce the number of terms loaded into memory, and thus reduce memory usage. Terms can be filtered by frequency:
The frequency filter allows you to only load terms whose document frequency falls between a min and max value, which can be expressed an absolute number (when the number is bigger than 1.0) or as a percentage (eg 0.01 is 1% and 1.0 is 100%). Frequency is calculated per segment. Percentages are based on the number of docs which have a value for the field, as opposed to all docs in the segment.
Small segments can be excluded completely by specifying the minimum number of docs that the segment should contain with min_segment_size
https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html#field-data-filtering
type WithFields ¶
type WithFields interface { // Fields, also known as Multi-fields, allow the same string value to be // indexed in multiple ways for different purposes, such as one field for // search and a multi-field for sorting and aggregations, or the same string // value analyzed by different analyzers. Fields() Fields // SetFields sets the Fields value to v SetFields(v Fields) error }
WithFields is a mixin that adds the fields param
It is often useful to index the same field in different ways for different purposes. This is the purpose of multi-fields. For instance, a string field could be mapped as a text field for full-text search, and as a keyword field for sorting or aggregations
https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html
type WithFormat ¶
type WithFormat interface { // The date format(s) that can be parsed. Defaults to // "strict_date_optional_time||epoch_millis." // // https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html Format() string // SetFormat sets the format to v // // https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html SetFormat(v string) }
WithFormat is a type with a format parameter
https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html
type WithFuzziness ¶
type WithFuzziness interface { // Fuzziness is the maximum edit distance allowed for matching. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness Fuzziness() string // SetFuzziness sets the FuzzinessValue to v SetFuzziness(str string) // FuzzyRewrite is the method used to rewrite the query. See the rewrite // parameter for valid values and more information. // // If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite // method of top_terms_blended_freqs_${max_expansions} by default. FuzzyRewrite() Rewrite // SetFuzzyRewrite sets the value of FuzzyRewrite to v SetFuzzyRewrite(v Rewrite) error DefaultFuzzyRewrite() Rewrite // Rewrite }
WithFuzziness is an interface for queries with fuzziness the parameter
Maximum edit distance allowed for matching. See Fuzziness for valid values and more information.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
type WithFuzzyMaxExpansions ¶
type WithFuzzyMaxExpansions interface { // FuzzyMaxExpansions is the maximum number of variations created. Defaults to 50. FuzzyMaxExpansions() int // SetFuzzyMaxExpansions sets the max_expansions param // // Maximum number of variations created. Defaults to 50. // // Warning // // Avoid using a high value in the max_expansions parameter, especially if the // prefix_length parameter value is 0. High values in the max_expansions // parameter can cause poor performance due to the high number of variations // examined. SetFuzzyMaxExpansions(v interface{}) error }
WithFuzzyMaxExpansions is a query with the max_expansions param
Maximum number of variations created. Defaults to 50.
Warning ¶
Avoid using a high value in the max_expansions parameter, especially if the prefix_length parameter value is 0. High values in the max_expansions parameter can cause poor performance due to the high number of variations examined.
type WithFuzzyPrefixLength ¶
type WithFuzzyTranspositions ¶
type WithFuzzyTranspositions interface { // FuzzyTranspositions edits for fuzzy matching include transpositions of // two adjacent characters (ab → ba). Defaults to true FuzzyTranspositions() bool // SetFuzzyTranspositions sets FuzzyTranspositions to v SetFuzzyTranspositions(v interface{}) error }
WithFuzzyTranspositions is a query with the fuzzy_transpositions param
If true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true
type WithIgnoreAbove ¶
type WithIgnoreAbove interface { // IgnoreAbove signiall to not index any string longer than this value. // Defaults to 2147483647 so that all values would be accepted. Please // however note that default dynamic mapping rules create a sub keyword // field that overrides this default by setting ignore_above: 256. IgnoreAbove() float64 // SetIgnoreAbove sets the IgnoreAbove value to v SetIgnoreAbove(v interface{}) error }
WithIgnoreAbove is a mapping the ignore_above parameter
Strings longer than the ignore_above setting will not be indexed or stored. For arrays of strings, ignore_above will be applied for each array element separately and string elements longer than ignore_above will not be indexed or stored.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html
type WithIgnoreMalformed ¶
type WithIgnoreMalformed interface { // IgnoreMalformed determines if malformed numbers are ignored. If true, // malformed numbers are ignored. If false (default), malformed numbers // throw an exception and reject the whole document. IgnoreMalformed() bool // SetIgnoreMalformed sets IgnoreMalformed to v SetIgnoreMalformed(v interface{}) error }
WithIgnoreMalformed is a mapping with the ignore_malformed parameter
Sometimes you don’t have much control over the data that you receive. One user may send a login field that is a date, and another sends a login field that is an email address.
Trying to index the wrong data type into a field throws an exception by default, and rejects the whole document. The ignore_malformed parameter, if set to true, allows the exception to be ignored. The malformed field is not indexed, but other fields in the document are processed normally.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-malformed.html
type WithIgnoreZValue ¶
type WithIgnoreZValue interface { // IgnoreZValue determines whether three dimension points will be indexed. // // If true (default) three dimension points will be accepted (stored in // source) but only latitude and longitude values will be indexed; the third // dimension is ignored. If false, geo-points containing any more than // latitude and longitude (two dimensions) values throw an exception and // reject the whole document. IgnoreZValue() bool // SetIgnoreZValue sets the IgnoreZValue Value to v SetIgnoreZValue(v interface{}) error }
WithIgnoreZValue is a mapping with the ignore_z_value parameter
If IgnoreZValue is true (default) three dimension points will be accepted (stored in source) but only latitude and longitude values will be indexed; the third dimension is ignored. If false, geo-points containing any more than latitude and longitude (two dimensions) values throw an exception and reject the whole document.
https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html#geo-point-params
type WithIncludeInParent ¶
type WithIncludeInParent interface { // IncludeInParent (Optional, Boolean) If true, all fields in the nested // object are also added to the parent document as standard (flat) fields. // Defaults to false. IncludeInParent() bool // SetIncludeInParent sets the IncludeInParent Value to v SetIncludeInParent(v interface{}) error }
WithIncludeInParent is a mapping with the include_in_parent parameter
(Optional, Boolean) If true, all fields in the nested object are also added to the parent document as standard (flat) fields. Defaults to false.
https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html#nested-params
type WithIncludeInRoot ¶
type WithIncludeInRoot interface { // IncludeInRoot deteremines if all fields in the nested object are also // added to the root document as standard (flat) fields. Defaults to false IncludeInRoot() bool // SetIncldueInRoot sets the IncludeInRoot Value to v SetIncludeInRoot(v interface{}) error }
WithIncludeInRoot is a mapping with the include_in_root parameter
(Optional, Boolean) If true, all fields in the nested object are also added to the root document as standard (flat) fields. Defaults to false
https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html#nested-params
type WithIndex ¶
WithIndex is a mapping with index parameter
The index parameter controls whether field values are indexed. It accepts true or false and defaults to true. Fields that are not indexed are not queryable.
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html
type WithIndexOptions ¶
type WithIndexOptions interface { //IndexOptions parameter controls what information is added to the inverted //index for search and highlighting purposes. IndexOptions() IndexOptions // SetIndexOptions sets IndexOptions value to v SetIndexOptions(v IndexOptions) error }
WithIndexOptions is a mapping wit the index_options parameter
The index_options parameter controls what information is added to the inverted index for search and highlighting purposes.
"docs"
Only the doc number is indexed. Can answer the question Does this term exist in this field?
"freqs"
Doc number and term frequencies are indexed. Term frequencies are used to score repeated terms higher than single terms.
"positions" (default)
Doc number, term frequencies, and term positions (or order) are indexed. Positions can be used for proximity or phrase queries.
"offsets"
Doc number, term frequencies, positions, and start and end character offsets (which map the term back to the original string) are indexed. Offsets are used by the unified highlighter to speed up highlighting.
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-options.html
type WithIndexPhrases ¶
type WithIndexPhrases interface { // IndexPhrases is a param that if enabled, two-term word combinations // (shingles) are indexed into a separate field. This allows exact phrase // queries (no slop) to run more efficiently, at the expense of a larger index. // // Note that this works best when stopwords are not removed, as phrases // containing stopwords will not use the subsidiary field and will fall back to // a standard phrase query. Accepts true or false (default). IndexPhrases() bool // SetIndexPhrases sets the IndexPhrases value to v SetIndexPhrases(v interface{}) error }
WithIndexPhrases is a mapping with the index_phrases parameter
If IndexPhrases parameter is enabled, two-term word combinations (shingles) are indexed into a separate field. This allows exact phrase queries (no slop) to run more efficiently, at the expense of a larger index. Note that this works best when stopwords are not removed, as phrases containing stopwords will not use the subsidiary field and will fall back to a standard phrase query. Accepts true or false (default).
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-phrases.html#index-phrases
type WithIndexPrefixes ¶
type WithIndexPrefixes interface { IndexPrefixes() *IndexPrefixes SetIndexPrefixes(v *IndexPrefixes) error }
WithIndexPrefixes is a mapping with the index_prefixes parameter
The index_prefixes parameter enables the indexing of term prefixes to speed up prefix searches. It accepts the following optional settings
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-prefixes.html
type WithLenient ¶
type WithLenient interface { // Lenient determines whether format-based errors, such as providing a text // query value for a numeric field, are ignored. Defaults to false. Lenient() bool // SetLenient sets Lenient to v SetLenient(v bool) }
WithLenient is a query with the lenient param
Lenient determines whether format-based errors, such as providing a text query value for a numeric field, are ignored. Defaults to false.
type WithMaxBoost ¶
type WithMaxExpansions ¶
type WithMaxExpansions interface { // MaxExpansions is the maximum number of variations created. Defaults to 50. MaxExpansions() int // SetMaxExpansions sets the max_expansions param // // Maximum number of variations created. Defaults to 50. // // Warning // // Avoid using a high value in the max_expansions parameter, especially if the // prefix_length parameter value is 0. High values in the max_expansions // parameter can cause poor performance due to the high number of variations // examined. SetMaxExpansions(v interface{}) error }
WithMaxExpansions is a query with the max_expansions param
Maximum number of variations created. Defaults to 50.
Warning ¶
Avoid using a high value in the max_expansions parameter, especially if the prefix_length parameter value is 0. High values in the max_expansions parameter can cause poor performance due to the high number of variations examined.
type WithMaxGaps ¶
type WithMaxInputLength ¶
type WithMaxInputLength interface { // MaxInputLength limits the length of a single input, defaults to 50 UTF-16 // code points. This limit is only used at index time to reduce the total // number of characters per input string in order to prevent massive inputs // from bloating the underlying datastructure. Most use cases won’t be // influenced by the default value since prefix completions seldom grow // beyond prefixes longer than a handful of characters. MaxInputLength() int // SetMaxInputLength sets the MaxInputLength value to v SetMaxInputLength(v interface{}) error }
WithMaxInputLength is a mapping with the max_input_length parameter
Limits the length of a single input, defaults to 50 UTF-16 code points. This limit is only used at index time to reduce the total number of characters per input string in order to prevent massive inputs from bloating the underlying datastructure. Most use cases won’t be influenced by the default value since prefix completions seldom grow beyond prefixes longer than a handful of characters.
type WithMaxShingleSize ¶
type WithMaxShingleSize interface { // MaxShingleSize is the largest shingle size to create. Valid values are 2 // (inclusive) to 4 (inclusive). Defaults to 3. MaxShingleSize() int // SetMaxShingleSize sets the MaxShingleSize to v // // Valid values are 2 (inclusive) to 4 (inclusive). Defaults to 3. SetMaxShingleSize(v int) error }
WithMaxShingleSize is a mapping with the max_shingle_size parameter
(Optional, integer) Largest shingle size to create. Valid values are 2 (inclusive) to 4 (inclusive). Defaults to 3.
A subfield is created for each integer between 2 and this value. For example, a value of 3 creates two subfields: my_field._2gram and my_field._3gram
More subfields enables more specific queries but increases index size.
type WithMeta ¶
WithMeta is a mapping with the meta parameter
Meta is metadata attached to the field. This metadata is opaque to Elasticsearch, it is only useful for multiple applications that work on the same indices to share meta information about fields such as units
type WithMinScore ¶
type WithMinimumShouldMatch ¶
type WithMinimumShouldMatch interface { MinimumShouldMatch() string SetMinimumShouldMatch(v string) }
WithMinimumShouldMatch is a query with the minimum_should_match param
Examples of possible values:
"3"
Integers indicate a fixed value regardless of the number of optional clauses.
"-2"
Negative integers indicate that the total number of optional clauses, minus this number should be mandatory
"75%"
Percentages indicate that this percent of the total number of optional clauses are necessary. The number computed from the percentage is rounded down and used as the minimum.
"-25%"
Negative percentages indicate that this percent of the total number of optional clauses can be missing. The number computed from the percentage is rounded down, before being subtracted from the total to determine the minimum.
"3<90%"
A positive integer, followed by the less-than symbol, followed by any of the previously mentioned specifiers is a conditional specification. It indicates that if the number of optional clauses is equal to (or less than) the integer, they are all required, but if it’s greater than the integer, the specification applies. In this example: if there are 1 to 3 clauses they are all required, but for 4 or more clauses only 90% are required.
"2<-25% 9<-3"
Multiple conditional specifications can be separated by spaces, each one only being valid for numbers greater than the one before it. In this example: if there are 1 or 2 clauses both are required, if there are 3-9 clauses all but 25% are required, and if there are more than 9 clauses, all but three are required.
Note ¶
When dealing with percentages, negative values can be used to get different behavior in edge cases. 75% and -25% mean the same thing when dealing with 4 clauses, but when dealing with 5 clauses 75% means 3 are required, but -25% means 4 are required.
If the calculations based on the specification determine that no optional clauses are needed, the usual rules about BooleanQueries still apply at search time (a BooleanQuery containing no required clauses must still match at least one optional clause)
No matter what number the calculation arrives at, a value greater than the number of optional clauses, or a value less than 1 will never be used. (ie: no matter how low or how high the result of the calculation result is, the minimum number of required matches will never be lower than 1 or greater than the number of clauses.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html
type WithModifier ¶
type WithNegativeBoost ¶
type WithNormalizer ¶
type WithNormalizer interface { // Normalizer property of keyword fields is similar to analyzer except that it // guarantees that the analysis chain produces a single token. Normalizer() string // SetNormalizer sets the Normalizer value to v // // The normalizer property of keyword fields is similar to analyzer except that // it guarantees that the analysis chain produces a single token. SetNormalizer(v string) }
WithNormalizer is a mixin that adds the normalizer parameter
The normalizer property of keyword fields is similar to analyzer except that it guarantees that the analysis chain produces a single token.
The normalizer is applied prior to indexing the keyword, as well as at search-time when the keyword field is searched via a query parser such as the match query or via a term-level query such as the term query.
A simple normalizer called lowercase ships with elasticsearch and can be used. Custom normalizers can be defined as part of analysis settings
https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html
type WithNorms ¶
type WithNorms interface { // Whether field-length should be taken into account when scoring queries. // Accepts true (default) or false. Norms() bool // SetNorms sets the Norms value to v SetIndexPhrases(v interface{}) error }
WithNorms is a mapping with the Norms parameter
Norms store various normalization factors that are later used at query time in order to compute the score of a document relatively to a query.
Although useful for scoring, norms also require quite a lot of disk (typically in the order of one byte per document per field in your index, even for documents that don’t have this specific field). As a consequence, if you don’t need scoring on a specific field, you should disable norms on that field. In particular, this is the case for fields that are used solely for filtering or aggregations.
Norms can be disabled (but not reenabled after the fact)
If updating the norms via the REST API, they will not be removed instantly, but will be removed as old segments are merged into new segments as you continue indexing new documents. Any score computation on a field that has had norms removed might return inconsistent results since some documents won’t have norms anymore while other documents might still have norms.
https://www.elastic.co/guide/en/elasticsearch/reference/current/norms.html
type WithNullValue ¶
type WithNullValue interface { // NullValue parameter allows you to replace explicit null values with the // specified value so that it can be indexed and searched NullValue() interface{} // SetNullValue sets the NullValue value to v SetNullValue(v interface{}) }
WithNullValue is a mapping with the null_value parameter
A null value cannot be indexed or searched. When a field is set to null, (or an empty array or an array of null values) it is treated as though that field has no values.
The null_value parameter allows you to replace explicit null values with the specified value so that it can be indexed and searched
The null_value needs to be the same data type as the field. For instance, a long field cannot have a string null_value.
https://www.elastic.co/guide/en/elasticsearch/reference/current/null-value.html
type WithOperator ¶
type WithOperator interface { // Operator is the boolean logic used to interpret text in the query value. // Defaults to Or Operator() Operator // SetOperator sets the Operator to v SetOperator(v Operator) error }
WithOperator is a query with the operator param
Boolean logic used to interpret text in the query value.
type WithOrdered ¶
type WithOrientation ¶
type WithOrientation interface { // Orientation is the vertex order for the shape’s coordinates list. // // Defaults to OrientationRight (RIGHT) to comply with OGC standards. OGC // standards define outer ring vertices in counterclockwise order with inner // ring (hole) vertices in clockwise order. Orientation() Orientation // SetOrientation sets the Orientation Value to v SetOrientation(v Orientation) error }
WithOrientation is a mapping with the orientation parameter
type WithPhraseSlop ¶
type WithPositionIncrementGap ¶
type WithPositionIncrementGap interface { // PositionIncrementGap is the number of fake term position which should be // inserted between each element of an array of strings. Defaults to the // position_increment_gap configured on the analyzer which defaults to 100. // 100 was chosen because it prevents phrase queries with reasonably large // slops (less than 100) from matching terms across field values. // // https://www.elastic.co/guide/en/elasticsearch/reference/current/position-increment-gap.html PositionIncrementGap() int // SetPositionIncrementGap sets the PositionIncrementGap Value to v SetPositionIncrementGap(v interface{}) error }
WithPositionIncrementGap is a mapping with the position_increment_gap parameter
Analyzed text fields take term positions into account, in order to be able to support proximity or phrase queries. When indexing text fields with multiple values a "fake" gap is added between the values to prevent most phrase queries from matching across the values. The size of this gap is configured using position_increment_gap and defaults to 100.
https://www.elastic.co/guide/en/elasticsearch/reference/current/position-increment-gap.html
type WithPositiveScoreImpact ¶
type WithPositiveScoreImpact interface { // PositiveScoreImpact is used by rank_feature queries to modify the scoring // formula in such a way that the score increases or decreases the value of // the feature PositiveScoreImpact() bool // SetPositiveScoreImpact sets the PositiveScoreImpact Value to v SetPositiveScoreImpact(v interface{}) error }
WithPositiveScoreImpact is a mapping with the positive_score_impact parameter Rank features that correlate negatively with the score should set positive_score_impact to false (defaults to true). This will be used by the rank_feature query to modify the scoring formula in such a way that the score decreases with the value of the feature instead of increasing. For instance in web search, the url length is a commonly used feature which correlates negatively with scores.
https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-feature.html
type WithPrefixLength ¶
WithPrefixLength is an interface for a type with the PrefixLength and SetPrefixLength methods
PrefixLength is the umber of beginning characters left unchanged when fuzzy matching. Defaults to 0.
type WithPreservePositionIncrements ¶
type WithPreservePositionIncrements interface { // PreservePositionIncrements enables position increments, defaults to true. // If disabled and using stopwords analyzer, you could get a field starting // with The Beatles, if you suggest for b. Note: You could also achieve this // by indexing two inputs, Beatles and The Beatles, no need to change a // simple analyzer, if you are able to enrich your data. PreservePositionIncrements() bool // SetPreservePositionIncrements sets the PreservePositionIncrements value // to V SetPreservePositionIncrements(v bool) }
WithPreservePositionIncrements is a mapping with the preserve_position_increments parameter
Enables position increments, defaults to true. If disabled and using stopwords analyzer, you could get a field starting with The Beatles, if you suggest for b. Note: You could also achieve this by indexing two inputs, Beatles and The Beatles, no need to change a simple analyzer, if you are able to enrich your data.
type WithPreserveSeperators ¶
type WithPreserveSeperators interface { // PreserveSeperators preserves the separators, defaults to true. If // disabled, you could find a field starting with Foo Fighters, if you // suggest for foof. PreserveSeperators() bool // SetPreserveSeperators sets the PreserveSeperatorParam value to v SetPreserveSeperators(v interface{}) error }
WithPreserveSeperators is a mapping with the preserve_seperators parameter
Preserves the separators, defaults to true. If disabled, you could find a field starting with Foo Fighters, if you suggest for foof.
type WithProperties ¶
type WithProperties interface { // Properties are fields within the object, which can be of any data type, // including object. New properties may be added to an existing object. Properties() Fields // SetProperties sets the Properties value to v SetProperties(v FieldMap) error }
WithProperties is a mixin that adds the properties param
Type mappings, object fields and nested fields contain sub-fields, called properties. These properties may be of any data type, including object and nested. Properties can be added:
- explicitly by defining them when creating an index. - explicitly by defining them when adding or updating a mapping type with the PUT mapping API. - dynamically just by indexing documents containing new fields.
https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html
type WithQUoteFieldSuffix ¶
type WithQuoteAnalyzer ¶
type WithRelation ¶
type WithRelations ¶
WithRelations is a mapping with a relations parameter
The relations section defines a set of possible relations within the documents, each relation being a parent name and a child name.
https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
type WithRewrite ¶
WithRewrite is a query with the rewrite param
type WithRuleFilter ¶
type WithRuleFilter interface { Filter() *RuleFilter SetFilter(rf RuleFilterer) error }
type WithScalingFactor ¶
type WithScalingFactor interface { ScalingFactor() float64 SetScalingFactor(v interface{}) }
WithScalingFactor is a mapping with the scaling_factor param
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html#scaled-float-params
type WithScoreMode ¶
type WithSearchAnalyzer ¶
type WithSearchQuoteAnalyzer ¶
type WithSearchQuoteAnalyzer interface { // SearchQuoteAnalyzer setting allows you to specify an analyzer for // phrases, this is particularly useful when dealing with disabling stop // words for phrase queries. SearchQuoteAnalyzer() string // SetSearchQuoteAnalyzer sets SearchQuoteAnalyzer to v SetSearchQuoteAnalyzer(v string) }
type WithSimilarity ¶
type WithSimilarity interface { // Similarity is mostly useful for text fields, but can also apply to other // field types. Similarity() Similarity // SetSimilarity sets the similarity param to v SetSimilarity(v Similarity) error }
WithSimilarity is a mapping with the similarity parameter
Elasticsearch allows you to configure a scoring algorithm or similarity per field. The similarity setting provides a simple way of choosing a similarity algorithm other than the default BM25, such as TF/IDF.
Similarities are mostly useful for text fields, but can also apply to other field types.
Custom similarities can be configured by tuning the parameters of the built-in similarities. For more details about this expert options, see the similarity module.
The only similarities which can be used out of the box, without any further configuration are:
"BM25"
The Okapi BM25 algorithm. The algorithm used by default in Elasticsearch and Lucene.
"classic" (deprecated)
TF/IDF algorithm, the former default in Elasticsearch and Lucene.
"boolean"
A simple boolean similarity, which is used when full-text ranking is not needed and the score should only be based on whether the query terms match or not. Boolean similarity gives terms a score equal to their query boost.
https://www.elastic.co/guide/en/elasticsearch/reference/current/similarity.html
type WithSplitQueriesOnWhitespace ¶
type WithSplitQueriesOnWhitespace interface { // SplitQueriesOnWhitespace determines whether full text queries should // split the input on whitespace when building a query for this field. // Accepts true or false (default). SplitQueriesOnWhitespace() bool // SetSplitQueriesOnWhitespace sets the SplitQueriesOnWhitespace Value to v SetSplitQueriesOnWhitespace(v interface{}) error }
WithSplitQueriesOnWhitespace is mapping with the split_queries_on_whitespace parameter
split_queries_on_whitespace determines whether full text queries should split the input on whitespace when building a query for this field. Accepts true or false (default).
type WithStore ¶
WithStore is a mapping with a store paramter.
By default, field values are indexed to make them searchable, but they are not stored. This means that the field can be queried, but the original field value cannot be retrieved.
Usually this doesn’t matter. The field value is already part of the _source field, which is stored by default. If you only want to retrieve the value of a single field or of a few fields, instead of the whole _source, then this can be achieved with source filtering.
In certain situations it can make sense to store a field. For instance, if you have a document with a title, a date, and a very large content field, you may want to retrieve just the title and the date without having to extract those fields from a large _source field
Stored fields returned as arrays ¶
For consistency, stored fields are always returned as an array because there is no way of knowing if the original field value was a single value, multiple values, or an empty array.
The original value can be retrieved from the _source field instead.
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html
type WithTermVector ¶
type WithTermVector interface { // TermVector determines whether term vectors should be stored for the field. // Defaults to "no" / TermVectorNone. TermVector() TermVector // SetTermVector sets the TermVector Value to v SetTermVector(v TermVector) error }
WithTermVector is a mapping with the term_vector parameter
Term vectors contain information about the terms produced by the analysis process, including:
- a list of terms.
- the position (or order) of each term.
- the start and end character offsets mapping the term to its origin in the original string.
- payloads (if they are available) — user-defined binary data associated with each term position.
These term vectors can be stored so that they can be retrieved for a particular document.
WARNING ¶
Setting with_positions_offsets will double the size of a field’s index.
https://www.elastic.co/guide/en/elasticsearch/reference/current/term-vector.html
type WithTieBreaker ¶
type WithTimeZone ¶
type WithTranspositions ¶
type WithTranspositions interface { // Transpositions indicates whether edits include transpositions of two // adjacent characters (ab → ba). Defaults to true. Transpositions() bool // SetTranspositions sets the value of Transpositions to v SetTranspositions(v interface{}) error }
WithTranspositions is an interface for queries with the transpositions param
(Optional, Boolean) Indicates whether edits include transpositions of two adjacent characters (ab → ba). Defaults to true.
type WithWeight ¶
type WithZeroTermsQuery ¶
type WrapperQuery ¶
type WrapperQuery struct {
// contains filtered or unexported fields
}
func (*WrapperQuery) Clause ¶
func (q *WrapperQuery) Clause() (QueryClause, error)
func (*WrapperQuery) Clear ¶
func (q *WrapperQuery) Clear()
func (*WrapperQuery) IsEmpty ¶
func (q *WrapperQuery) IsEmpty() bool
func (WrapperQuery) Kind ¶
func (WrapperQuery) Kind() QueryKind
func (WrapperQuery) MarshalBSON ¶
func (q WrapperQuery) MarshalBSON() ([]byte, error)
func (WrapperQuery) MarshalJSON ¶
func (q WrapperQuery) MarshalJSON() ([]byte, error)
func (*WrapperQuery) UnmarshalBSON ¶
func (q *WrapperQuery) UnmarshalBSON(data []byte) error
func (*WrapperQuery) UnmarshalJSON ¶
func (q *WrapperQuery) UnmarshalJSON(data []byte) error
func (*WrapperQuery) Wrapper ¶
func (q *WrapperQuery) Wrapper() (*WrapperQuery, error)
type WrapperQueryParams ¶
type WrapperQueryParams struct { Name string // contains filtered or unexported fields }
func (WrapperQueryParams) Clause ¶
func (p WrapperQueryParams) Clause() (QueryClause, error)
func (WrapperQueryParams) Kind ¶
func (WrapperQueryParams) Kind() QueryKind
func (WrapperQueryParams) Wrapper ¶
func (p WrapperQueryParams) Wrapper() (*WrapperQuery, error)
type ZeroTerms ¶
type ZeroTerms string
func (ZeroTerms) MarshalJSON ¶
func (*ZeroTerms) UnmarshalJSON ¶
Source Files ¶
- agg_kind.go
- alias_field.go
- all_of_query.go
- all_of_rule.go
- allow_leading_wildcard_param.go
- analyze_wildcard_param.go
- analyzer_param.go
- any_of_rule.go
- auto_generate_synonyms_phrase_query_param.go
- binary_field.go
- bool_query.go
- boolean_field.go
- boost_mode_param.go
- boost_param.go
- boosting_query.go
- bounding_box.go
- case_insensitive_param.go
- clause.go
- coerce_param.go
- common_query.go
- completion_field.go
- constant_field.go
- constant_score_query.go
- copy_to_param.go
- count.go
- cutoff_frequency_param.go
- date_field.go
- default_operator_param.go
- delete_by_query.go
- dense_vector_field.go
- depth_limit_param.go
- dimensions_param.go
- disjunction_max_query.go
- distance_feature_query.go
- doc_values_param.go
- docs.go
- dynamic_param.go
- eager_global_ordinals_param.go
- enable_position_increments_param.go
- enabled_param.go
- errors.go
- exists_query.go
- exp_function.go
- field.go
- field_data_frequency_filter_param.go
- field_data_param.go
- field_masking_span_query.go
- field_param.go
- field_type.go
- field_value_factor_function.go
- fields.go
- flattened_field.go
- format_param.go
- function.go
- function_score_query.go
- fuzziness_param.go
- fuzzy_max_expansions_param.go
- fuzzy_prefix_length_param.go
- fuzzy_query.go
- fuzzy_rule.go
- fuzzy_transpositions_param.go
- gauss_function.go
- geo_bounding_box_query.go
- geo_distance_query.go
- geo_point_field.go
- geo_polygon_query.go
- geo_shape_field.go
- geo_shape_query.go
- has_child_query.go
- has_parent_query.go
- histogram_field.go
- ids_query.go
- ignore_above_param.go
- ignore_malformed_param.go
- ignore_z_value_param.go
- include_in_parent_param.go
- include_in_root_param.go
- index.go
- index_options_param.go
- index_param.go
- index_phrases_param.go
- index_prefixes_param.go
- intervals_query.go
- ip_field.go
- join_field.go
- keyword_field.go
- lenient_param.go
- linear_function.go
- lookup_query.go
- mappings.go
- match_all_query.go
- match_bool_prefix_query.go
- match_none_query.go
- match_phrase_prefix_query.go
- match_phrase_query.go
- match_query.go
- match_rule.go
- max_boost_param.go
- max_determinized_states_param.go
- max_expansions_param.go
- max_gaps_param.go
- max_input_length.go
- max_shingle_size.go
- meta_param.go
- min_score_param.go
- minimum_should_match_param.go
- modifier_param.go
- more_like_this_query.go
- multi_match_query.go
- multi_match_type.go
- name_param.go
- negative_boost_param.go
- nested_field.go
- nested_query.go
- normalize.go
- norms.go
- null_value.go
- number_field.go
- object_field.go
- operator_param.go
- ordered_param.go
- orientation.go
- parent_id_query.go
- percolate_query.go
- percolator_field.go
- phrase_slop_param.go
- picker_easyjson.go
- pinned_query.go
- point_field.go
- point_in_time.go
- position_increment_gap.go
- positive_score_impact.go
- prefix_length_param.go
- prefix_query.go
- prefix_rule.go
- preserve_positive_increments_param.go
- preserve_seperators_param.go
- processor.go
- processor_kind.go
- properties.go
- query.go
- query_kind.go
- query_params.go
- query_string_query.go
- quote_analyzer_param.go
- quote_field_suffix_param.go
- random_score_function.go
- range_field.go
- range_query.go
- rank_feature_field.go
- rank_feature_query.go
- regexp_query.go
- relation_param.go
- relations.go
- rewrite_param.go
- rule.go
- rule_filter.go
- rule_filter_param.go
- runtime_mappings.go
- scaling_factor.go
- score_mode_param.go
- script.go
- script_query.go
- script_score_function.go
- script_score_query.go
- search.go
- search_analyzer_param.go
- search_as_you_type_field.go
- search_field.go
- search_quote_analyzer_param.go
- search_source.go
- shape_field.go
- shape_query.go
- similarity_param.go
- simple_query_string_query.go
- slop_param.go
- sort.go
- span_containing_query.go
- span_first_query.go
- span_multi_query.go
- span_near_query.go
- span_not_query.go
- span_or_query.go
- span_term_query.go
- span_within_query.go
- spatial_relation.go
- split_queries_on_whitespace_param.go
- store_param.go
- string_query.go
- term_query.go
- term_vector.go
- terms_query.go
- terms_set_query.go
- text_field.go
- tie_breaker_param.go
- time_zone_param.go
- token_count_field.go
- transpositions_param.go
- type_query.go
- update_by_query.go
- use_field_param.go
- util.go
- vars.go
- weight_function.go
- weight_param.go
- wildcard_field.go
- wildcard_query.go
- wildcard_rule.go
- wrapper_query.go
- zero_terms_param.go