Documentation ¶
Index ¶
- type API
- type AggFilter
- type AggNested
- type AggScript
- type AggTerms
- func (*AggTerms) WithDocCountErrorUpperBound(DocCountErrorUpperBound int) func(all *tAggTerms)
- func (*AggTerms) WithExclude(Exclude []string) func(all *tAggTerms)
- func (*AggTerms) WithExecutionHint(executionHint ExecutionHint) func(all *tAggTerms)
- func (*AggTerms) WithInclude(Include []string) func(all *tAggTerms)
- func (*AggTerms) WithMissing(missing string) func(all *tAggTerms)
- func (*AggTerms) WithOrder(Order *AggTermsOrder) func(all *tAggTerms)
- func (*AggTerms) WithShardMinDocCount(ShardMinDocCount int) func(all *tAggTerms)
- func (*AggTerms) WithShardSize(shardSize int) func(all *tAggTerms)
- func (*AggTerms) WithShowTermDocCountError(ShowTermDocCountError bool) func(all *tAggTerms)
- func (*AggTerms) WithSize(size int) func(all *tAggTerms)
- func (*AggTerms) WithSumOtherDocCount(SumOtherDocCount int) func(all *tAggTerms)
- func (*AggTerms) WithValueType(valueType string) func(all *tAggTerms)
- type AggTermsOrder
- type Aggs
- type BaseAgg
- type BaseQuery
- type BoolQuery
- func (q *BoolQuery) WithFilter(bq ...BaseQuery) func(all *tBoolQuery)
- func (q *BoolQuery) WithMinimumShouldMatch(msm *MinimumShouldMatch) func(all *tBoolQuery)
- func (q *BoolQuery) WithMust(bq ...BaseQuery) func(all *tBoolQuery)
- func (q *BoolQuery) WithMustNot(bq ...BaseQuery) func(all *tBoolQuery)
- func (q *BoolQuery) WithShould(bq ...BaseQuery) func(all *tBoolQuery)
- type CollectMode
- type CombinedFieldQuery
- func (q *CombinedFieldQuery) WithAutoGenerateSynonymsPhraseQuery(b bool) func(all *tCombinedFieldsQuery)
- func (q *CombinedFieldQuery) WithMinimumShouldMatch(v string) func(all *tCombinedFieldsQuery)
- func (q *CombinedFieldQuery) WithOperator(o QueryOperator) func(all *tCombinedFieldsQuery)
- func (q *CombinedFieldQuery) WithZeroTermsQuery(v QueryZeroTermsQuery) func(all *tCombinedFieldsQuery)
- type ExecutionHint
- type ExistsQuery
- type Fields
- type FieldsField
- type Fuzzyquery
- func (fq *Fuzzyquery) WithFuzziness(fuzziness string) func(all *tFuzzyQuery)
- func (fq *Fuzzyquery) WithMaxExpansion(maxExpansion int) func(all *tFuzzyQuery)
- func (fq *Fuzzyquery) WithPrefixLength(prefixLength int) func(all *tFuzzyQuery)
- func (fq *Fuzzyquery) WithRewrite(rewrite QueryRewrite) func(all *tFuzzyQuery)
- func (fq *Fuzzyquery) WithTranspositions(transpositions bool) func(all *tFuzzyQuery)
- type GapPolicy
- type IDsQuery
- type IndicesBoost
- type IntervalsQuery
- type InvervalsQueryAllOf
- type InvervalsQueryAnyOf
- type InvervalsQueryFilter
- type InvervalsQueryFuzzy
- type InvervalsQueryMatch
- type InvervalsQueryPrefix
- type InvervalsQueryWildcard
- type MatchAllQuery
- type MatchBoolPrefixQuery
- type MatchNoneQuery
- type MatchPhrasePrefixQuery
- type MatchPhraseQuery
- type MatchQuery
- func (q *MatchQuery) WithAnalyzer(v string) func(all *tMatchQuery)
- func (q *MatchQuery) WithAutoGenerateSynonymsPhraseQuery(v bool) func(all *tMatchQuery)
- func (q *MatchQuery) WithFuzziness(v string) func(all *tMatchQuery)
- func (q *MatchQuery) WithFuzzyRewrite(v string) func(all *tMatchQuery)
- func (q *MatchQuery) WithFuzzyTranspositions(v bool) func(all *tMatchQuery)
- func (q *MatchQuery) WithLenient(v bool) func(all *tMatchQuery)
- func (q *MatchQuery) WithMaxExpansions(v int) func(all *tMatchQuery)
- func (q *MatchQuery) WithMinimumShouldMatch(v *MinimumShouldMatch) func(all *tMatchQuery)
- func (q *MatchQuery) WithOperator(v QueryOperator) func(all *tMatchQuery)
- func (q *MatchQuery) WithPrefixLength(v int) func(all *tMatchQuery)
- func (q *MatchQuery) WithZeroTermsQuery(v QueryZeroTermsQuery) func(all *tMatchQuery)
- type MinimumShouldMatch
- type MultiMatchQuery
- type MultiType
- type NestedQuery
- type Order
- type PrefixQuery
- type Query
- type QueryExpandWildcards
- type QueryMultiMatchType
- type QueryOperator
- type QueryRelation
- type QueryRewrite
- type QuerySearchType
- type QuerySimpleQueryStringFlag
- type QueryZeroTermsQuery
- type RangeQuery
- type ScoreMode
- type Script
- type Search
- type SearchQueryParams
- type SearchSortVal
- type SearchSourceVal
- type SearchSuggestMode
- type SimpleQueryStringQuery
- func (sqsq *SimpleQueryStringQuery) WithAnalyzeWildcard(analyzeWildcard bool) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithAnalyzer(analyzer string) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithAutoGenerateSynonymsPhraseQuery(autoGenerateSynonymsPhraseQuery bool) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithDefaultOperator(defaultOperator QueryOperator) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithFields(fields ...string) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithFlags(flags ...QuerySimpleQueryStringFlag) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithFuzzyMaxExpansions(FuzzyMaxExpansions int) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithFuzzyPrefixLength(FuzzyPrefixLength int) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithFuzzyTranspositions(FuzzyTranspositions bool) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithLenient(Lenient bool) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithMinimumShouldMatch(MinimumShouldMatch *MinimumShouldMatch) func(all *tSimpleQueryStringQuery)
- func (sqsq *SimpleQueryStringQuery) WithQuoteFieldSuffix(QuoteFieldSuffix string) func(all *tSimpleQueryStringQuery)
- type SimpleQueryStringQueryFlags
- type StringList
- type StringOrList
- type StringQuery
- type TermQuery
- type TermsQuery
- type TrackTotalHitsVal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Query Query MatchAllQuery MatchAllQuery CombinedFieldQuery CombinedFieldQuery ExistsQuery ExistsQuery BoolQuery BoolQuery MatchQuery MatchQuery MatchNoneQuery MatchNoneQuery Fuzzyquery Fuzzyquery SimpleQueryStringQuery SimpleQueryStringQuery NestedQuery NestedQuery TermQuery TermQuery TermsQuery TermsQuery Search Search Aggs Aggs AggNested AggNested AggTerms AggTerms AggFilter AggFilter AggScript AggScript IndicesBoost IndicesBoost Fields Fields FieldsField FieldsField }
type AggFilter ¶
type AggFilter func(name string, field string, value string, o ...func(AggFilter *tAggFilter)) *tAggFilter
AggFilter returns an AggFilter body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-AggFilterregations.html
func NewAggFilter ¶
func NewAggFilter() AggFilter
type AggNested ¶
type AggNested func(name string, path string, aggs *tAggs, o ...func(aggNestes *tAggNested)) *tAggNested
AggNested returns a nested body
See full documentations at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-nested-aggregation.html
func NewAggNested ¶
func NewAggNested() AggNested
type AggScript ¶
type AggScript func(name string, bucketsPath map[string]string, o ...func(AggScript *tAggScript)) *tAggScript
AggScript returns an AggScript body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-AggScriptregations.html
func NewAggScript ¶
func NewAggScript() AggScript
func (*AggScript) WithFormat ¶
func (*AggScript) WithGapPolicy ¶
type AggTerms ¶
AggTerms returns an AggTerms body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-AggTermsregations.html
func NewAggTerms ¶
func NewAggTerms() AggTerms
func (*AggTerms) WithDocCountErrorUpperBound ¶
func (*AggTerms) WithExclude ¶
func (*AggTerms) WithExecutionHint ¶
func (*AggTerms) WithExecutionHint(executionHint ExecutionHint) func(all *tAggTerms)
func (*AggTerms) WithInclude ¶
func (*AggTerms) WithMissing ¶
func (*AggTerms) WithOrder ¶
func (*AggTerms) WithOrder(Order *AggTermsOrder) func(all *tAggTerms)
func (*AggTerms) WithShardMinDocCount ¶
func (*AggTerms) WithShardSize ¶
func (*AggTerms) WithShowTermDocCountError ¶
func (*AggTerms) WithSumOtherDocCount ¶
func (*AggTerms) WithValueType ¶
type AggTermsOrder ¶
func (*AggTermsOrder) MarshalJSON ¶
func (ato *AggTermsOrder) MarshalJSON() ([]byte, error)
type Aggs ¶
type Aggs func(o ...func(aggs *tAggs)) *tAggs
Aggs returns an aggs body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-aggregations.html
func (*Aggs) WithAggregations ¶
type BaseQuery ¶
type BaseQuery interface {
GetQueryName() string
}
BaseQuery https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
type BoolQuery ¶
type BoolQuery func(o ...func(all *tBoolQuery)) BaseQuery
BoolQuery results a bool query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
func NewBoolQuery ¶
func NewBoolQuery() BoolQuery
func (*BoolQuery) WithFilter ¶
func (*BoolQuery) WithMinimumShouldMatch ¶
func (q *BoolQuery) WithMinimumShouldMatch(msm *MinimumShouldMatch) func(all *tBoolQuery)
func (*BoolQuery) WithMustNot ¶
func (*BoolQuery) WithShould ¶
type CollectMode ¶
type CollectMode string
const ( CollectModeBreadthFirst CollectMode = "breadth_first" CollectModeDepthFirst CollectMode = "depth_first" )
type CombinedFieldQuery ¶
type CombinedFieldQuery func(fields []string, query string, o ...func(all *tCombinedFieldsQuery)) BaseQuery
CombindedFieldQuery results a combined_field query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-combined-fields-query.html
func NewCombinedFieldQuery ¶
func NewCombinedFieldQuery() CombinedFieldQuery
func (*CombinedFieldQuery) WithAutoGenerateSynonymsPhraseQuery ¶
func (q *CombinedFieldQuery) WithAutoGenerateSynonymsPhraseQuery(b bool) func(all *tCombinedFieldsQuery)
func (*CombinedFieldQuery) WithMinimumShouldMatch ¶
func (q *CombinedFieldQuery) WithMinimumShouldMatch(v string) func(all *tCombinedFieldsQuery)
func (*CombinedFieldQuery) WithOperator ¶
func (q *CombinedFieldQuery) WithOperator(o QueryOperator) func(all *tCombinedFieldsQuery)
func (*CombinedFieldQuery) WithZeroTermsQuery ¶
func (q *CombinedFieldQuery) WithZeroTermsQuery(v QueryZeroTermsQuery) func(all *tCombinedFieldsQuery)
type ExecutionHint ¶
type ExecutionHint string
const ( ExecutionHintMap ExecutionHint = "map" ExecutionHintGlobalOrdinals ExecutionHint = "global_ordinals" )
type ExistsQuery ¶
ExistsQuery results a combined_field query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html
func NewExistsQuery ¶
func NewExistsQuery() ExistsQuery
type Fields ¶
type Fields func(o ...func(fields *tFields)) *tFields
Fields returns an fields body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-fieldregations.html
func (*Fields) WithFields ¶
func (a *Fields) WithFields(fields ...*tFieldsField) func(all *tFields)
type FieldsField ¶
type FieldsField func(name string, o ...func(FieldsField *tFieldsField)) *tFieldsField
FieldsField returns an FieldsField body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/search-FieldsFieldregations.html
func NewFieldsField ¶
func NewFieldsField() FieldsField
func (*FieldsField) WithFormat ¶
func (*FieldsField) WithFormat(format string) func(all *tFieldsField)
type Fuzzyquery ¶
FuzzyQuery results a fuzzy query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html
func NewFuzzyQuery ¶
func NewFuzzyQuery() Fuzzyquery
func (*Fuzzyquery) WithFuzziness ¶
func (fq *Fuzzyquery) WithFuzziness(fuzziness string) func(all *tFuzzyQuery)
func (*Fuzzyquery) WithMaxExpansion ¶
func (fq *Fuzzyquery) WithMaxExpansion(maxExpansion int) func(all *tFuzzyQuery)
func (*Fuzzyquery) WithPrefixLength ¶
func (fq *Fuzzyquery) WithPrefixLength(prefixLength int) func(all *tFuzzyQuery)
func (*Fuzzyquery) WithRewrite ¶
func (fq *Fuzzyquery) WithRewrite(rewrite QueryRewrite) func(all *tFuzzyQuery)
func (*Fuzzyquery) WithTranspositions ¶
func (fq *Fuzzyquery) WithTranspositions(transpositions bool) func(all *tFuzzyQuery)
type IDsQuery ¶
type IDsQuery struct {
IDs []string `json:"ids,omitempty"`
}
func (*IDsQuery) GetQueryName ¶
type IndicesBoost ¶
type IndicesBoost func(o ...func(all tIndicesBoost)) tIndicesBoost
IndicesBoost results a indices_boost struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multiple-indices.html
func NewIndicesBoost ¶
func NewIndicesBoost() IndicesBoost
func (*IndicesBoost) AppendIndex ¶
func (ib *IndicesBoost) AppendIndex(index string, boost float64) func(all tIndicesBoost)
type IntervalsQuery ¶
type IntervalsQuery struct { Field string `json:"-"` Match *InvervalsQueryMatch `json:"match,omitempty"` Prefix *InvervalsQueryPrefix `json:"prefix,omitempty"` Wildcard *InvervalsQueryWildcard `json:"wildcard,omitempty"` Fuzzy *InvervalsQueryFuzzy `json:"fuzzy,omitempty"` AllOf *InvervalsQueryAllOf `json:"all_of,omitempty"` AnyOf *InvervalsQueryAnyOf `json:"any_of,omitempty"` }
func (*IntervalsQuery) GetQueryName ¶
func (i *IntervalsQuery) GetQueryName() string
func (*IntervalsQuery) MarshalJSON ¶
func (i *IntervalsQuery) MarshalJSON() ([]byte, error)
type InvervalsQueryAllOf ¶
type InvervalsQueryAllOf struct { Intervals []any `json:"intervals"` MaxGaps int `json:"max_gaps,omitempty"` // default: -1 Ordered bool `json:"ordered,omitempty"` // default: false Filter *InvervalsQueryFilter `json:"filter,omitempty"` }
type InvervalsQueryAnyOf ¶
type InvervalsQueryAnyOf struct { Intervals []any `json:"intervals"` Filter *InvervalsQueryFilter `json:"filter,omitempty"` }
type InvervalsQueryFilter ¶
type InvervalsQueryFilter struct { After *BaseQuery `json:"after,omitempty"` Before *BaseQuery `json:"before,omitempty"` ContainedBy *BaseQuery `json:"contained_by,omitempty"` Containing *BaseQuery `json:"containing,omitempty"` NotContainedBy *BaseQuery `json:"not_contained_by,omitempty"` NotContaining *BaseQuery `json:"not_containing,omitempty"` NotOverlapping *BaseQuery `json:"not_overlapping,omitempty"` Overlapping *BaseQuery `json:"overlapping,omitempty"` Script *Script `json:"script,omitempty"` }
type InvervalsQueryFuzzy ¶
type InvervalsQueryFuzzy struct { Term string `json:"term"` PrefixLength int `json:"prefix_length"` // default: 0 Transpositions bool `json:"transpositions,omitempty"` // default: false Fuzziness string `json:"fuzziness,omitempty"` // default: "auto" Analyzer string `json:"analyzer,omitempty"` UseField string `json:"use_field,omitempty"` }
type InvervalsQueryMatch ¶
type InvervalsQueryMatch struct { Query string `json:"query"` MaxGaps int `json:"max_gaps,omitempty"` // default: -1 Ordered bool `json:"ordered,omitempty"` // default: false Analyzer string `json:"analyzer,omitempty"` Filter *InvervalsQueryFilter `json:"filter,omitempty"` UseField string `json:"use_field,omitempty"` }
type InvervalsQueryPrefix ¶
type InvervalsQueryWildcard ¶
type MatchAllQuery ¶
type MatchAllQuery func(o ...func(all *tMatchAllQuery)) BaseQuery
MatchAllQuery results a match_all query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
func NewMatchAllQuery ¶
func NewMatchAllQuery() MatchAllQuery
func (*MatchAllQuery) WithBoost ¶
func (qma *MatchAllQuery) WithBoost(boost float64) func(all *tMatchAllQuery)
type MatchBoolPrefixQuery ¶
type MatchBoolPrefixQuery struct { Field string `json:"-"` Query string `json:"query"` Analyzer string `json:"analyzer,omitempty"` }
func (*MatchBoolPrefixQuery) GetQueryName ¶
func (mb *MatchBoolPrefixQuery) GetQueryName() string
func (*MatchBoolPrefixQuery) MarshalJSON ¶
func (mb *MatchBoolPrefixQuery) MarshalJSON() ([]byte, error)
type MatchNoneQuery ¶
type MatchNoneQuery func(o ...func(all *tMatchNoneQuery)) BaseQuery
MatchAllQuery results a match_all query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
func NewMatchNoneQuery ¶
func NewMatchNoneQuery() MatchNoneQuery
type MatchPhrasePrefixQuery ¶
type MatchPhrasePrefixQuery struct { Field string `json:"-"` Query string `json:"query"` Analyzer string `json:"analyzer,omitempty"` MaxExpansions int `json:"max_expansions,omitempty"` // default: 50 Slop int `json:"slop,omitempty"` // default: 0 ZeroTermsQuery QueryZeroTermsQuery `json:"zero_terms_query,omitempty"` // default: QeruyZeroTermsQueryNONE }
func (*MatchPhrasePrefixQuery) GetQueryName ¶
func (mpp *MatchPhrasePrefixQuery) GetQueryName() string
func (*MatchPhrasePrefixQuery) MarshalJSON ¶
func (mpp *MatchPhrasePrefixQuery) MarshalJSON() ([]byte, error)
type MatchPhraseQuery ¶
type MatchPhraseQuery struct { Field string `json:"-"` Query string `json:"query"` Analyzer string `json:"analyzer,omitempty"` }
func (*MatchPhraseQuery) GetQueryName ¶
func (mp *MatchPhraseQuery) GetQueryName() string
func (*MatchPhraseQuery) MarshalJSON ¶
func (mp *MatchPhraseQuery) MarshalJSON() ([]byte, error)
type MatchQuery ¶
MatchQuery results a match query struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/8.6/query-dsl-match-query.html
func NewMatchQuery ¶
func NewMatchQuery() MatchQuery
func (*MatchQuery) WithAnalyzer ¶
func (q *MatchQuery) WithAnalyzer(v string) func(all *tMatchQuery)
func (*MatchQuery) WithAutoGenerateSynonymsPhraseQuery ¶
func (q *MatchQuery) WithAutoGenerateSynonymsPhraseQuery(v bool) func(all *tMatchQuery)
func (*MatchQuery) WithFuzziness ¶
func (q *MatchQuery) WithFuzziness(v string) func(all *tMatchQuery)
func (*MatchQuery) WithFuzzyRewrite ¶
func (q *MatchQuery) WithFuzzyRewrite(v string) func(all *tMatchQuery)
func (*MatchQuery) WithFuzzyTranspositions ¶
func (q *MatchQuery) WithFuzzyTranspositions(v bool) func(all *tMatchQuery)
func (*MatchQuery) WithLenient ¶
func (q *MatchQuery) WithLenient(v bool) func(all *tMatchQuery)
func (*MatchQuery) WithMaxExpansions ¶
func (q *MatchQuery) WithMaxExpansions(v int) func(all *tMatchQuery)
func (*MatchQuery) WithMinimumShouldMatch ¶
func (q *MatchQuery) WithMinimumShouldMatch(v *MinimumShouldMatch) func(all *tMatchQuery)
func (*MatchQuery) WithOperator ¶
func (q *MatchQuery) WithOperator(v QueryOperator) func(all *tMatchQuery)
func (*MatchQuery) WithPrefixLength ¶
func (q *MatchQuery) WithPrefixLength(v int) func(all *tMatchQuery)
func (*MatchQuery) WithZeroTermsQuery ¶
func (q *MatchQuery) WithZeroTermsQuery(v QueryZeroTermsQuery) func(all *tMatchQuery)
type MinimumShouldMatch ¶
func (*MinimumShouldMatch) MarshalJSON ¶
func (msm *MinimumShouldMatch) MarshalJSON() ([]byte, error)
type MultiMatchQuery ¶
type MultiMatchQuery struct { Fields []string `json:"fields,omitempty"` Query string `json:"query"` Type QueryMultiMatchType `json:"type,omitempty"` // default: QueryMultiMatchTypeBestFields Analyzer string `json:"analyzer,omitempty"` AutoGenerateSynonymsPhraseQuery bool `json:"auto_generate_synonyms_phrase_query,omitempty"` Fuzziness string `json:"fuzziness,omitempty"` MaxExpansions int `json:"max_expansions,omitempty"` // default: 50 PrefixLength int `json:"prefix_length,omitempty"` // default: 0 FuzzyTranspositions bool `json:"fuzzy_transpositions,omitempty"` // default: true FuzzyRewrite string `json:"fuzzy_rewrite,omitempty"` Lenient bool `json:"lenient,omitempty"` // default: false Operator QueryOperator `json:"operator,omitempty"` // default: QueryOperatorOR MinimumShouldMatch string `json:"minimum_should_match,omitempty"` ZeroTermsQuery QueryZeroTermsQuery `json:"zero_terms_query,omitempty"` // default: QeruyZeroTermsQueryNONE TieBreaker float64 `json:"tie_breaker,omitempty"` // default: 0.0 }
func (*MultiMatchQuery) GetQueryName ¶
func (*MultiMatchQuery) GetQueryName() string
type NestedQuery ¶
NestedQuery return a nested body
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html
func NewNestedQuery ¶
func NewNestedQuery() NestedQuery
func (*NestedQuery) WithIgnoreUnmapped ¶
func (nq *NestedQuery) WithIgnoreUnmapped(ignoreUnmapped bool) func(all *tNestedQuery)
func (*NestedQuery) WithScoreMode ¶
func (nq *NestedQuery) WithScoreMode(mode ScoreMode) func(all *tNestedQuery)
type PrefixQuery ¶
type PrefixQuery struct { Field string `json:"-"` Value string `json:"value"` Rewrite QueryRewrite `json:"rewrite,omitempty"` CaseInsensitive bool `json:"case_insensitive,omitempty"` // default: false }
func (*PrefixQuery) GetQueryName ¶
func (f *PrefixQuery) GetQueryName() string
func (*PrefixQuery) MarshalJSON ¶
func (f *PrefixQuery) MarshalJSON() ([]byte, error)
type Query ¶
type Query func(query BaseQuery, o ...func(*tQuery)) *tQuery
Query returns results a query body.
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
type QueryExpandWildcards ¶
type QueryExpandWildcards string
const ( QueryExpandWildcardsAll QueryExpandWildcards = "all" QueryExpandWildcardsOpen QueryExpandWildcards = "open" QueryExpandWildcardsClosed QueryExpandWildcards = "closed" QueryExpandWildcardsHidden QueryExpandWildcards = "hidden" QueryExpandWildcardsNone QueryExpandWildcards = "none" )
type QueryMultiMatchType ¶
type QueryMultiMatchType string
const ( QueryMultiMatchTypeBestFields QueryMultiMatchType = "best_fields" QueryMultiMatchTypeMostFields QueryMultiMatchType = "most_fields" QueryMultiMatchTypeCrossFields QueryMultiMatchType = "cross_fields" QueryMultiMatchTypePhrase QueryMultiMatchType = "phrase" QueryMultiMatchTypePhrasePrefix QueryMultiMatchType = "phrase_prefix" QueryMultiMatchTypeBoolPrefix QueryMultiMatchType = "bool_prefix" )
type QueryOperator ¶
type QueryOperator string
const ( QueryOperatorOR QueryOperator = "OR" QueryOperatorAND QueryOperator = "AND" )
type QueryRelation ¶
type QueryRelation string
const ( QueryRelationINTERSECTS QueryRelation = "INTERSECTS" QueryRelationCONTAINS QueryRelation = "CONTAINS" QueryRelationWITHIN QueryRelation = "WITHIN" )
type QueryRewrite ¶
type QueryRewrite string
const ( QueryRewriteConstantScore QueryRewrite = "constant_score" QueryRewriteScoringboolean QueryRewrite = "scoring_boolean" QueryRewriteTopTermsBlendedFreqsN QueryRewrite = "top_terms_blended_freqs_N" QueryRewriteTopTermsBoostN QueryRewrite = "top_terms_boost_N" QueryRewriteTopTermsN QueryRewrite = "top_terms_N" )
type QuerySearchType ¶
type QuerySearchType string
const ( QuerySearchTypeQueryThenFetch QuerySearchType = "query_then_fetch" QuerySearchDFSTypeQueryThenFetch QuerySearchType = "dfs_query_then_fetch" )
type QuerySimpleQueryStringFlag ¶
type QuerySimpleQueryStringFlag string
const ( QuerySimpleQueryStringFlagALL QuerySimpleQueryStringFlag = "ALL" QuerySimpleQueryStringFlagAND QuerySimpleQueryStringFlag = "AND" QuerySimpleQueryStringFlagESCAPE QuerySimpleQueryStringFlag = "ESCAPE" QuerySimpleQueryStringFlagFUZZY QuerySimpleQueryStringFlag = "FUZZY" QuerySimpleQueryStringFlagNEAR QuerySimpleQueryStringFlag = "NEAR" QuerySimpleQueryStringFlagNONE QuerySimpleQueryStringFlag = "NONE" QuerySimpleQueryStringFlagNOT QuerySimpleQueryStringFlag = "NOT" QuerySimpleQueryStringFlagOR QuerySimpleQueryStringFlag = "OR" QuerySimpleQueryStringFlagPHRASE QuerySimpleQueryStringFlag = "PHRASE" QuerySimpleQueryStringFlagPRECEDENCE QuerySimpleQueryStringFlag = "PRECEDENCE" QuerySimpleQueryStringFlagPREFIX QuerySimpleQueryStringFlag = "PREFIX" QuerySimpleQueryStringFlagSLOP QuerySimpleQueryStringFlag = "SLOP" QuerySimpleQueryStringFlagWHITESPACE QuerySimpleQueryStringFlag = "WHITESPACE" )
type QueryZeroTermsQuery ¶
type QueryZeroTermsQuery string
const ( QeruyZeroTermsQueryNONE QueryZeroTermsQuery = "none" QueryZeroTermsQueryALL QueryZeroTermsQuery = "all" )
type RangeQuery ¶
type RangeQuery struct { Field string `json:"-"` GT *MultiType `json:"gt,omitempty"` GTE *MultiType `json:"gte,omitempty"` LT *MultiType `json:"lt,omitempty"` LTE *MultiType `json:"lte,omitempty"` Format string `json:"format,omitempty"` Relation QueryRelation `json:"relation,omitempty"` TimeZone string `json:"time_zone,omitempty"` Boost float64 `json:"boost,omitempty"` // default: 1.0 }
func (*RangeQuery) GetQueryName ¶
func (*RangeQuery) GetQueryName() string
func (*RangeQuery) MarshalJSON ¶
func (r *RangeQuery) MarshalJSON() ([]byte, error)
type Search ¶
type Search func(o ...func(all *tSearch)) *tSearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html
func (*Search) WithFields ¶
func (*Search) WithFields(fields *tFields) func(all *tSearch)
func (*Search) WithIndicesBoost ¶
func (*Search) WithIndicesBoost(ib tIndicesBoost) func(all *tSearch)
type SearchQueryParams ¶
type SearchQueryParams struct { AllowNoIndices bool `json:"allow_no_indices,omitempty"` // default: true AllowPartialSearchResults bool `json:"allow_partial_search_results,omitempty"` // default: true Analyzer string `json:"analyzer,omitempty"` AnalyzeWildcard bool `json:"analyze_wildcard,omitempty"` // default: false BatchedReduceSize int `json:"batched_reduce_size,omitempty"` // default: 512 CSSMinimizeRoundtrips bool `json:"css_minimize_roundtrips,omitempty"` // default: true DefaultOperator QueryOperator `json:"default_operator,omitempty"` // default: QueryOperatorOR DF string `json:"df,omitempty"` DocvalueFields []string `json:"docvalue_fields,omitempty"` ExpandWildcards QueryExpandWildcards `json:"expand_wildcards,omitempty"` // default: QueryExpandWildcardsOpen Explain bool `json:"explain,omitempty"` // default: false From int `json:"from,omitempty"` // default: 0 IgnoreThrottled bool `json:"ignore_throttled,omitempty"` // default: false Lenient bool `json:"lenient,omitempty"` // default: false MaxConcurrentShardRequests int `json:"max_concurrent_shard_requests,omitempty"` // default: 5 PreFilterShardSize int `json:"pre_filter_shard_size,omitempty"` Preference string `json:"preference,omitempty"` Q string `json:"q,omitempty"` RequestCache bool `json:"request_cache,omitempty"` RestTotalHitsAsInt bool `json:"rest_total_hits_as_int,omitempty"` // default: false Routing string `json:"routing,omitempty"` Scroll string `json:"scroll,omitempty"` SearchType QuerySearchType `json:"search_type,omitempty"` // default: QuerySearchTypeQueryThenFetch SeqNoPrimaryTerm bool `json:"seq_no_primary_term,omitempty"` Size int `json:"size,omitempty"` // default: 10 Sort SearchSortVal `json:"sort,omitempty"` Source *SearchSourceVal `json:"_source,omitempty"` // default: true SourceExcludes StringList `json:"_source_excludes,omitempty"` SourceIncludes StringList `json:"_source_includes,omitempty"` Stats string `json:"stats,omitempty"` StoredFields StringList `json:"stored_fields,omitempty"` SuggestField string `json:"suggest_field,omitempty"` SuggestMode SearchSuggestMode `json:"suggest_mode,omitempty"` // default: SearchSuggestModeMissing SuggestSize int `json:"suggest_size,omitempty"` SuggestText string `json:"suggest_text,omitempty"` TerminateAfter int `json:"terminate_after,omitempty"` // default: 0 Timeout string `json:"timeout,omitempty"` TrackScores bool `json:"track_scores,omitempty"` // default: false TrackTotalHits *TrackTotalHitsVal `json:"track_total_hits,omitempty"` // default: 10000 TypedKeys bool `json:"typed_keys,omitempty"` // default: true Version bool `json:"version,omitempty"` // default: false }
type SearchSortVal ¶
func (SearchSortVal) MarshalJSON ¶
func (ssv SearchSortVal) MarshalJSON() ([]byte, error)
type SearchSourceVal ¶
type SearchSourceVal struct { BoolValue bool Fields StringList }
func (*SearchSourceVal) MarshalJSON ¶
func (ssv *SearchSourceVal) MarshalJSON() ([]byte, error)
type SearchSuggestMode ¶
type SearchSuggestMode string
const ( SearchSuggestModeAlways SearchSuggestMode = "always" SearchSuggestModeMissing SearchSuggestMode = "missing" SearchSuggestModePopular SearchSuggestMode = "popular" )
type SimpleQueryStringQuery ¶
SimpleQueryStringQuery results a simple_query_string struct
See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html
func NewSimpleQueryStringQuery ¶
func NewSimpleQueryStringQuery() SimpleQueryStringQuery
func (*SimpleQueryStringQuery) WithAnalyzeWildcard ¶
func (sqsq *SimpleQueryStringQuery) WithAnalyzeWildcard(analyzeWildcard bool) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithAnalyzer ¶
func (sqsq *SimpleQueryStringQuery) WithAnalyzer(analyzer string) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithAutoGenerateSynonymsPhraseQuery ¶
func (sqsq *SimpleQueryStringQuery) WithAutoGenerateSynonymsPhraseQuery(autoGenerateSynonymsPhraseQuery bool) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithDefaultOperator ¶
func (sqsq *SimpleQueryStringQuery) WithDefaultOperator(defaultOperator QueryOperator) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithFields ¶
func (sqsq *SimpleQueryStringQuery) WithFields(fields ...string) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithFlags ¶
func (sqsq *SimpleQueryStringQuery) WithFlags(flags ...QuerySimpleQueryStringFlag) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithFuzzyMaxExpansions ¶
func (sqsq *SimpleQueryStringQuery) WithFuzzyMaxExpansions(FuzzyMaxExpansions int) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithFuzzyPrefixLength ¶
func (sqsq *SimpleQueryStringQuery) WithFuzzyPrefixLength(FuzzyPrefixLength int) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithFuzzyTranspositions ¶
func (sqsq *SimpleQueryStringQuery) WithFuzzyTranspositions(FuzzyTranspositions bool) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithLenient ¶
func (sqsq *SimpleQueryStringQuery) WithLenient(Lenient bool) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithMinimumShouldMatch ¶
func (sqsq *SimpleQueryStringQuery) WithMinimumShouldMatch(MinimumShouldMatch *MinimumShouldMatch) func(all *tSimpleQueryStringQuery)
func (*SimpleQueryStringQuery) WithQuoteFieldSuffix ¶
func (sqsq *SimpleQueryStringQuery) WithQuoteFieldSuffix(QuoteFieldSuffix string) func(all *tSimpleQueryStringQuery)
type SimpleQueryStringQueryFlags ¶
type SimpleQueryStringQueryFlags []QuerySimpleQueryStringFlag
func (SimpleQueryStringQueryFlags) MarshalJSON ¶
func (flags SimpleQueryStringQueryFlags) MarshalJSON() ([]byte, error)
type StringList ¶
type StringList []string
func (StringList) MarshalJSON ¶
func (sl StringList) MarshalJSON() ([]byte, error)
type StringOrList ¶
type StringOrList []string
func (StringOrList) MarshalJSON ¶
func (sl StringOrList) MarshalJSON() ([]byte, error)
type StringQuery ¶
type StringQuery struct { Query string `json:"query"` DefaultField string `json:"default_field,omitempty"` AllowLeadingWildcard bool `json:"allow_leading_wildcard,omitempty"` // default: true AnalyzeWildcard bool `json:"analyze_wildcard,omitempty"` // default: false Analyzer string `json:"analyzer,omitempty"` AutoGenerateSynonymsPhraseQuery bool `json:"auto_generate_synonyms_phrase_query,omitempty"` Boost float64 `json:"boost,omitempty"` // default: 1.0 DefaultOperator QueryOperator `json:"default_operator,omitempty"` // default: QueryOperatorOR EnablePositionIncrements bool `json:"enable_position_increments,omitempty"` // default: true Fields []string `json:"fields,omitempty"` Fuzziness string `json:"fuzziness,omitempty"` FuzzyMaxExpansions int `json:"fuzzy_max_expansions,omitempty"` // default: 50 FuzzyPrefixLength int `json:"fuzzy_prefix_length,omitempty"` // default: 0 FuzzyTranspositions bool `json:"fuzzy_transpositions,omitempty"` // default: true Lenient bool `json:"lenient,omitempty"` // default: false MaxDeterminizedStates int `json:"max_determinized_states,omitempty"` // default: 10000 MinimumShouldMatch string `json:"minimum_should_match,omitempty"` QuoteAnalyzer string `json:"quote_analyzer,omitempty"` PhraseSlop int `json:"phrase_slop,omitempty"` // default: 0 QuoteFieldSuffix string `json:"quote_field_suffix,omitempty"` Rewrite string `json:"rewrite,omitempty"` TimeZone string `json:"time_zone,omitempty"` }
func (*StringQuery) GetQueryName ¶
func (*StringQuery) GetQueryName() string
type TermQuery ¶
TermQuery return a term structure
See complete documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
func NewTermQuery ¶
func NewTermQuery() TermQuery
func (*TermQuery) WithCaseInsensitiv ¶
type TermsQuery ¶
TermsQuery return a terms structure
See complete documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html
func NewTermsQuery ¶
func NewTermsQuery() TermsQuery
func (*TermsQuery) WithBoost ¶
func (q *TermsQuery) WithBoost(boost float64) func(all *tTermsQuery)
func (*TermsQuery) WithCaseInsensitiv ¶
func (q *TermsQuery) WithCaseInsensitiv(caseInsensitive bool) func(all *tTermsQuery)
type TrackTotalHitsVal ¶
func (*TrackTotalHitsVal) MarshalJSON ¶
func (tthv *TrackTotalHitsVal) MarshalJSON() ([]byte, error)
Source Files ¶
- aggBase.go
- aggFilter.go
- aggNested.go
- aggScript.go
- aggTerms.go
- aggs.go
- api.go
- baseQuery.go
- enums.go
- fields.go
- fieldsField.go
- indicesBoost.go
- query.go
- queryBool.go
- queryCombinedFields.go
- queryExists.go
- queryFuzzy.go
- queryIDs.go
- queryIntervals.go
- queryMatch.go
- queryMatchAll.go
- queryMatchBoolPrefix.go
- queryMatchNone.go
- queryMatchPhrase.go
- queryMatchPhrasePrefix.go
- queryMultiMatch.go
- queryNested.go
- queryPrefix.go
- queryRange.go
- querySimpleQueryString.go
- queryString.go
- queryTerm.go
- queryTerms.go
- search.go
- types.go