Documentation
¶
Overview ¶
Copyright 2012-present Oliver Eilhard. All rights reserved. Use of this source code is governed by a MIT-license. See http://olivere.mit-license.org/license.txt for details.
Index ¶
- func ErrorReason(err error) string
- func IsContextErr(err error) bool
- type AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Filters(name string, filter Query) *AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Meta(metaData map[string]interface{}) *AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Source() (interface{}, error)
- func (a *AdjacencyMatrixAggregation) SubAggregation(name string, subAggregation Aggregation) *AdjacencyMatrixAggregation
- type Aggregation
- type AggregationBucketAdjacencyMatrix
- type AggregationBucketCompositeItem
- type AggregationBucketCompositeItems
- type AggregationBucketFilters
- type AggregationBucketHistogramItem
- type AggregationBucketHistogramItems
- type AggregationBucketKeyItem
- type AggregationBucketKeyItems
- type AggregationBucketKeyedHistogramItems
- type AggregationBucketKeyedRangeItems
- type AggregationBucketMultiKeyItem
- type AggregationBucketMultiKeyItems
- type AggregationBucketRangeItem
- type AggregationBucketRangeItems
- type AggregationBucketSignificantTerm
- type AggregationBucketSignificantTerms
- type AggregationExtendedStatsMetric
- type AggregationGeoBoundsMetric
- type AggregationGeoCentroidMetric
- type AggregationMatrixStats
- type AggregationMatrixStatsField
- type AggregationPercentilesMetric
- type AggregationPipelineBucketMetricValue
- type AggregationPipelineDerivative
- type AggregationPipelinePercentilesMetric
- type AggregationPipelineSimpleValue
- type AggregationPipelineStatsMetric
- type AggregationScriptedMetric
- type AggregationSingleBucket
- type AggregationStatsMetric
- type AggregationTopMetricsItem
- type AggregationTopMetricsItems
- type AggregationValueMetric
- type Aggregations
- func (a Aggregations) AdjacencyMatrix(name string) (*AggregationBucketAdjacencyMatrix, bool)
- func (a Aggregations) AutoDateHistogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) AvgBucket(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Composite(name string) (*AggregationBucketCompositeItems, bool)
- func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool)
- func (a Aggregations) DiversifiedSampler(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool)
- func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool)
- func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool)
- func (a Aggregations) GeoCentroid(name string) (*AggregationGeoCentroidMetric, bool)
- func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) GeoTile(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) IPRange(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) KeyedDateHistogram(name string) (*AggregationBucketKeyedHistogramItems, bool)
- func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
- func (a Aggregations) MatrixStats(name string) (*AggregationMatrixStats, bool)
- func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
- func (a Aggregations) MedianAbsoluteDeviation(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) Min(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) MinBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
- func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool)deprecated
- func (a Aggregations) MovFn(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) MultiTerms(name string) (*AggregationBucketMultiKeyItems, bool)
- func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool)
- func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool)
- func (a Aggregations) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool)
- func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) RareTerms(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Sampler(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) ScriptedMetric(name string) (*AggregationScriptedMetric, bool)
- func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool)
- func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool)
- func (a Aggregations) StatsBucket(name string) (*AggregationPipelineStatsMetric, bool)
- func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) TopMetrics(name string) (*AggregationTopMetricsItems, bool)
- func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) WeightedAvg(name string) (*AggregationValueMetric, bool)
- type AllocationId
- type AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Buckets(buckets int) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Field(field string) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Format(format string) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Meta(metaData map[string]interface{}) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) MinDocCount(minDocCount int64) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) MinimumInterval(interval string) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Missing(missing interface{}) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Script(script *Script) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) Source() (interface{}, error)
- func (a *AutoDateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *AutoDateHistogramAggregation
- func (a *AutoDateHistogramAggregation) TimeZone(timeZone string) *AutoDateHistogramAggregation
- type AvgAggregation
- func (a *AvgAggregation) Field(field string) *AvgAggregation
- func (a *AvgAggregation) Format(format string) *AvgAggregation
- func (a *AvgAggregation) Meta(metaData map[string]interface{}) *AvgAggregation
- func (a *AvgAggregation) Missing(missing interface{}) *AvgAggregation
- func (a *AvgAggregation) Script(script *Script) *AvgAggregation
- func (a *AvgAggregation) Source() (interface{}, error)
- func (a *AvgAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgAggregation
- type AvgBucketAggregation
- func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapInsertZeros() *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapPolicy(gapPolicy string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapSkip() *AvgBucketAggregation
- func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation
- func (a *AvgBucketAggregation) Source() (interface{}, error)
- type BoolQuery
- func (q *BoolQuery) AdjustPureNegative(adjustPureNegative bool) *BoolQuery
- func (q *BoolQuery) Boost(boost float64) *BoolQuery
- func (q *BoolQuery) Filter(filters ...Query) *BoolQuery
- func (q *BoolQuery) MinimumNumberShouldMatch(minimumNumberShouldMatch int) *BoolQuery
- func (q *BoolQuery) MinimumShouldMatch(minimumShouldMatch string) *BoolQuery
- func (q *BoolQuery) Must(queries ...Query) *BoolQuery
- func (q *BoolQuery) MustNot(queries ...Query) *BoolQuery
- func (q *BoolQuery) QueryName(queryName string) *BoolQuery
- func (q *BoolQuery) Should(queries ...Query) *BoolQuery
- func (q *BoolQuery) Source() (interface{}, error)
- type BoostingQuery
- func (q *BoostingQuery) Boost(boost float64) *BoostingQuery
- func (q *BoostingQuery) Negative(negative Query) *BoostingQuery
- func (q *BoostingQuery) NegativeBoost(negativeBoost float64) *BoostingQuery
- func (q *BoostingQuery) Positive(positive Query) *BoostingQuery
- func (q *BoostingQuery) Source() (interface{}, error)
- type BoundingBox
- type BroadcastResponse
- type BucketCountThresholds
- type BucketScriptAggregation
- func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapInsertZeros() *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapPolicy(gapPolicy string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapSkip() *BucketScriptAggregation
- func (a *BucketScriptAggregation) Meta(metaData map[string]interface{}) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Script(script *Script) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Source() (interface{}, error)
- type BucketSelectorAggregation
- func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapInsertZeros() *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapPolicy(gapPolicy string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapSkip() *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Meta(metaData map[string]interface{}) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Script(script *Script) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Source() (interface{}, error)
- type BucketSortAggregation
- func (a *BucketSortAggregation) From(from int) *BucketSortAggregation
- func (a *BucketSortAggregation) GapInsertZeros() *BucketSortAggregation
- func (a *BucketSortAggregation) GapPolicy(gapPolicy string) *BucketSortAggregation
- func (a *BucketSortAggregation) GapSkip() *BucketSortAggregation
- func (a *BucketSortAggregation) Meta(meta map[string]interface{}) *BucketSortAggregation
- func (a *BucketSortAggregation) Size(size int) *BucketSortAggregation
- func (a *BucketSortAggregation) Sort(field string, ascending bool) *BucketSortAggregation
- func (a *BucketSortAggregation) SortWithInfo(info SortInfo) *BucketSortAggregation
- func (a *BucketSortAggregation) Source() (interface{}, error)
- type CandidateGenerator
- type CardinalityAggregation
- func (a *CardinalityAggregation) Field(field string) *CardinalityAggregation
- func (a *CardinalityAggregation) Format(format string) *CardinalityAggregation
- func (a *CardinalityAggregation) Meta(metaData map[string]interface{}) *CardinalityAggregation
- func (a *CardinalityAggregation) Missing(missing interface{}) *CardinalityAggregation
- func (a *CardinalityAggregation) PrecisionThreshold(threshold int64) *CardinalityAggregation
- func (a *CardinalityAggregation) Rehash(rehash bool) *CardinalityAggregation
- func (a *CardinalityAggregation) Script(script *Script) *CardinalityAggregation
- func (a *CardinalityAggregation) Source() (interface{}, error)
- func (a *CardinalityAggregation) SubAggregation(name string, subAggregation Aggregation) *CardinalityAggregation
- type ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) Name() string
- func (sh *ChiSquareSignificanceHeuristic) Source() (interface{}, error)
- type ChildrenAggregation
- func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation
- func (a *ChildrenAggregation) Source() (interface{}, error)
- func (a *ChildrenAggregation) SubAggregation(name string, subAggregation Aggregation) *ChildrenAggregation
- func (a *ChildrenAggregation) Type(typ string) *ChildrenAggregation
- type ClosePointInTimeService
- func (s *ClosePointInTimeService) BodyJson(body interface{}) *ClosePointInTimeService
- func (s *ClosePointInTimeService) BodyString(body string) *ClosePointInTimeService
- func (s *ClosePointInTimeService) ErrorTrace(errorTrace bool) *ClosePointInTimeService
- func (s *ClosePointInTimeService) FilterPath(filterPath ...string) *ClosePointInTimeService
- func (s *ClosePointInTimeService) Header(name string, value string) *ClosePointInTimeService
- func (s *ClosePointInTimeService) Headers(headers http.Header) *ClosePointInTimeService
- func (s *ClosePointInTimeService) Human(human bool) *ClosePointInTimeService
- func (s *ClosePointInTimeService) ID(id string) *ClosePointInTimeService
- func (s *ClosePointInTimeService) Pretty(pretty bool) *ClosePointInTimeService
- func (s *ClosePointInTimeService) Validate() error
- type CollapseBuilder
- type CollectorResult
- type CombinedFieldsQuery
- func (q *CombinedFieldsQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *CombinedFieldsQuery
- func (q *CombinedFieldsQuery) Field(field string) *CombinedFieldsQuery
- func (q *CombinedFieldsQuery) FieldWithBoost(field string, boost float64) *CombinedFieldsQuery
- func (q *CombinedFieldsQuery) MinimumShouldMatch(minimumShouldMatch string) *CombinedFieldsQuery
- func (q *CombinedFieldsQuery) Operator(operator string) *CombinedFieldsQuery
- func (q *CombinedFieldsQuery) Source() (interface{}, error)
- func (q *CombinedFieldsQuery) ZeroTermsQuery(zeroTermsQuery string) *CombinedFieldsQuery
- type CommonTermsQuerydeprecated
- func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery
- func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery
- func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreq(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreqOperator(op string) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreq(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreqOperator(op string) *CommonTermsQuery
- func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery
- func (q *CommonTermsQuery) Source() (interface{}, error)
- type CompletionSuggester
- func (q *CompletionSuggester) Analyzer(analyzer string) *CompletionSuggester
- func (q *CompletionSuggester) ContextQueries(queries ...SuggesterContextQuery) *CompletionSuggester
- func (q *CompletionSuggester) ContextQuery(query SuggesterContextQuery) *CompletionSuggester
- func (q *CompletionSuggester) Field(field string) *CompletionSuggester
- func (q *CompletionSuggester) Fuzziness(fuzziness interface{}) *CompletionSuggester
- func (q *CompletionSuggester) FuzzyOptions(options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) Name() string
- func (q *CompletionSuggester) Prefix(prefix string) *CompletionSuggester
- func (q *CompletionSuggester) PrefixWithEditDistance(prefix string, editDistance interface{}) *CompletionSuggester
- func (q *CompletionSuggester) PrefixWithOptions(prefix string, options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) Regex(regex string) *CompletionSuggester
- func (q *CompletionSuggester) RegexOptions(options *RegexCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) RegexWithOptions(regex string, options *RegexCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) ShardSize(shardSize int) *CompletionSuggester
- func (q *CompletionSuggester) Size(size int) *CompletionSuggester
- func (q *CompletionSuggester) SkipDuplicates(skipDuplicates bool) *CompletionSuggester
- func (q *CompletionSuggester) Source(includeName bool) (interface{}, error)
- func (q *CompletionSuggester) Text(text string) *CompletionSuggester
- type CompositeAggregation
- func (a *CompositeAggregation) AggregateAfter(after map[string]interface{}) *CompositeAggregation
- func (a *CompositeAggregation) Meta(metaData map[string]interface{}) *CompositeAggregation
- func (a *CompositeAggregation) Size(size int) *CompositeAggregation
- func (a *CompositeAggregation) Source() (interface{}, error)
- func (a *CompositeAggregation) Sources(sources ...CompositeAggregationValuesSource) *CompositeAggregation
- func (a *CompositeAggregation) SubAggregation(name string, subAggregation Aggregation) *CompositeAggregation
- type CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Asc() *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) CalendarInterval(calendarInterval interface{}) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Desc() *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Field(field string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) FixedInterval(fixedInterval interface{}) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Format(format string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Interval(interval interface{}) *CompositeAggregationDateHistogramValuesSourcedeprecated
- func (a *CompositeAggregationDateHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationDateHistogramValuesSourcedeprecated
- func (a *CompositeAggregationDateHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Order(order string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Script(script *Script) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationDateHistogramValuesSource) TimeZone(timeZone string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) ValueType(valueType string) *CompositeAggregationDateHistogramValuesSource
- type CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Asc() *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Desc() *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Field(field string) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationHistogramValuesSourcedeprecated
- func (a *CompositeAggregationHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Order(order string) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Script(script *Script) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource
- type CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Asc() *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Desc() *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Missing(missing interface{}) *CompositeAggregationTermsValuesSourcedeprecated
- func (a *CompositeAggregationTermsValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Order(order string) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Script(script *Script) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationTermsValuesSource) ValueType(valueType string) *CompositeAggregationTermsValuesSource
- type CompositeAggregationValuesSource
- type ConstantScoreQuery
- type ContextSuggester
- func (q *ContextSuggester) ContextQueries(queries ...SuggesterContextQuery) *ContextSuggester
- func (q *ContextSuggester) ContextQuery(query SuggesterContextQuery) *ContextSuggester
- func (q *ContextSuggester) Field(field string) *ContextSuggester
- func (q *ContextSuggester) Name() string
- func (q *ContextSuggester) Prefix(prefix string) *ContextSuggester
- func (q *ContextSuggester) Size(size int) *ContextSuggester
- func (q *ContextSuggester) Source(includeName bool) (interface{}, error)
- type CumulativeSumAggregation
- func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Meta(metaData map[string]interface{}) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Source() (interface{}, error)
- type DateHistogramAggregation
- func (a *DateHistogramAggregation) CalendarInterval(calendarInterval string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBounds(min, max interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBoundsMin(min interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) FixedInterval(fixedInterval string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Format(format string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregationdeprecated
- func (a *DateHistogramAggregation) Keyed(keyed bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) MinDocCount(minDocCount int64) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Source() (interface{}, error)
- func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation
- func (a *DateHistogramAggregation) TimeZone(timeZone string) *DateHistogramAggregation
- type DateRangeAggregation
- func (a *DateRangeAggregation) AddRange(from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddRangeWithKey(key string, from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedFrom(to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedTo(from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Between(from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) BetweenWithKey(key string, from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Field(field string) *DateRangeAggregation
- func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation
- func (a *DateRangeAggregation) Gt(from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) GtWithKey(key string, from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Keyed(keyed bool) *DateRangeAggregation
- func (a *DateRangeAggregation) Lt(to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) LtWithKey(key string, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Meta(metaData map[string]interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Script(script *Script) *DateRangeAggregation
- func (a *DateRangeAggregation) Source() (interface{}, error)
- func (a *DateRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *DateRangeAggregation
- func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation
- func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation
- type DateRangeAggregationEntry
- type Decoder
- type DefaultDecoder
- type DeleteScriptService
- func (s *DeleteScriptService) ErrorTrace(errorTrace bool) *DeleteScriptService
- func (s *DeleteScriptService) FilterPath(filterPath ...string) *DeleteScriptService
- func (s *DeleteScriptService) Header(name string, value string) *DeleteScriptService
- func (s *DeleteScriptService) Headers(headers http.Header) *DeleteScriptService
- func (s *DeleteScriptService) Human(human bool) *DeleteScriptService
- func (s *DeleteScriptService) Id(id string) *DeleteScriptService
- func (s *DeleteScriptService) MasterTimeout(masterTimeout string) *DeleteScriptService
- func (s *DeleteScriptService) Pretty(pretty bool) *DeleteScriptService
- func (s *DeleteScriptService) Timeout(timeout string) *DeleteScriptService
- type DerivativeAggregation
- func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeAggregation
- func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation
- func (a *DerivativeAggregation) GapInsertZeros() *DerivativeAggregation
- func (a *DerivativeAggregation) GapPolicy(gapPolicy string) *DerivativeAggregation
- func (a *DerivativeAggregation) GapSkip() *DerivativeAggregation
- func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation
- func (a *DerivativeAggregation) Source() (interface{}, error)
- func (a *DerivativeAggregation) Unit(unit string) *DerivativeAggregation
- type DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Accuracy(accuracy float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Field(field string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxEdits(maxEdits int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxInspections(maxInspections int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxTermFreq(maxTermFreq float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MinDocFreq(minDocFreq float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MinWordLength(minWordLength int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PostFilter(postFilter string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PreFilter(preFilter string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PrefixLength(prefixLength int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Size(size int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Sort(sort string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Source() (interface{}, error)
- func (g *DirectCandidateGenerator) StringDistance(stringDistance string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) SuggestMode(suggestMode string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Type() string
- type DisMaxQuery
- type DistanceFeatureQuery
- func (q *DistanceFeatureQuery) Boost(boost float64) *DistanceFeatureQuery
- func (q *DistanceFeatureQuery) Field(name string) *DistanceFeatureQuery
- func (q *DistanceFeatureQuery) Origin(origin interface{}) *DistanceFeatureQuery
- func (q *DistanceFeatureQuery) Pivot(pivot string) *DistanceFeatureQuery
- func (q *DistanceFeatureQuery) QueryName(queryName string) *DistanceFeatureQuery
- func (q *DistanceFeatureQuery) Source() (interface{}, error)
- type DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) ExecutionHint(hint string) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Field(field string) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Meta(metaData map[string]interface{}) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Script(script *Script) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) ShardSize(shardSize int) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Source() (interface{}, error)
- func (a *DiversifiedSamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *DiversifiedSamplerAggregation
- type DocvalueField
- type DocvalueFields
- type EWMAMovAvgModel
- type Error
- type ErrorDetails
- type ExistsQuery
- type ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Decay(decay float64) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) FieldName(fieldName string) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) GetWeight() *float64
- func (fn *ExponentialDecayFunction) MultiValueMode(mode string) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Name() string
- func (fn *ExponentialDecayFunction) Offset(offset interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Origin(origin interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Scale(scale interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Source() (interface{}, error)
- func (fn *ExponentialDecayFunction) Weight(weight float64) *ExponentialDecayFunction
- type ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Field(field string) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Format(format string) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Missing(missing interface{}) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Script(script *Script) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Sigma(sigma float64) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Source() (interface{}, error)
- func (a *ExtendedStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *ExtendedStatsAggregation
- type ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) BucketsPath(bucketsPaths ...string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Format(format string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapInsertZeros() *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapPolicy(gapPolicy string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapSkip() *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Sigma(sigma float32) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Source() (interface{}, error)
- type FailedNodeException
- type FetchSourceContext
- func (fsc *FetchSourceContext) Exclude(excludes ...string) *FetchSourceContext
- func (fsc *FetchSourceContext) FetchSource() bool
- func (fsc *FetchSourceContext) Include(includes ...string) *FetchSourceContext
- func (fsc *FetchSourceContext) Query() url.Values
- func (fsc *FetchSourceContext) SetFetchSource(fetchSource bool)
- func (fsc *FetchSourceContext) Source() (interface{}, error)
- type FieldSort
- func (s *FieldSort) Asc() *FieldSort
- func (s *FieldSort) Desc() *FieldSort
- func (s *FieldSort) FieldName(fieldName string) *FieldSort
- func (s *FieldSort) Filter(filter Query) *FieldSort
- func (s *FieldSort) Missing(missing interface{}) *FieldSort
- func (s *FieldSort) Nested(nested *NestedSort) *FieldSort
- func (s *FieldSort) NestedFilter(nestedFilter Query) *FieldSort
- func (s *FieldSort) NestedPath(nestedPath string) *FieldSort
- func (s *FieldSort) NestedSort(nestedSort *NestedSort) *FieldSort
- func (s *FieldSort) Order(ascending bool) *FieldSort
- func (s *FieldSort) Path(path string) *FieldSort
- func (s *FieldSort) SortMode(sortMode string) *FieldSort
- func (s *FieldSort) Source() (interface{}, error)
- func (s *FieldSort) UnmappedType(typ string) *FieldSort
- type FieldStatistics
- type FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Factor(factor float64) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Field(field string) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) GetWeight() *float64
- func (fn *FieldValueFactorFunction) Missing(missing float64) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Modifier(modifier string) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Name() string
- func (fn *FieldValueFactorFunction) Source() (interface{}, error)
- func (fn *FieldValueFactorFunction) Weight(weight float64) *FieldValueFactorFunction
- type FilterAggregation
- func (a *FilterAggregation) Filter(filter Query) *FilterAggregation
- func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation
- func (a *FilterAggregation) Source() (interface{}, error)
- func (a *FilterAggregation) SubAggregation(name string, subAggregation Aggregation) *FilterAggregation
- type FiltersAggregation
- func (a *FiltersAggregation) Filter(filter Query) *FiltersAggregation
- func (a *FiltersAggregation) FilterWithName(name string, filter Query) *FiltersAggregation
- func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation
- func (a *FiltersAggregation) Meta(metaData map[string]interface{}) *FiltersAggregation
- func (a *FiltersAggregation) OtherBucket(otherBucket bool) *FiltersAggregation
- func (a *FiltersAggregation) OtherBucketKey(key string) *FiltersAggregation
- func (a *FiltersAggregation) Source() (interface{}, error)
- func (a *FiltersAggregation) SubAggregation(name string, subAggregation Aggregation) *FiltersAggregation
- type FunctionScoreQuery
- func (q *FunctionScoreQuery) Add(filter Query, scoreFunc ScoreFunction) *FunctionScoreQuery
- func (q *FunctionScoreQuery) AddScoreFunc(scoreFunc ScoreFunction) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Boost(boost float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) BoostMode(boostMode string) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery
- func (q *FunctionScoreQuery) MaxBoost(maxBoost float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) MinScore(minScore float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Query(query Query) *FunctionScoreQuery
- func (q *FunctionScoreQuery) ScoreMode(scoreMode string) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Source() (interface{}, error)
- type FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) EditDistance(editDistance interface{}) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) MaxDeterminizedStates(max int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) MinLength(minLength int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) PrefixLength(prefixLength int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) Source() (interface{}, error)
- func (o *FuzzyCompletionSuggesterOptions) Transpositions(transpositions bool) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) UnicodeAware(unicodeAware bool) *FuzzyCompletionSuggesterOptions
- type FuzzyQuery
- func (q *FuzzyQuery) Boost(boost float64) *FuzzyQuery
- func (q *FuzzyQuery) Fuzziness(fuzziness interface{}) *FuzzyQuery
- func (q *FuzzyQuery) MaxExpansions(maxExpansions int) *FuzzyQuery
- func (q *FuzzyQuery) PrefixLength(prefixLength int) *FuzzyQuery
- func (q *FuzzyQuery) QueryName(queryName string) *FuzzyQuery
- func (q *FuzzyQuery) Rewrite(rewrite string) *FuzzyQuery
- func (q *FuzzyQuery) Source() (interface{}, error)
- func (q *FuzzyQuery) Transpositions(transpositions bool) *FuzzyQuery
- type GNDSignificanceHeuristic
- type GaussDecayFunction
- func (fn *GaussDecayFunction) Decay(decay float64) *GaussDecayFunction
- func (fn *GaussDecayFunction) FieldName(fieldName string) *GaussDecayFunction
- func (fn *GaussDecayFunction) GetWeight() *float64
- func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction
- func (fn *GaussDecayFunction) Name() string
- func (fn *GaussDecayFunction) Offset(offset interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Origin(origin interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Scale(scale interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Source() (interface{}, error)
- func (fn *GaussDecayFunction) Weight(weight float64) *GaussDecayFunction
- type GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomLeft(bottom, left float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomLeftFromGeoHash(bottomLeft string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomRight(bottom, right float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomRightFromGeoHash(bottomRight string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) IgnoreUnmapped(ignoreUnmapped bool) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) QueryName(queryName string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) Source() (interface{}, error)
- func (q *GeoBoundingBoxQuery) TopLeft(top, left float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopLeftFromGeoHash(topLeft string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopRight(top, right float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopRightFromGeoHash(topRight string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) Type(typ string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) ValidationMethod(method string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) WKT(wkt interface{}) *GeoBoundingBoxQuery
- type GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Field(field string) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Meta(metaData map[string]interface{}) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Script(script *Script) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Source() (interface{}, error)
- func (a *GeoBoundsAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) WrapLongitude(wrapLongitude bool) *GeoBoundsAggregation
- type GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Field(field string) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Meta(metaData map[string]interface{}) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Script(script *Script) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Source() (interface{}, error)
- func (a *GeoCentroidAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoCentroidAggregation
- type GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddRange(from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddRangeWithKey(key string, from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedFrom(to float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedFromWithKey(key string, to float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedTo(from float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedToWithKey(key string, from float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Between(from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) BetweenWithKey(key string, from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) DistanceType(distanceType string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Field(field string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Meta(metaData map[string]interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Point(latLon string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Source() (interface{}, error)
- func (a *GeoDistanceAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Unit(unit string) *GeoDistanceAggregation
- type GeoDistanceQuery
- func (q *GeoDistanceQuery) Distance(distance string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) DistanceType(distanceType string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) GeoHash(geohash string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) GeoPoint(point *GeoPoint) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Lat(lat float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Lon(lon float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Point(lat, lon float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) QueryName(queryName string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Source() (interface{}, error)
- type GeoDistanceSort
- func (s *GeoDistanceSort) Asc() *GeoDistanceSort
- func (s *GeoDistanceSort) Desc() *GeoDistanceSort
- func (s *GeoDistanceSort) DistanceType(distanceType string) *GeoDistanceSort
- func (s *GeoDistanceSort) FieldName(fieldName string) *GeoDistanceSort
- func (s *GeoDistanceSort) GeoDistance(geoDistance string) *GeoDistanceSort
- func (s *GeoDistanceSort) GeoHashes(geohashes ...string) *GeoDistanceSort
- func (s *GeoDistanceSort) IgnoreUnmapped(ignoreUnmapped bool) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedFilter(nestedFilter Query) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedPath(nestedPath string) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedSort(nestedSort *NestedSort) *GeoDistanceSort
- func (s *GeoDistanceSort) Order(ascending bool) *GeoDistanceSort
- func (s *GeoDistanceSort) Point(lat, lon float64) *GeoDistanceSort
- func (s *GeoDistanceSort) Points(points ...*GeoPoint) *GeoDistanceSort
- func (s *GeoDistanceSort) SortMode(sortMode string) *GeoDistanceSort
- func (s *GeoDistanceSort) Source() (interface{}, error)
- func (s *GeoDistanceSort) Unit(unit string) *GeoDistanceSort
- type GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Field(field string) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Meta(metaData map[string]interface{}) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Precision(precision interface{}) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) ShardSize(shardSize int) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Size(size int) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Source() (interface{}, error)
- func (a *GeoHashGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoHashGridAggregation
- type GeoPoint
- type GeoPolygonQuery
- type GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Bounds(boundingBox BoundingBox) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Field(field string) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Meta(metaData map[string]interface{}) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Precision(precision int) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) ShardSize(shardSize int) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Size(size int) *GeoTileGridAggregation
- func (a *GeoTileGridAggregation) Source() (interface{}, error)
- func (a *GeoTileGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoTileGridAggregation
- type GetScriptService
- func (s *GetScriptService) ErrorTrace(errorTrace bool) *GetScriptService
- func (s *GetScriptService) FilterPath(filterPath ...string) *GetScriptService
- func (s *GetScriptService) Header(name string, value string) *GetScriptService
- func (s *GetScriptService) Headers(headers http.Header) *GetScriptService
- func (s *GetScriptService) Human(human bool) *GetScriptService
- func (s *GetScriptService) Id(id string) *GetScriptService
- func (s *GetScriptService) Pretty(pretty bool) *GetScriptService
- type GlobalAggregation
- type HasChildQuery
- func (q *HasChildQuery) Boost(boost float64) *HasChildQuery
- func (q *HasChildQuery) InnerHit(innerHit *InnerHit) *HasChildQuery
- func (q *HasChildQuery) MaxChildren(maxChildren int) *HasChildQuery
- func (q *HasChildQuery) MinChildren(minChildren int) *HasChildQuery
- func (q *HasChildQuery) QueryName(queryName string) *HasChildQuery
- func (q *HasChildQuery) ScoreMode(scoreMode string) *HasChildQuery
- func (q *HasChildQuery) ShortCircuitCutoff(shortCircuitCutoff int) *HasChildQuery
- func (q *HasChildQuery) Source() (interface{}, error)
- type HasParentQuery
- func (q *HasParentQuery) Boost(boost float64) *HasParentQuery
- func (q *HasParentQuery) IgnoreUnmapped(ignore bool) *HasParentQuery
- func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery
- func (q *HasParentQuery) QueryName(queryName string) *HasParentQuery
- func (q *HasParentQuery) Score(score bool) *HasParentQuery
- func (q *HasParentQuery) Source() (interface{}, error)
- type Highlight
- func (hl *Highlight) BoundaryChars(boundaryChars string) *Highlight
- func (hl *Highlight) BoundaryMaxScan(boundaryMaxScan int) *Highlight
- func (hl *Highlight) BoundaryScannerLocale(boundaryScannerLocale string) *Highlight
- func (hl *Highlight) BoundaryScannerType(boundaryScannerType string) *Highlight
- func (hl *Highlight) Encoder(encoder string) *Highlight
- func (hl *Highlight) Field(name string) *Highlight
- func (hl *Highlight) Fields(fields ...*HighlighterField) *Highlight
- func (hl *Highlight) ForceSource(forceSource bool) *Highlight
- func (hl *Highlight) FragmentSize(fragmentSize int) *Highlight
- func (hl *Highlight) Fragmenter(fragmenter string) *Highlight
- func (hl *Highlight) HighlightFilter(highlightFilter bool) *Highlight
- func (hl *Highlight) HighlightQuery(highlightQuery Query) *Highlight
- func (hl *Highlight) HighlighterType(highlighterType string) *Highlight
- func (hl *Highlight) MaxAnalyzedOffset(maxAnalyzedOffset int) *Highlight
- func (hl *Highlight) NoMatchSize(noMatchSize int) *Highlight
- func (hl *Highlight) NumOfFragments(numOfFragments int) *Highlight
- func (hl *Highlight) Options(options map[string]interface{}) *Highlight
- func (hl *Highlight) Order(order string) *Highlight
- func (hl *Highlight) PostTags(postTags ...string) *Highlight
- func (hl *Highlight) PreTags(preTags ...string) *Highlight
- func (hl *Highlight) RequireFieldMatch(requireFieldMatch bool) *Highlight
- func (hl *Highlight) Source() (interface{}, error)
- func (hl *Highlight) TagsSchema(schemaName string) *Highlight
- func (hl *Highlight) UseExplicitFieldOrder(useExplicitFieldOrder bool) *Highlight
- type HighlighterField
- func (f *HighlighterField) BoundaryChars(boundaryChars ...rune) *HighlighterField
- func (f *HighlighterField) BoundaryMaxScan(boundaryMaxScan int) *HighlighterField
- func (f *HighlighterField) ForceSource(forceSource bool) *HighlighterField
- func (f *HighlighterField) FragmentOffset(fragmentOffset int) *HighlighterField
- func (f *HighlighterField) FragmentSize(fragmentSize int) *HighlighterField
- func (f *HighlighterField) Fragmenter(fragmenter string) *HighlighterField
- func (f *HighlighterField) HighlightFilter(highlightFilter bool) *HighlighterField
- func (f *HighlighterField) HighlightQuery(highlightQuery Query) *HighlighterField
- func (f *HighlighterField) HighlighterType(highlighterType string) *HighlighterField
- func (f *HighlighterField) MatchedFields(matchedFields ...string) *HighlighterField
- func (f *HighlighterField) NoMatchSize(noMatchSize int) *HighlighterField
- func (f *HighlighterField) NumOfFragments(numOfFragments int) *HighlighterField
- func (f *HighlighterField) Options(options map[string]interface{}) *HighlighterField
- func (f *HighlighterField) Order(order string) *HighlighterField
- func (f *HighlighterField) PhraseLimit(phraseLimit int) *HighlighterField
- func (f *HighlighterField) PostTags(postTags ...string) *HighlighterField
- func (f *HighlighterField) PreTags(preTags ...string) *HighlighterField
- func (f *HighlighterField) RequireFieldMatch(requireFieldMatch bool) *HighlighterField
- func (f *HighlighterField) Source() (interface{}, error)
- type HistogramAggregation
- func (a *HistogramAggregation) ExtendedBounds(min, max float64) *HistogramAggregation
- func (a *HistogramAggregation) ExtendedBoundsMax(max float64) *HistogramAggregation
- func (a *HistogramAggregation) ExtendedBoundsMin(min float64) *HistogramAggregation
- func (a *HistogramAggregation) Field(field string) *HistogramAggregation
- func (a *HistogramAggregation) Interval(interval float64) *HistogramAggregation
- func (a *HistogramAggregation) MaxBounds(max float64) *HistogramAggregation
- func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation
- func (a *HistogramAggregation) MinBounds(min float64) *HistogramAggregation
- func (a *HistogramAggregation) MinDocCount(minDocCount int64) *HistogramAggregation
- func (a *HistogramAggregation) Missing(missing interface{}) *HistogramAggregation
- func (a *HistogramAggregation) Offset(offset float64) *HistogramAggregation
- func (a *HistogramAggregation) Order(order string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByAggregation(aggName string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByCount(asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByCountAsc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByCountDesc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByKey(asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByKeyAsc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByKeyDesc() *HistogramAggregation
- func (a *HistogramAggregation) Script(script *Script) *HistogramAggregation
- func (a *HistogramAggregation) Source() (interface{}, error)
- func (a *HistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *HistogramAggregation
- type HoltLinearMovAvgModel
- type HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Alpha(alpha float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Beta(beta float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Gamma(gamma float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Name() string
- func (m *HoltWintersMovAvgModel) Pad(pad bool) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Period(period int) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) SeasonalityType(typ string) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Settings() map[string]interface{}
- type IPRangeAggregation
- func (a *IPRangeAggregation) AddMaskRange(mask string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddMaskRangeWithKey(key, mask string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddRange(from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddRangeWithKey(key, from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedFrom(to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedFromWithKey(key, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedTo(from string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedToWithKey(key, from string) *IPRangeAggregation
- func (a *IPRangeAggregation) Between(from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) BetweenWithKey(key, from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) Field(field string) *IPRangeAggregation
- func (a *IPRangeAggregation) Gt(from string) *IPRangeAggregation
- func (a *IPRangeAggregation) GtWithKey(key, from string) *IPRangeAggregation
- func (a *IPRangeAggregation) Keyed(keyed bool) *IPRangeAggregation
- func (a *IPRangeAggregation) Lt(to string) *IPRangeAggregation
- func (a *IPRangeAggregation) LtWithKey(key, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) Meta(metaData map[string]interface{}) *IPRangeAggregation
- func (a *IPRangeAggregation) Source() (interface{}, error)
- func (a *IPRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *IPRangeAggregation
- type IPRangeAggregationEntry
- type IdsQuery
- type IndexBoost
- type IndexBoosts
- type InnerHit
- func (hit *InnerHit) Collapse(collapse *CollapseBuilder) *InnerHit
- func (hit *InnerHit) DocvalueField(docvalueField string) *InnerHit
- func (hit *InnerHit) DocvalueFieldWithFormat(docvalueField DocvalueField) *InnerHit
- func (hit *InnerHit) DocvalueFields(docvalueFields ...string) *InnerHit
- func (hit *InnerHit) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *InnerHit
- func (hit *InnerHit) Explain(explain bool) *InnerHit
- func (hit *InnerHit) FetchSource(fetchSource bool) *InnerHit
- func (hit *InnerHit) FetchSourceContext(fetchSourceContext *FetchSourceContext) *InnerHit
- func (hit *InnerHit) From(from int) *InnerHit
- func (hit *InnerHit) Highlight(highlight *Highlight) *InnerHit
- func (hit *InnerHit) Highlighter() *Highlight
- func (hit *InnerHit) Name(name string) *InnerHit
- func (hit *InnerHit) NoStoredFields() *InnerHit
- func (hit *InnerHit) Path(path string) *InnerHit
- func (hit *InnerHit) Query(query Query) *InnerHit
- func (hit *InnerHit) ScriptField(scriptField *ScriptField) *InnerHit
- func (hit *InnerHit) ScriptFields(scriptFields ...*ScriptField) *InnerHit
- func (hit *InnerHit) Size(size int) *InnerHit
- func (hit *InnerHit) Sort(field string, ascending bool) *InnerHit
- func (hit *InnerHit) SortBy(sorter ...Sorter) *InnerHit
- func (hit *InnerHit) SortWithInfo(info SortInfo) *InnerHit
- func (hit *InnerHit) Source() (interface{}, error)
- func (hit *InnerHit) StoredField(storedFieldName string) *InnerHit
- func (hit *InnerHit) StoredFields(storedFieldNames ...string) *InnerHit
- func (hit *InnerHit) TrackScores(trackScores bool) *InnerHit
- func (hit *InnerHit) Type(typ string) *InnerHit
- func (hit *InnerHit) Version(version bool) *InnerHit
- type IntervalQuery
- type IntervalQueryFilter
- func (r *IntervalQueryFilter) After(after IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) Before(before IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) ContainedBy(containedBy IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) Containing(containing IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) NotContainedBy(notContainedBy IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) NotContaining(notContaining IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) NotOverlapping(notOverlapping IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) Overlapping(overlapping IntervalQueryRule) *IntervalQueryFilter
- func (r *IntervalQueryFilter) Script(script *Script) *IntervalQueryFilter
- func (r *IntervalQueryFilter) Source() (interface{}, error)
- type IntervalQueryRule
- type IntervalQueryRuleAllOf
- func (r *IntervalQueryRuleAllOf) Filter(filter *IntervalQueryFilter) *IntervalQueryRuleAllOf
- func (r *IntervalQueryRuleAllOf) MaxGaps(maxGaps int) *IntervalQueryRuleAllOf
- func (r *IntervalQueryRuleAllOf) Ordered(ordered bool) *IntervalQueryRuleAllOf
- func (r *IntervalQueryRuleAllOf) Source() (interface{}, error)
- type IntervalQueryRuleAnyOf
- type IntervalQueryRuleFuzzy
- func (r *IntervalQueryRuleFuzzy) Analyzer(analyzer string) *IntervalQueryRuleFuzzy
- func (q *IntervalQueryRuleFuzzy) Fuzziness(fuzziness interface{}) *IntervalQueryRuleFuzzy
- func (q *IntervalQueryRuleFuzzy) PrefixLength(prefixLength int) *IntervalQueryRuleFuzzy
- func (r *IntervalQueryRuleFuzzy) Source() (interface{}, error)
- func (q *IntervalQueryRuleFuzzy) Transpositions(transpositions bool) *IntervalQueryRuleFuzzy
- func (r *IntervalQueryRuleFuzzy) UseField(useField string) *IntervalQueryRuleFuzzy
- type IntervalQueryRuleMatch
- func (r *IntervalQueryRuleMatch) Analyzer(analyzer string) *IntervalQueryRuleMatch
- func (r *IntervalQueryRuleMatch) Filter(filter *IntervalQueryFilter) *IntervalQueryRuleMatch
- func (r *IntervalQueryRuleMatch) MaxGaps(maxGaps int) *IntervalQueryRuleMatch
- func (r *IntervalQueryRuleMatch) Ordered(ordered bool) *IntervalQueryRuleMatch
- func (r *IntervalQueryRuleMatch) Source() (interface{}, error)
- func (r *IntervalQueryRuleMatch) UseField(useField string) *IntervalQueryRuleMatch
- type IntervalQueryRulePrefix
- type IntervalQueryRuleWildcard
- type JLHScoreSignificanceHeuristic
- type LaplaceSmoothingModel
- type LinearDecayFunction
- func (fn *LinearDecayFunction) Decay(decay float64) *LinearDecayFunction
- func (fn *LinearDecayFunction) FieldName(fieldName string) *LinearDecayFunction
- func (fn *LinearDecayFunction) GetMultiValueMode() string
- func (fn *LinearDecayFunction) GetWeight() *float64
- func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction
- func (fn *LinearDecayFunction) Name() string
- func (fn *LinearDecayFunction) Offset(offset interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Origin(origin interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Scale(scale interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Source() (interface{}, error)
- func (fn *LinearDecayFunction) Weight(weight float64) *LinearDecayFunction
- type LinearInterpolationSmoothingModel
- type LinearMovAvgModel
- type Logger
- type MatchAllQuery
- type MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) Analyzer(analyzer string) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) Boost(boost float64) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) Fuzziness(fuzziness string) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) FuzzyRewrite(fuzzyRewrite string) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) MaxExpansions(n int) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) Operator(operator string) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) PrefixLength(prefixLength int) *MatchBoolPrefixQuery
- func (q *MatchBoolPrefixQuery) Source() (interface{}, error)
- type MatchNoneQuery
- type MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Analyzer(analyzer string) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Boost(boost float64) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) MaxExpansions(n int) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) QueryName(queryName string) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Slop(slop int) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Source() (interface{}, error)
- type MatchPhraseQuery
- func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Boost(boost float64) *MatchPhraseQuery
- func (q *MatchPhraseQuery) QueryName(queryName string) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Slop(slop int) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Source() (interface{}, error)
- func (q *MatchPhraseQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchPhraseQuery
- type MatchQuery
- func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery
- func (q *MatchQuery) Boost(boost float64) *MatchQuery
- func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery
- func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery
- func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery
- func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery
- func (q *MatchQuery) Lenient(lenient bool) *MatchQuery
- func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery
- func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery
- func (q *MatchQuery) Operator(operator string) *MatchQuery
- func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery
- func (q *MatchQuery) QueryName(queryName string) *MatchQuery
- func (q *MatchQuery) Source() (interface{}, error)
- func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery
- type MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Fields(fields ...string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Format(format string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Missing(missing interface{}) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Source() (interface{}, error)
- func (a *MatrixStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) ValueType(valueType interface{}) *MatrixStatsAggregation
- type MaxAggregation
- func (a *MaxAggregation) Field(field string) *MaxAggregation
- func (a *MaxAggregation) Format(format string) *MaxAggregation
- func (a *MaxAggregation) Meta(metaData map[string]interface{}) *MaxAggregation
- func (a *MaxAggregation) Missing(missing interface{}) *MaxAggregation
- func (a *MaxAggregation) Script(script *Script) *MaxAggregation
- func (a *MaxAggregation) Source() (interface{}, error)
- func (a *MaxAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxAggregation
- type MaxBucketAggregation
- func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapInsertZeros() *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapPolicy(gapPolicy string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapSkip() *MaxBucketAggregation
- func (a *MaxBucketAggregation) Meta(metaData map[string]interface{}) *MaxBucketAggregation
- func (a *MaxBucketAggregation) Source() (interface{}, error)
- type MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Compression(compression float64) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Field(field string) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Format(format string) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Meta(metaData map[string]interface{}) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Missing(missing interface{}) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Script(script *Script) *MedianAbsoluteDeviationAggregation
- func (a *MedianAbsoluteDeviationAggregation) Source() (interface{}, error)
- func (a *MedianAbsoluteDeviationAggregation) SubAggregation(name string, subAggregation Aggregation) *MedianAbsoluteDeviationAggregation
- type MinAggregation
- func (a *MinAggregation) Field(field string) *MinAggregation
- func (a *MinAggregation) Format(format string) *MinAggregation
- func (a *MinAggregation) Meta(metaData map[string]interface{}) *MinAggregation
- func (a *MinAggregation) Missing(missing interface{}) *MinAggregation
- func (a *MinAggregation) Script(script *Script) *MinAggregation
- func (a *MinAggregation) Source() (interface{}, error)
- func (a *MinAggregation) SubAggregation(name string, subAggregation Aggregation) *MinAggregation
- type MinBucketAggregation
- func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAggregation
- func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation
- func (a *MinBucketAggregation) GapInsertZeros() *MinBucketAggregation
- func (a *MinBucketAggregation) GapPolicy(gapPolicy string) *MinBucketAggregation
- func (a *MinBucketAggregation) GapSkip() *MinBucketAggregation
- func (a *MinBucketAggregation) Meta(metaData map[string]interface{}) *MinBucketAggregation
- func (a *MinBucketAggregation) Source() (interface{}, error)
- type MissingAggregation
- func (a *MissingAggregation) Field(field string) *MissingAggregation
- func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation
- func (a *MissingAggregation) Source() (interface{}, error)
- func (a *MissingAggregation) SubAggregation(name string, subAggregation Aggregation) *MissingAggregation
- type MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Analyzer(analyzer string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Boost(boost float64) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) BoostTerms(boostTerms float64) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Field(fields ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Ids(ids ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) IgnoreLikeItems(ignoreDocs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) IgnoreLikeText(ignoreLikeText ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Include(include bool) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) LikeItems(docs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) LikeText(likeTexts ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxQueryTerms(maxQueryTerms int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinDocFreq(minDocFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinTermFreq(minTermFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) QueryName(queryName string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Source() (interface{}, error)
- func (q *MoreLikeThisQuery) StopWord(stopWords ...string) *MoreLikeThisQuery
- type MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Doc(doc interface{}) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Fields(fields ...string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Index(index string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) LikeText(likeText string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Routing(routing string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Source() (interface{}, error)
- func (item *MoreLikeThisQueryItem) Type(typ string) *MoreLikeThisQueryItemdeprecated
- func (item *MoreLikeThisQueryItem) Version(version int64) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) VersionType(versionType string) *MoreLikeThisQueryItem
- type MovAvgAggregationdeprecated
- func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregation
- func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation
- func (a *MovAvgAggregation) GapInsertZeros() *MovAvgAggregation
- func (a *MovAvgAggregation) GapPolicy(gapPolicy string) *MovAvgAggregation
- func (a *MovAvgAggregation) GapSkip() *MovAvgAggregation
- func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation
- func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation
- func (a *MovAvgAggregation) Model(model MovAvgModel) *MovAvgAggregation
- func (a *MovAvgAggregation) Predict(numPredictions int) *MovAvgAggregation
- func (a *MovAvgAggregation) Source() (interface{}, error)
- func (a *MovAvgAggregation) Window(window int) *MovAvgAggregation
- type MovAvgModel
- type MovFnAggregation
- func (a *MovFnAggregation) BucketsPath(bucketsPaths ...string) *MovFnAggregation
- func (a *MovFnAggregation) Format(format string) *MovFnAggregation
- func (a *MovFnAggregation) GapInsertZeros() *MovFnAggregation
- func (a *MovFnAggregation) GapPolicy(gapPolicy string) *MovFnAggregation
- func (a *MovFnAggregation) GapSkip() *MovFnAggregation
- func (a *MovFnAggregation) Meta(metaData map[string]interface{}) *MovFnAggregation
- func (a *MovFnAggregation) Script(script *Script) *MovFnAggregation
- func (a *MovFnAggregation) Source() (interface{}, error)
- func (a *MovFnAggregation) Window(window int) *MovFnAggregation
- type MultiMatchQuery
- func (q *MultiMatchQuery) Analyzer(analyzer string) *MultiMatchQuery
- func (q *MultiMatchQuery) Boost(boost float64) *MultiMatchQuery
- func (q *MultiMatchQuery) CutoffFrequency(cutoff float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Field(field string) *MultiMatchQuery
- func (q *MultiMatchQuery) FieldWithBoost(field string, boost float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Fuzziness(fuzziness string) *MultiMatchQuery
- func (q *MultiMatchQuery) FuzzyRewrite(fuzzyRewrite string) *MultiMatchQuery
- func (q *MultiMatchQuery) Lenient(lenient bool) *MultiMatchQuery
- func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery
- func (q *MultiMatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MultiMatchQuery
- func (q *MultiMatchQuery) Operator(operator string) *MultiMatchQuery
- func (q *MultiMatchQuery) PrefixLength(prefixLength int) *MultiMatchQuery
- func (q *MultiMatchQuery) QueryName(queryName string) *MultiMatchQuery
- func (q *MultiMatchQuery) Rewrite(rewrite string) *MultiMatchQuery
- func (q *MultiMatchQuery) Slop(slop int) *MultiMatchQuery
- func (q *MultiMatchQuery) Source() (interface{}, error)
- func (q *MultiMatchQuery) TieBreaker(tieBreaker float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery
- func (q *MultiMatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MultiMatchQuery
- type MultiSearchService
- func (s *MultiSearchService) Add(requests ...*SearchRequest) *MultiSearchService
- func (s *MultiSearchService) ErrorTrace(errorTrace bool) *MultiSearchService
- func (s *MultiSearchService) FilterPath(filterPath ...string) *MultiSearchService
- func (s *MultiSearchService) Header(name string, value string) *MultiSearchService
- func (s *MultiSearchService) Headers(headers http.Header) *MultiSearchService
- func (s *MultiSearchService) Human(human bool) *MultiSearchService
- func (s *MultiSearchService) Index(indices ...string) *MultiSearchService
- func (s *MultiSearchService) MaxConcurrentSearches(max int) *MultiSearchService
- func (s *MultiSearchService) PreFilterShardSize(size int) *MultiSearchService
- func (s *MultiSearchService) Pretty(pretty bool) *MultiSearchService
- type MultiTerm
- type MultiTermsAggregation
- func (a *MultiTermsAggregation) CollectionMode(collectionMode string) *MultiTermsAggregation
- func (a *MultiTermsAggregation) Meta(metaData map[string]interface{}) *MultiTermsAggregation
- func (a *MultiTermsAggregation) MinDocCount(minDocCount int) *MultiTermsAggregation
- func (a *MultiTermsAggregation) MultiTerms(multiTerms ...MultiTerm) *MultiTermsAggregation
- func (a *MultiTermsAggregation) Order(order string, asc bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByAggregation(aggName string, asc bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByCount(asc bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByCountAsc() *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByCountDesc() *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByKey(asc bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByKeyAsc() *MultiTermsAggregation
- func (a *MultiTermsAggregation) OrderByKeyDesc() *MultiTermsAggregation
- func (a *MultiTermsAggregation) ShardMinDocCount(shardMinDocCount int) *MultiTermsAggregation
- func (a *MultiTermsAggregation) ShardSize(shardSize int) *MultiTermsAggregation
- func (a *MultiTermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *MultiTermsAggregation
- func (a *MultiTermsAggregation) Size(size int) *MultiTermsAggregation
- func (a *MultiTermsAggregation) Source() (interface{}, error)
- func (a *MultiTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *MultiTermsAggregation
- func (a *MultiTermsAggregation) Terms(fields ...string) *MultiTermsAggregation
- type MultiTermsOrder
- type MultiTermvectorItem
- func (s *MultiTermvectorItem) Doc(doc interface{}) *MultiTermvectorItem
- func (s *MultiTermvectorItem) FieldStatistics(fieldStatistics bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Fields(fields ...string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Id(id string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Index(index string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Offsets(offsets bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Parent(parent string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Payloads(payloads bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Preference(preference string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Realtime(realtime bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Routing(routing string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Source() interface{}
- func (s *MultiTermvectorItem) TermStatistics(termStatistics bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Type(typ string) *MultiTermvectorItem
- type MultiTermvectorResponse
- type MultiTermvectorService
- func (s *MultiTermvectorService) Add(docs ...*MultiTermvectorItem) *MultiTermvectorService
- func (s *MultiTermvectorService) BodyJson(body interface{}) *MultiTermvectorService
- func (s *MultiTermvectorService) BodyString(body string) *MultiTermvectorService
- func (s *MultiTermvectorService) ErrorTrace(errorTrace bool) *MultiTermvectorService
- func (s *MultiTermvectorService) FieldStatistics(fieldStatistics bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Fields(fields []string) *MultiTermvectorService
- func (s *MultiTermvectorService) FilterPath(filterPath ...string) *MultiTermvectorService
- func (s *MultiTermvectorService) Header(name string, value string) *MultiTermvectorService
- func (s *MultiTermvectorService) Headers(headers http.Header) *MultiTermvectorService
- func (s *MultiTermvectorService) Human(human bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Ids(ids []string) *MultiTermvectorService
- func (s *MultiTermvectorService) Index(index string) *MultiTermvectorService
- func (s *MultiTermvectorService) Offsets(offsets bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Parent(parent string) *MultiTermvectorService
- func (s *MultiTermvectorService) Payloads(payloads bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Positions(positions bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Preference(preference string) *MultiTermvectorService
- func (s *MultiTermvectorService) Pretty(pretty bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Realtime(realtime bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Routing(routing string) *MultiTermvectorService
- func (s *MultiTermvectorService) Source() interface{}
- func (s *MultiTermvectorService) TermStatistics(termStatistics bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService
- func (s *MultiTermvectorService) Validate() error
- func (s *MultiTermvectorService) Version(version interface{}) *MultiTermvectorService
- func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService
- type MultiValuesSourceFieldConfig
- type MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) Name() string
- func (sh *MutualInformationSignificanceHeuristic) Source() (interface{}, error)
- type NestedAggregation
- func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation
- func (a *NestedAggregation) Path(path string) *NestedAggregation
- func (a *NestedAggregation) Source() (interface{}, error)
- func (a *NestedAggregation) SubAggregation(name string, subAggregation Aggregation) *NestedAggregation
- type NestedHit
- type NestedQuery
- func (q *NestedQuery) Boost(boost float64) *NestedQuery
- func (q *NestedQuery) IgnoreUnmapped(value bool) *NestedQuery
- func (q *NestedQuery) InnerHit(innerHit *InnerHit) *NestedQuery
- func (q *NestedQuery) QueryName(queryName string) *NestedQuery
- func (q *NestedQuery) ScoreMode(scoreMode string) *NestedQuery
- func (q *NestedQuery) Source() (interface{}, error)
- type NestedSort
- type NumberDecoder
- type OpenPointInTimeService
- func (s *OpenPointInTimeService) BodyJson(body interface{}) *OpenPointInTimeService
- func (s *OpenPointInTimeService) BodyString(body string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) ErrorTrace(errorTrace bool) *OpenPointInTimeService
- func (s *OpenPointInTimeService) ExpandWildcards(expandWildcards string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) FilterPath(filterPath ...string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Header(name string, value string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Headers(headers http.Header) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Human(human bool) *OpenPointInTimeService
- func (s *OpenPointInTimeService) IgnoreUnavailable(ignoreUnavailable bool) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Index(index ...string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) KeepAlive(keepAlive string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Preference(preference string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Pretty(pretty bool) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Routing(routing string) *OpenPointInTimeService
- func (s *OpenPointInTimeService) Validate() error
- type ParentIdQuery
- func (q *ParentIdQuery) Boost(boost float64) *ParentIdQuery
- func (q *ParentIdQuery) Id(id string) *ParentIdQuery
- func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery
- func (q *ParentIdQuery) InnerHit(innerHit *InnerHit) *ParentIdQuery
- func (q *ParentIdQuery) QueryName(queryName string) *ParentIdQuery
- func (q *ParentIdQuery) Source() (interface{}, error)
- func (q *ParentIdQuery) Type(typ string) *ParentIdQuery
- type PercentageScoreSignificanceHeuristic
- type PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Compression(compression float64) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Estimator(estimator string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Field(field string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Format(format string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Meta(metaData map[string]interface{}) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Missing(missing interface{}) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Script(script *Script) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Source() (interface{}, error)
- func (a *PercentileRanksAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Values(values ...float64) *PercentileRanksAggregation
- type PercentilesAggregation
- func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation
- func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation
- func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation
- func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation
- func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation
- func (a *PercentilesAggregation) Method(method string) *PercentilesAggregation
- func (a *PercentilesAggregation) Missing(missing interface{}) *PercentilesAggregation
- func (a *PercentilesAggregation) NumberOfSignificantValueDigits(digits int) *PercentilesAggregation
- func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation
- func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation
- func (a *PercentilesAggregation) Source() (interface{}, error)
- func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation
- type PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Format(format string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapInsertZeros() *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapPolicy(gapPolicy string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapSkip() *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Percents(percents ...float64) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Source() (interface{}, error)
- type PercolatorQuery
- func (q *PercolatorQuery) Document(docs ...interface{}) *PercolatorQuery
- func (q *PercolatorQuery) DocumentType(typ string) *PercolatorQuerydeprecated
- func (q *PercolatorQuery) Field(field string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentId(id string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentIndex(index string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentPreference(preference string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentRouting(routing string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentType(typ string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentVersion(version int64) *PercolatorQuery
- func (q *PercolatorQuery) Name(name string) *PercolatorQuery
- func (q *PercolatorQuery) Source() (interface{}, error)
- type PhraseSuggester
- func (q *PhraseSuggester) Analyzer(analyzer string) *PhraseSuggester
- func (q *PhraseSuggester) CandidateGenerator(generator CandidateGenerator) *PhraseSuggester
- func (q *PhraseSuggester) CandidateGenerators(generators ...CandidateGenerator) *PhraseSuggester
- func (q *PhraseSuggester) ClearCandidateGenerator() *PhraseSuggester
- func (q *PhraseSuggester) CollateParams(collateParams map[string]interface{}) *PhraseSuggester
- func (q *PhraseSuggester) CollatePreference(collatePreference string) *PhraseSuggester
- func (q *PhraseSuggester) CollatePrune(collatePrune bool) *PhraseSuggester
- func (q *PhraseSuggester) CollateQuery(collateQuery *Script) *PhraseSuggester
- func (q *PhraseSuggester) Confidence(confidence float64) *PhraseSuggester
- func (q *PhraseSuggester) ContextQueries(queries ...SuggesterContextQuery) *PhraseSuggester
- func (q *PhraseSuggester) ContextQuery(query SuggesterContextQuery) *PhraseSuggester
- func (q *PhraseSuggester) Field(field string) *PhraseSuggester
- func (q *PhraseSuggester) ForceUnigrams(forceUnigrams bool) *PhraseSuggester
- func (q *PhraseSuggester) GramSize(gramSize int) *PhraseSuggester
- func (q *PhraseSuggester) Highlight(preTag, postTag string) *PhraseSuggester
- func (q *PhraseSuggester) MaxErrors(maxErrors float64) *PhraseSuggester
- func (q *PhraseSuggester) Name() string
- func (q *PhraseSuggester) RealWordErrorLikelihood(realWordErrorLikelihood float64) *PhraseSuggester
- func (q *PhraseSuggester) Separator(separator string) *PhraseSuggester
- func (q *PhraseSuggester) ShardSize(shardSize int) *PhraseSuggester
- func (q *PhraseSuggester) Size(size int) *PhraseSuggester
- func (q *PhraseSuggester) SmoothingModel(smoothingModel SmoothingModel) *PhraseSuggester
- func (q *PhraseSuggester) Source(includeName bool) (interface{}, error)
- func (q *PhraseSuggester) Text(text string) *PhraseSuggester
- func (q *PhraseSuggester) TokenLimit(tokenLimit int) *PhraseSuggester
- type PinnedQuery
- type PointInTime
- type PrefixQuery
- func (q *PrefixQuery) Boost(boost float64) *PrefixQuery
- func (q *PrefixQuery) CaseInsensitive(caseInsensitive bool) *PrefixQuery
- func (q *PrefixQuery) QueryName(queryName string) *PrefixQuery
- func (q *PrefixQuery) Rewrite(rewrite string) *PrefixQuery
- func (q *PrefixQuery) Source() (interface{}, error)
- type ProfileResult
- type PutScriptService
- func (s *PutScriptService) BodyJson(body interface{}) *PutScriptService
- func (s *PutScriptService) BodyString(body string) *PutScriptService
- func (s *PutScriptService) Context(context string) *PutScriptService
- func (s *PutScriptService) ErrorTrace(errorTrace bool) *PutScriptService
- func (s *PutScriptService) FilterPath(filterPath ...string) *PutScriptService
- func (s *PutScriptService) Header(name string, value string) *PutScriptService
- func (s *PutScriptService) Headers(headers http.Header) *PutScriptService
- func (s *PutScriptService) Human(human bool) *PutScriptService
- func (s *PutScriptService) Id(id string) *PutScriptService
- func (s *PutScriptService) MasterTimeout(masterTimeout string) *PutScriptService
- func (s *PutScriptService) Pretty(pretty bool) *PutScriptService
- func (s *PutScriptService) Timeout(timeout string) *PutScriptService
- type Query
- type QueryProfileShardResult
- type QueryRescorer
- func (r *QueryRescorer) Name() string
- func (r *QueryRescorer) QueryWeight(queryWeight float64) *QueryRescorer
- func (r *QueryRescorer) RescoreQueryWeight(rescoreQueryWeight float64) *QueryRescorer
- func (r *QueryRescorer) ScoreMode(scoreMode string) *QueryRescorer
- func (r *QueryRescorer) Source() (interface{}, error)
- type QueryStringQuery
- func (q *QueryStringQuery) AllowLeadingWildcard(allowLeadingWildcard bool) *QueryStringQuery
- func (q *QueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *QueryStringQuery
- func (q *QueryStringQuery) Analyzer(analyzer string) *QueryStringQuery
- func (q *QueryStringQuery) Boost(boost float64) *QueryStringQuery
- func (q *QueryStringQuery) DefaultField(defaultField string) *QueryStringQuery
- func (q *QueryStringQuery) DefaultOperator(operator string) *QueryStringQuery
- func (q *QueryStringQuery) EnablePositionIncrements(enablePositionIncrements bool) *QueryStringQuery
- func (q *QueryStringQuery) Escape(escape bool) *QueryStringQuery
- func (q *QueryStringQuery) Field(field string) *QueryStringQuery
- func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery
- func (q *QueryStringQuery) Fuzziness(fuzziness string) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyRewrite(fuzzyRewrite string) *QueryStringQuery
- func (q *QueryStringQuery) Lenient(lenient bool) *QueryStringQuery
- func (q *QueryStringQuery) Locale(locale string) *QueryStringQuerydeprecated
- func (q *QueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *QueryStringQuerydeprecated
- func (q *QueryStringQuery) MaxDeterminizedState(maxDeterminizedStates int) *QueryStringQuery
- func (q *QueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *QueryStringQuery
- func (q *QueryStringQuery) PhraseSlop(phraseSlop int) *QueryStringQuery
- func (q *QueryStringQuery) QueryName(queryName string) *QueryStringQuery
- func (q *QueryStringQuery) QuoteAnalyzer(quoteAnalyzer string) *QueryStringQuery
- func (q *QueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *QueryStringQuery
- func (q *QueryStringQuery) Rewrite(rewrite string) *QueryStringQuery
- func (q *QueryStringQuery) Source() (interface{}, error)
- func (q *QueryStringQuery) TieBreaker(tieBreaker float64) *QueryStringQuery
- func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery
- func (q *QueryStringQuery) Type(typ string) *QueryStringQuery
- type RandomFunction
- func (fn *RandomFunction) Field(field string) *RandomFunction
- func (fn *RandomFunction) GetWeight() *float64
- func (fn *RandomFunction) Name() string
- func (fn *RandomFunction) Seed(seed interface{}) *RandomFunction
- func (fn *RandomFunction) Source() (interface{}, error)
- func (fn *RandomFunction) Weight(weight float64) *RandomFunction
- type RangeAggregation
- func (a *RangeAggregation) AddRange(from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddRangeWithKey(key string, from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedFrom(to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedTo(from interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *RangeAggregation
- func (a *RangeAggregation) Between(from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) BetweenWithKey(key string, from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) Field(field string) *RangeAggregation
- func (a *RangeAggregation) Gt(from interface{}) *RangeAggregation
- func (a *RangeAggregation) GtWithKey(key string, from interface{}) *RangeAggregation
- func (a *RangeAggregation) Keyed(keyed bool) *RangeAggregation
- func (a *RangeAggregation) Lt(to interface{}) *RangeAggregation
- func (a *RangeAggregation) LtWithKey(key string, to interface{}) *RangeAggregation
- func (a *RangeAggregation) Meta(metaData map[string]interface{}) *RangeAggregation
- func (a *RangeAggregation) Missing(missing interface{}) *RangeAggregation
- func (a *RangeAggregation) Script(script *Script) *RangeAggregation
- func (a *RangeAggregation) Source() (interface{}, error)
- func (a *RangeAggregation) SubAggregation(name string, subAggregation Aggregation) *RangeAggregation
- func (a *RangeAggregation) Unmapped(unmapped bool) *RangeAggregation
- type RangeQuery
- func (q *RangeQuery) Boost(boost float64) *RangeQuery
- func (q *RangeQuery) Format(format string) *RangeQuery
- func (q *RangeQuery) From(from interface{}) *RangeQuery
- func (q *RangeQuery) Gt(from interface{}) *RangeQuery
- func (q *RangeQuery) Gte(from interface{}) *RangeQuery
- func (q *RangeQuery) IncludeLower(includeLower bool) *RangeQuery
- func (q *RangeQuery) IncludeUpper(includeUpper bool) *RangeQuery
- func (q *RangeQuery) Lt(to interface{}) *RangeQuery
- func (q *RangeQuery) Lte(to interface{}) *RangeQuery
- func (q *RangeQuery) QueryName(queryName string) *RangeQuery
- func (q *RangeQuery) Relation(relation string) *RangeQuery
- func (q *RangeQuery) Source() (interface{}, error)
- func (q *RangeQuery) TimeZone(timeZone string) *RangeQuery
- func (q *RangeQuery) To(to interface{}) *RangeQuery
- type RankFeatureLinearScoreFunction
- type RankFeatureLogScoreFunction
- type RankFeatureQuery
- func (q *RankFeatureQuery) Boost(boost float64) *RankFeatureQuery
- func (q *RankFeatureQuery) Field(field string) *RankFeatureQuery
- func (q *RankFeatureQuery) QueryName(queryName string) *RankFeatureQuery
- func (q *RankFeatureQuery) ScoreFunction(f RankFeatureScoreFunction) *RankFeatureQuery
- func (q *RankFeatureQuery) Source() (interface{}, error)
- type RankFeatureSaturationScoreFunction
- type RankFeatureScoreFunction
- type RankFeatureSigmoidScoreFunction
- type RareTermsAggregation
- func (a *RareTermsAggregation) Exclude(regexp string) *RareTermsAggregation
- func (a *RareTermsAggregation) ExcludeValues(values ...interface{}) *RareTermsAggregation
- func (a *RareTermsAggregation) Field(field string) *RareTermsAggregation
- func (a *RareTermsAggregation) Include(regexp string) *RareTermsAggregation
- func (a *RareTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *RareTermsAggregation
- func (a *RareTermsAggregation) IncludeValues(values ...interface{}) *RareTermsAggregation
- func (a *RareTermsAggregation) MaxDocCount(maxDocCount int) *RareTermsAggregation
- func (a *RareTermsAggregation) Meta(metaData map[string]interface{}) *RareTermsAggregation
- func (a *RareTermsAggregation) Missing(missing interface{}) *RareTermsAggregation
- func (a *RareTermsAggregation) Precision(precision float64) *RareTermsAggregation
- func (a *RareTermsAggregation) Source() (interface{}, error)
- func (a *RareTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *RareTermsAggregation
- type RawStringQuery
- type RecoverySource
- type RegexCompletionSuggesterOptions
- type RegexpQuery
- func (q *RegexpQuery) Boost(boost float64) *RegexpQuery
- func (q *RegexpQuery) CaseInsensitive(caseInsensitive bool) *RegexpQuery
- func (q *RegexpQuery) Flags(flags string) *RegexpQuery
- func (q *RegexpQuery) MaxDeterminizedStates(maxDeterminizedStates int) *RegexpQuery
- func (q *RegexpQuery) QueryName(queryName string) *RegexpQuery
- func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery
- func (q *RegexpQuery) Source() (interface{}, error)
- type Request
- type Rescore
- type Rescorer
- type ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Meta(metaData map[string]interface{}) *ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Path(path string) *ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Source() (interface{}, error)
- func (a *ReverseNestedAggregation) SubAggregation(name string, subAggregation Aggregation) *ReverseNestedAggregation
- type RuntimeMappings
- type SamplerAggregation
- func (a *SamplerAggregation) Meta(metaData map[string]interface{}) *SamplerAggregation
- func (a *SamplerAggregation) ShardSize(shardSize int) *SamplerAggregation
- func (a *SamplerAggregation) Source() (interface{}, error)
- func (a *SamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *SamplerAggregation
- type ScoreFunction
- type ScoreSort
- type Script
- func (s *Script) Lang(lang string) *Script
- func (s *Script) Param(name string, value interface{}) *Script
- func (s *Script) Params(params map[string]interface{}) *Script
- func (s *Script) Script(script string) *Script
- func (s *Script) Source() (interface{}, error)
- func (s *Script) Type(typ string) *Script
- type ScriptErrorPosition
- type ScriptField
- type ScriptFunction
- type ScriptQuery
- type ScriptScoreQuery
- func (q *ScriptScoreQuery) Boost(boost float64) *ScriptScoreQuery
- func (q *ScriptScoreQuery) MinScore(minScore float64) *ScriptScoreQuery
- func (q *ScriptScoreQuery) Query(query Query) *ScriptScoreQuery
- func (q *ScriptScoreQuery) QueryName(queryName string) *ScriptScoreQuery
- func (q *ScriptScoreQuery) Script(script *Script) *ScriptScoreQuery
- func (q *ScriptScoreQuery) Source() (interface{}, error)
- type ScriptSignificanceHeuristic
- type ScriptSort
- func (s *ScriptSort) Asc() *ScriptSort
- func (s *ScriptSort) Desc() *ScriptSort
- func (s *ScriptSort) NestedFilter(nestedFilter Query) *ScriptSort
- func (s *ScriptSort) NestedPath(nestedPath string) *ScriptSort
- func (s *ScriptSort) NestedSort(nestedSort *NestedSort) *ScriptSort
- func (s *ScriptSort) Order(ascending bool) *ScriptSort
- func (s *ScriptSort) SortMode(sortMode string) *ScriptSort
- func (s *ScriptSort) Source() (interface{}, error)
- func (s *ScriptSort) Type(typ string) *ScriptSort
- type ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) CombineScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) InitScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) MapScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Meta(metaData map[string]interface{}) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Params(params map[string]interface{}) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) ReduceScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Source() (interface{}, error)
- type SearchExplanation
- type SearchHit
- type SearchHitFields
- type SearchHitHighlight
- type SearchHitInnerHits
- type SearchHits
- type SearchProfile
- type SearchProfileShardResult
- type SearchRequest
- func (r *SearchRequest) Aggregation(name string, aggregation Aggregation) *SearchRequest
- func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest
- func (r *SearchRequest) AllowPartialSearchResults(allow bool) *SearchRequest
- func (r *SearchRequest) BatchedReduceSize(size int) *SearchRequest
- func (r *SearchRequest) Body() (string, error)
- func (r *SearchRequest) ClearRescorers() *SearchRequest
- func (r *SearchRequest) Collapse(collapse *CollapseBuilder) *SearchRequest
- func (r *SearchRequest) DocValueField(field string) *SearchRequest
- func (r *SearchRequest) DocValueFieldWithFormat(field DocvalueField) *SearchRequest
- func (r *SearchRequest) DocValueFields(fields ...string) *SearchRequest
- func (r *SearchRequest) DocValueFieldsWithFormat(fields ...DocvalueField) *SearchRequest
- func (s *SearchRequest) ExpandWildcards(expandWildcards string) *SearchRequest
- func (r *SearchRequest) Explain(explain bool) *SearchRequest
- func (r *SearchRequest) FetchSource(fetchSource bool) *SearchRequest
- func (r *SearchRequest) FetchSourceContext(fsc *FetchSourceContext) *SearchRequest
- func (r *SearchRequest) FetchSourceIncludeExclude(include, exclude []string) *SearchRequest
- func (r *SearchRequest) From(from int) *SearchRequest
- func (r *SearchRequest) HasIndices() bool
- func (r *SearchRequest) Highlight(highlight *Highlight) *SearchRequest
- func (s *SearchRequest) IgnoreUnavailable(ignoreUnavailable bool) *SearchRequest
- func (r *SearchRequest) Index(indices ...string) *SearchRequest
- func (r *SearchRequest) IndexBoost(index string, boost float64) *SearchRequest
- func (r *SearchRequest) MaxConcurrentShardRequests(size int) *SearchRequest
- func (r *SearchRequest) MinScore(minScore float64) *SearchRequest
- func (r *SearchRequest) NoStoredFields() *SearchRequest
- func (s *SearchRequest) PointInTime(pointInTime *PointInTime) *SearchRequest
- func (r *SearchRequest) PostFilter(filter Query) *SearchRequest
- func (r *SearchRequest) PreFilterShardSize(size int) *SearchRequest
- func (r *SearchRequest) Preference(preference string) *SearchRequest
- func (r *SearchRequest) Profile(profile bool) *SearchRequest
- func (r *SearchRequest) Query(query Query) *SearchRequest
- func (r *SearchRequest) RequestCache(requestCache bool) *SearchRequest
- func (r *SearchRequest) Rescorer(rescore *Rescore) *SearchRequest
- func (r *SearchRequest) Routing(routing string) *SearchRequest
- func (r *SearchRequest) Routings(routings ...string) *SearchRequest
- func (r *SearchRequest) ScriptField(field *ScriptField) *SearchRequest
- func (r *SearchRequest) ScriptFields(fields ...*ScriptField) *SearchRequest
- func (r *SearchRequest) Scroll(scroll string) *SearchRequest
- func (r *SearchRequest) SearchAfter(sortValues ...interface{}) *SearchRequest
- func (r *SearchRequest) SearchSource(searchSource *SearchSource) *SearchRequest
- func (r *SearchRequest) SearchType(searchType string) *SearchRequest
- func (r *SearchRequest) SearchTypeDfsQueryThenFetch() *SearchRequest
- func (r *SearchRequest) SearchTypeQueryThenFetch() *SearchRequest
- func (r *SearchRequest) Size(size int) *SearchRequest
- func (r *SearchRequest) Slice(sliceQuery Query) *SearchRequest
- func (r *SearchRequest) Sort(field string, ascending bool) *SearchRequest
- func (r *SearchRequest) SortBy(sorter ...Sorter) *SearchRequest
- func (r *SearchRequest) SortWithInfo(info SortInfo) *SearchRequest
- func (r *SearchRequest) Source(source interface{}) *SearchRequest
- func (r *SearchRequest) Stats(statsGroup ...string) *SearchRequest
- func (r *SearchRequest) StoredField(field string) *SearchRequest
- func (r *SearchRequest) StoredFields(fields ...string) *SearchRequest
- func (r *SearchRequest) Suggester(suggester Suggester) *SearchRequest
- func (r *SearchRequest) TerminateAfter(docs int) *SearchRequest
- func (r *SearchRequest) Timeout(timeout string) *SearchRequest
- func (r *SearchRequest) TrackScores(trackScores bool) *SearchRequest
- func (r *SearchRequest) TrackTotalHits(trackTotalHits interface{}) *SearchRequest
- func (r *SearchRequest) Type(types ...string) *SearchRequestdeprecated
- func (r *SearchRequest) Version(version bool) *SearchRequest
- type SearchResult
- type SearchResultCluster
- type SearchService
- func (s *SearchService) Aggregation(name string, aggregation Aggregation) *SearchService
- func (s *SearchService) Collapse(collapse *CollapseBuilder) *SearchService
- func (s *SearchService) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchService
- func (s *SearchService) DocvalueField(docvalueField string) *SearchService
- func (s *SearchService) DocvalueFieldWithFormat(docvalueField DocvalueField) *SearchService
- func (s *SearchService) DocvalueFields(docvalueFields ...string) *SearchService
- func (s *SearchService) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchService
- func (s *SearchService) Explain(explain bool) *SearchService
- func (s *SearchService) FetchSource(fetchSource bool) *SearchService
- func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService
- func (s *SearchService) From(from int) *SearchService
- func (s *SearchService) GlobalSuggestText(globalText string) *SearchService
- func (s *SearchService) Highlight(highlight *Highlight) *SearchService
- func (s *SearchService) MinScore(minScore float64) *SearchService
- func (s *SearchService) NoStoredFields() *SearchService
- func (s *SearchService) PointInTime(pointInTime *PointInTime) *SearchService
- func (s *SearchService) PostFilter(postFilter Query) *SearchService
- func (s *SearchService) Profile(profile bool) *SearchService
- func (s *SearchService) Query(query Query) *SearchService
- func (s *SearchService) Rescorer(rescore *Rescore) *SearchService
- func (s *SearchService) RuntimeMappings(runtimeMappings RuntimeMappings) *SearchService
- func (s *SearchService) SearchAfter(sortValues ...interface{}) *SearchService
- func (s *SearchService) SearchSource(searchSource *SearchSource) *SearchService
- func (s *SearchService) Size(size int) *SearchService
- func (s *SearchService) Sort(field string, ascending bool) *SearchService
- func (s *SearchService) SortBy(sorter ...Sorter) *SearchService
- func (s *SearchService) SortWithInfo(info SortInfo) *SearchService
- func (s *SearchService) Source(source interface{}) *SearchService
- func (s *SearchService) StoredField(fieldName string) *SearchService
- func (s *SearchService) StoredFields(fields ...string) *SearchService
- func (s *SearchService) Suggester(suggester Suggester) *SearchService
- func (s *SearchService) TerminateAfter(terminateAfter int) *SearchService
- func (s *SearchService) Timeout(timeout string) *SearchService
- func (s *SearchService) TimeoutInMillis(timeoutInMillis int) *SearchService
- func (s *SearchService) TrackScores(trackScores bool) *SearchService
- func (s *SearchService) TrackTotalHits(trackTotalHits interface{}) *SearchService
- func (s *SearchService) Version(version bool) *SearchService
- type SearchShardsService
- func (s *SearchShardsService) AllowNoIndices(allowNoIndices bool) *SearchShardsService
- func (s *SearchShardsService) ErrorTrace(errorTrace bool) *SearchShardsService
- func (s *SearchShardsService) ExpandWildcards(expandWildcards string) *SearchShardsService
- func (s *SearchShardsService) FilterPath(filterPath ...string) *SearchShardsService
- func (s *SearchShardsService) Header(name string, value string) *SearchShardsService
- func (s *SearchShardsService) Headers(headers http.Header) *SearchShardsService
- func (s *SearchShardsService) Human(human bool) *SearchShardsService
- func (s *SearchShardsService) IgnoreUnavailable(ignoreUnavailable bool) *SearchShardsService
- func (s *SearchShardsService) Index(index ...string) *SearchShardsService
- func (s *SearchShardsService) Local(local bool) *SearchShardsService
- func (s *SearchShardsService) Preference(preference string) *SearchShardsService
- func (s *SearchShardsService) Pretty(pretty bool) *SearchShardsService
- func (s *SearchShardsService) Routing(routing string) *SearchShardsService
- type SearchSource
- func (s *SearchSource) Aggregation(name string, aggregation Aggregation) *SearchSource
- func (s *SearchSource) ClearRescorers() *SearchSource
- func (s *SearchSource) Collapse(collapse *CollapseBuilder) *SearchSource
- func (s *SearchSource) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchSource
- func (s *SearchSource) DocvalueField(fieldDataField string) *SearchSource
- func (s *SearchSource) DocvalueFieldWithFormat(fieldDataFieldWithFormat DocvalueField) *SearchSource
- func (s *SearchSource) DocvalueFields(docvalueFields ...string) *SearchSource
- func (s *SearchSource) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchSource
- func (s *SearchSource) Explain(explain bool) *SearchSource
- func (s *SearchSource) FetchSource(fetchSource bool) *SearchSource
- func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource
- func (s *SearchSource) FetchSourceIncludeExclude(include, exclude []string) *SearchSource
- func (s *SearchSource) From(from int) *SearchSource
- func (s *SearchSource) GlobalSuggestText(text string) *SearchSource
- func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource
- func (s *SearchSource) Highlighter() *Highlight
- func (s *SearchSource) IndexBoost(index string, boost float64) *SearchSource
- func (s *SearchSource) IndexBoosts(boosts ...IndexBoost) *SearchSource
- func (s *SearchSource) InnerHit(name string, innerHit *InnerHit) *SearchSource
- func (q *SearchSource) MarshalJSON() ([]byte, error)
- func (s *SearchSource) MinScore(minScore float64) *SearchSource
- func (s *SearchSource) NoStoredFields() *SearchSource
- func (s *SearchSource) PointInTime(pointInTime *PointInTime) *SearchSource
- func (s *SearchSource) PostFilter(postFilter Query) *SearchSource
- func (s *SearchSource) Profile(profile bool) *SearchSource
- func (s *SearchSource) Query(query Query) *SearchSource
- func (s *SearchSource) Rescorer(rescore *Rescore) *SearchSource
- func (s *SearchSource) RuntimeMappings(runtimeMappings RuntimeMappings) *SearchSource
- func (s *SearchSource) ScriptField(scriptField *ScriptField) *SearchSource
- func (s *SearchSource) ScriptFields(scriptFields ...*ScriptField) *SearchSource
- func (s *SearchSource) SearchAfter(sortValues ...interface{}) *SearchSource
- func (s *SearchSource) SeqNoAndPrimaryTerm(enabled bool) *SearchSource
- func (s *SearchSource) Size(size int) *SearchSource
- func (s *SearchSource) Slice(sliceQuery Query) *SearchSource
- func (s *SearchSource) Sort(field string, ascending bool) *SearchSource
- func (s *SearchSource) SortBy(sorter ...Sorter) *SearchSource
- func (s *SearchSource) SortWithInfo(info SortInfo) *SearchSource
- func (s *SearchSource) Source() (interface{}, error)
- func (s *SearchSource) Stats(statsGroup ...string) *SearchSource
- func (s *SearchSource) StoredField(storedFieldName string) *SearchSource
- func (s *SearchSource) StoredFields(storedFieldNames ...string) *SearchSource
- func (s *SearchSource) Suggester(suggester Suggester) *SearchSource
- func (s *SearchSource) TerminateAfter(terminateAfter int) *SearchSource
- func (s *SearchSource) Timeout(timeout string) *SearchSource
- func (s *SearchSource) TimeoutInMillis(timeoutInMillis int) *SearchSource
- func (s *SearchSource) TrackScores(trackScores bool) *SearchSource
- func (s *SearchSource) TrackTotalHits(trackTotalHits interface{}) *SearchSource
- func (s *SearchSource) Version(version bool) *SearchSource
- type SearchSuggest
- type SearchSuggestion
- type SearchSuggestionOption
- type SerialDiffAggregation
- func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapInsertZeros() *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapPolicy(gapPolicy string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapSkip() *SerialDiffAggregation
- func (a *SerialDiffAggregation) Lag(lag int) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Meta(metaData map[string]interface{}) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Source() (interface{}, error)
- type ShardOperationFailedException
- type ShardsInfo
- type SignificanceHeuristic
- type SignificantTermsAggregation
- func (a *SignificantTermsAggregation) BackgroundFilter(filter Query) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Exclude(regexp string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ExcludeValues(values ...interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ExecutionHint(hint string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Field(field string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Include(regexp string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) IncludeValues(values ...interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Meta(metaData map[string]interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) MinDocCount(minDocCount int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) NumPartitions(n int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Partition(p int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) RequiredSize(requiredSize int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ShardMinDocCount(shardMinDocCount int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ShardSize(shardSize int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Source() (interface{}, error)
- func (a *SignificantTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTermsAggregation
- type SignificantTextAggregation
- func (a *SignificantTextAggregation) BackgroundFilter(filter Query) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Exclude(regexp string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ExcludeValues(values ...interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Field(field string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) FilterDuplicateText(filter bool) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Include(regexp string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTextAggregation
- func (a *SignificantTextAggregation) IncludeValues(values ...interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) MinDocCount(minDocCount int64) *SignificantTextAggregation
- func (a *SignificantTextAggregation) NumPartitions(n int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Partition(p int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ShardMinDocCount(shardMinDocCount int64) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ShardSize(shardSize int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Size(size int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Source() (interface{}, error)
- func (a *SignificantTextAggregation) SourceFieldNames(names ...string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTextAggregation
- type SimpleMovAvgModel
- type SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Analyzer(analyzer string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Boost(boost float64) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) DefaultOperator(defaultOperator string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Field(field string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FieldWithBoost(field string, boost float64) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyTranspositions(fuzzyTranspositions bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Lenient(lenient bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Locale(locale string) *SimpleQueryStringQuerydeprecated
- func (q *SimpleQueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *SimpleQueryStringQuerydeprecated
- func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Source() (interface{}, error)
- type SliceQuery
- type SmoothingModel
- type SortByDoc
- type SortInfo
- type Sorter
- type SpanFirstQuery
- type SpanNearQuery
- func (q *SpanNearQuery) Add(clauses ...Query) *SpanNearQuery
- func (q *SpanNearQuery) Boost(boost float64) *SpanNearQuery
- func (q *SpanNearQuery) Clauses(clauses ...Query) *SpanNearQuery
- func (q *SpanNearQuery) InOrder(inOrder bool) *SpanNearQuery
- func (q *SpanNearQuery) QueryName(queryName string) *SpanNearQuery
- func (q *SpanNearQuery) Slop(slop int) *SpanNearQuery
- func (q *SpanNearQuery) Source() (interface{}, error)
- type SpanTermQuery
- func (q *SpanTermQuery) Boost(boost float64) *SpanTermQuery
- func (q *SpanTermQuery) Field(field string) *SpanTermQuery
- func (q *SpanTermQuery) QueryName(queryName string) *SpanTermQuery
- func (q *SpanTermQuery) Source() (interface{}, error)
- func (q *SpanTermQuery) Value(value interface{}) *SpanTermQuery
- type StatsAggregation
- func (a *StatsAggregation) Field(field string) *StatsAggregation
- func (a *StatsAggregation) Format(format string) *StatsAggregation
- func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation
- func (a *StatsAggregation) Missing(missing interface{}) *StatsAggregation
- func (a *StatsAggregation) Script(script *Script) *StatsAggregation
- func (a *StatsAggregation) Source() (interface{}, error)
- func (a *StatsAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsAggregation
- type StatsBucketAggregation
- func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapInsertZeros() *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapPolicy(gapPolicy string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapSkip() *StatsBucketAggregation
- func (s *StatsBucketAggregation) Meta(metaData map[string]interface{}) *StatsBucketAggregation
- func (s *StatsBucketAggregation) Source() (interface{}, error)
- type StupidBackoffSmoothingModel
- type SuggestField
- type Suggester
- type SuggesterCategoryIndex
- type SuggesterCategoryMapping
- type SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) Source() (interface{}, error)
- func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery
- type SuggesterContextQuery
- type SuggesterGeoIndex
- type SuggesterGeoMapping
- func (q *SuggesterGeoMapping) DefaultLocations(locations ...*GeoPoint) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) FieldName(fieldName string) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Neighbors(neighbors bool) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Precision(precision ...string) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Source() (interface{}, error)
- type SuggesterGeoQuery
- type SumAggregation
- func (a *SumAggregation) Field(field string) *SumAggregation
- func (a *SumAggregation) Format(format string) *SumAggregation
- func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation
- func (a *SumAggregation) Missing(missing interface{}) *SumAggregation
- func (a *SumAggregation) Script(script *Script) *SumAggregation
- func (a *SumAggregation) Source() (interface{}, error)
- func (a *SumAggregation) SubAggregation(name string, subAggregation Aggregation) *SumAggregation
- type SumBucketAggregation
- func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAggregation
- func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation
- func (a *SumBucketAggregation) GapInsertZeros() *SumBucketAggregation
- func (a *SumBucketAggregation) GapPolicy(gapPolicy string) *SumBucketAggregation
- func (a *SumBucketAggregation) GapSkip() *SumBucketAggregation
- func (a *SumBucketAggregation) Meta(metaData map[string]interface{}) *SumBucketAggregation
- func (a *SumBucketAggregation) Source() (interface{}, error)
- type TermQuery
- type TermSuggester
- func (q *TermSuggester) Accuracy(accuracy float64) *TermSuggester
- func (q *TermSuggester) Analyzer(analyzer string) *TermSuggester
- func (q *TermSuggester) ContextQueries(queries ...SuggesterContextQuery) *TermSuggester
- func (q *TermSuggester) ContextQuery(query SuggesterContextQuery) *TermSuggester
- func (q *TermSuggester) Field(field string) *TermSuggester
- func (q *TermSuggester) MaxEdits(maxEdits int) *TermSuggester
- func (q *TermSuggester) MaxInspections(maxInspections int) *TermSuggester
- func (q *TermSuggester) MaxTermFreq(maxTermFreq float64) *TermSuggester
- func (q *TermSuggester) MinDocFreq(minDocFreq float64) *TermSuggester
- func (q *TermSuggester) MinWordLength(minWordLength int) *TermSuggester
- func (q *TermSuggester) Name() string
- func (q *TermSuggester) PrefixLength(prefixLength int) *TermSuggester
- func (q *TermSuggester) ShardSize(shardSize int) *TermSuggester
- func (q *TermSuggester) Size(size int) *TermSuggester
- func (q *TermSuggester) Sort(sort string) *TermSuggester
- func (q *TermSuggester) Source(includeName bool) (interface{}, error)
- func (q *TermSuggester) StringDistance(stringDistance string) *TermSuggester
- func (q *TermSuggester) SuggestMode(suggestMode string) *TermSuggester
- func (q *TermSuggester) Text(text string) *TermSuggester
- type TermVectorsFieldInfo
- type TermsAggregation
- func (a *TermsAggregation) CollectionMode(collectionMode string) *TermsAggregation
- func (a *TermsAggregation) Exclude(regexp string) *TermsAggregation
- func (a *TermsAggregation) ExcludeValues(values ...interface{}) *TermsAggregation
- func (a *TermsAggregation) ExecutionHint(hint string) *TermsAggregation
- func (a *TermsAggregation) Field(field string) *TermsAggregation
- func (a *TermsAggregation) Include(regexp string) *TermsAggregation
- func (a *TermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *TermsAggregation
- func (a *TermsAggregation) IncludeValues(values ...interface{}) *TermsAggregation
- func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation
- func (a *TermsAggregation) MinDocCount(minDocCount int) *TermsAggregation
- func (a *TermsAggregation) Missing(missing interface{}) *TermsAggregation
- func (a *TermsAggregation) NumPartitions(n int) *TermsAggregation
- func (a *TermsAggregation) Order(order string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByAggregation(aggName string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByCount(asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByCountAsc() *TermsAggregation
- func (a *TermsAggregation) OrderByCountDesc() *TermsAggregation
- func (a *TermsAggregation) OrderByKey(asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByKeyAsc() *TermsAggregation
- func (a *TermsAggregation) OrderByKeyDesc() *TermsAggregation
- func (a *TermsAggregation) OrderByTerm(asc bool) *TermsAggregationdeprecated
- func (a *TermsAggregation) OrderByTermAsc() *TermsAggregationdeprecated
- func (a *TermsAggregation) OrderByTermDesc() *TermsAggregationdeprecated
- func (a *TermsAggregation) Partition(p int) *TermsAggregation
- func (a *TermsAggregation) RequiredSize(requiredSize int) *TermsAggregation
- func (a *TermsAggregation) Script(script *Script) *TermsAggregation
- func (a *TermsAggregation) ShardMinDocCount(shardMinDocCount int) *TermsAggregation
- func (a *TermsAggregation) ShardSize(shardSize int) *TermsAggregation
- func (a *TermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *TermsAggregation
- func (a *TermsAggregation) Size(size int) *TermsAggregation
- func (a *TermsAggregation) Source() (interface{}, error)
- func (a *TermsAggregation) SubAggregation(name string, subAggregation Aggregation) *TermsAggregation
- func (a *TermsAggregation) ValueType(valueType string) *TermsAggregation
- type TermsAggregationIncludeExclude
- type TermsInfo
- type TermsLookup
- func (t *TermsLookup) Id(id string) *TermsLookup
- func (t *TermsLookup) Index(index string) *TermsLookup
- func (t *TermsLookup) Path(path string) *TermsLookup
- func (t *TermsLookup) Routing(routing string) *TermsLookup
- func (t *TermsLookup) Source() (interface{}, error)
- func (t *TermsLookup) Type(typ string) *TermsLookupdeprecated
- type TermsOrder
- type TermsQuery
- type TermsSetQuery
- func (q *TermsSetQuery) Boost(boost float64) *TermsSetQuery
- func (q *TermsSetQuery) MinimumShouldMatchField(minimumShouldMatchField string) *TermsSetQuery
- func (q *TermsSetQuery) MinimumShouldMatchScript(minimumShouldMatchScript *Script) *TermsSetQuery
- func (q *TermsSetQuery) QueryName(queryName string) *TermsSetQuery
- func (q *TermsSetQuery) Source() (interface{}, error)
- type TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxDocFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxNumTerms(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxTermFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxWordLength(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinDocFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinTermFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinWordLength(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) Source() (interface{}, error)
- type TermvectorsResponse
- type TermvectorsService
- func (s *TermvectorsService) BodyJson(body interface{}) *TermvectorsService
- func (s *TermvectorsService) BodyString(body string) *TermvectorsService
- func (s *TermvectorsService) Dfs(dfs bool) *TermvectorsService
- func (s *TermvectorsService) Doc(doc interface{}) *TermvectorsService
- func (s *TermvectorsService) ErrorTrace(errorTrace bool) *TermvectorsService
- func (s *TermvectorsService) FieldStatistics(fieldStatistics bool) *TermvectorsService
- func (s *TermvectorsService) Fields(fields ...string) *TermvectorsService
- func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService
- func (s *TermvectorsService) FilterPath(filterPath ...string) *TermvectorsService
- func (s *TermvectorsService) Header(name string, value string) *TermvectorsService
- func (s *TermvectorsService) Headers(headers http.Header) *TermvectorsService
- func (s *TermvectorsService) Human(human bool) *TermvectorsService
- func (s *TermvectorsService) Id(id string) *TermvectorsService
- func (s *TermvectorsService) Index(index string) *TermvectorsService
- func (s *TermvectorsService) Offsets(offsets bool) *TermvectorsService
- func (s *TermvectorsService) Parent(parent string) *TermvectorsService
- func (s *TermvectorsService) Payloads(payloads bool) *TermvectorsService
- func (s *TermvectorsService) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *TermvectorsService
- func (s *TermvectorsService) Positions(positions bool) *TermvectorsService
- func (s *TermvectorsService) Preference(preference string) *TermvectorsService
- func (s *TermvectorsService) Pretty(pretty bool) *TermvectorsService
- func (s *TermvectorsService) Realtime(realtime bool) *TermvectorsService
- func (s *TermvectorsService) Routing(routing string) *TermvectorsService
- func (s *TermvectorsService) TermStatistics(termStatistics bool) *TermvectorsService
- func (s *TermvectorsService) Type(typ string) *TermvectorsServicedeprecated
- func (s *TermvectorsService) Version(version interface{}) *TermvectorsService
- func (s *TermvectorsService) VersionType(versionType string) *TermvectorsService
- type TokenInfo
- type TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFieldWithFormat(docvalueField DocvalueField) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *TopHitsAggregation
- func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation
- func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation
- func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation
- func (a *TopHitsAggregation) From(from int) *TopHitsAggregation
- func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation
- func (a *TopHitsAggregation) Highlighter() *Highlight
- func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation
- func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation
- func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation
- func (a *TopHitsAggregation) SearchSource(searchSource *SearchSource) *TopHitsAggregation
- func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation
- func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation
- func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation
- func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation
- func (a *TopHitsAggregation) Source() (interface{}, error)
- func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation
- func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation
- type TopMetricsAggregation
- func (a *TopMetricsAggregation) Field(field string) *TopMetricsAggregation
- func (a *TopMetricsAggregation) Size(size int) *TopMetricsAggregation
- func (a *TopMetricsAggregation) Sort(field string, ascending bool) *TopMetricsAggregation
- func (a *TopMetricsAggregation) SortBy(sorter Sorter) *TopMetricsAggregation
- func (a *TopMetricsAggregation) SortWithInfo(info SortInfo) *TopMetricsAggregation
- func (a *TopMetricsAggregation) Source() (interface{}, error)
- type TotalHits
- type TypeQuery
- type UnassignedInfo
- type ValidateService
- func (s *ValidateService) AllShards(allShards *bool) *ValidateService
- func (s *ValidateService) AllowNoIndices(allowNoIndices bool) *ValidateService
- func (s *ValidateService) AnalyzeWildcard(analyzeWildcard bool) *ValidateService
- func (s *ValidateService) Analyzer(analyzer string) *ValidateService
- func (s *ValidateService) BodyJson(body interface{}) *ValidateService
- func (s *ValidateService) BodyString(body string) *ValidateService
- func (s *ValidateService) DefaultOperator(defaultOperator string) *ValidateService
- func (s *ValidateService) Df(df string) *ValidateService
- func (s *ValidateService) ErrorTrace(errorTrace bool) *ValidateService
- func (s *ValidateService) ExpandWildcards(expandWildcards string) *ValidateService
- func (s *ValidateService) Explain(explain *bool) *ValidateService
- func (s *ValidateService) FilterPath(filterPath ...string) *ValidateService
- func (s *ValidateService) Header(name string, value string) *ValidateService
- func (s *ValidateService) Headers(headers http.Header) *ValidateService
- func (s *ValidateService) Human(human bool) *ValidateService
- func (s *ValidateService) IgnoreUnavailable(ignoreUnavailable bool) *ValidateService
- func (s *ValidateService) Index(index ...string) *ValidateService
- func (s *ValidateService) Lenient(lenient bool) *ValidateService
- func (s *ValidateService) Pretty(pretty bool) *ValidateService
- func (s *ValidateService) Q(q string) *ValidateService
- func (s *ValidateService) Query(query Query) *ValidateService
- func (s *ValidateService) Rewrite(rewrite *bool) *ValidateService
- func (s *ValidateService) Type(typ ...string) *ValidateServicedeprecated
- type ValueCountAggregation
- func (a *ValueCountAggregation) Field(field string) *ValueCountAggregation
- func (a *ValueCountAggregation) Format(format string) *ValueCountAggregation
- func (a *ValueCountAggregation) Meta(metaData map[string]interface{}) *ValueCountAggregation
- func (a *ValueCountAggregation) Script(script *Script) *ValueCountAggregation
- func (a *ValueCountAggregation) Source() (interface{}, error)
- func (a *ValueCountAggregation) SubAggregation(name string, subAggregation Aggregation) *ValueCountAggregation
- type WeightFactorFunction
- type WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Field(field string, config *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Format(format string) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Meta(metaData map[string]interface{}) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Source() (interface{}, error)
- func (a *WeightedAvgAggregation) SubAggregation(name string, subAggregation Aggregation) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Value(value *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) ValueType(valueType string) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Weight(weight *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- type WildcardQuery
- func (q *WildcardQuery) Boost(boost float64) *WildcardQuery
- func (q *WildcardQuery) CaseInsensitive(caseInsensitive bool) *WildcardQuery
- func (q *WildcardQuery) QueryName(queryName string) *WildcardQuery
- func (q *WildcardQuery) Rewrite(rewrite string) *WildcardQuery
- func (q *WildcardQuery) Source() (interface{}, error)
- type WrapperQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorReason ¶
ErrorReason returns the reason of an error that Elasticsearch reported, if err is of kind Error and has ErrorDetails with a Reason. Any other value of err will return an empty string.
func IsContextErr ¶
IsContextErr returns true if the error is from a context that was canceled or deadline exceeded
Types ¶
type AdjacencyMatrixAggregation ¶
type AdjacencyMatrixAggregation struct {
// contains filtered or unexported fields
}
AdjacencyMatrixAggregation returning a form of adjacency matrix. The request provides a collection of named filter expressions, similar to the filters aggregation request. Each bucket in the response represents a non-empty cell in the matrix of intersecting filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-adjacency-matrix-aggregation.html
func NewAdjacencyMatrixAggregation ¶
func NewAdjacencyMatrixAggregation() *AdjacencyMatrixAggregation
NewAdjacencyMatrixAggregation initializes a new AdjacencyMatrixAggregation.
func (*AdjacencyMatrixAggregation) Filters ¶
func (a *AdjacencyMatrixAggregation) Filters(name string, filter Query) *AdjacencyMatrixAggregation
Filters adds the filter
func (*AdjacencyMatrixAggregation) Meta ¶
func (a *AdjacencyMatrixAggregation) Meta(metaData map[string]interface{}) *AdjacencyMatrixAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AdjacencyMatrixAggregation) Source ¶
func (a *AdjacencyMatrixAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*AdjacencyMatrixAggregation) SubAggregation ¶
func (a *AdjacencyMatrixAggregation) SubAggregation(name string, subAggregation Aggregation) *AdjacencyMatrixAggregation
SubAggregation adds a sub-aggregation to this aggregation.
type Aggregation ¶
type Aggregation interface { // Source returns a JSON-serializable aggregation that is a fragment // of the request sent to Elasticsearch. Source() (interface{}, error) }
Aggregations can be seen as a unit-of-work that build analytic information over a set of documents. It is (in many senses) the follow-up of facets in Elasticsearch. For more details about aggregations, visit: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations.html
type AggregationBucketAdjacencyMatrix ¶
type AggregationBucketAdjacencyMatrix struct { Aggregations Buckets []*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketAdjacencyMatrix is a multi-bucket aggregation that is returned with a AdjacencyMatrix aggregation.
func (*AggregationBucketAdjacencyMatrix) UnmarshalJSON ¶
func (a *AggregationBucketAdjacencyMatrix) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketAdjacencyMatrix structure.
type AggregationBucketCompositeItem ¶
type AggregationBucketCompositeItem struct { Aggregations Key map[string]interface{} //`json:"key"` DocCount int64 //`json:"doc_count"` }
AggregationBucketCompositeItem is a single bucket of an AggregationBucketCompositeItems structure.
func (*AggregationBucketCompositeItem) UnmarshalJSON ¶
func (a *AggregationBucketCompositeItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItem structure.
type AggregationBucketCompositeItems ¶
type AggregationBucketCompositeItems struct { Aggregations Buckets []*AggregationBucketCompositeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` AfterKey map[string]interface{} // `json:"after_key,omitempty"` }
AggregationBucketCompositeItems implements the response structure for a bucket aggregation of type composite.
func (*AggregationBucketCompositeItems) UnmarshalJSON ¶
func (a *AggregationBucketCompositeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItems structure.
type AggregationBucketFilters ¶
type AggregationBucketFilters struct { Aggregations Buckets []*AggregationBucketKeyItem //`json:"buckets"` NamedBuckets map[string]*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketFilters is a multi-bucket aggregation that is returned with a filters aggregation.
func (*AggregationBucketFilters) UnmarshalJSON ¶
func (a *AggregationBucketFilters) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketFilters structure.
type AggregationBucketHistogramItem ¶
type AggregationBucketHistogramItem struct { Aggregations Key float64 //`json:"key"` KeyAsString *string //`json:"key_as_string"` DocCount int64 //`json:"doc_count"` }
AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.
func (*AggregationBucketHistogramItem) UnmarshalJSON ¶
func (a *AggregationBucketHistogramItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItem structure.
type AggregationBucketHistogramItems ¶
type AggregationBucketHistogramItems struct { Aggregations Buckets []*AggregationBucketHistogramItem // `json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketHistogramItems is a bucket aggregation that is returned with a date histogram aggregation.
func (*AggregationBucketHistogramItems) UnmarshalJSON ¶
func (a *AggregationBucketHistogramItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItems structure.
type AggregationBucketKeyItem ¶
type AggregationBucketKeyItem struct { Aggregations Key interface{} //`json:"key"` KeyAsString *string //`json:"key_as_string"` KeyNumber json.Number DocCount int64 //`json:"doc_count"` }
AggregationBucketKeyItem is a single bucket of an AggregationBucketKeyItems structure.
func (*AggregationBucketKeyItem) UnmarshalJSON ¶
func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItem structure.
type AggregationBucketKeyItems ¶
type AggregationBucketKeyItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets []*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyItems is a bucket aggregation that is e.g. returned with a terms aggregation.
func (*AggregationBucketKeyItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItems structure.
type AggregationBucketKeyedHistogramItems ¶
type AggregationBucketKeyedHistogramItems struct { Aggregations Buckets map[string]*AggregationBucketHistogramItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyedHistogramItems is a bucket aggregation that is returned with a (keyed) date histogram aggregation.
func (*AggregationBucketKeyedHistogramItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyedHistogramItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyedHistogramItems structure.
type AggregationBucketKeyedRangeItems ¶
type AggregationBucketKeyedRangeItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets map[string]*AggregationBucketRangeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyedRangeItems is a bucket aggregation that is e.g. returned with a keyed range aggregation.
func (*AggregationBucketKeyedRangeItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyedRangeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
type AggregationBucketMultiKeyItem ¶
type AggregationBucketMultiKeyItem struct { Aggregations Key []interface{} //`json:"key"` KeyAsString *string //`json:"key_as_string"` KeyNumber []json.Number DocCount int64 //`json:"doc_count"` }
AggregationBucketMultiKeyItem is a single bucket of an AggregationBucketMultiKeyItems structure.
func (*AggregationBucketMultiKeyItem) UnmarshalJSON ¶
func (a *AggregationBucketMultiKeyItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketMultiKeyItem structure.
type AggregationBucketMultiKeyItems ¶
type AggregationBucketMultiKeyItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets []*AggregationBucketMultiKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketMultiKeyItems is a bucket aggregation that is returned with a multi terms aggregation.
func (*AggregationBucketMultiKeyItems) UnmarshalJSON ¶
func (a *AggregationBucketMultiKeyItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketMultiKeyItems structure.
type AggregationBucketRangeItem ¶
type AggregationBucketRangeItem struct { Aggregations Key string //`json:"key"` DocCount int64 //`json:"doc_count"` From *float64 //`json:"from"` FromAsString string //`json:"from_as_string"` To *float64 //`json:"to"` ToAsString string //`json:"to_as_string"` }
AggregationBucketRangeItem is a single bucket of an AggregationBucketRangeItems structure.
func (*AggregationBucketRangeItem) UnmarshalJSON ¶
func (a *AggregationBucketRangeItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItem structure.
type AggregationBucketRangeItems ¶
type AggregationBucketRangeItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets []*AggregationBucketRangeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketRangeItems is a bucket aggregation that is e.g. returned with a range aggregation.
func (*AggregationBucketRangeItems) UnmarshalJSON ¶
func (a *AggregationBucketRangeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
type AggregationBucketSignificantTerm ¶
type AggregationBucketSignificantTerm struct { Aggregations Key string //`json:"key"` DocCount int64 //`json:"doc_count"` BgCount int64 //`json:"bg_count"` Score float64 //`json:"score"` }
AggregationBucketSignificantTerm is a single bucket of an AggregationBucketSignificantTerms structure.
func (*AggregationBucketSignificantTerm) UnmarshalJSON ¶
func (a *AggregationBucketSignificantTerm) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerm structure.
type AggregationBucketSignificantTerms ¶
type AggregationBucketSignificantTerms struct { Aggregations DocCount int64 //`json:"doc_count"` Buckets []*AggregationBucketSignificantTerm //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketSignificantTerms is a bucket aggregation returned with a significant terms aggregation.
func (*AggregationBucketSignificantTerms) UnmarshalJSON ¶
func (a *AggregationBucketSignificantTerms) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerms structure.
type AggregationExtendedStatsMetric ¶
type AggregationExtendedStatsMetric struct { Aggregations Count int64 // `json:"count"` Min *float64 //`json:"min,omitempty"` Max *float64 //`json:"max,omitempty"` Avg *float64 //`json:"avg,omitempty"` Sum *float64 //`json:"sum,omitempty"` SumOfSquares *float64 //`json:"sum_of_squares,omitempty"` Variance *float64 //`json:"variance,omitempty"` StdDeviation *float64 //`json:"std_deviation,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationExtendedStatsMetric is a multi-value metric, returned by an ExtendedStats aggregation.
func (*AggregationExtendedStatsMetric) UnmarshalJSON ¶
func (a *AggregationExtendedStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationExtendedStatsMetric structure.
type AggregationGeoBoundsMetric ¶
type AggregationGeoBoundsMetric struct { Aggregations Bounds struct { TopLeft struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"top_left"` BottomRight struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"bottom_right"` } `json:"bounds"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationGeoBoundsMetric is a metric as returned by a GeoBounds aggregation.
func (*AggregationGeoBoundsMetric) UnmarshalJSON ¶
func (a *AggregationGeoBoundsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationGeoBoundsMetric structure.
type AggregationGeoCentroidMetric ¶
type AggregationGeoCentroidMetric struct { Aggregations Location struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"location"` Count int // `json:"count,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationGeoCentroidMetric is a metric as returned by a GeoCentroid aggregation.
func (*AggregationGeoCentroidMetric) UnmarshalJSON ¶
func (a *AggregationGeoCentroidMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationGeoCentroidMetric structure.
type AggregationMatrixStats ¶
type AggregationMatrixStats struct { Aggregations Fields []*AggregationMatrixStatsField // `json:"field,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationMatrixStats is returned by a MatrixStats aggregation.
func (*AggregationMatrixStats) UnmarshalJSON ¶
func (a *AggregationMatrixStats) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationMatrixStats structure.
type AggregationMatrixStatsField ¶
type AggregationMatrixStatsField struct { Name string `json:"name"` Count int64 `json:"count"` Mean float64 `json:"mean,omitempty"` Variance float64 `json:"variance,omitempty"` Skewness float64 `json:"skewness,omitempty"` Kurtosis float64 `json:"kurtosis,omitempty"` Covariance map[string]float64 `json:"covariance,omitempty"` Correlation map[string]float64 `json:"correlation,omitempty"` }
AggregationMatrixStatsField represents running stats of a single field returned from MatrixStats aggregation.
type AggregationPercentilesMetric ¶
type AggregationPercentilesMetric struct { Aggregations Values map[string]float64 // `json:"values"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPercentilesMetric is a multi-value metric, returned by a Percentiles aggregation.
func (*AggregationPercentilesMetric) UnmarshalJSON ¶
func (a *AggregationPercentilesMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPercentilesMetric structure.
type AggregationPipelineBucketMetricValue ¶
type AggregationPipelineBucketMetricValue struct { Aggregations Keys []interface{} // `json:"keys"` Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineBucketMetricValue is a value returned e.g. by a MaxBucket aggregation.
func (*AggregationPipelineBucketMetricValue) UnmarshalJSON ¶
func (a *AggregationPipelineBucketMetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineBucketMetricValue structure.
type AggregationPipelineDerivative ¶
type AggregationPipelineDerivative struct { Aggregations Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` NormalizedValue *float64 // `json:"normalized_value"` NormalizedValueAsString string // `json:"normalized_value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineDerivative is the value returned by a Derivative aggregation.
func (*AggregationPipelineDerivative) UnmarshalJSON ¶
func (a *AggregationPipelineDerivative) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineDerivative structure.
type AggregationPipelinePercentilesMetric ¶
type AggregationPipelinePercentilesMetric struct { Aggregations Values map[string]float64 // `json:"values"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelinePercentilesMetric is the value returned by a pipeline percentiles Metric aggregation
func (*AggregationPipelinePercentilesMetric) UnmarshalJSON ¶
func (a *AggregationPipelinePercentilesMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelinePercentilesMetric structure.
type AggregationPipelineSimpleValue ¶
type AggregationPipelineSimpleValue struct { Aggregations Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineSimpleValue is a simple value, returned e.g. by a MovAvg aggregation.
func (*AggregationPipelineSimpleValue) UnmarshalJSON ¶
func (a *AggregationPipelineSimpleValue) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineSimpleValue structure.
type AggregationPipelineStatsMetric ¶
type AggregationPipelineStatsMetric struct { Aggregations Count int64 // `json:"count"` CountAsString string // `json:"count_as_string"` Min *float64 // `json:"min"` MinAsString string // `json:"min_as_string"` Max *float64 // `json:"max"` MaxAsString string // `json:"max_as_string"` Avg *float64 // `json:"avg"` AvgAsString string // `json:"avg_as_string"` Sum *float64 // `json:"sum"` SumAsString string // `json:"sum_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineStatsMetric is a simple value, returned e.g. by a MovAvg aggregation.
func (*AggregationPipelineStatsMetric) UnmarshalJSON ¶
func (a *AggregationPipelineStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineStatsMetric structure.
type AggregationScriptedMetric ¶
type AggregationScriptedMetric struct { Aggregations Value interface{} //`json:"value"` Meta map[string]interface{} //`json:"meta,omitempty"` }
AggregationScriptedMetric is the value return by a scripted metric aggregation. Value maybe one of map[string]interface{}/[]interface{}/string/bool/json.Number
func (*AggregationScriptedMetric) UnmarshalJSON ¶
func (a *AggregationScriptedMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationScriptedMetric structure.
type AggregationSingleBucket ¶
type AggregationSingleBucket struct { Aggregations DocCount int64 // `json:"doc_count"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationSingleBucket is a single bucket, returned e.g. via an aggregation of type Global.
func (*AggregationSingleBucket) UnmarshalJSON ¶
func (a *AggregationSingleBucket) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationSingleBucket structure.
type AggregationStatsMetric ¶
type AggregationStatsMetric struct { Aggregations Count int64 // `json:"count"` Min *float64 //`json:"min,omitempty"` Max *float64 //`json:"max,omitempty"` Avg *float64 //`json:"avg,omitempty"` Sum *float64 //`json:"sum,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationStatsMetric is a multi-value metric, returned by a Stats aggregation.
func (*AggregationStatsMetric) UnmarshalJSON ¶
func (a *AggregationStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationStatsMetric structure.
type AggregationTopMetricsItem ¶
type AggregationTopMetricsItem struct { Sort []interface{} `json:"sort"` // sort information Metrics map[string]interface{} `json:"metrics"` // returned metrics }
AggregationTopMetricsItem is a set of metrics returned for the top document or documents
type AggregationTopMetricsItems ¶
type AggregationTopMetricsItems struct { Aggregations Top []AggregationTopMetricsItem `json:"top"` }
AggregationTopMetricsItems is the value returned by the top metrics aggregation
type AggregationValueMetric ¶
type AggregationValueMetric struct { Aggregations Value *float64 //`json:"value"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationValueMetric is a single-value metric, returned e.g. by a Min or Max aggregation.
func (*AggregationValueMetric) UnmarshalJSON ¶
func (a *AggregationValueMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationValueMetric structure.
type Aggregations ¶
type Aggregations map[string]json.RawMessage
Aggregations is a list of aggregations that are part of a search result.
func (Aggregations) AdjacencyMatrix ¶
func (a Aggregations) AdjacencyMatrix(name string) (*AggregationBucketAdjacencyMatrix, bool)
AdjacencyMatrix returning a form of adjacency matrix. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-adjacency-matrix-aggregation.html
func (Aggregations) AutoDateHistogram ¶
func (a Aggregations) AutoDateHistogram(name string) (*AggregationBucketHistogramItems, bool)
AutoDateHistogram returns auto date histogram aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-datehistogram-aggregation.html
func (Aggregations) Avg ¶
func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool)
Avg returns average aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-avg-aggregation.html
func (Aggregations) AvgBucket ¶
func (a Aggregations) AvgBucket(name string) (*AggregationPipelineSimpleValue, bool)
AvgBucket returns average bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-avg-bucket-aggregation.html
func (Aggregations) BucketScript ¶
func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool)
BucketScript returns bucket script pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-bucket-script-aggregation.html
func (Aggregations) Cardinality ¶
func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool)
Cardinality returns cardinality aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-cardinality-aggregation.html
func (Aggregations) Children ¶
func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool)
Children returns children results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-children-aggregation.html
func (Aggregations) Composite ¶
func (a Aggregations) Composite(name string) (*AggregationBucketCompositeItems, bool)
Composite returns composite bucket aggregation results.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-composite-aggregation.html for details.
func (Aggregations) CumulativeSum ¶
func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool)
CumulativeSum returns a cumulative sum pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
func (Aggregations) DateHistogram ¶
func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool)
DateHistogram returns date histogram aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-datehistogram-aggregation.html
func (Aggregations) DateRange ¶
func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool)
DateRange returns date range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-daterange-aggregation.html
func (Aggregations) Derivative ¶
func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool)
Derivative returns derivative pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-derivative-aggregation.html
func (Aggregations) DiversifiedSampler ¶
func (a Aggregations) DiversifiedSampler(name string) (*AggregationSingleBucket, bool)
DiversifiedSampler returns diversified_sampler aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-diversified-sampler-aggregation.html
func (Aggregations) ExtendedStats ¶
func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool)
ExtendedStats returns extended stats aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-extendedstats-aggregation.html
func (Aggregations) Filter ¶
func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool)
Filter returns filter results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-filter-aggregation.html
func (Aggregations) Filters ¶
func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool)
Filters returns filters results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-filters-aggregation.html
func (Aggregations) GeoBounds ¶
func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool)
GeoBounds returns geo-bounds aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-geobounds-aggregation.html
func (Aggregations) GeoCentroid ¶
func (a Aggregations) GeoCentroid(name string) (*AggregationGeoCentroidMetric, bool)
GeoCentroid returns geo-centroid aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-geocentroid-aggregation.html
func (Aggregations) GeoDistance ¶
func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
GeoDistance returns geo distance aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geodistance-aggregation.html
func (Aggregations) GeoHash ¶
func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
GeoHash returns geo-hash aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geohashgrid-aggregation.html
func (Aggregations) GeoTile ¶
func (a Aggregations) GeoTile(name string) (*AggregationBucketKeyItems, bool)
GeoTile returns geo-tile aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geotilegrid-aggregation.html
func (Aggregations) Global ¶
func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
Global returns global results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-global-aggregation.html
func (Aggregations) Histogram ¶
func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
Histogram returns histogram aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-histogram-aggregation.html
func (Aggregations) IPRange ¶
func (a Aggregations) IPRange(name string) (*AggregationBucketRangeItems, bool)
IPRange returns IP range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-iprange-aggregation.html
func (Aggregations) KeyedDateHistogram ¶
func (a Aggregations) KeyedDateHistogram(name string) (*AggregationBucketKeyedHistogramItems, bool)
KeyedDateHistogram returns date histogram aggregation results for keyed responses.
func (Aggregations) KeyedRange ¶
func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
KeyedRange returns keyed range aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-range-aggregation.html.
func (Aggregations) MatrixStats ¶
func (a Aggregations) MatrixStats(name string) (*AggregationMatrixStats, bool)
MatrixStats returns matrix stats aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-matrix-stats-aggregation.html
func (Aggregations) Max ¶
func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
Max returns max aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-max-aggregation.html
func (Aggregations) MaxBucket ¶
func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
MaxBucket returns maximum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-max-bucket-aggregation.html
func (Aggregations) MedianAbsoluteDeviation ¶
func (a Aggregations) MedianAbsoluteDeviation(name string) (*AggregationValueMetric, bool)
MedianAbsoluteDeviation returns median absolute deviation aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.6/search-aggregations-metrics-median-absolute-deviation-aggregation.html for details.
func (Aggregations) Min ¶
func (a Aggregations) Min(name string) (*AggregationValueMetric, bool)
Min returns min aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-min-aggregation.html
func (Aggregations) MinBucket ¶
func (a Aggregations) MinBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
MinBucket returns minimum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-min-bucket-aggregation.html
func (Aggregations) Missing ¶
func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool)
Missing returns missing results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-missing-aggregation.html
func (Aggregations) MovAvg
deprecated
func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool)
MovAvg returns moving average pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (Aggregations) MovFn ¶
func (a Aggregations) MovFn(name string) (*AggregationPipelineSimpleValue, bool)
MovFn returns moving function pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movfn-aggregation.html
func (Aggregations) MultiTerms ¶
func (a Aggregations) MultiTerms(name string) (*AggregationBucketMultiKeyItems, bool)
MultiTerms returns multi terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.13/search-aggregations-bucket-multi-terms-aggregation.html
func (Aggregations) Nested ¶
func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool)
Nested returns nested results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-nested-aggregation.html
func (Aggregations) PercentileRanks ¶
func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool)
PercentileRanks returns percentile ranks results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-percentile-rank-aggregation.html
func (Aggregations) Percentiles ¶
func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool)
Percentiles returns percentiles results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-percentile-aggregation.html
func (Aggregations) PercentilesBucket ¶
func (a Aggregations) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool)
PercentilesBucket returns stats bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
func (Aggregations) Range ¶
func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
Range returns range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-range-aggregation.html
func (Aggregations) RareTerms ¶
func (a Aggregations) RareTerms(name string) (*AggregationBucketKeyItems, bool)
RareTerms returns rate terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-rare-terms-aggregation.html
func (Aggregations) ReverseNested ¶
func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
ReverseNested returns reverse-nested results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-reverse-nested-aggregation.html
func (Aggregations) Sampler ¶
func (a Aggregations) Sampler(name string) (*AggregationSingleBucket, bool)
Sampler returns sampler aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-sampler-aggregation.html
func (Aggregations) ScriptedMetric ¶
func (a Aggregations) ScriptedMetric(name string) (*AggregationScriptedMetric, bool)
ScriptedMetric returns scripted metric aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.2/search-aggregations-metrics-scripted-metric-aggregation.html for details.
func (Aggregations) SerialDiff ¶
func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool)
SerialDiff returns serial differencing pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-serialdiff-aggregation.html
func (Aggregations) SignificantTerms ¶
func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool)
SignificantTerms returns significant terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html
func (Aggregations) Stats ¶
func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool)
Stats returns stats aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-stats-aggregation.html
func (Aggregations) StatsBucket ¶
func (a Aggregations) StatsBucket(name string) (*AggregationPipelineStatsMetric, bool)
StatsBucket returns stats bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-stats-bucket-aggregation.html
func (Aggregations) Sum ¶
func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool)
Sum returns sum aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-sum-aggregation.html
func (Aggregations) SumBucket ¶
func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool)
SumBucket returns sum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-sum-bucket-aggregation.html
func (Aggregations) Terms ¶
func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
Terms returns terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-terms-aggregation.html
func (Aggregations) TopMetrics ¶
func (a Aggregations) TopMetrics(name string) (*AggregationTopMetricsItems, bool)
TopMetrics returns top metrics aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-top-metrics.html for details
func (Aggregations) ValueCount ¶
func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
ValueCount returns value-count aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-valuecount-aggregation.html
func (Aggregations) WeightedAvg ¶
func (a Aggregations) WeightedAvg(name string) (*AggregationValueMetric, bool)
WeightedAvg computes the weighted average of numeric values that are extracted from the aggregated documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-weight-avg-aggregation.html
type AllocationId ¶
type AutoDateHistogramAggregation ¶
type AutoDateHistogramAggregation struct {
// contains filtered or unexported fields
}
AutoDateHistogramAggregation is a multi-bucket aggregation similar to the histogram except it can only be applied on date values, and the buckets num can bin pointed. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.3/search-aggregations-bucket-autodatehistogram-aggregation.html
func NewAutoDateHistogramAggregation ¶
func NewAutoDateHistogramAggregation() *AutoDateHistogramAggregation
NewAutoDateHistogramAggregation creates a new AutoDateHistogramAggregation.
func (*AutoDateHistogramAggregation) Buckets ¶
func (a *AutoDateHistogramAggregation) Buckets(buckets int) *AutoDateHistogramAggregation
Buckets buckets num by which the aggregation gets processed.
func (*AutoDateHistogramAggregation) Field ¶
func (a *AutoDateHistogramAggregation) Field(field string) *AutoDateHistogramAggregation
Field on which the aggregation is processed.
func (*AutoDateHistogramAggregation) Format ¶
func (a *AutoDateHistogramAggregation) Format(format string) *AutoDateHistogramAggregation
Format sets the format to use for dates.
func (*AutoDateHistogramAggregation) Meta ¶
func (a *AutoDateHistogramAggregation) Meta(metaData map[string]interface{}) *AutoDateHistogramAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AutoDateHistogramAggregation) MinDocCount ¶
func (a *AutoDateHistogramAggregation) MinDocCount(minDocCount int64) *AutoDateHistogramAggregation
MinDocCount sets the minimum document count per bucket. Buckets with less documents than this min value will not be returned.
func (*AutoDateHistogramAggregation) MinimumInterval ¶
func (a *AutoDateHistogramAggregation) MinimumInterval(interval string) *AutoDateHistogramAggregation
MinimumInterval accepted units for minimum_interval are: year/month/day/hour/minute/second
func (*AutoDateHistogramAggregation) Missing ¶
func (a *AutoDateHistogramAggregation) Missing(missing interface{}) *AutoDateHistogramAggregation
Missing configures the value to use when documents miss a value.
func (*AutoDateHistogramAggregation) Script ¶
func (a *AutoDateHistogramAggregation) Script(script *Script) *AutoDateHistogramAggregation
Script on which th
func (*AutoDateHistogramAggregation) Source ¶
func (a *AutoDateHistogramAggregation) Source() (interface{}, error)
Source source for AutoDateHistogramAggregation
func (*AutoDateHistogramAggregation) SubAggregation ¶
func (a *AutoDateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *AutoDateHistogramAggregation
SubAggregation sub aggregation
func (*AutoDateHistogramAggregation) TimeZone ¶
func (a *AutoDateHistogramAggregation) TimeZone(timeZone string) *AutoDateHistogramAggregation
TimeZone sets the timezone in which to translate dates before computing buckets.
type AvgAggregation ¶
type AvgAggregation struct {
// contains filtered or unexported fields
}
AvgAggregation is a single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
func NewAvgAggregation ¶
func NewAvgAggregation() *AvgAggregation
func (*AvgAggregation) Field ¶
func (a *AvgAggregation) Field(field string) *AvgAggregation
func (*AvgAggregation) Format ¶
func (a *AvgAggregation) Format(format string) *AvgAggregation
func (*AvgAggregation) Meta ¶
func (a *AvgAggregation) Meta(metaData map[string]interface{}) *AvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AvgAggregation) Missing ¶
func (a *AvgAggregation) Missing(missing interface{}) *AvgAggregation
func (*AvgAggregation) Script ¶
func (a *AvgAggregation) Script(script *Script) *AvgAggregation
func (*AvgAggregation) Source ¶
func (a *AvgAggregation) Source() (interface{}, error)
func (*AvgAggregation) SubAggregation ¶
func (a *AvgAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgAggregation
type AvgBucketAggregation ¶
type AvgBucketAggregation struct {
// contains filtered or unexported fields
}
AvgBucketAggregation is a sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-avg-bucket-aggregation.html
func NewAvgBucketAggregation ¶
func NewAvgBucketAggregation() *AvgBucketAggregation
NewAvgBucketAggregation creates and initializes a new AvgBucketAggregation.
func (*AvgBucketAggregation) BucketsPath ¶
func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*AvgBucketAggregation) Format ¶
func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation
Format to use on the output of this aggregation.
func (*AvgBucketAggregation) GapInsertZeros ¶
func (a *AvgBucketAggregation) GapInsertZeros() *AvgBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*AvgBucketAggregation) GapPolicy ¶
func (a *AvgBucketAggregation) GapPolicy(gapPolicy string) *AvgBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*AvgBucketAggregation) GapSkip ¶
func (a *AvgBucketAggregation) GapSkip() *AvgBucketAggregation
GapSkip skips gaps in the series.
func (*AvgBucketAggregation) Meta ¶
func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AvgBucketAggregation) Source ¶
func (a *AvgBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BoolQuery ¶
type BoolQuery struct { Query // contains filtered or unexported fields }
A bool query matches documents matching boolean combinations of other queries. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-bool-query.html
func (*BoolQuery) AdjustPureNegative ¶
func (*BoolQuery) MinimumNumberShouldMatch ¶
func (*BoolQuery) MinimumShouldMatch ¶
type BoostingQuery ¶
type BoostingQuery struct { Query // contains filtered or unexported fields }
A boosting query can be used to effectively demote results that match a given query. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-boosting-query.html
func (*BoostingQuery) Boost ¶
func (q *BoostingQuery) Boost(boost float64) *BoostingQuery
func (*BoostingQuery) Negative ¶
func (q *BoostingQuery) Negative(negative Query) *BoostingQuery
func (*BoostingQuery) NegativeBoost ¶
func (q *BoostingQuery) NegativeBoost(negativeBoost float64) *BoostingQuery
func (*BoostingQuery) Positive ¶
func (q *BoostingQuery) Positive(positive Query) *BoostingQuery
func (*BoostingQuery) Source ¶
func (q *BoostingQuery) Source() (interface{}, error)
Creates the query source for the boosting query.
type BoundingBox ¶
type BoundingBox struct { TopLeft GeoPoint `json:"top_left"` BottomRight GeoPoint `json:"bottom_right"` }
BoundingBox bounding box
type BroadcastResponse ¶
type BroadcastResponse struct { Shards *ShardsInfo `json:"_shards,omitempty"` Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` Failures []*ShardOperationFailedException `json:"failures,omitempty"` }
type BucketCountThresholds ¶
type BucketCountThresholds struct { MinDocCount *int64 ShardMinDocCount *int64 RequiredSize *int ShardSize *int }
BucketCountThresholds is used in e.g. terms and significant text aggregations.
type BucketScriptAggregation ¶
type BucketScriptAggregation struct {
// contains filtered or unexported fields
}
BucketScriptAggregation is a parent pipeline aggregation which executes a script which can perform per bucket computations on specified metrics in the parent multi-bucket aggregation. The specified metric must be numeric and the script must return a numeric value.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-bucket-script-aggregation.html
func NewBucketScriptAggregation ¶
func NewBucketScriptAggregation() *BucketScriptAggregation
NewBucketScriptAggregation creates and initializes a new BucketScriptAggregation.
func (*BucketScriptAggregation) AddBucketsPath ¶
func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScriptAggregation
AddBucketsPath adds a bucket path to use for this pipeline aggregator.
func (*BucketScriptAggregation) BucketsPathsMap ¶
func (a *BucketScriptAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketScriptAggregation
BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
func (*BucketScriptAggregation) Format ¶
func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation
Format to use on the output of this aggregation.
func (*BucketScriptAggregation) GapInsertZeros ¶
func (a *BucketScriptAggregation) GapInsertZeros() *BucketScriptAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketScriptAggregation) GapPolicy ¶
func (a *BucketScriptAggregation) GapPolicy(gapPolicy string) *BucketScriptAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*BucketScriptAggregation) GapSkip ¶
func (a *BucketScriptAggregation) GapSkip() *BucketScriptAggregation
GapSkip skips gaps in the series.
func (*BucketScriptAggregation) Meta ¶
func (a *BucketScriptAggregation) Meta(metaData map[string]interface{}) *BucketScriptAggregation
Meta sets the meta data to be included in the aggregation response.
func (*BucketScriptAggregation) Script ¶
func (a *BucketScriptAggregation) Script(script *Script) *BucketScriptAggregation
Script is the script to run.
func (*BucketScriptAggregation) Source ¶
func (a *BucketScriptAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BucketSelectorAggregation ¶
type BucketSelectorAggregation struct {
// contains filtered or unexported fields
}
BucketSelectorAggregation is a parent pipeline aggregation which determines whether the current bucket will be retained in the parent multi-bucket aggregation. The specific metric must be numeric and the script must return a boolean value. If the script language is expression then a numeric return value is permitted. In this case 0.0 will be evaluated as false and all other values will evaluate to true.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-bucket-selector-aggregation.html
func NewBucketSelectorAggregation ¶
func NewBucketSelectorAggregation() *BucketSelectorAggregation
NewBucketSelectorAggregation creates and initializes a new BucketSelectorAggregation.
func (*BucketSelectorAggregation) AddBucketsPath ¶
func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSelectorAggregation
AddBucketsPath adds a bucket path to use for this pipeline aggregator.
func (*BucketSelectorAggregation) BucketsPathsMap ¶
func (a *BucketSelectorAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketSelectorAggregation
BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
func (*BucketSelectorAggregation) Format ¶
func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation
Format to use on the output of this aggregation.
func (*BucketSelectorAggregation) GapInsertZeros ¶
func (a *BucketSelectorAggregation) GapInsertZeros() *BucketSelectorAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketSelectorAggregation) GapPolicy ¶
func (a *BucketSelectorAggregation) GapPolicy(gapPolicy string) *BucketSelectorAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*BucketSelectorAggregation) GapSkip ¶
func (a *BucketSelectorAggregation) GapSkip() *BucketSelectorAggregation
GapSkip skips gaps in the series.
func (*BucketSelectorAggregation) Meta ¶
func (a *BucketSelectorAggregation) Meta(metaData map[string]interface{}) *BucketSelectorAggregation
Meta sets the meta data to be included in the aggregation response.
func (*BucketSelectorAggregation) Script ¶
func (a *BucketSelectorAggregation) Script(script *Script) *BucketSelectorAggregation
Script is the script to run.
func (*BucketSelectorAggregation) Source ¶
func (a *BucketSelectorAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BucketSortAggregation ¶
type BucketSortAggregation struct {
// contains filtered or unexported fields
}
BucketSortAggregation parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. Zero or more sort fields may be specified together with the corresponding sort order. Each bucket may be sorted based on its _key, _count or its sub-aggregations. In addition, parameters from and size may be set in order to truncate the result buckets.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-bucket-sort-aggregation.html
func NewBucketSortAggregation ¶
func NewBucketSortAggregation() *BucketSortAggregation
NewBucketSortAggregation creates and initializes a new BucketSortAggregation.
func (*BucketSortAggregation) From ¶
func (a *BucketSortAggregation) From(from int) *BucketSortAggregation
From adds the "from" parameter to the aggregation.
func (*BucketSortAggregation) GapInsertZeros ¶
func (a *BucketSortAggregation) GapInsertZeros() *BucketSortAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketSortAggregation) GapPolicy ¶
func (a *BucketSortAggregation) GapPolicy(gapPolicy string) *BucketSortAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "skip".
func (*BucketSortAggregation) GapSkip ¶
func (a *BucketSortAggregation) GapSkip() *BucketSortAggregation
GapSkip skips gaps in the series.
func (*BucketSortAggregation) Meta ¶
func (a *BucketSortAggregation) Meta(meta map[string]interface{}) *BucketSortAggregation
Meta sets the meta data in the aggregation. Although metadata is supported for this aggregation by Elasticsearch, it's important to note that there's no use to it because this aggregation does not include new data in the response. It merely reorders parent buckets.
func (*BucketSortAggregation) Size ¶
func (a *BucketSortAggregation) Size(size int) *BucketSortAggregation
Size adds the "size" parameter to the aggregation.
func (*BucketSortAggregation) Sort ¶
func (a *BucketSortAggregation) Sort(field string, ascending bool) *BucketSortAggregation
Sort adds a sort order to the list of sorters.
func (*BucketSortAggregation) SortWithInfo ¶
func (a *BucketSortAggregation) SortWithInfo(info SortInfo) *BucketSortAggregation
SortWithInfo adds a SortInfo to the list of sorters.
func (*BucketSortAggregation) Source ¶
func (a *BucketSortAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type CandidateGenerator ¶
type CardinalityAggregation ¶
type CardinalityAggregation struct {
// contains filtered or unexported fields
}
CardinalityAggregation is a single-value metrics aggregation that calculates an approximate count of distinct values. Values can be extracted either from specific fields in the document or generated by a script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-cardinality-aggregation.html
func NewCardinalityAggregation ¶
func NewCardinalityAggregation() *CardinalityAggregation
func (*CardinalityAggregation) Field ¶
func (a *CardinalityAggregation) Field(field string) *CardinalityAggregation
func (*CardinalityAggregation) Format ¶
func (a *CardinalityAggregation) Format(format string) *CardinalityAggregation
func (*CardinalityAggregation) Meta ¶
func (a *CardinalityAggregation) Meta(metaData map[string]interface{}) *CardinalityAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CardinalityAggregation) Missing ¶
func (a *CardinalityAggregation) Missing(missing interface{}) *CardinalityAggregation
func (*CardinalityAggregation) PrecisionThreshold ¶
func (a *CardinalityAggregation) PrecisionThreshold(threshold int64) *CardinalityAggregation
func (*CardinalityAggregation) Rehash ¶
func (a *CardinalityAggregation) Rehash(rehash bool) *CardinalityAggregation
func (*CardinalityAggregation) Script ¶
func (a *CardinalityAggregation) Script(script *Script) *CardinalityAggregation
func (*CardinalityAggregation) Source ¶
func (a *CardinalityAggregation) Source() (interface{}, error)
func (*CardinalityAggregation) SubAggregation ¶
func (a *CardinalityAggregation) SubAggregation(name string, subAggregation Aggregation) *CardinalityAggregation
type ChiSquareSignificanceHeuristic ¶
type ChiSquareSignificanceHeuristic struct {
// contains filtered or unexported fields
}
ChiSquareSignificanceHeuristic implements Chi square as described in "Information Retrieval", Manning et al., Chapter 13.5.2.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_chi_square for details.
func NewChiSquareSignificanceHeuristic ¶
func NewChiSquareSignificanceHeuristic() *ChiSquareSignificanceHeuristic
NewChiSquareSignificanceHeuristic initializes a new ChiSquareSignificanceHeuristic.
func (*ChiSquareSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *ChiSquareSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *ChiSquareSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*ChiSquareSignificanceHeuristic) IncludeNegatives ¶
func (sh *ChiSquareSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *ChiSquareSignificanceHeuristic
IncludeNegatives indicates whether to filter out the terms that appear much less in the subset than in the background without the subset.
func (*ChiSquareSignificanceHeuristic) Name ¶
func (sh *ChiSquareSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*ChiSquareSignificanceHeuristic) Source ¶
func (sh *ChiSquareSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type ChildrenAggregation ¶
type ChildrenAggregation struct {
// contains filtered or unexported fields
}
ChildrenAggregation is a special single bucket aggregation that enables aggregating from buckets on parent document types to buckets on child documents. It is available from 1.4.0.Beta1 upwards. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-children-aggregation.html
func NewChildrenAggregation ¶
func NewChildrenAggregation() *ChildrenAggregation
func (*ChildrenAggregation) Meta ¶
func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ChildrenAggregation) Source ¶
func (a *ChildrenAggregation) Source() (interface{}, error)
func (*ChildrenAggregation) SubAggregation ¶
func (a *ChildrenAggregation) SubAggregation(name string, subAggregation Aggregation) *ChildrenAggregation
func (*ChildrenAggregation) Type ¶
func (a *ChildrenAggregation) Type(typ string) *ChildrenAggregation
type ClosePointInTimeService ¶
type ClosePointInTimeService struct {
// contains filtered or unexported fields
}
ClosePointInTimeService removes a point in time.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.x/point-in-time-api.html for details.
func NewClosePointInTimeService ¶
func NewClosePointInTimeService() *ClosePointInTimeService
NewClosePointInTimeService creates a new ClosePointInTimeService.
func (*ClosePointInTimeService) BodyJson ¶
func (s *ClosePointInTimeService) BodyJson(body interface{}) *ClosePointInTimeService
BodyJson is the document as a serializable JSON interface.
func (*ClosePointInTimeService) BodyString ¶
func (s *ClosePointInTimeService) BodyString(body string) *ClosePointInTimeService
BodyString is the document encoded as a string.
func (*ClosePointInTimeService) ErrorTrace ¶
func (s *ClosePointInTimeService) ErrorTrace(errorTrace bool) *ClosePointInTimeService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClosePointInTimeService) FilterPath ¶
func (s *ClosePointInTimeService) FilterPath(filterPath ...string) *ClosePointInTimeService
FilterPath specifies a list of filters used to reduce the response.
func (*ClosePointInTimeService) Header ¶
func (s *ClosePointInTimeService) Header(name string, value string) *ClosePointInTimeService
Header adds a header to the request.
func (*ClosePointInTimeService) Headers ¶
func (s *ClosePointInTimeService) Headers(headers http.Header) *ClosePointInTimeService
Headers specifies the headers of the request.
func (*ClosePointInTimeService) Human ¶
func (s *ClosePointInTimeService) Human(human bool) *ClosePointInTimeService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClosePointInTimeService) ID ¶
func (s *ClosePointInTimeService) ID(id string) *ClosePointInTimeService
ID to close.
func (*ClosePointInTimeService) Pretty ¶
func (s *ClosePointInTimeService) Pretty(pretty bool) *ClosePointInTimeService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClosePointInTimeService) Validate ¶
func (s *ClosePointInTimeService) Validate() error
Validate checks if the operation is valid.
type CollapseBuilder ¶
type CollapseBuilder struct {
// contains filtered or unexported fields
}
CollapseBuilder enables field collapsing on a search request. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-collapse.html for details.
func NewCollapseBuilder ¶
func NewCollapseBuilder(field string) *CollapseBuilder
NewCollapseBuilder creates a new CollapseBuilder.
func (*CollapseBuilder) Field ¶
func (b *CollapseBuilder) Field(field string) *CollapseBuilder
Field to collapse.
func (*CollapseBuilder) InnerHit ¶
func (b *CollapseBuilder) InnerHit(innerHits ...*InnerHit) *CollapseBuilder
InnerHit option to expand the collapsed results.
func (*CollapseBuilder) MaxConcurrentGroupRequests ¶
func (b *CollapseBuilder) MaxConcurrentGroupRequests(max int) *CollapseBuilder
MaxConcurrentGroupRequests is the maximum number of group requests that are allowed to be ran concurrently in the inner_hits phase.
func (*CollapseBuilder) Source ¶
func (b *CollapseBuilder) Source() (interface{}, error)
Source generates the JSON serializable fragment for the CollapseBuilder.
type CollectorResult ¶
type CollectorResult struct { Name string `json:"name,omitempty"` Reason string `json:"reason,omitempty"` Time string `json:"time,omitempty"` TimeNanos int64 `json:"time_in_nanos,omitempty"` Children []CollectorResult `json:"children,omitempty"` }
CollectorResult holds the profile timings of the collectors used in the search. Children's CollectorResults may be embedded inside of a parent CollectorResult.
type CombinedFieldsQuery ¶
type CombinedFieldsQuery struct {
// contains filtered or unexported fields
}
CombinedFieldsQuery supports searching multiple text fields as if their contents had been indexed into one combined field.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.13/query-dsl-combined-fields-query.html
func NewCombinedFieldsQuery ¶
func NewCombinedFieldsQuery(text interface{}, fields ...string) *CombinedFieldsQuery
NewCombinedFieldsQuery creates and initializes a new CombinedFieldsQuery.
func (*CombinedFieldsQuery) AutoGenerateSynonymsPhraseQuery ¶
func (q *CombinedFieldsQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *CombinedFieldsQuery
AutoGenerateSynonymsPhraseQuery indicates whether phrase queries should be automatically generated for multi terms synonyms. Defaults to true.
func (*CombinedFieldsQuery) Field ¶
func (q *CombinedFieldsQuery) Field(field string) *CombinedFieldsQuery
Field adds a field to run the multi match against.
func (*CombinedFieldsQuery) FieldWithBoost ¶
func (q *CombinedFieldsQuery) FieldWithBoost(field string, boost float64) *CombinedFieldsQuery
FieldWithBoost adds a field to run the multi match against with a specific boost.
func (*CombinedFieldsQuery) MinimumShouldMatch ¶
func (q *CombinedFieldsQuery) MinimumShouldMatch(minimumShouldMatch string) *CombinedFieldsQuery
MinimumShouldMatch represents the minimum number of optional should clauses to match.
func (*CombinedFieldsQuery) Operator ¶
func (q *CombinedFieldsQuery) Operator(operator string) *CombinedFieldsQuery
Operator sets the operator to use when using boolean query. It can be either AND or OR (default).
func (*CombinedFieldsQuery) Source ¶
func (q *CombinedFieldsQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*CombinedFieldsQuery) ZeroTermsQuery ¶
func (q *CombinedFieldsQuery) ZeroTermsQuery(zeroTermsQuery string) *CombinedFieldsQuery
ZeroTermsQuery can be "all" or "none".
type CommonTermsQuery
deprecated
type CommonTermsQuery struct { Query // contains filtered or unexported fields }
CommonTermsQuery is a modern alternative to stopwords which improves the precision and recall of search results (by taking stopwords into account), without sacrificing performance. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl-common-terms-query.html
Deprecated: Use Match query instead (7.3.0+), which skips blocks of documents efficiently, without any configuration, provided that the total number of hits is not tracked.
func NewCommonTermsQuery
deprecated
func NewCommonTermsQuery(name string, text interface{}) *CommonTermsQuery
NewCommonTermsQuery creates and initializes a new common terms query.
Deprecated: Common Terms Query was deprecated in >= 7.3.0. See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-common-terms-query.html.
func (*CommonTermsQuery) Analyzer ¶
func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery
func (*CommonTermsQuery) Boost ¶
func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery
func (*CommonTermsQuery) CutoffFrequency ¶
func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery
func (*CommonTermsQuery) HighFreq ¶
func (q *CommonTermsQuery) HighFreq(f float64) *CommonTermsQuery
func (*CommonTermsQuery) HighFreqMinimumShouldMatch ¶
func (q *CommonTermsQuery) HighFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
func (*CommonTermsQuery) HighFreqOperator ¶
func (q *CommonTermsQuery) HighFreqOperator(op string) *CommonTermsQuery
func (*CommonTermsQuery) LowFreq ¶
func (q *CommonTermsQuery) LowFreq(f float64) *CommonTermsQuery
func (*CommonTermsQuery) LowFreqMinimumShouldMatch ¶
func (q *CommonTermsQuery) LowFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
func (*CommonTermsQuery) LowFreqOperator ¶
func (q *CommonTermsQuery) LowFreqOperator(op string) *CommonTermsQuery
func (*CommonTermsQuery) QueryName ¶
func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery
func (*CommonTermsQuery) Source ¶
func (q *CommonTermsQuery) Source() (interface{}, error)
Creates the query source for the common query.
type CompletionSuggester ¶
type CompletionSuggester struct { Suggester // contains filtered or unexported fields }
CompletionSuggester is a fast suggester for e.g. type-ahead completion.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-completion.html for more details.
func NewCompletionSuggester ¶
func NewCompletionSuggester(name string) *CompletionSuggester
Creates a new completion suggester.
func (*CompletionSuggester) Analyzer ¶
func (q *CompletionSuggester) Analyzer(analyzer string) *CompletionSuggester
func (*CompletionSuggester) ContextQueries ¶
func (q *CompletionSuggester) ContextQueries(queries ...SuggesterContextQuery) *CompletionSuggester
func (*CompletionSuggester) ContextQuery ¶
func (q *CompletionSuggester) ContextQuery(query SuggesterContextQuery) *CompletionSuggester
func (*CompletionSuggester) Field ¶
func (q *CompletionSuggester) Field(field string) *CompletionSuggester
func (*CompletionSuggester) Fuzziness ¶
func (q *CompletionSuggester) Fuzziness(fuzziness interface{}) *CompletionSuggester
func (*CompletionSuggester) FuzzyOptions ¶
func (q *CompletionSuggester) FuzzyOptions(options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) Name ¶
func (q *CompletionSuggester) Name() string
func (*CompletionSuggester) Prefix ¶
func (q *CompletionSuggester) Prefix(prefix string) *CompletionSuggester
func (*CompletionSuggester) PrefixWithEditDistance ¶
func (q *CompletionSuggester) PrefixWithEditDistance(prefix string, editDistance interface{}) *CompletionSuggester
func (*CompletionSuggester) PrefixWithOptions ¶
func (q *CompletionSuggester) PrefixWithOptions(prefix string, options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) Regex ¶
func (q *CompletionSuggester) Regex(regex string) *CompletionSuggester
func (*CompletionSuggester) RegexOptions ¶
func (q *CompletionSuggester) RegexOptions(options *RegexCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) RegexWithOptions ¶
func (q *CompletionSuggester) RegexWithOptions(regex string, options *RegexCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) ShardSize ¶
func (q *CompletionSuggester) ShardSize(shardSize int) *CompletionSuggester
func (*CompletionSuggester) Size ¶
func (q *CompletionSuggester) Size(size int) *CompletionSuggester
func (*CompletionSuggester) SkipDuplicates ¶
func (q *CompletionSuggester) SkipDuplicates(skipDuplicates bool) *CompletionSuggester
func (*CompletionSuggester) Source ¶
func (q *CompletionSuggester) Source(includeName bool) (interface{}, error)
Source creates the JSON data for the completion suggester.
func (*CompletionSuggester) Text ¶
func (q *CompletionSuggester) Text(text string) *CompletionSuggester
type CompositeAggregation ¶
type CompositeAggregation struct {
// contains filtered or unexported fields
}
CompositeAggregation is a multi-bucket values source based aggregation that can be used to calculate unique composite values from source documents.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-composite-aggregation.html for details.
func NewCompositeAggregation ¶
func NewCompositeAggregation() *CompositeAggregation
NewCompositeAggregation creates a new CompositeAggregation.
func (*CompositeAggregation) AggregateAfter ¶
func (a *CompositeAggregation) AggregateAfter(after map[string]interface{}) *CompositeAggregation
AggregateAfter sets the values that indicate which composite bucket this request should "aggregate after".
func (*CompositeAggregation) Meta ¶
func (a *CompositeAggregation) Meta(metaData map[string]interface{}) *CompositeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CompositeAggregation) Size ¶
func (a *CompositeAggregation) Size(size int) *CompositeAggregation
Size represents the number of composite buckets to return. Defaults to 10 as of Elasticsearch 6.1.
func (*CompositeAggregation) Source ¶
func (a *CompositeAggregation) Source() (interface{}, error)
Source returns the serializable JSON for this aggregation.
func (*CompositeAggregation) Sources ¶
func (a *CompositeAggregation) Sources(sources ...CompositeAggregationValuesSource) *CompositeAggregation
Sources specifies the list of CompositeAggregationValuesSource instances to use in the aggregation.
func (*CompositeAggregation) SubAggregation ¶
func (a *CompositeAggregation) SubAggregation(name string, subAggregation Aggregation) *CompositeAggregation
SubAggregations of this aggregation.
type CompositeAggregationDateHistogramValuesSource ¶
type CompositeAggregationDateHistogramValuesSource struct {
// contains filtered or unexported fields
}
CompositeAggregationDateHistogramValuesSource is a source for the CompositeAggregation that handles date histograms it works very similar to a date histogram aggregation with slightly different syntax
See https://www.elastic.co/guide/en/elasticsearch/reference/7.4/search-aggregations-bucket-composite-aggregation.html#_date_histogram for details.
func NewCompositeAggregationDateHistogramValuesSource ¶
func NewCompositeAggregationDateHistogramValuesSource(name string) *CompositeAggregationDateHistogramValuesSource
NewCompositeAggregationDateHistogramValuesSource creates and initializes a new CompositeAggregationDateHistogramValuesSource.
func (*CompositeAggregationDateHistogramValuesSource) Asc ¶
func (a *CompositeAggregationDateHistogramValuesSource) Asc() *CompositeAggregationDateHistogramValuesSource
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationDateHistogramValuesSource) CalendarInterval ¶
func (a *CompositeAggregationDateHistogramValuesSource) CalendarInterval(calendarInterval interface{}) *CompositeAggregationDateHistogramValuesSource
CalendarInterval to use for the date histogram, e.g. "1d" or a numeric value like "60".
func (*CompositeAggregationDateHistogramValuesSource) Desc ¶
func (a *CompositeAggregationDateHistogramValuesSource) Desc() *CompositeAggregationDateHistogramValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationDateHistogramValuesSource) Field ¶
func (a *CompositeAggregationDateHistogramValuesSource) Field(field string) *CompositeAggregationDateHistogramValuesSource
Field to use for this source.
func (*CompositeAggregationDateHistogramValuesSource) FixedInterval ¶
func (a *CompositeAggregationDateHistogramValuesSource) FixedInterval(fixedInterval interface{}) *CompositeAggregationDateHistogramValuesSource
FixedInterval to use for the date histogram, e.g. "1d" or a numeric value like "60".
func (*CompositeAggregationDateHistogramValuesSource) Format ¶
func (a *CompositeAggregationDateHistogramValuesSource) Format(format string) *CompositeAggregationDateHistogramValuesSource
Format to use for the date histogram, e.g. "strict_date_optional_time"
func (*CompositeAggregationDateHistogramValuesSource) Interval
deprecated
func (a *CompositeAggregationDateHistogramValuesSource) Interval(interval interface{}) *CompositeAggregationDateHistogramValuesSource
Interval to use for the date histogram, e.g. "1d" or a numeric value like "60".
Deprecated: Use FixedInterval or CalendarInterval instead.
func (*CompositeAggregationDateHistogramValuesSource) Missing
deprecated
func (a *CompositeAggregationDateHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationDateHistogramValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationDateHistogramValuesSource) MissingBucket ¶
func (a *CompositeAggregationDateHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationDateHistogramValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationDateHistogramValuesSource) Order ¶
func (a *CompositeAggregationDateHistogramValuesSource) Order(order string) *CompositeAggregationDateHistogramValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationDateHistogramValuesSource) Script ¶
func (a *CompositeAggregationDateHistogramValuesSource) Script(script *Script) *CompositeAggregationDateHistogramValuesSource
Script to use for this source.
func (*CompositeAggregationDateHistogramValuesSource) Source ¶
func (a *CompositeAggregationDateHistogramValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationDateHistogramValuesSource) TimeZone ¶
func (a *CompositeAggregationDateHistogramValuesSource) TimeZone(timeZone string) *CompositeAggregationDateHistogramValuesSource
TimeZone to use for the dates.
func (*CompositeAggregationDateHistogramValuesSource) ValueType ¶
func (a *CompositeAggregationDateHistogramValuesSource) ValueType(valueType string) *CompositeAggregationDateHistogramValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationHistogramValuesSource ¶
type CompositeAggregationHistogramValuesSource struct {
// contains filtered or unexported fields
}
CompositeAggregationHistogramValuesSource is a source for the CompositeAggregation that handles histograms it works very similar to a terms histogram with slightly different syntax
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-composite-aggregation.html#_histogram for details.
func NewCompositeAggregationHistogramValuesSource ¶
func NewCompositeAggregationHistogramValuesSource(name string, interval float64) *CompositeAggregationHistogramValuesSource
NewCompositeAggregationHistogramValuesSource creates and initializes a new CompositeAggregationHistogramValuesSource.
func (*CompositeAggregationHistogramValuesSource) Asc ¶
func (a *CompositeAggregationHistogramValuesSource) Asc() *CompositeAggregationHistogramValuesSource
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationHistogramValuesSource) Desc ¶
func (a *CompositeAggregationHistogramValuesSource) Desc() *CompositeAggregationHistogramValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationHistogramValuesSource) Field ¶
func (a *CompositeAggregationHistogramValuesSource) Field(field string) *CompositeAggregationHistogramValuesSource
Field to use for this source.
func (*CompositeAggregationHistogramValuesSource) Interval ¶
func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource
Interval specifies the interval to use.
func (*CompositeAggregationHistogramValuesSource) Missing
deprecated
func (a *CompositeAggregationHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationHistogramValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationHistogramValuesSource) MissingBucket ¶
func (a *CompositeAggregationHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationHistogramValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationHistogramValuesSource) Order ¶
func (a *CompositeAggregationHistogramValuesSource) Order(order string) *CompositeAggregationHistogramValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationHistogramValuesSource) Script ¶
func (a *CompositeAggregationHistogramValuesSource) Script(script *Script) *CompositeAggregationHistogramValuesSource
Script to use for this source.
func (*CompositeAggregationHistogramValuesSource) Source ¶
func (a *CompositeAggregationHistogramValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationHistogramValuesSource) ValueType ¶
func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationTermsValuesSource ¶
type CompositeAggregationTermsValuesSource struct {
// contains filtered or unexported fields
}
CompositeAggregationTermsValuesSource is a source for the CompositeAggregation that handles terms it works very similar to a terms aggregation with slightly different syntax
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-composite-aggregation.html#_terms for details.
func NewCompositeAggregationTermsValuesSource ¶
func NewCompositeAggregationTermsValuesSource(name string) *CompositeAggregationTermsValuesSource
NewCompositeAggregationTermsValuesSource creates and initializes a new CompositeAggregationTermsValuesSource.
func (*CompositeAggregationTermsValuesSource) Asc ¶
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationTermsValuesSource) Desc ¶
func (a *CompositeAggregationTermsValuesSource) Desc() *CompositeAggregationTermsValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationTermsValuesSource) Field ¶
func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource
Field to use for this source.
func (*CompositeAggregationTermsValuesSource) Missing
deprecated
func (a *CompositeAggregationTermsValuesSource) Missing(missing interface{}) *CompositeAggregationTermsValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationTermsValuesSource) MissingBucket ¶
func (a *CompositeAggregationTermsValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationTermsValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationTermsValuesSource) Order ¶
func (a *CompositeAggregationTermsValuesSource) Order(order string) *CompositeAggregationTermsValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationTermsValuesSource) Script ¶
func (a *CompositeAggregationTermsValuesSource) Script(script *Script) *CompositeAggregationTermsValuesSource
Script to use for this source.
func (*CompositeAggregationTermsValuesSource) Source ¶
func (a *CompositeAggregationTermsValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationTermsValuesSource) ValueType ¶
func (a *CompositeAggregationTermsValuesSource) ValueType(valueType string) *CompositeAggregationTermsValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationValuesSource ¶
type CompositeAggregationValuesSource interface {
Source() (interface{}, error)
}
CompositeAggregationValuesSource specifies the interface that all implementations for CompositeAggregation's Sources method need to implement.
The different implementations are described in https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-composite-aggregation.html#_values_source_2.
type ConstantScoreQuery ¶
type ConstantScoreQuery struct {
// contains filtered or unexported fields
}
ConstantScoreQuery is a query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-constant-score-query.html
func NewConstantScoreQuery ¶
func NewConstantScoreQuery(filter Query) *ConstantScoreQuery
ConstantScoreQuery creates and initializes a new constant score query.
func (*ConstantScoreQuery) Boost ¶
func (q *ConstantScoreQuery) Boost(boost float64) *ConstantScoreQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*ConstantScoreQuery) Source ¶
func (q *ConstantScoreQuery) Source() (interface{}, error)
Source returns the query source.
type ContextSuggester ¶
type ContextSuggester struct { Suggester // contains filtered or unexported fields }
ContextSuggester is a fast suggester for e.g. type-ahead completion that supports filtering and boosting based on contexts. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/suggester-context.html for more details.
func NewContextSuggester ¶
func NewContextSuggester(name string) *ContextSuggester
Creates a new context suggester.
func (*ContextSuggester) ContextQueries ¶
func (q *ContextSuggester) ContextQueries(queries ...SuggesterContextQuery) *ContextSuggester
func (*ContextSuggester) ContextQuery ¶
func (q *ContextSuggester) ContextQuery(query SuggesterContextQuery) *ContextSuggester
func (*ContextSuggester) Field ¶
func (q *ContextSuggester) Field(field string) *ContextSuggester
func (*ContextSuggester) Name ¶
func (q *ContextSuggester) Name() string
func (*ContextSuggester) Prefix ¶
func (q *ContextSuggester) Prefix(prefix string) *ContextSuggester
func (*ContextSuggester) Size ¶
func (q *ContextSuggester) Size(size int) *ContextSuggester
func (*ContextSuggester) Source ¶
func (q *ContextSuggester) Source(includeName bool) (interface{}, error)
Creates the source for the context suggester.
type CumulativeSumAggregation ¶
type CumulativeSumAggregation struct {
// contains filtered or unexported fields
}
CumulativeSumAggregation is a parent pipeline aggregation which calculates the cumulative sum of a specified metric in a parent histogram (or date_histogram) aggregation. The specified metric must be numeric and the enclosing histogram must have min_doc_count set to 0 (default for histogram aggregations).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
func NewCumulativeSumAggregation ¶
func NewCumulativeSumAggregation() *CumulativeSumAggregation
NewCumulativeSumAggregation creates and initializes a new CumulativeSumAggregation.
func (*CumulativeSumAggregation) BucketsPath ¶
func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *CumulativeSumAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*CumulativeSumAggregation) Format ¶
func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation
Format to use on the output of this aggregation.
func (*CumulativeSumAggregation) Meta ¶
func (a *CumulativeSumAggregation) Meta(metaData map[string]interface{}) *CumulativeSumAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CumulativeSumAggregation) Source ¶
func (a *CumulativeSumAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type DateHistogramAggregation ¶
type DateHistogramAggregation struct {
// contains filtered or unexported fields
}
DateHistogramAggregation is a multi-bucket aggregation similar to the histogram except it can only be applied on date values. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-datehistogram-aggregation.html
func NewDateHistogramAggregation ¶
func NewDateHistogramAggregation() *DateHistogramAggregation
NewDateHistogramAggregation creates a new DateHistogramAggregation.
func (*DateHistogramAggregation) CalendarInterval ¶
func (a *DateHistogramAggregation) CalendarInterval(calendarInterval string) *DateHistogramAggregation
CalendarInterval by which the aggregation gets processed.
Allowed values are: "year" ("1y", "y"), "quarter" ("1q", "q"), "month" ("1M", "M"), "week" ("1w", "w"), "day" ("d", "1d")
These units are calendar-aware, meaning they respect leap additions, variable days per month etc. This is mutually exclusive with FixedInterval.
func (*DateHistogramAggregation) ExtendedBounds ¶
func (a *DateHistogramAggregation) ExtendedBounds(min, max interface{}) *DateHistogramAggregation
ExtendedBounds accepts int, int64, string, or time.Time values. In case the lower value in the histogram would be greater than min or the upper value would be less than max, empty buckets will be generated.
func (*DateHistogramAggregation) ExtendedBoundsMax ¶
func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHistogramAggregation
ExtendedBoundsMax accepts int, int64, string, or time.Time values.
func (*DateHistogramAggregation) ExtendedBoundsMin ¶
func (a *DateHistogramAggregation) ExtendedBoundsMin(min interface{}) *DateHistogramAggregation
ExtendedBoundsMin accepts int, int64, string, or time.Time values.
func (*DateHistogramAggregation) Field ¶
func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation
Field on which the aggregation is processed.
func (*DateHistogramAggregation) FixedInterval ¶
func (a *DateHistogramAggregation) FixedInterval(fixedInterval string) *DateHistogramAggregation
FixedInterval by which the aggregation gets processed.
Allowed values are: "year", "1y", "quarter", "1q", "month", "1M", "week", "1w", "day", "1d", "hour", "1h", "minute", "1m", "second", or "1s". It also supports time settings like "1.5h".
These units are not calendar-aware and are simply multiples of fixed, SI units. This is mutually exclusive with CalendarInterval.
func (*DateHistogramAggregation) Format ¶
func (a *DateHistogramAggregation) Format(format string) *DateHistogramAggregation
Format sets the format to use for dates.
func (*DateHistogramAggregation) Interval
deprecated
func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregation
Interval by which the aggregation gets processed. This field will be replaced by the two FixedInterval and CalendarInterval fields (see below).
Deprecated: This field will be removed in the future.
func (*DateHistogramAggregation) Keyed ¶
func (a *DateHistogramAggregation) Keyed(keyed bool) *DateHistogramAggregation
Keyed specifies whether to return the results with a keyed response (or not).
func (*DateHistogramAggregation) Meta ¶
func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DateHistogramAggregation) MinDocCount ¶
func (a *DateHistogramAggregation) MinDocCount(minDocCount int64) *DateHistogramAggregation
MinDocCount sets the minimum document count per bucket. Buckets with less documents than this min value will not be returned.
func (*DateHistogramAggregation) Missing ¶
func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation
Missing configures the value to use when documents miss a value.
func (*DateHistogramAggregation) Offset ¶
func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation
Offset sets the offset of time intervals in the histogram, e.g. "+6h".
func (*DateHistogramAggregation) Order ¶
func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation
Order specifies the sort order. Valid values for order are: "_key", "_count", a sub-aggregation name, or a sub-aggregation name with a metric.
func (*DateHistogramAggregation) OrderByAggregation ¶
func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*DateHistogramAggregation) OrderByAggregationAndMetric ¶
func (a *DateHistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *DateHistogramAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*DateHistogramAggregation) OrderByCount ¶
func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByCountAsc ¶
func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByCountDesc ¶
func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKey ¶
func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKeyAsc ¶
func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKeyDesc ¶
func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation
func (*DateHistogramAggregation) Script ¶
func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation
func (*DateHistogramAggregation) Source ¶
func (a *DateHistogramAggregation) Source() (interface{}, error)
func (*DateHistogramAggregation) SubAggregation ¶
func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation
func (*DateHistogramAggregation) TimeZone ¶
func (a *DateHistogramAggregation) TimeZone(timeZone string) *DateHistogramAggregation
TimeZone sets the timezone in which to translate dates before computing buckets.
type DateRangeAggregation ¶
type DateRangeAggregation struct {
// contains filtered or unexported fields
}
DateRangeAggregation is a range aggregation that is dedicated for date values. The main difference between this aggregation and the normal range aggregation is that the from and to values can be expressed in Date Math expressions, and it is also possible to specify a date format by which the from and to response fields will be returned. Note that this aggregration includes the from value and excludes the to value for each range. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-daterange-aggregation.html
func NewDateRangeAggregation ¶
func NewDateRangeAggregation() *DateRangeAggregation
func (*DateRangeAggregation) AddRange ¶
func (a *DateRangeAggregation) AddRange(from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddRangeWithKey ¶
func (a *DateRangeAggregation) AddRangeWithKey(key string, from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedFrom ¶
func (a *DateRangeAggregation) AddUnboundedFrom(to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedFromWithKey ¶
func (a *DateRangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedTo ¶
func (a *DateRangeAggregation) AddUnboundedTo(from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedToWithKey ¶
func (a *DateRangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Between ¶
func (a *DateRangeAggregation) Between(from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) BetweenWithKey ¶
func (a *DateRangeAggregation) BetweenWithKey(key string, from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Field ¶
func (a *DateRangeAggregation) Field(field string) *DateRangeAggregation
func (*DateRangeAggregation) Format ¶
func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation
func (*DateRangeAggregation) Gt ¶
func (a *DateRangeAggregation) Gt(from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) GtWithKey ¶
func (a *DateRangeAggregation) GtWithKey(key string, from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Keyed ¶
func (a *DateRangeAggregation) Keyed(keyed bool) *DateRangeAggregation
func (*DateRangeAggregation) Lt ¶
func (a *DateRangeAggregation) Lt(to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) LtWithKey ¶
func (a *DateRangeAggregation) LtWithKey(key string, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Meta ¶
func (a *DateRangeAggregation) Meta(metaData map[string]interface{}) *DateRangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DateRangeAggregation) Script ¶
func (a *DateRangeAggregation) Script(script *Script) *DateRangeAggregation
func (*DateRangeAggregation) Source ¶
func (a *DateRangeAggregation) Source() (interface{}, error)
func (*DateRangeAggregation) SubAggregation ¶
func (a *DateRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *DateRangeAggregation
func (*DateRangeAggregation) TimeZone ¶
func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation
func (*DateRangeAggregation) Unmapped ¶
func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation
type DateRangeAggregationEntry ¶
type DateRangeAggregationEntry struct { Key string From interface{} To interface{} }
type Decoder ¶
Decoder is used to decode responses from Elasticsearch. Users of elastic can implement their own marshaler for advanced purposes and set them per Client (see SetDecoder). If none is specified, DefaultDecoder is used.
type DefaultDecoder ¶
type DefaultDecoder struct{}
DefaultDecoder uses json.Unmarshal from the Go standard library to decode JSON data.
func (*DefaultDecoder) Decode ¶
func (u *DefaultDecoder) Decode(data []byte, v interface{}) error
Decode decodes with json.Unmarshal from the Go standard library.
type DeleteScriptService ¶
type DeleteScriptService struct {
// contains filtered or unexported fields
}
DeleteScriptService removes a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html for details.
func NewDeleteScriptService ¶
func NewDeleteScriptService() *DeleteScriptService
NewDeleteScriptService creates a new DeleteScriptService.
func (*DeleteScriptService) ErrorTrace ¶
func (s *DeleteScriptService) ErrorTrace(errorTrace bool) *DeleteScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*DeleteScriptService) FilterPath ¶
func (s *DeleteScriptService) FilterPath(filterPath ...string) *DeleteScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*DeleteScriptService) Header ¶
func (s *DeleteScriptService) Header(name string, value string) *DeleteScriptService
Header adds a header to the request.
func (*DeleteScriptService) Headers ¶
func (s *DeleteScriptService) Headers(headers http.Header) *DeleteScriptService
Headers specifies the headers of the request.
func (*DeleteScriptService) Human ¶
func (s *DeleteScriptService) Human(human bool) *DeleteScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*DeleteScriptService) Id ¶
func (s *DeleteScriptService) Id(id string) *DeleteScriptService
Id is the script ID.
func (*DeleteScriptService) MasterTimeout ¶
func (s *DeleteScriptService) MasterTimeout(masterTimeout string) *DeleteScriptService
MasterTimeout is the timeout for connecting to master.
func (*DeleteScriptService) Pretty ¶
func (s *DeleteScriptService) Pretty(pretty bool) *DeleteScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*DeleteScriptService) Timeout ¶
func (s *DeleteScriptService) Timeout(timeout string) *DeleteScriptService
Timeout is an explicit operation timeout.
type DerivativeAggregation ¶
type DerivativeAggregation struct {
// contains filtered or unexported fields
}
DerivativeAggregation is a parent pipeline aggregation which calculates the derivative of a specified metric in a parent histogram (or date_histogram) aggregation. The specified metric must be numeric and the enclosing histogram must have min_doc_count set to 0 (default for histogram aggregations).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-derivative-aggregation.html
func NewDerivativeAggregation ¶
func NewDerivativeAggregation() *DerivativeAggregation
NewDerivativeAggregation creates and initializes a new DerivativeAggregation.
func (*DerivativeAggregation) BucketsPath ¶
func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*DerivativeAggregation) Format ¶
func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation
Format to use on the output of this aggregation.
func (*DerivativeAggregation) GapInsertZeros ¶
func (a *DerivativeAggregation) GapInsertZeros() *DerivativeAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*DerivativeAggregation) GapPolicy ¶
func (a *DerivativeAggregation) GapPolicy(gapPolicy string) *DerivativeAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*DerivativeAggregation) GapSkip ¶
func (a *DerivativeAggregation) GapSkip() *DerivativeAggregation
GapSkip skips gaps in the series.
func (*DerivativeAggregation) Meta ¶
func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DerivativeAggregation) Source ¶
func (a *DerivativeAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*DerivativeAggregation) Unit ¶
func (a *DerivativeAggregation) Unit(unit string) *DerivativeAggregation
Unit sets the unit provided, e.g. "1d" or "1y". It is only useful when calculating the derivative using a date_histogram.
type DirectCandidateGenerator ¶
type DirectCandidateGenerator struct {
// contains filtered or unexported fields
}
DirectCandidateGenerator implements a direct candidate generator. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewDirectCandidateGenerator ¶
func NewDirectCandidateGenerator(field string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Accuracy ¶
func (g *DirectCandidateGenerator) Accuracy(accuracy float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Field ¶
func (g *DirectCandidateGenerator) Field(field string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxEdits ¶
func (g *DirectCandidateGenerator) MaxEdits(maxEdits int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxInspections ¶
func (g *DirectCandidateGenerator) MaxInspections(maxInspections int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxTermFreq ¶
func (g *DirectCandidateGenerator) MaxTermFreq(maxTermFreq float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MinDocFreq ¶
func (g *DirectCandidateGenerator) MinDocFreq(minDocFreq float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MinWordLength ¶
func (g *DirectCandidateGenerator) MinWordLength(minWordLength int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PostFilter ¶
func (g *DirectCandidateGenerator) PostFilter(postFilter string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PreFilter ¶
func (g *DirectCandidateGenerator) PreFilter(preFilter string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PrefixLength ¶
func (g *DirectCandidateGenerator) PrefixLength(prefixLength int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Size ¶
func (g *DirectCandidateGenerator) Size(size int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Sort ¶
func (g *DirectCandidateGenerator) Sort(sort string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Source ¶
func (g *DirectCandidateGenerator) Source() (interface{}, error)
func (*DirectCandidateGenerator) StringDistance ¶
func (g *DirectCandidateGenerator) StringDistance(stringDistance string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) SuggestMode ¶
func (g *DirectCandidateGenerator) SuggestMode(suggestMode string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Type ¶
func (g *DirectCandidateGenerator) Type() string
type DisMaxQuery ¶
type DisMaxQuery struct {
// contains filtered or unexported fields
}
DisMaxQuery is a query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-dis-max-query.html
func NewDisMaxQuery ¶
func NewDisMaxQuery() *DisMaxQuery
NewDisMaxQuery creates and initializes a new dis max query.
func (*DisMaxQuery) Boost ¶
func (q *DisMaxQuery) Boost(boost float64) *DisMaxQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*DisMaxQuery) Query ¶
func (q *DisMaxQuery) Query(queries ...Query) *DisMaxQuery
Query adds one or more queries to the dis max query.
func (*DisMaxQuery) QueryName ¶
func (q *DisMaxQuery) QueryName(queryName string) *DisMaxQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*DisMaxQuery) Source ¶
func (q *DisMaxQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
func (*DisMaxQuery) TieBreaker ¶
func (q *DisMaxQuery) TieBreaker(tieBreaker float64) *DisMaxQuery
TieBreaker is the factor by which the score of each non-maximum disjunct for a document is multiplied with and added into the final score.
If non-zero, the value should be small, on the order of 0.1, which says that 10 occurrences of word in a lower-scored field that is also in a higher scored field is just as good as a unique word in the lower scored field (i.e., one that is not in any higher scored field).
type DistanceFeatureQuery ¶
type DistanceFeatureQuery struct {
// contains filtered or unexported fields
}
DistanceFeatureQuery uses a script to provide a custom score for returned documents.
A DistanceFeatureQuery 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.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl-distance-feature-query.html
func NewDistanceFeatureQuery ¶
func NewDistanceFeatureQuery(field string, origin interface{}, pivot string) *DistanceFeatureQuery
NewDistanceFeatureQuery creates and initializes a new script_score query.
func (*DistanceFeatureQuery) Boost ¶
func (q *DistanceFeatureQuery) Boost(boost float64) *DistanceFeatureQuery
Boost sets the boost for this query.
func (*DistanceFeatureQuery) Field ¶
func (q *DistanceFeatureQuery) Field(name string) *DistanceFeatureQuery
Field to be used in the DistanceFeatureQuery.
func (*DistanceFeatureQuery) Origin ¶
func (q *DistanceFeatureQuery) Origin(origin interface{}) *DistanceFeatureQuery
Origin is the date or point of origin used to calculate distances.
If the field 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 is a geo_point field, the origin must be a GeoPoint.
func (*DistanceFeatureQuery) Pivot ¶
func (q *DistanceFeatureQuery) Pivot(pivot string) *DistanceFeatureQuery
Pivot is distance from the origin at which relevance scores receive half of the boost value.
If field is a date or date_nanos field, the pivot value must be a time unit, such as "1h" or "10d".
If field is a geo_point field, the pivot value must be a distance unit, such as "1km" or "12m". You can pass a string, or a GeoPoint.
func (*DistanceFeatureQuery) QueryName ¶
func (q *DistanceFeatureQuery) QueryName(queryName string) *DistanceFeatureQuery
QueryName sets the query name for the filter.
func (*DistanceFeatureQuery) Source ¶
func (q *DistanceFeatureQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type DiversifiedSamplerAggregation ¶
type DiversifiedSamplerAggregation struct {
// contains filtered or unexported fields
}
DiversifiedSamplerAggregation Like the ‘sampler` aggregation this is a filtering aggregation used to limit any sub aggregations’ processing to a sample of the top-scoring documents. The diversified_sampler aggregation adds the ability to limit the number of matches that share a common value such as an "author".
func NewDiversifiedSamplerAggregation ¶
func NewDiversifiedSamplerAggregation() *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) ExecutionHint ¶
func (a *DiversifiedSamplerAggregation) ExecutionHint(hint string) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) Field ¶
func (a *DiversifiedSamplerAggregation) Field(field string) *DiversifiedSamplerAggregation
Field on which the aggregation is processed.
func (*DiversifiedSamplerAggregation) MaxDocsPerValue ¶
func (a *DiversifiedSamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) Meta ¶
func (a *DiversifiedSamplerAggregation) Meta(metaData map[string]interface{}) *DiversifiedSamplerAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DiversifiedSamplerAggregation) Script ¶
func (a *DiversifiedSamplerAggregation) Script(script *Script) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) ShardSize ¶
func (a *DiversifiedSamplerAggregation) ShardSize(shardSize int) *DiversifiedSamplerAggregation
ShardSize sets the maximum number of docs returned from each shard.
func (*DiversifiedSamplerAggregation) Source ¶
func (a *DiversifiedSamplerAggregation) Source() (interface{}, error)
func (*DiversifiedSamplerAggregation) SubAggregation ¶
func (a *DiversifiedSamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *DiversifiedSamplerAggregation
type DocvalueField ¶
DocvalueField represents a docvalue field, its name and its format (optional).
func (DocvalueField) Source ¶
func (d DocvalueField) Source() (interface{}, error)
Source serializes the DocvalueField into JSON.
type DocvalueFields ¶
type DocvalueFields []DocvalueField
DocvalueFields is a slice of DocvalueField instances.
func (DocvalueFields) Source ¶
func (d DocvalueFields) Source() (interface{}, error)
Source serializes the DocvalueFields into JSON.
type EWMAMovAvgModel ¶
type EWMAMovAvgModel struct {
// contains filtered or unexported fields
}
EWMAMovAvgModel calculates an exponentially weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html#_ewma_exponentially_weighted
func NewEWMAMovAvgModel ¶
func NewEWMAMovAvgModel() *EWMAMovAvgModel
NewEWMAMovAvgModel creates and initializes a new EWMAMovAvgModel.
func (*EWMAMovAvgModel) Alpha ¶
func (m *EWMAMovAvgModel) Alpha(alpha float64) *EWMAMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*EWMAMovAvgModel) Settings ¶
func (m *EWMAMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type Error ¶
type Error struct { Status int `json:"status"` Details *ErrorDetails `json:"error,omitempty"` }
Error encapsulates error details as returned from Elasticsearch.
type ErrorDetails ¶
type ErrorDetails struct { Type string `json:"type"` Reason string `json:"reason"` ResourceType string `json:"resource.type,omitempty"` ResourceId string `json:"resource.id,omitempty"` Index string `json:"index,omitempty"` Phase string `json:"phase,omitempty"` Grouped bool `json:"grouped,omitempty"` CausedBy map[string]interface{} `json:"caused_by,omitempty"` RootCause []*ErrorDetails `json:"root_cause,omitempty"` Suppressed []*ErrorDetails `json:"suppressed,omitempty"` FailedShards []map[string]interface{} `json:"failed_shards,omitempty"` Header map[string]interface{} `json:"header,omitempty"` ScriptStack []string `json:"script_stack,omitempty"` // from ScriptException Script string `json:"script,omitempty"` // from ScriptException Lang string `json:"lang,omitempty"` // from ScriptException Position *ScriptErrorPosition `json:"position,omitempty"` // from ScriptException (7.7+) }
ErrorDetails encapsulate error details from Elasticsearch. It is used in e.g. elastic.Error and elastic.BulkResponseItem.
type ExistsQuery ¶
type ExistsQuery struct {
// contains filtered or unexported fields
}
ExistsQuery is a query that only matches on documents that the field has a value in them.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-exists-query.html
func NewExistsQuery ¶
func NewExistsQuery(name string) *ExistsQuery
NewExistsQuery creates and initializes a new exists query.
func (*ExistsQuery) QueryName ¶
func (q *ExistsQuery) QueryName(queryName string) *ExistsQuery
QueryName sets the query name for the filter that can be used when searching for matched queries per hit.
func (*ExistsQuery) Source ¶
func (q *ExistsQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
type ExponentialDecayFunction ¶
type ExponentialDecayFunction struct {
// contains filtered or unexported fields
}
ExponentialDecayFunction builds an exponential decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html for details.
func NewExponentialDecayFunction ¶
func NewExponentialDecayFunction() *ExponentialDecayFunction
NewExponentialDecayFunction creates a new ExponentialDecayFunction.
func (*ExponentialDecayFunction) Decay ¶
func (fn *ExponentialDecayFunction) Decay(decay float64) *ExponentialDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*ExponentialDecayFunction) FieldName ¶
func (fn *ExponentialDecayFunction) FieldName(fieldName string) *ExponentialDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*ExponentialDecayFunction) GetWeight ¶
func (fn *ExponentialDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*ExponentialDecayFunction) MultiValueMode ¶
func (fn *ExponentialDecayFunction) MultiValueMode(mode string) *ExponentialDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*ExponentialDecayFunction) Name ¶
func (fn *ExponentialDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*ExponentialDecayFunction) Offset ¶
func (fn *ExponentialDecayFunction) Offset(offset interface{}) *ExponentialDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*ExponentialDecayFunction) Origin ¶
func (fn *ExponentialDecayFunction) Origin(origin interface{}) *ExponentialDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*ExponentialDecayFunction) Scale ¶
func (fn *ExponentialDecayFunction) Scale(scale interface{}) *ExponentialDecayFunction
Scale defines the scale to be used with Decay.
func (*ExponentialDecayFunction) Source ¶
func (fn *ExponentialDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*ExponentialDecayFunction) Weight ¶
func (fn *ExponentialDecayFunction) Weight(weight float64) *ExponentialDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type ExtendedStatsAggregation ¶
type ExtendedStatsAggregation struct {
// contains filtered or unexported fields
}
ExtendedExtendedStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-extendedstats-aggregation.html
func NewExtendedStatsAggregation ¶
func NewExtendedStatsAggregation() *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Field ¶
func (a *ExtendedStatsAggregation) Field(field string) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Format ¶
func (a *ExtendedStatsAggregation) Format(format string) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Meta ¶
func (a *ExtendedStatsAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ExtendedStatsAggregation) Missing ¶
func (a *ExtendedStatsAggregation) Missing(missing interface{}) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Script ¶
func (a *ExtendedStatsAggregation) Script(script *Script) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Sigma ¶
func (a *ExtendedStatsAggregation) Sigma(sigma float64) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Source ¶
func (a *ExtendedStatsAggregation) Source() (interface{}, error)
func (*ExtendedStatsAggregation) SubAggregation ¶
func (a *ExtendedStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *ExtendedStatsAggregation
type ExtendedStatsBucketAggregation ¶
type ExtendedStatsBucketAggregation struct {
// contains filtered or unexported fields
}
ExtendedStatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
This aggregation provides a few more statistics (sum of squares, standard deviation, etc) compared to the stats_bucket aggregation. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-extended-stats-bucket-aggregation.html
func NewExtendedStatsBucketAggregation ¶
func NewExtendedStatsBucketAggregation() *ExtendedStatsBucketAggregation
NewExtendedStatsBucketAggregation creates and initializes a new ExtendedStatsBucketAggregation.
func (*ExtendedStatsBucketAggregation) BucketsPath ¶
func (s *ExtendedStatsBucketAggregation) BucketsPath(bucketsPaths ...string) *ExtendedStatsBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*ExtendedStatsBucketAggregation) Format ¶
func (s *ExtendedStatsBucketAggregation) Format(format string) *ExtendedStatsBucketAggregation
Format to use on the output of this aggregation.
func (*ExtendedStatsBucketAggregation) GapInsertZeros ¶
func (s *ExtendedStatsBucketAggregation) GapInsertZeros() *ExtendedStatsBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*ExtendedStatsBucketAggregation) GapPolicy ¶
func (s *ExtendedStatsBucketAggregation) GapPolicy(gapPolicy string) *ExtendedStatsBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*ExtendedStatsBucketAggregation) GapSkip ¶
func (s *ExtendedStatsBucketAggregation) GapSkip() *ExtendedStatsBucketAggregation
GapSkip skips gaps in the series.
func (*ExtendedStatsBucketAggregation) Meta ¶
func (s *ExtendedStatsBucketAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ExtendedStatsBucketAggregation) Sigma ¶
func (s *ExtendedStatsBucketAggregation) Sigma(sigma float32) *ExtendedStatsBucketAggregation
Sigma sets number of standard deviations above/below the mean to display
func (*ExtendedStatsBucketAggregation) Source ¶
func (s *ExtendedStatsBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type FailedNodeException ¶
type FailedNodeException struct { *ErrorDetails NodeId string `json:"node_id"` }
FailedNodeException returns an error on the node level.
type FetchSourceContext ¶
type FetchSourceContext struct {
// contains filtered or unexported fields
}
FetchSourceContext enables source filtering, i.e. it allows control over how the _source field is returned with every hit. It is used with various endpoints, e.g. when searching for documents, retrieving individual documents, or even updating documents.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-source-filtering.html for details.
func NewFetchSourceContext ¶
func NewFetchSourceContext(fetchSource bool) *FetchSourceContext
NewFetchSourceContext returns a new FetchSourceContext.
func (*FetchSourceContext) Exclude ¶
func (fsc *FetchSourceContext) Exclude(excludes ...string) *FetchSourceContext
Exclude indicates to exclude specific parts of the _source. Wildcards are allowed here.
func (*FetchSourceContext) FetchSource ¶
func (fsc *FetchSourceContext) FetchSource() bool
FetchSource indicates whether to return the _source.
func (*FetchSourceContext) Include ¶
func (fsc *FetchSourceContext) Include(includes ...string) *FetchSourceContext
Include indicates to return specific parts of the _source. Wildcards are allowed here.
func (*FetchSourceContext) Query ¶
func (fsc *FetchSourceContext) Query() url.Values
Query returns the parameters in a form suitable for a URL query string.
func (*FetchSourceContext) SetFetchSource ¶
func (fsc *FetchSourceContext) SetFetchSource(fetchSource bool)
SetFetchSource specifies whether to return the _source.
func (*FetchSourceContext) Source ¶
func (fsc *FetchSourceContext) Source() (interface{}, error)
Source returns the JSON-serializable data to be used in a body.
type FieldSort ¶
type FieldSort struct { Sorter // contains filtered or unexported fields }
FieldSort sorts by a given field.
func NewFieldSort ¶
NewFieldSort creates a new FieldSort.
func (*FieldSort) Filter ¶
Filter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*FieldSort) Missing ¶
Missing sets the value to be used when a field is missing in a document. You can also use "_last" or "_first" to sort missing last or first respectively.
func (*FieldSort) Nested ¶
func (s *FieldSort) Nested(nested *NestedSort) *FieldSort
Nested is available starting with 6.1 and will replace Filter and Path.
func (*FieldSort) NestedFilter ¶
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting. Deprecated: Use Filter instead.
func (*FieldSort) NestedPath ¶
NestedPath is used if sorting occurs on a field that is inside a nested object. Deprecated: Use Path instead.
func (*FieldSort) NestedSort ¶
func (s *FieldSort) NestedSort(nestedSort *NestedSort) *FieldSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath. Deprecated: Use Nested instead.
func (*FieldSort) SortMode ¶
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min, max, sum, and avg.
func (*FieldSort) UnmappedType ¶
UnmappedType sets the type to use when the current field is not mapped in an index.
type FieldStatistics ¶
type FieldValueFactorFunction ¶
type FieldValueFactorFunction struct {
// contains filtered or unexported fields
}
FieldValueFactorFunction is a function score function that allows you to use a field from a document to influence the score. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_field_value_factor.
func NewFieldValueFactorFunction ¶
func NewFieldValueFactorFunction() *FieldValueFactorFunction
NewFieldValueFactorFunction initializes and returns a new FieldValueFactorFunction.
func (*FieldValueFactorFunction) Factor ¶
func (fn *FieldValueFactorFunction) Factor(factor float64) *FieldValueFactorFunction
Factor is the (optional) factor to multiply the field with. If you do not specify a factor, the default is 1.
func (*FieldValueFactorFunction) Field ¶
func (fn *FieldValueFactorFunction) Field(field string) *FieldValueFactorFunction
Field is the field to be extracted from the document.
func (*FieldValueFactorFunction) GetWeight ¶
func (fn *FieldValueFactorFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*FieldValueFactorFunction) Missing ¶
func (fn *FieldValueFactorFunction) Missing(missing float64) *FieldValueFactorFunction
Missing is used if a document does not have that field.
func (*FieldValueFactorFunction) Modifier ¶
func (fn *FieldValueFactorFunction) Modifier(modifier string) *FieldValueFactorFunction
Modifier to apply to the field value. It can be one of: none, log, log1p, log2p, ln, ln1p, ln2p, square, sqrt, or reciprocal. Defaults to: none.
func (*FieldValueFactorFunction) Name ¶
func (fn *FieldValueFactorFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*FieldValueFactorFunction) Source ¶
func (fn *FieldValueFactorFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*FieldValueFactorFunction) Weight ¶
func (fn *FieldValueFactorFunction) Weight(weight float64) *FieldValueFactorFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type FilterAggregation ¶
type FilterAggregation struct {
// contains filtered or unexported fields
}
FilterAggregation defines a single bucket of all the documents in the current document set context that match a specified filter. Often this will be used to narrow down the current aggregation context to a specific set of documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-filter-aggregation.html
func NewFilterAggregation ¶
func NewFilterAggregation() *FilterAggregation
func (*FilterAggregation) Filter ¶
func (a *FilterAggregation) Filter(filter Query) *FilterAggregation
func (*FilterAggregation) Meta ¶
func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation
Meta sets the meta data to be included in the aggregation response.
func (*FilterAggregation) Source ¶
func (a *FilterAggregation) Source() (interface{}, error)
func (*FilterAggregation) SubAggregation ¶
func (a *FilterAggregation) SubAggregation(name string, subAggregation Aggregation) *FilterAggregation
type FiltersAggregation ¶
type FiltersAggregation struct {
// contains filtered or unexported fields
}
FiltersAggregation defines a multi bucket aggregations where each bucket is associated with a filter. Each bucket will collect all documents that match its associated filter.
Notice that the caller has to decide whether to add filters by name (using FilterWithName) or unnamed filters (using Filter or Filters). One cannot use both named and unnamed filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-filters-aggregation.html
func NewFiltersAggregation ¶
func NewFiltersAggregation() *FiltersAggregation
NewFiltersAggregation initializes a new FiltersAggregation.
func (*FiltersAggregation) Filter ¶
func (a *FiltersAggregation) Filter(filter Query) *FiltersAggregation
Filter adds an unnamed filter. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) FilterWithName ¶
func (a *FiltersAggregation) FilterWithName(name string, filter Query) *FiltersAggregation
FilterWithName adds a filter with a specific name. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) Filters ¶
func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation
Filters adds one or more unnamed filters. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) Meta ¶
func (a *FiltersAggregation) Meta(metaData map[string]interface{}) *FiltersAggregation
Meta sets the meta data to be included in the aggregation response.
func (*FiltersAggregation) OtherBucket ¶
func (a *FiltersAggregation) OtherBucket(otherBucket bool) *FiltersAggregation
OtherBucket indicates whether to include a bucket for documents not matching any filter.
func (*FiltersAggregation) OtherBucketKey ¶
func (a *FiltersAggregation) OtherBucketKey(key string) *FiltersAggregation
OtherBucketKey sets the key to use for the bucket for documents not matching any filter.
func (*FiltersAggregation) Source ¶
func (a *FiltersAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface. If the aggregation is invalid, an error is returned. This may e.g. happen if you mixed named and unnamed filters.
func (*FiltersAggregation) SubAggregation ¶
func (a *FiltersAggregation) SubAggregation(name string, subAggregation Aggregation) *FiltersAggregation
SubAggregation adds a sub-aggregation to this aggregation.
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.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html
func NewFunctionScoreQuery ¶
func NewFunctionScoreQuery() *FunctionScoreQuery
NewFunctionScoreQuery creates and initializes a new function score query.
func (*FunctionScoreQuery) Add ¶
func (q *FunctionScoreQuery) Add(filter Query, scoreFunc ScoreFunction) *FunctionScoreQuery
Add adds a score function that will execute on all the documents matching the filter.
func (*FunctionScoreQuery) AddScoreFunc ¶
func (q *FunctionScoreQuery) AddScoreFunc(scoreFunc ScoreFunction) *FunctionScoreQuery
AddScoreFunc adds a score function that will execute the function on all documents.
func (*FunctionScoreQuery) Boost ¶
func (q *FunctionScoreQuery) Boost(boost float64) *FunctionScoreQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*FunctionScoreQuery) BoostMode ¶
func (q *FunctionScoreQuery) BoostMode(boostMode string) *FunctionScoreQuery
BoostMode defines how the combined result of score functions will influence the final score together with the sub query score.
func (*FunctionScoreQuery) Filter ¶
func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery
Filter sets the filter for the function score query.
func (*FunctionScoreQuery) MaxBoost ¶
func (q *FunctionScoreQuery) MaxBoost(maxBoost float64) *FunctionScoreQuery
MaxBoost is the maximum boost that will be applied by function score.
func (*FunctionScoreQuery) MinScore ¶
func (q *FunctionScoreQuery) MinScore(minScore float64) *FunctionScoreQuery
MinScore sets the minimum score.
func (*FunctionScoreQuery) Query ¶
func (q *FunctionScoreQuery) Query(query Query) *FunctionScoreQuery
Query sets the query for the function score query.
func (*FunctionScoreQuery) ScoreMode ¶
func (q *FunctionScoreQuery) ScoreMode(scoreMode string) *FunctionScoreQuery
ScoreMode defines how results of individual score functions will be aggregated. Can be first, avg, max, sum, min, or multiply.
func (*FunctionScoreQuery) Source ¶
func (q *FunctionScoreQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type FuzzyCompletionSuggesterOptions ¶
type FuzzyCompletionSuggesterOptions struct {
// contains filtered or unexported fields
}
FuzzyCompletionSuggesterOptions represents the options for fuzzy completion suggester.
func NewFuzzyCompletionSuggesterOptions ¶
func NewFuzzyCompletionSuggesterOptions() *FuzzyCompletionSuggesterOptions
NewFuzzyCompletionSuggesterOptions initializes a new FuzzyCompletionSuggesterOptions instance.
func (*FuzzyCompletionSuggesterOptions) EditDistance ¶
func (o *FuzzyCompletionSuggesterOptions) EditDistance(editDistance interface{}) *FuzzyCompletionSuggesterOptions
EditDistance specifies the maximum number of edits, e.g. a number like "1" or "2" or a string like "0..2" or ">5".
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/common-options.html#fuzziness for details.
func (*FuzzyCompletionSuggesterOptions) MaxDeterminizedStates ¶
func (o *FuzzyCompletionSuggesterOptions) MaxDeterminizedStates(max int) *FuzzyCompletionSuggesterOptions
MaxDeterminizedStates is currently undocumented in Elasticsearch. It represents the maximum automaton states allowed for fuzzy expansion.
func (*FuzzyCompletionSuggesterOptions) MinLength ¶
func (o *FuzzyCompletionSuggesterOptions) MinLength(minLength int) *FuzzyCompletionSuggesterOptions
MinLength represents the minimum length of the input before fuzzy suggestions are returned (defaults to 3).
func (*FuzzyCompletionSuggesterOptions) PrefixLength ¶
func (o *FuzzyCompletionSuggesterOptions) PrefixLength(prefixLength int) *FuzzyCompletionSuggesterOptions
PrefixLength represents the minimum length of the input, which is not checked for fuzzy alternatives (defaults to 1).
func (*FuzzyCompletionSuggesterOptions) Source ¶
func (o *FuzzyCompletionSuggesterOptions) Source() (interface{}, error)
Source creates the JSON data.
func (*FuzzyCompletionSuggesterOptions) Transpositions ¶
func (o *FuzzyCompletionSuggesterOptions) Transpositions(transpositions bool) *FuzzyCompletionSuggesterOptions
Transpositions, if set to true, are counted as one change instead of two (defaults to true).
func (*FuzzyCompletionSuggesterOptions) UnicodeAware ¶
func (o *FuzzyCompletionSuggesterOptions) UnicodeAware(unicodeAware bool) *FuzzyCompletionSuggesterOptions
UnicodeAware, if true, all measurements (like fuzzy edit distance, transpositions, and lengths) are measured in Unicode code points instead of in bytes. This is slightly slower than raw bytes, so it is set to false by default.
type FuzzyQuery ¶
type FuzzyQuery struct {
// contains filtered or unexported fields
}
FuzzyQuery uses similarity based on Levenshtein edit distance for string fields, and a +/- margin on numeric and date fields.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-fuzzy-query.html
func NewFuzzyQuery ¶
func NewFuzzyQuery(name string, value interface{}) *FuzzyQuery
NewFuzzyQuery creates a new fuzzy query.
func (*FuzzyQuery) Boost ¶
func (q *FuzzyQuery) Boost(boost float64) *FuzzyQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*FuzzyQuery) Fuzziness ¶
func (q *FuzzyQuery) Fuzziness(fuzziness interface{}) *FuzzyQuery
Fuzziness can be an integer/long like 0, 1 or 2 as well as strings like "auto", "0..1", "1..4" or "0.0..1.0".
func (*FuzzyQuery) MaxExpansions ¶
func (q *FuzzyQuery) MaxExpansions(maxExpansions int) *FuzzyQuery
func (*FuzzyQuery) PrefixLength ¶
func (q *FuzzyQuery) PrefixLength(prefixLength int) *FuzzyQuery
func (*FuzzyQuery) QueryName ¶
func (q *FuzzyQuery) QueryName(queryName string) *FuzzyQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*FuzzyQuery) Rewrite ¶
func (q *FuzzyQuery) Rewrite(rewrite string) *FuzzyQuery
func (*FuzzyQuery) Source ¶
func (q *FuzzyQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*FuzzyQuery) Transpositions ¶
func (q *FuzzyQuery) Transpositions(transpositions bool) *FuzzyQuery
type GNDSignificanceHeuristic ¶
type GNDSignificanceHeuristic struct {
// contains filtered or unexported fields
}
GNDSignificanceHeuristic implements the "Google Normalized Distance" as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_google_normalized_distance for details.
func NewGNDSignificanceHeuristic ¶
func NewGNDSignificanceHeuristic() *GNDSignificanceHeuristic
NewGNDSignificanceHeuristic implements a new GNDSignificanceHeuristic.
func (*GNDSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *GNDSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *GNDSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*GNDSignificanceHeuristic) Name ¶
func (sh *GNDSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*GNDSignificanceHeuristic) Source ¶
func (sh *GNDSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type GaussDecayFunction ¶
type GaussDecayFunction struct {
// contains filtered or unexported fields
}
GaussDecayFunction builds a gauss decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html for details.
func NewGaussDecayFunction ¶
func NewGaussDecayFunction() *GaussDecayFunction
NewGaussDecayFunction returns a new GaussDecayFunction.
func (*GaussDecayFunction) Decay ¶
func (fn *GaussDecayFunction) Decay(decay float64) *GaussDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*GaussDecayFunction) FieldName ¶
func (fn *GaussDecayFunction) FieldName(fieldName string) *GaussDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*GaussDecayFunction) GetWeight ¶
func (fn *GaussDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*GaussDecayFunction) MultiValueMode ¶
func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*GaussDecayFunction) Name ¶
func (fn *GaussDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*GaussDecayFunction) Offset ¶
func (fn *GaussDecayFunction) Offset(offset interface{}) *GaussDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*GaussDecayFunction) Origin ¶
func (fn *GaussDecayFunction) Origin(origin interface{}) *GaussDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*GaussDecayFunction) Scale ¶
func (fn *GaussDecayFunction) Scale(scale interface{}) *GaussDecayFunction
Scale defines the scale to be used with Decay.
func (*GaussDecayFunction) Source ¶
func (fn *GaussDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*GaussDecayFunction) Weight ¶
func (fn *GaussDecayFunction) Weight(weight float64) *GaussDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type GeoBoundingBoxQuery ¶
type GeoBoundingBoxQuery struct {
// contains filtered or unexported fields
}
GeoBoundingBoxQuery allows to filter hits based on a point location using a bounding box.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-geo-bounding-box-query.html
func NewGeoBoundingBoxQuery ¶
func NewGeoBoundingBoxQuery(name string) *GeoBoundingBoxQuery
NewGeoBoundingBoxQuery creates and initializes a new GeoBoundingBoxQuery.
func (*GeoBoundingBoxQuery) BottomLeft ¶
func (q *GeoBoundingBoxQuery) BottomLeft(bottom, left float64) *GeoBoundingBoxQuery
BottomLeft position from longitude (left) and latitude (bottom).
func (*GeoBoundingBoxQuery) BottomLeftFromGeoHash ¶
func (q *GeoBoundingBoxQuery) BottomLeftFromGeoHash(bottomLeft string) *GeoBoundingBoxQuery
BottomLeftFromGeoHash from a Geo hash.
func (*GeoBoundingBoxQuery) BottomLeftFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) BottomLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
BottomLeftFromGeoPoint from a GeoPoint.
func (*GeoBoundingBoxQuery) BottomRight ¶
func (q *GeoBoundingBoxQuery) BottomRight(bottom, right float64) *GeoBoundingBoxQuery
BottomRight position from longitude (right) and latitude (bottom).
func (*GeoBoundingBoxQuery) BottomRightFromGeoHash ¶
func (q *GeoBoundingBoxQuery) BottomRightFromGeoHash(bottomRight string) *GeoBoundingBoxQuery
BottomRightFromGeoHash from a Geo hash.
func (*GeoBoundingBoxQuery) BottomRightFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) BottomRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
BottomRightFromGeoPoint from a GeoPoint.
func (*GeoBoundingBoxQuery) IgnoreUnmapped ¶
func (q *GeoBoundingBoxQuery) IgnoreUnmapped(ignoreUnmapped bool) *GeoBoundingBoxQuery
IgnoreUnmapped indicates whether to ignore unmapped fields (and run a MatchNoDocsQuery in place of this).
func (*GeoBoundingBoxQuery) QueryName ¶
func (q *GeoBoundingBoxQuery) QueryName(queryName string) *GeoBoundingBoxQuery
QueryName gives the query a name. It is used for caching.
func (*GeoBoundingBoxQuery) Source ¶
func (q *GeoBoundingBoxQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*GeoBoundingBoxQuery) TopLeft ¶
func (q *GeoBoundingBoxQuery) TopLeft(top, left float64) *GeoBoundingBoxQuery
TopLeft position from longitude (left) and latitude (top).
func (*GeoBoundingBoxQuery) TopLeftFromGeoHash ¶
func (q *GeoBoundingBoxQuery) TopLeftFromGeoHash(topLeft string) *GeoBoundingBoxQuery
TopLeftFromGeoHash from a Geo hash.
func (*GeoBoundingBoxQuery) TopLeftFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) TopLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
TopLeftFromGeoPoint from a GeoPoint.
func (*GeoBoundingBoxQuery) TopRight ¶
func (q *GeoBoundingBoxQuery) TopRight(top, right float64) *GeoBoundingBoxQuery
TopRight position from longitude (right) and latitude (top).
func (*GeoBoundingBoxQuery) TopRightFromGeoHash ¶
func (q *GeoBoundingBoxQuery) TopRightFromGeoHash(topRight string) *GeoBoundingBoxQuery
TopRightFromGeoHash from a Geo hash.
func (*GeoBoundingBoxQuery) TopRightFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) TopRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
TopRightFromGeoPoint from a GeoPoint.
func (*GeoBoundingBoxQuery) Type ¶
func (q *GeoBoundingBoxQuery) Type(typ string) *GeoBoundingBoxQuery
Type sets the type of executing the geo bounding box. It can be either memory or indexed. It defaults to memory.
func (*GeoBoundingBoxQuery) ValidationMethod ¶
func (q *GeoBoundingBoxQuery) ValidationMethod(method string) *GeoBoundingBoxQuery
ValidationMethod accepts IGNORE_MALFORMED, COERCE, and STRICT (default). IGNORE_MALFORMED accepts geo points with invalid lat/lon. COERCE tries to infer the correct lat/lon.
func (*GeoBoundingBoxQuery) WKT ¶
func (q *GeoBoundingBoxQuery) WKT(wkt interface{}) *GeoBoundingBoxQuery
WKT initializes the bounding box from Well-Known Text (WKT), e.g. "BBOX (-74.1, -71.12, 40.73, 40.01)".
type GeoBoundsAggregation ¶
type GeoBoundsAggregation struct {
// contains filtered or unexported fields
}
GeoBoundsAggregation is a metric aggregation that computes the bounding box containing all geo_point values for a field. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-geobounds-aggregation.html
func NewGeoBoundsAggregation ¶
func NewGeoBoundsAggregation() *GeoBoundsAggregation
func (*GeoBoundsAggregation) Field ¶
func (a *GeoBoundsAggregation) Field(field string) *GeoBoundsAggregation
func (*GeoBoundsAggregation) Meta ¶
func (a *GeoBoundsAggregation) Meta(metaData map[string]interface{}) *GeoBoundsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoBoundsAggregation) Script ¶
func (a *GeoBoundsAggregation) Script(script *Script) *GeoBoundsAggregation
func (*GeoBoundsAggregation) Source ¶
func (a *GeoBoundsAggregation) Source() (interface{}, error)
func (*GeoBoundsAggregation) SubAggregation ¶
func (a *GeoBoundsAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoBoundsAggregation
func (*GeoBoundsAggregation) WrapLongitude ¶
func (a *GeoBoundsAggregation) WrapLongitude(wrapLongitude bool) *GeoBoundsAggregation
type GeoCentroidAggregation ¶
type GeoCentroidAggregation struct {
// contains filtered or unexported fields
}
GeoCentroidAggregation is a metric aggregation that computes the weighted centroid from all coordinate values for a Geo-point datatype field. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-geocentroid-aggregation.html
func NewGeoCentroidAggregation ¶
func NewGeoCentroidAggregation() *GeoCentroidAggregation
func (*GeoCentroidAggregation) Field ¶
func (a *GeoCentroidAggregation) Field(field string) *GeoCentroidAggregation
func (*GeoCentroidAggregation) Meta ¶
func (a *GeoCentroidAggregation) Meta(metaData map[string]interface{}) *GeoCentroidAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoCentroidAggregation) Script ¶
func (a *GeoCentroidAggregation) Script(script *Script) *GeoCentroidAggregation
func (*GeoCentroidAggregation) Source ¶
func (a *GeoCentroidAggregation) Source() (interface{}, error)
func (*GeoCentroidAggregation) SubAggregation ¶
func (a *GeoCentroidAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoCentroidAggregation
type GeoDistanceAggregation ¶
type GeoDistanceAggregation struct {
// contains filtered or unexported fields
}
GeoDistanceAggregation is a multi-bucket aggregation that works on geo_point fields and conceptually works very similar to the range aggregation. The user can define a point of origin and a set of distance range buckets. The aggregation evaluate the distance of each document value from the origin point and determines the buckets it belongs to based on the ranges (a document belongs to a bucket if the distance between the document and the origin falls within the distance range of the bucket). See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geodistance-aggregation.html
func NewGeoDistanceAggregation ¶
func NewGeoDistanceAggregation() *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddRange ¶
func (a *GeoDistanceAggregation) AddRange(from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddRangeWithKey ¶
func (a *GeoDistanceAggregation) AddRangeWithKey(key string, from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedFrom ¶
func (a *GeoDistanceAggregation) AddUnboundedFrom(to float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedFromWithKey ¶
func (a *GeoDistanceAggregation) AddUnboundedFromWithKey(key string, to float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedTo ¶
func (a *GeoDistanceAggregation) AddUnboundedTo(from float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedToWithKey ¶
func (a *GeoDistanceAggregation) AddUnboundedToWithKey(key string, from float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Between ¶
func (a *GeoDistanceAggregation) Between(from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) BetweenWithKey ¶
func (a *GeoDistanceAggregation) BetweenWithKey(key string, from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) DistanceType ¶
func (a *GeoDistanceAggregation) DistanceType(distanceType string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Field ¶
func (a *GeoDistanceAggregation) Field(field string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Meta ¶
func (a *GeoDistanceAggregation) Meta(metaData map[string]interface{}) *GeoDistanceAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoDistanceAggregation) Point ¶
func (a *GeoDistanceAggregation) Point(latLon string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Source ¶
func (a *GeoDistanceAggregation) Source() (interface{}, error)
func (*GeoDistanceAggregation) SubAggregation ¶
func (a *GeoDistanceAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Unit ¶
func (a *GeoDistanceAggregation) Unit(unit string) *GeoDistanceAggregation
type GeoDistanceQuery ¶
type GeoDistanceQuery struct {
// contains filtered or unexported fields
}
GeoDistanceQuery filters documents that include only hits that exists within a specific distance from a geo point.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-geo-distance-query.html
func NewGeoDistanceQuery ¶
func NewGeoDistanceQuery(name string) *GeoDistanceQuery
NewGeoDistanceQuery creates and initializes a new GeoDistanceQuery.
func (*GeoDistanceQuery) Distance ¶
func (q *GeoDistanceQuery) Distance(distance string) *GeoDistanceQuery
func (*GeoDistanceQuery) DistanceType ¶
func (q *GeoDistanceQuery) DistanceType(distanceType string) *GeoDistanceQuery
func (*GeoDistanceQuery) GeoHash ¶
func (q *GeoDistanceQuery) GeoHash(geohash string) *GeoDistanceQuery
func (*GeoDistanceQuery) GeoPoint ¶
func (q *GeoDistanceQuery) GeoPoint(point *GeoPoint) *GeoDistanceQuery
func (*GeoDistanceQuery) Lat ¶
func (q *GeoDistanceQuery) Lat(lat float64) *GeoDistanceQuery
func (*GeoDistanceQuery) Lon ¶
func (q *GeoDistanceQuery) Lon(lon float64) *GeoDistanceQuery
func (*GeoDistanceQuery) Point ¶
func (q *GeoDistanceQuery) Point(lat, lon float64) *GeoDistanceQuery
func (*GeoDistanceQuery) QueryName ¶
func (q *GeoDistanceQuery) QueryName(queryName string) *GeoDistanceQuery
func (*GeoDistanceQuery) Source ¶
func (q *GeoDistanceQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type GeoDistanceSort ¶
type GeoDistanceSort struct { Sorter // contains filtered or unexported fields }
GeoDistanceSort allows for sorting by geographic distance. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-sort.html#_geo_distance_sorting.
func NewGeoDistanceSort ¶
func NewGeoDistanceSort(fieldName string) *GeoDistanceSort
NewGeoDistanceSort creates a new sorter for geo distances.
func (*GeoDistanceSort) Asc ¶
func (s *GeoDistanceSort) Asc() *GeoDistanceSort
Asc sets ascending sort order.
func (*GeoDistanceSort) Desc ¶
func (s *GeoDistanceSort) Desc() *GeoDistanceSort
Desc sets descending sort order.
func (*GeoDistanceSort) DistanceType ¶
func (s *GeoDistanceSort) DistanceType(distanceType string) *GeoDistanceSort
DistanceType describes how to compute the distance, e.g. "arc" or "plane". See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-sort.html#geo-sorting for details.
func (*GeoDistanceSort) FieldName ¶
func (s *GeoDistanceSort) FieldName(fieldName string) *GeoDistanceSort
FieldName specifies the name of the (geo) field to use for sorting.
func (*GeoDistanceSort) GeoDistance ¶
func (s *GeoDistanceSort) GeoDistance(geoDistance string) *GeoDistanceSort
GeoDistance is an alias for DistanceType.
func (*GeoDistanceSort) GeoHashes ¶
func (s *GeoDistanceSort) GeoHashes(geohashes ...string) *GeoDistanceSort
GeoHashes specifies the geo point to create the range distance aggregations from.
func (*GeoDistanceSort) IgnoreUnmapped ¶
func (s *GeoDistanceSort) IgnoreUnmapped(ignoreUnmapped bool) *GeoDistanceSort
IgnoreUnmapped indicates whether the unmapped field should be treated as a missing value. Setting it to true is equivalent to specifying an unmapped_type in the field sort. The default is false (unmapped field causes the search to fail).
func (*GeoDistanceSort) NestedFilter ¶
func (s *GeoDistanceSort) NestedFilter(nestedFilter Query) *GeoDistanceSort
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*GeoDistanceSort) NestedPath ¶
func (s *GeoDistanceSort) NestedPath(nestedPath string) *GeoDistanceSort
NestedPath is used if sorting occurs on a field that is inside a nested object.
func (*GeoDistanceSort) NestedSort ¶
func (s *GeoDistanceSort) NestedSort(nestedSort *NestedSort) *GeoDistanceSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath.
func (*GeoDistanceSort) Order ¶
func (s *GeoDistanceSort) Order(ascending bool) *GeoDistanceSort
Order defines whether sorting ascending (default) or descending.
func (*GeoDistanceSort) Point ¶
func (s *GeoDistanceSort) Point(lat, lon float64) *GeoDistanceSort
Point specifies a point to create the range distance aggregations from.
func (*GeoDistanceSort) Points ¶
func (s *GeoDistanceSort) Points(points ...*GeoPoint) *GeoDistanceSort
Points specifies the geo point(s) to create the range distance aggregations from.
func (*GeoDistanceSort) SortMode ¶
func (s *GeoDistanceSort) SortMode(sortMode string) *GeoDistanceSort
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min, max, sum, and avg.
func (*GeoDistanceSort) Source ¶
func (s *GeoDistanceSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*GeoDistanceSort) Unit ¶
func (s *GeoDistanceSort) Unit(unit string) *GeoDistanceSort
Unit specifies the distance unit to use. It defaults to km. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/common-options.html#distance-units for details.
type GeoHashGridAggregation ¶
type GeoHashGridAggregation struct {
// contains filtered or unexported fields
}
func NewGeoHashGridAggregation ¶
func NewGeoHashGridAggregation() *GeoHashGridAggregation
func (*GeoHashGridAggregation) Field ¶
func (a *GeoHashGridAggregation) Field(field string) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Meta ¶
func (a *GeoHashGridAggregation) Meta(metaData map[string]interface{}) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Precision ¶
func (a *GeoHashGridAggregation) Precision(precision interface{}) *GeoHashGridAggregation
Precision accepts the level as int value between 1 and 12 or Distance Units like "2km", "5mi" as described at https://www.elastic.co/guide/en/elasticsearch/reference/7.0/common-options.html#distance-units and https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geohashgrid-aggregation.html
func (*GeoHashGridAggregation) ShardSize ¶
func (a *GeoHashGridAggregation) ShardSize(shardSize int) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Size ¶
func (a *GeoHashGridAggregation) Size(size int) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Source ¶
func (a *GeoHashGridAggregation) Source() (interface{}, error)
func (*GeoHashGridAggregation) SubAggregation ¶
func (a *GeoHashGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoHashGridAggregation
type GeoPoint ¶
GeoPoint is a geographic position described via latitude and longitude.
func GeoPointFromLatLon ¶
GeoPointFromLatLon initializes a new GeoPoint by latitude and longitude.
func GeoPointFromString ¶
GeoPointFromString initializes a new GeoPoint by a string that is formatted as "{latitude},{longitude}", e.g. "40.10210,-70.12091".
func (*GeoPoint) MarshalJSON ¶
MarshalJSON encodes the GeoPoint to JSON.
type GeoPolygonQuery ¶
type GeoPolygonQuery struct {
// contains filtered or unexported fields
}
GeoPolygonQuery allows to include hits that only fall within a polygon of points.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-geo-polygon-query.html
func NewGeoPolygonQuery ¶
func NewGeoPolygonQuery(name string) *GeoPolygonQuery
NewGeoPolygonQuery creates and initializes a new GeoPolygonQuery.
func (*GeoPolygonQuery) AddGeoPoint ¶
func (q *GeoPolygonQuery) AddGeoPoint(point *GeoPoint) *GeoPolygonQuery
AddGeoPoint adds a GeoPoint.
func (*GeoPolygonQuery) AddPoint ¶
func (q *GeoPolygonQuery) AddPoint(lat, lon float64) *GeoPolygonQuery
AddPoint adds a point from latitude and longitude.
func (*GeoPolygonQuery) QueryName ¶
func (q *GeoPolygonQuery) QueryName(queryName string) *GeoPolygonQuery
func (*GeoPolygonQuery) Source ¶
func (q *GeoPolygonQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type GeoTileGridAggregation ¶
type GeoTileGridAggregation struct {
// contains filtered or unexported fields
}
func NewGeoTileGridAggregation ¶
func NewGeoTileGridAggregation() *GeoTileGridAggregation
NewGeoTileGridAggregation Create new bucket aggregation of Geotile grid type https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-geotilegrid-aggregation.html
func (*GeoTileGridAggregation) Bounds ¶
func (a *GeoTileGridAggregation) Bounds(boundingBox BoundingBox) *GeoTileGridAggregation
Bounds The bounding box to filter the points in the bucket. Optional.
func (*GeoTileGridAggregation) Field ¶
func (a *GeoTileGridAggregation) Field(field string) *GeoTileGridAggregation
Field The name of the field indexed with GeoPoints. Mandatory.
func (*GeoTileGridAggregation) Meta ¶
func (a *GeoTileGridAggregation) Meta(metaData map[string]interface{}) *GeoTileGridAggregation
Meta Sets the meta data to be included in the aggregation response.
func (*GeoTileGridAggregation) Precision ¶
func (a *GeoTileGridAggregation) Precision(precision int) *GeoTileGridAggregation
Precision The integer zoom of the key used to define cells/buckets in the results. Defaults to 7. Values outside of [0,29] will be rejected. Optional.
func (*GeoTileGridAggregation) ShardSize ¶
func (a *GeoTileGridAggregation) ShardSize(shardSize int) *GeoTileGridAggregation
ShardSize The maximum number of buckets to return from each shard. Optional.
func (*GeoTileGridAggregation) Size ¶
func (a *GeoTileGridAggregation) Size(size int) *GeoTileGridAggregation
Size The maximum number of buckets to return in the result structure. Optional.
func (*GeoTileGridAggregation) Source ¶
func (a *GeoTileGridAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*GeoTileGridAggregation) SubAggregation ¶
func (a *GeoTileGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoTileGridAggregation
SubAggregation Adds a sub-aggregation to this aggregation.
type GetScriptService ¶
type GetScriptService struct {
// contains filtered or unexported fields
}
GetScriptService reads a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html for details.
func NewGetScriptService ¶
func NewGetScriptService() *GetScriptService
NewGetScriptService creates a new GetScriptService.
func (*GetScriptService) ErrorTrace ¶
func (s *GetScriptService) ErrorTrace(errorTrace bool) *GetScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*GetScriptService) FilterPath ¶
func (s *GetScriptService) FilterPath(filterPath ...string) *GetScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*GetScriptService) Header ¶
func (s *GetScriptService) Header(name string, value string) *GetScriptService
Header adds a header to the request.
func (*GetScriptService) Headers ¶
func (s *GetScriptService) Headers(headers http.Header) *GetScriptService
Headers specifies the headers of the request.
func (*GetScriptService) Human ¶
func (s *GetScriptService) Human(human bool) *GetScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*GetScriptService) Id ¶
func (s *GetScriptService) Id(id string) *GetScriptService
Id is the script ID.
func (*GetScriptService) Pretty ¶
func (s *GetScriptService) Pretty(pretty bool) *GetScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
type GlobalAggregation ¶
type GlobalAggregation struct {
// contains filtered or unexported fields
}
GlobalAggregation defines a single bucket of all the documents within the search execution context. This context is defined by the indices and the document types you’re searching on, but is not influenced by the search query itself. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-global-aggregation.html
func NewGlobalAggregation ¶
func NewGlobalAggregation() *GlobalAggregation
func (*GlobalAggregation) Meta ¶
func (a *GlobalAggregation) Meta(metaData map[string]interface{}) *GlobalAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GlobalAggregation) Source ¶
func (a *GlobalAggregation) Source() (interface{}, error)
func (*GlobalAggregation) SubAggregation ¶
func (a *GlobalAggregation) SubAggregation(name string, subAggregation Aggregation) *GlobalAggregation
type HasChildQuery ¶
type HasChildQuery struct {
// contains filtered or unexported fields
}
HasChildQuery accepts a query and the child type to run against, and results in parent documents that have child docs matching the query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-has-child-query.html
func NewHasChildQuery ¶
func NewHasChildQuery(childType string, query Query) *HasChildQuery
NewHasChildQuery creates and initializes a new has_child query.
func (*HasChildQuery) Boost ¶
func (q *HasChildQuery) Boost(boost float64) *HasChildQuery
Boost sets the boost for this query.
func (*HasChildQuery) InnerHit ¶
func (q *HasChildQuery) InnerHit(innerHit *InnerHit) *HasChildQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*HasChildQuery) MaxChildren ¶
func (q *HasChildQuery) MaxChildren(maxChildren int) *HasChildQuery
MaxChildren defines the maximum number of children that are required to match for the parent to be considered a match.
func (*HasChildQuery) MinChildren ¶
func (q *HasChildQuery) MinChildren(minChildren int) *HasChildQuery
MinChildren defines the minimum number of children that are required to match for the parent to be considered a match.
func (*HasChildQuery) QueryName ¶
func (q *HasChildQuery) QueryName(queryName string) *HasChildQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*HasChildQuery) ScoreMode ¶
func (q *HasChildQuery) ScoreMode(scoreMode string) *HasChildQuery
ScoreMode defines how the scores from the matching child documents are mapped into the parent document. Allowed values are: min, max, avg, or none.
func (*HasChildQuery) ShortCircuitCutoff ¶
func (q *HasChildQuery) ShortCircuitCutoff(shortCircuitCutoff int) *HasChildQuery
ShortCircuitCutoff configures what cut off point only to evaluate parent documents that contain the matching parent id terms instead of evaluating all parent docs.
func (*HasChildQuery) Source ¶
func (q *HasChildQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type HasParentQuery ¶
type HasParentQuery struct {
// contains filtered or unexported fields
}
HasParentQuery accepts a query and a parent type. The query is executed in the parent document space which is specified by the parent type. This query returns child documents which associated parents have matched. For the rest has_parent query has the same options and works in the same manner as has_child query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-has-parent-query.html
func NewHasParentQuery ¶
func NewHasParentQuery(parentType string, query Query) *HasParentQuery
NewHasParentQuery creates and initializes a new has_parent query.
func (*HasParentQuery) Boost ¶
func (q *HasParentQuery) Boost(boost float64) *HasParentQuery
Boost sets the boost for this query.
func (*HasParentQuery) IgnoreUnmapped ¶
func (q *HasParentQuery) IgnoreUnmapped(ignore bool) *HasParentQuery
IgnoreUnmapped specifies whether unmapped types should be ignored. If set to false, the query failes when an unmapped type is found.
func (*HasParentQuery) InnerHit ¶
func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*HasParentQuery) QueryName ¶
func (q *HasParentQuery) QueryName(queryName string) *HasParentQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*HasParentQuery) Score ¶
func (q *HasParentQuery) Score(score bool) *HasParentQuery
Score defines if the parent score is mapped into the child documents.
func (*HasParentQuery) Source ¶
func (q *HasParentQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type Highlight ¶
type Highlight struct {
// contains filtered or unexported fields
}
Highlight allows highlighting search results on one or more fields. For details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-highlighting.html
func NewHighlight ¶
func NewHighlight() *Highlight
func (*Highlight) BoundaryChars ¶
func (*Highlight) BoundaryMaxScan ¶
func (*Highlight) BoundaryScannerLocale ¶
func (*Highlight) BoundaryScannerType ¶
func (*Highlight) Fields ¶
func (hl *Highlight) Fields(fields ...*HighlighterField) *Highlight
func (*Highlight) ForceSource ¶
func (*Highlight) FragmentSize ¶
func (*Highlight) Fragmenter ¶
func (*Highlight) HighlightFilter ¶
func (*Highlight) HighlightQuery ¶
func (*Highlight) HighlighterType ¶
func (*Highlight) MaxAnalyzedOffset ¶
func (*Highlight) NoMatchSize ¶
func (*Highlight) NumOfFragments ¶
func (*Highlight) RequireFieldMatch ¶
func (*Highlight) TagsSchema ¶
func (*Highlight) UseExplicitFieldOrder ¶
type HighlighterField ¶
type HighlighterField struct { Name string // contains filtered or unexported fields }
HighlighterField specifies a highlighted field.
func NewHighlighterField ¶
func NewHighlighterField(name string) *HighlighterField
func (*HighlighterField) BoundaryChars ¶
func (f *HighlighterField) BoundaryChars(boundaryChars ...rune) *HighlighterField
func (*HighlighterField) BoundaryMaxScan ¶
func (f *HighlighterField) BoundaryMaxScan(boundaryMaxScan int) *HighlighterField
func (*HighlighterField) ForceSource ¶
func (f *HighlighterField) ForceSource(forceSource bool) *HighlighterField
func (*HighlighterField) FragmentOffset ¶
func (f *HighlighterField) FragmentOffset(fragmentOffset int) *HighlighterField
func (*HighlighterField) FragmentSize ¶
func (f *HighlighterField) FragmentSize(fragmentSize int) *HighlighterField
func (*HighlighterField) Fragmenter ¶
func (f *HighlighterField) Fragmenter(fragmenter string) *HighlighterField
func (*HighlighterField) HighlightFilter ¶
func (f *HighlighterField) HighlightFilter(highlightFilter bool) *HighlighterField
func (*HighlighterField) HighlightQuery ¶
func (f *HighlighterField) HighlightQuery(highlightQuery Query) *HighlighterField
func (*HighlighterField) HighlighterType ¶
func (f *HighlighterField) HighlighterType(highlighterType string) *HighlighterField
func (*HighlighterField) MatchedFields ¶
func (f *HighlighterField) MatchedFields(matchedFields ...string) *HighlighterField
func (*HighlighterField) NoMatchSize ¶
func (f *HighlighterField) NoMatchSize(noMatchSize int) *HighlighterField
func (*HighlighterField) NumOfFragments ¶
func (f *HighlighterField) NumOfFragments(numOfFragments int) *HighlighterField
func (*HighlighterField) Options ¶
func (f *HighlighterField) Options(options map[string]interface{}) *HighlighterField
func (*HighlighterField) Order ¶
func (f *HighlighterField) Order(order string) *HighlighterField
func (*HighlighterField) PhraseLimit ¶
func (f *HighlighterField) PhraseLimit(phraseLimit int) *HighlighterField
func (*HighlighterField) PostTags ¶
func (f *HighlighterField) PostTags(postTags ...string) *HighlighterField
func (*HighlighterField) PreTags ¶
func (f *HighlighterField) PreTags(preTags ...string) *HighlighterField
func (*HighlighterField) RequireFieldMatch ¶
func (f *HighlighterField) RequireFieldMatch(requireFieldMatch bool) *HighlighterField
func (*HighlighterField) Source ¶
func (f *HighlighterField) Source() (interface{}, error)
type HistogramAggregation ¶
type HistogramAggregation struct {
// contains filtered or unexported fields
}
HistogramAggregation is a multi-bucket values source based aggregation that can be applied on numeric values extracted from the documents. It dynamically builds fixed size (a.k.a. interval) buckets over the values. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-histogram-aggregation.html
func NewHistogramAggregation ¶
func NewHistogramAggregation() *HistogramAggregation
func (*HistogramAggregation) ExtendedBounds ¶
func (a *HistogramAggregation) ExtendedBounds(min, max float64) *HistogramAggregation
func (*HistogramAggregation) ExtendedBoundsMax ¶
func (a *HistogramAggregation) ExtendedBoundsMax(max float64) *HistogramAggregation
func (*HistogramAggregation) ExtendedBoundsMin ¶
func (a *HistogramAggregation) ExtendedBoundsMin(min float64) *HistogramAggregation
func (*HistogramAggregation) Field ¶
func (a *HistogramAggregation) Field(field string) *HistogramAggregation
func (*HistogramAggregation) Interval ¶
func (a *HistogramAggregation) Interval(interval float64) *HistogramAggregation
Interval for this builder, must be greater than 0.
func (*HistogramAggregation) MaxBounds ¶
func (a *HistogramAggregation) MaxBounds(max float64) *HistogramAggregation
func (*HistogramAggregation) Meta ¶
func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation
Meta sets the meta data to be included in the aggregation response.
func (*HistogramAggregation) MinBounds ¶
func (a *HistogramAggregation) MinBounds(min float64) *HistogramAggregation
func (*HistogramAggregation) MinDocCount ¶
func (a *HistogramAggregation) MinDocCount(minDocCount int64) *HistogramAggregation
func (*HistogramAggregation) Missing ¶
func (a *HistogramAggregation) Missing(missing interface{}) *HistogramAggregation
Missing configures the value to use when documents miss a value.
func (*HistogramAggregation) Offset ¶
func (a *HistogramAggregation) Offset(offset float64) *HistogramAggregation
Offset into the histogram
func (*HistogramAggregation) Order ¶
func (a *HistogramAggregation) Order(order string, asc bool) *HistogramAggregation
Order specifies the sort order. Valid values for order are: "_key", "_count", a sub-aggregation name, or a sub-aggregation name with a metric.
func (*HistogramAggregation) OrderByAggregation ¶
func (a *HistogramAggregation) OrderByAggregation(aggName string, asc bool) *HistogramAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*HistogramAggregation) OrderByAggregationAndMetric ¶
func (a *HistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *HistogramAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*HistogramAggregation) OrderByCount ¶
func (a *HistogramAggregation) OrderByCount(asc bool) *HistogramAggregation
func (*HistogramAggregation) OrderByCountAsc ¶
func (a *HistogramAggregation) OrderByCountAsc() *HistogramAggregation
func (*HistogramAggregation) OrderByCountDesc ¶
func (a *HistogramAggregation) OrderByCountDesc() *HistogramAggregation
func (*HistogramAggregation) OrderByKey ¶
func (a *HistogramAggregation) OrderByKey(asc bool) *HistogramAggregation
func (*HistogramAggregation) OrderByKeyAsc ¶
func (a *HistogramAggregation) OrderByKeyAsc() *HistogramAggregation
func (*HistogramAggregation) OrderByKeyDesc ¶
func (a *HistogramAggregation) OrderByKeyDesc() *HistogramAggregation
func (*HistogramAggregation) Script ¶
func (a *HistogramAggregation) Script(script *Script) *HistogramAggregation
func (*HistogramAggregation) Source ¶
func (a *HistogramAggregation) Source() (interface{}, error)
func (*HistogramAggregation) SubAggregation ¶
func (a *HistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *HistogramAggregation
type HoltLinearMovAvgModel ¶
type HoltLinearMovAvgModel struct {
// contains filtered or unexported fields
}
HoltLinearMovAvgModel calculates a doubly exponential weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html#_holt_linear
func NewHoltLinearMovAvgModel ¶
func NewHoltLinearMovAvgModel() *HoltLinearMovAvgModel
NewHoltLinearMovAvgModel creates and initializes a new HoltLinearMovAvgModel.
func (*HoltLinearMovAvgModel) Alpha ¶
func (m *HoltLinearMovAvgModel) Alpha(alpha float64) *HoltLinearMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*HoltLinearMovAvgModel) Beta ¶
func (m *HoltLinearMovAvgModel) Beta(beta float64) *HoltLinearMovAvgModel
Beta is equivalent to Alpha but controls the smoothing of the trend instead of the data.
func (*HoltLinearMovAvgModel) Name ¶
func (m *HoltLinearMovAvgModel) Name() string
Name of the model.
func (*HoltLinearMovAvgModel) Settings ¶
func (m *HoltLinearMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type HoltWintersMovAvgModel ¶
type HoltWintersMovAvgModel struct {
// contains filtered or unexported fields
}
HoltWintersMovAvgModel calculates a triple exponential weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html#_holt_winters
func NewHoltWintersMovAvgModel ¶
func NewHoltWintersMovAvgModel() *HoltWintersMovAvgModel
NewHoltWintersMovAvgModel creates and initializes a new HoltWintersMovAvgModel.
func (*HoltWintersMovAvgModel) Alpha ¶
func (m *HoltWintersMovAvgModel) Alpha(alpha float64) *HoltWintersMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*HoltWintersMovAvgModel) Beta ¶
func (m *HoltWintersMovAvgModel) Beta(beta float64) *HoltWintersMovAvgModel
Beta is equivalent to Alpha but controls the smoothing of the trend instead of the data.
func (*HoltWintersMovAvgModel) Gamma ¶
func (m *HoltWintersMovAvgModel) Gamma(gamma float64) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Name ¶
func (m *HoltWintersMovAvgModel) Name() string
Name of the model.
func (*HoltWintersMovAvgModel) Pad ¶
func (m *HoltWintersMovAvgModel) Pad(pad bool) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Period ¶
func (m *HoltWintersMovAvgModel) Period(period int) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) SeasonalityType ¶
func (m *HoltWintersMovAvgModel) SeasonalityType(typ string) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Settings ¶
func (m *HoltWintersMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type IPRangeAggregation ¶
type IPRangeAggregation struct {
// contains filtered or unexported fields
}
IPRangeAggregation is a range aggregation that is dedicated for IP addresses.
func NewIPRangeAggregation ¶
func NewIPRangeAggregation() *IPRangeAggregation
func (*IPRangeAggregation) AddMaskRange ¶
func (a *IPRangeAggregation) AddMaskRange(mask string) *IPRangeAggregation
func (*IPRangeAggregation) AddMaskRangeWithKey ¶
func (a *IPRangeAggregation) AddMaskRangeWithKey(key, mask string) *IPRangeAggregation
func (*IPRangeAggregation) AddRange ¶
func (a *IPRangeAggregation) AddRange(from, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddRangeWithKey ¶
func (a *IPRangeAggregation) AddRangeWithKey(key, from, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedFrom ¶
func (a *IPRangeAggregation) AddUnboundedFrom(to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedFromWithKey ¶
func (a *IPRangeAggregation) AddUnboundedFromWithKey(key, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedTo ¶
func (a *IPRangeAggregation) AddUnboundedTo(from string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedToWithKey ¶
func (a *IPRangeAggregation) AddUnboundedToWithKey(key, from string) *IPRangeAggregation
func (*IPRangeAggregation) Between ¶
func (a *IPRangeAggregation) Between(from, to string) *IPRangeAggregation
func (*IPRangeAggregation) BetweenWithKey ¶
func (a *IPRangeAggregation) BetweenWithKey(key, from, to string) *IPRangeAggregation
func (*IPRangeAggregation) Field ¶
func (a *IPRangeAggregation) Field(field string) *IPRangeAggregation
func (*IPRangeAggregation) Gt ¶
func (a *IPRangeAggregation) Gt(from string) *IPRangeAggregation
func (*IPRangeAggregation) GtWithKey ¶
func (a *IPRangeAggregation) GtWithKey(key, from string) *IPRangeAggregation
func (*IPRangeAggregation) Keyed ¶
func (a *IPRangeAggregation) Keyed(keyed bool) *IPRangeAggregation
func (*IPRangeAggregation) Lt ¶
func (a *IPRangeAggregation) Lt(to string) *IPRangeAggregation
func (*IPRangeAggregation) LtWithKey ¶
func (a *IPRangeAggregation) LtWithKey(key, to string) *IPRangeAggregation
func (*IPRangeAggregation) Meta ¶
func (a *IPRangeAggregation) Meta(metaData map[string]interface{}) *IPRangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*IPRangeAggregation) Source ¶
func (a *IPRangeAggregation) Source() (interface{}, error)
func (*IPRangeAggregation) SubAggregation ¶
func (a *IPRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *IPRangeAggregation
type IPRangeAggregationEntry ¶
type IdsQuery ¶
type IdsQuery struct {
// contains filtered or unexported fields
}
IdsQuery filters documents that only have the provided ids. Note, this query uses the _uid field.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.6/query-dsl-ids-query.html
func NewIdsQuery ¶
NewIdsQuery creates and initializes a new ids query.
Notice that types are in the process of being removed. You should filter on a field instead.
type IndexBoost ¶
IndexBoost specifies an index by some boost factor.
func (IndexBoost) Source ¶
func (b IndexBoost) Source() (interface{}, error)
Source generates a JSON-serializable output for IndexBoost.
type IndexBoosts ¶
type IndexBoosts []IndexBoost
IndexBoosts is a slice of IndexBoost entities.
func (IndexBoosts) Source ¶
func (b IndexBoosts) Source() (interface{}, error)
Source generates a JSON-serializable output for IndexBoosts.
type InnerHit ¶
type InnerHit struct {
// contains filtered or unexported fields
}
InnerHit implements a simple join for parent/child, nested, and even top-level documents in Elasticsearch. It is an experimental feature for Elasticsearch versions 1.5 (or greater). See http://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-inner-hits.html for documentation.
See the tests for SearchSource, HasChildFilter, HasChildQuery, HasParentFilter, HasParentQuery, NestedFilter, and NestedQuery for usage examples.
func (*InnerHit) Collapse ¶
func (hit *InnerHit) Collapse(collapse *CollapseBuilder) *InnerHit
func (*InnerHit) DocvalueField ¶
func (*InnerHit) DocvalueFieldWithFormat ¶
func (hit *InnerHit) DocvalueFieldWithFormat(docvalueField DocvalueField) *InnerHit
func (*InnerHit) DocvalueFields ¶
func (*InnerHit) DocvalueFieldsWithFormat ¶
func (hit *InnerHit) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *InnerHit
func (*InnerHit) FetchSource ¶
func (*InnerHit) FetchSourceContext ¶
func (hit *InnerHit) FetchSourceContext(fetchSourceContext *FetchSourceContext) *InnerHit
func (*InnerHit) Highlighter ¶
func (*InnerHit) NoStoredFields ¶
func (*InnerHit) ScriptField ¶
func (hit *InnerHit) ScriptField(scriptField *ScriptField) *InnerHit
func (*InnerHit) ScriptFields ¶
func (hit *InnerHit) ScriptFields(scriptFields ...*ScriptField) *InnerHit
func (*InnerHit) SortWithInfo ¶
func (*InnerHit) StoredField ¶
func (*InnerHit) StoredFields ¶
func (*InnerHit) TrackScores ¶
type IntervalQuery ¶
type IntervalQuery struct {
// contains filtered or unexported fields
}
IntervalQuery returns documents based on the order and proximity of matching terms.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html
func NewIntervalQuery ¶
func NewIntervalQuery(field string, rule IntervalQueryRule) *IntervalQuery
NewIntervalQuery creates and initializes a new IntervalQuery.
func (*IntervalQuery) Source ¶
func (q *IntervalQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type IntervalQueryFilter ¶
type IntervalQueryFilter struct {
// contains filtered or unexported fields
}
IntervalQueryFilter specifies filters used in some IntervalQueryRule implementations, e.g. IntervalQueryRuleAllOf.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#interval_filter for details.
func NewIntervalQueryFilter ¶
func NewIntervalQueryFilter() *IntervalQueryFilter
NewIntervalQueryFilter initializes and creates a new IntervalQueryFilter.
func (*IntervalQueryFilter) After ¶
func (r *IntervalQueryFilter) After(after IntervalQueryRule) *IntervalQueryFilter
After specifies the query to be used to return intervals that follow an interval from the filter rule.
func (*IntervalQueryFilter) Before ¶
func (r *IntervalQueryFilter) Before(before IntervalQueryRule) *IntervalQueryFilter
Before specifies the query to be used to return intervals that occur before an interval from the filter rule.
func (*IntervalQueryFilter) ContainedBy ¶
func (r *IntervalQueryFilter) ContainedBy(containedBy IntervalQueryRule) *IntervalQueryFilter
ContainedBy specifies the query to be used to return intervals contained by an interval from the filter rule.
func (*IntervalQueryFilter) Containing ¶
func (r *IntervalQueryFilter) Containing(containing IntervalQueryRule) *IntervalQueryFilter
Containing specifies the query to be used to return intervals that contain an interval from the filter rule.
func (*IntervalQueryFilter) NotContainedBy ¶
func (r *IntervalQueryFilter) NotContainedBy(notContainedBy IntervalQueryRule) *IntervalQueryFilter
NotContainedBy specifies the query to be used to return intervals that are NOT contained by an interval from the filter rule.
func (*IntervalQueryFilter) NotContaining ¶
func (r *IntervalQueryFilter) NotContaining(notContaining IntervalQueryRule) *IntervalQueryFilter
NotContaining specifies the query to be used to return intervals that do NOT contain an interval from the filter rule.
func (*IntervalQueryFilter) NotOverlapping ¶
func (r *IntervalQueryFilter) NotOverlapping(notOverlapping IntervalQueryRule) *IntervalQueryFilter
NotOverlapping specifies the query to be used to return intervals that do NOT overlap with an interval from the filter rule.
func (*IntervalQueryFilter) Overlapping ¶
func (r *IntervalQueryFilter) Overlapping(overlapping IntervalQueryRule) *IntervalQueryFilter
Overlapping specifies the query to be used to return intervals that overlap with an interval from the filter rule.
func (*IntervalQueryFilter) Script ¶
func (r *IntervalQueryFilter) Script(script *Script) *IntervalQueryFilter
Script allows a script to be used to return matching documents. The script must return a boolean value, true or false.
func (*IntervalQueryFilter) Source ¶
func (r *IntervalQueryFilter) Source() (interface{}, error)
Source returns JSON for the function score query.
type IntervalQueryRule ¶
type IntervalQueryRule interface { Query // contains filtered or unexported methods }
IntervalQueryRule represents the generic matching interval rule interface. Interval Rule is actually just a Query, but may be used only inside IntervalQuery. An extra method is added just to shield its implementations (*Rule objects) from other query objects.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html for details.
type IntervalQueryRuleAllOf ¶
type IntervalQueryRuleAllOf struct {
// contains filtered or unexported fields
}
IntervalQueryRuleAllOf is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#intervals-all_of for details.
func NewIntervalQueryRuleAllOf ¶
func NewIntervalQueryRuleAllOf(intervals ...IntervalQueryRule) *IntervalQueryRuleAllOf
NewIntervalQueryRuleAllOf initializes and returns a new instance of IntervalQueryRuleAllOf.
func (*IntervalQueryRuleAllOf) Filter ¶
func (r *IntervalQueryRuleAllOf) Filter(filter *IntervalQueryFilter) *IntervalQueryRuleAllOf
Filter adds an additional interval filter.
func (*IntervalQueryRuleAllOf) MaxGaps ¶
func (r *IntervalQueryRuleAllOf) MaxGaps(maxGaps int) *IntervalQueryRuleAllOf
MaxGaps specifies the maximum number of positions between the matching terms. Terms further apart than this are considered matches. Defaults to -1.
func (*IntervalQueryRuleAllOf) Ordered ¶
func (r *IntervalQueryRuleAllOf) Ordered(ordered bool) *IntervalQueryRuleAllOf
Ordered, if true, indicates that matching terms must appear in their specified order. Defaults to false.
func (*IntervalQueryRuleAllOf) Source ¶
func (r *IntervalQueryRuleAllOf) Source() (interface{}, error)
Source returns JSON for the function score query.
type IntervalQueryRuleAnyOf ¶
type IntervalQueryRuleAnyOf struct {
// contains filtered or unexported fields
}
IntervalQueryRuleAnyOf is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#intervals-any_of for details.
func NewIntervalQueryRuleAnyOf ¶
func NewIntervalQueryRuleAnyOf(intervals ...IntervalQueryRule) *IntervalQueryRuleAnyOf
NewIntervalQueryRuleAnyOf initializes and returns a new instance of IntervalQueryRuleAnyOf.
func (*IntervalQueryRuleAnyOf) Filter ¶
func (r *IntervalQueryRuleAnyOf) Filter(filter *IntervalQueryFilter) *IntervalQueryRuleAnyOf
Filter adds an additional interval filter.
func (*IntervalQueryRuleAnyOf) Source ¶
func (r *IntervalQueryRuleAnyOf) Source() (interface{}, error)
Source returns JSON for the function score query.
type IntervalQueryRuleFuzzy ¶
type IntervalQueryRuleFuzzy struct {
// contains filtered or unexported fields
}
IntervalQueryRuleFuzzy is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/query-dsl-intervals-query.html#intervals-fuzzy for details.
func NewIntervalQueryRuleFuzzy ¶
func NewIntervalQueryRuleFuzzy(term string) *IntervalQueryRuleFuzzy
NewIntervalQueryRuleFuzzy initializes and returns a new instance of IntervalQueryRuleFuzzy.
func (*IntervalQueryRuleFuzzy) Analyzer ¶
func (r *IntervalQueryRuleFuzzy) Analyzer(analyzer string) *IntervalQueryRuleFuzzy
Analyzer specifies the analyzer used to analyze terms in the query.
func (*IntervalQueryRuleFuzzy) Fuzziness ¶
func (q *IntervalQueryRuleFuzzy) Fuzziness(fuzziness interface{}) *IntervalQueryRuleFuzzy
Fuzziness is the maximum edit distance allowed for matching. It can be integers like 0, 1 or 2 as well as strings like "auto", "0..1", "1..4" or "0.0..1.0". Defaults to "auto".
func (*IntervalQueryRuleFuzzy) PrefixLength ¶
func (q *IntervalQueryRuleFuzzy) PrefixLength(prefixLength int) *IntervalQueryRuleFuzzy
PrefixLength is the number of beginning characters left unchanged when creating expansions. Defaults to 0.
func (*IntervalQueryRuleFuzzy) Source ¶
func (r *IntervalQueryRuleFuzzy) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*IntervalQueryRuleFuzzy) Transpositions ¶
func (q *IntervalQueryRuleFuzzy) Transpositions(transpositions bool) *IntervalQueryRuleFuzzy
Transpositions indicates whether edits include transpositions of two adjacent characters (ab -> ba). Defaults to true.
func (*IntervalQueryRuleFuzzy) UseField ¶
func (r *IntervalQueryRuleFuzzy) UseField(useField string) *IntervalQueryRuleFuzzy
UseField, if specified, matches the intervals from this field rather than the top-level field.
type IntervalQueryRuleMatch ¶
type IntervalQueryRuleMatch struct {
// contains filtered or unexported fields
}
IntervalQueryRuleMatch is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#intervals-match for details.
func NewIntervalQueryRuleMatch ¶
func NewIntervalQueryRuleMatch(query string) *IntervalQueryRuleMatch
NewIntervalQueryRuleMatch initializes and returns a new instance of IntervalQueryRuleMatch.
func (*IntervalQueryRuleMatch) Analyzer ¶
func (r *IntervalQueryRuleMatch) Analyzer(analyzer string) *IntervalQueryRuleMatch
Analyzer specifies the analyzer used to analyze terms in the query.
func (*IntervalQueryRuleMatch) Filter ¶
func (r *IntervalQueryRuleMatch) Filter(filter *IntervalQueryFilter) *IntervalQueryRuleMatch
Filter adds an additional interval filter.
func (*IntervalQueryRuleMatch) MaxGaps ¶
func (r *IntervalQueryRuleMatch) MaxGaps(maxGaps int) *IntervalQueryRuleMatch
MaxGaps specifies the maximum number of positions between the matching terms. Terms further apart than this are considered matches. Defaults to -1.
func (*IntervalQueryRuleMatch) Ordered ¶
func (r *IntervalQueryRuleMatch) Ordered(ordered bool) *IntervalQueryRuleMatch
Ordered, if true, indicates that matching terms must appear in their specified order. Defaults to false.
func (*IntervalQueryRuleMatch) Source ¶
func (r *IntervalQueryRuleMatch) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*IntervalQueryRuleMatch) UseField ¶
func (r *IntervalQueryRuleMatch) UseField(useField string) *IntervalQueryRuleMatch
UseField, if specified, matches the intervals from this field rather than the top-level field.
type IntervalQueryRulePrefix ¶
type IntervalQueryRulePrefix struct {
// contains filtered or unexported fields
}
IntervalQueryRulePrefix is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#intervals-prefix for details.
func NewIntervalQueryRulePrefix ¶
func NewIntervalQueryRulePrefix(prefix string) *IntervalQueryRulePrefix
NewIntervalQueryRulePrefix initializes and returns a new instance of IntervalQueryRulePrefix.
func (*IntervalQueryRulePrefix) Analyzer ¶
func (r *IntervalQueryRulePrefix) Analyzer(analyzer string) *IntervalQueryRulePrefix
Analyzer specifies the analyzer used to analyze terms in the query.
func (*IntervalQueryRulePrefix) Source ¶
func (r *IntervalQueryRulePrefix) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*IntervalQueryRulePrefix) UseField ¶
func (r *IntervalQueryRulePrefix) UseField(useField string) *IntervalQueryRulePrefix
UseField, if specified, matches the intervals from this field rather than the top-level field.
type IntervalQueryRuleWildcard ¶
type IntervalQueryRuleWildcard struct {
// contains filtered or unexported fields
}
IntervalQueryRuleWildcard is an implementation of IntervalQueryRule.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/query-dsl-intervals-query.html#intervals-wildcard for details.
func NewIntervalQueryRuleWildcard ¶
func NewIntervalQueryRuleWildcard(pattern string) *IntervalQueryRuleWildcard
NewIntervalQueryRuleWildcard initializes and returns a new instance of IntervalQueryRuleWildcard.
func (*IntervalQueryRuleWildcard) Analyzer ¶
func (r *IntervalQueryRuleWildcard) Analyzer(analyzer string) *IntervalQueryRuleWildcard
Analyzer specifies the analyzer used to analyze terms in the query.
func (*IntervalQueryRuleWildcard) Source ¶
func (r *IntervalQueryRuleWildcard) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*IntervalQueryRuleWildcard) UseField ¶
func (r *IntervalQueryRuleWildcard) UseField(useField string) *IntervalQueryRuleWildcard
UseField, if specified, matches the intervals from this field rather than the top-level field.
type JLHScoreSignificanceHeuristic ¶
type JLHScoreSignificanceHeuristic struct{}
JLHScoreSignificanceHeuristic implements the JLH score as described in https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_jlh_score.
func NewJLHScoreSignificanceHeuristic ¶
func NewJLHScoreSignificanceHeuristic() *JLHScoreSignificanceHeuristic
NewJLHScoreSignificanceHeuristic initializes a new JLHScoreSignificanceHeuristic.
func (*JLHScoreSignificanceHeuristic) Name ¶
func (sh *JLHScoreSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*JLHScoreSignificanceHeuristic) Source ¶
func (sh *JLHScoreSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type LaplaceSmoothingModel ¶
type LaplaceSmoothingModel struct {
// contains filtered or unexported fields
}
LaplaceSmoothingModel implements a laplace smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewLaplaceSmoothingModel ¶
func NewLaplaceSmoothingModel(alpha float64) *LaplaceSmoothingModel
func (*LaplaceSmoothingModel) Source ¶
func (sm *LaplaceSmoothingModel) Source() (interface{}, error)
func (*LaplaceSmoothingModel) Type ¶
func (sm *LaplaceSmoothingModel) Type() string
type LinearDecayFunction ¶
type LinearDecayFunction struct {
// contains filtered or unexported fields
}
LinearDecayFunction builds a linear decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html for details.
func NewLinearDecayFunction ¶
func NewLinearDecayFunction() *LinearDecayFunction
NewLinearDecayFunction initializes and returns a new LinearDecayFunction.
func (*LinearDecayFunction) Decay ¶
func (fn *LinearDecayFunction) Decay(decay float64) *LinearDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*LinearDecayFunction) FieldName ¶
func (fn *LinearDecayFunction) FieldName(fieldName string) *LinearDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*LinearDecayFunction) GetMultiValueMode ¶
func (fn *LinearDecayFunction) GetMultiValueMode() string
GetMultiValueMode returns how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*LinearDecayFunction) GetWeight ¶
func (fn *LinearDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*LinearDecayFunction) MultiValueMode ¶
func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*LinearDecayFunction) Name ¶
func (fn *LinearDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*LinearDecayFunction) Offset ¶
func (fn *LinearDecayFunction) Offset(offset interface{}) *LinearDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*LinearDecayFunction) Origin ¶
func (fn *LinearDecayFunction) Origin(origin interface{}) *LinearDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*LinearDecayFunction) Scale ¶
func (fn *LinearDecayFunction) Scale(scale interface{}) *LinearDecayFunction
Scale defines the scale to be used with Decay.
func (*LinearDecayFunction) Source ¶
func (fn *LinearDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*LinearDecayFunction) Weight ¶
func (fn *LinearDecayFunction) Weight(weight float64) *LinearDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type LinearInterpolationSmoothingModel ¶
type LinearInterpolationSmoothingModel struct {
// contains filtered or unexported fields
}
LinearInterpolationSmoothingModel implements a linear interpolation smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewLinearInterpolationSmoothingModel ¶
func NewLinearInterpolationSmoothingModel(trigramLamda, bigramLambda, unigramLambda float64) *LinearInterpolationSmoothingModel
func (*LinearInterpolationSmoothingModel) Source ¶
func (sm *LinearInterpolationSmoothingModel) Source() (interface{}, error)
func (*LinearInterpolationSmoothingModel) Type ¶
func (sm *LinearInterpolationSmoothingModel) Type() string
type LinearMovAvgModel ¶
type LinearMovAvgModel struct { }
LinearMovAvgModel calculates a linearly weighted moving average, such that older values are linearly less important. "Time" is determined by position in collection.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html#_linear
func NewLinearMovAvgModel ¶
func NewLinearMovAvgModel() *LinearMovAvgModel
NewLinearMovAvgModel creates and initializes a new LinearMovAvgModel.
func (*LinearMovAvgModel) Settings ¶
func (m *LinearMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger specifies the interface for all log operations.
type MatchAllQuery ¶
type MatchAllQuery struct {
// contains filtered or unexported fields
}
MatchAllQuery is the most simple query, which matches all documents, giving them all a _score of 1.0.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-all-query.html
func NewMatchAllQuery ¶
func NewMatchAllQuery() *MatchAllQuery
NewMatchAllQuery creates and initializes a new match all query.
func (*MatchAllQuery) Boost ¶
func (q *MatchAllQuery) Boost(boost float64) *MatchAllQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*MatchAllQuery) MarshalJSON ¶
func (q *MatchAllQuery) MarshalJSON() ([]byte, error)
MarshalJSON enables serializing the type as JSON.
func (*MatchAllQuery) QueryName ¶
func (q *MatchAllQuery) QueryName(name string) *MatchAllQuery
QueryName sets the query name.
func (*MatchAllQuery) Source ¶
func (q *MatchAllQuery) Source() (interface{}, error)
Source returns JSON for the match all query.
type MatchBoolPrefixQuery ¶
type MatchBoolPrefixQuery struct {
// contains filtered or unexported fields
}
MatchBoolPrefixQuery 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 query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-bool-prefix-query.html
func NewMatchBoolPrefixQuery ¶
func NewMatchBoolPrefixQuery(name string, queryText interface{}) *MatchBoolPrefixQuery
NewMatchBoolPrefixQuery creates and initializes a new MatchBoolPrefixQuery.
func (*MatchBoolPrefixQuery) Analyzer ¶
func (q *MatchBoolPrefixQuery) Analyzer(analyzer string) *MatchBoolPrefixQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchBoolPrefixQuery) Boost ¶
func (q *MatchBoolPrefixQuery) Boost(boost float64) *MatchBoolPrefixQuery
Boost sets the boost to apply to this query.
func (*MatchBoolPrefixQuery) Fuzziness ¶
func (q *MatchBoolPrefixQuery) Fuzziness(fuzziness string) *MatchBoolPrefixQuery
Fuzziness sets the edit distance for fuzzy queries. Default is "AUTO".
func (*MatchBoolPrefixQuery) FuzzyRewrite ¶
func (q *MatchBoolPrefixQuery) FuzzyRewrite(fuzzyRewrite string) *MatchBoolPrefixQuery
FuzzyRewrite sets the fuzzy_rewrite parameter controlling how the fuzzy query will get rewritten.
func (*MatchBoolPrefixQuery) FuzzyTranspositions ¶
func (q *MatchBoolPrefixQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchBoolPrefixQuery
FuzzyTranspositions if true, edits for fuzzy matching include transpositions of two adjacent characters (ab → ba). Defaults to true.
func (*MatchBoolPrefixQuery) MaxExpansions ¶
func (q *MatchBoolPrefixQuery) MaxExpansions(n int) *MatchBoolPrefixQuery
MaxExpansions sets the number of term expansions to use.
func (*MatchBoolPrefixQuery) MinimumShouldMatch ¶
func (q *MatchBoolPrefixQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchBoolPrefixQuery
MinimumShouldMatch sets the optional minimumShouldMatch value to apply to the query.
func (*MatchBoolPrefixQuery) Operator ¶
func (q *MatchBoolPrefixQuery) Operator(operator string) *MatchBoolPrefixQuery
Operator sets the operator to use when using a boolean query. Can be "AND" or "OR" (default).
func (*MatchBoolPrefixQuery) PrefixLength ¶
func (q *MatchBoolPrefixQuery) PrefixLength(prefixLength int) *MatchBoolPrefixQuery
PrefixLength is the number of beginning characters left unchanged for fuzzy matching. Defaults to 0.
func (*MatchBoolPrefixQuery) Source ¶
func (q *MatchBoolPrefixQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type MatchNoneQuery ¶
type MatchNoneQuery struct {
// contains filtered or unexported fields
}
MatchNoneQuery returns no documents. It is the inverse of MatchAllQuery.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-all-query.html
func NewMatchNoneQuery ¶
func NewMatchNoneQuery() *MatchNoneQuery
NewMatchNoneQuery creates and initializes a new match none query.
func (*MatchNoneQuery) QueryName ¶
func (q *MatchNoneQuery) QueryName(name string) *MatchNoneQuery
QueryName sets the query name.
func (MatchNoneQuery) Source ¶
func (q MatchNoneQuery) Source() (interface{}, error)
Source returns JSON for the match none query.
type MatchPhrasePrefixQuery ¶
type MatchPhrasePrefixQuery struct {
// contains filtered or unexported fields
}
MatchPhrasePrefixQuery is the same as match_phrase, except that it allows for prefix matches on the last term in the text.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-query-phrase-prefix.html
func NewMatchPhrasePrefixQuery ¶
func NewMatchPhrasePrefixQuery(name string, value interface{}) *MatchPhrasePrefixQuery
NewMatchPhrasePrefixQuery creates and initializes a new MatchPhrasePrefixQuery.
func (*MatchPhrasePrefixQuery) Analyzer ¶
func (q *MatchPhrasePrefixQuery) Analyzer(analyzer string) *MatchPhrasePrefixQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchPhrasePrefixQuery) Boost ¶
func (q *MatchPhrasePrefixQuery) Boost(boost float64) *MatchPhrasePrefixQuery
Boost sets the boost to apply to this query.
func (*MatchPhrasePrefixQuery) MaxExpansions ¶
func (q *MatchPhrasePrefixQuery) MaxExpansions(n int) *MatchPhrasePrefixQuery
MaxExpansions sets the number of term expansions to use.
func (*MatchPhrasePrefixQuery) QueryName ¶
func (q *MatchPhrasePrefixQuery) QueryName(queryName string) *MatchPhrasePrefixQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchPhrasePrefixQuery) Slop ¶
func (q *MatchPhrasePrefixQuery) Slop(slop int) *MatchPhrasePrefixQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MatchPhrasePrefixQuery) Source ¶
func (q *MatchPhrasePrefixQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type MatchPhraseQuery ¶
type MatchPhraseQuery struct {
// contains filtered or unexported fields
}
MatchPhraseQuery analyzes the text and creates a phrase query out of the analyzed text.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-query-phrase.html
func NewMatchPhraseQuery ¶
func NewMatchPhraseQuery(name string, value interface{}) *MatchPhraseQuery
NewMatchPhraseQuery creates and initializes a new MatchPhraseQuery.
func (*MatchPhraseQuery) Analyzer ¶
func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchPhraseQuery) Boost ¶
func (q *MatchPhraseQuery) Boost(boost float64) *MatchPhraseQuery
Boost sets the boost to apply to this query.
func (*MatchPhraseQuery) QueryName ¶
func (q *MatchPhraseQuery) QueryName(queryName string) *MatchPhraseQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchPhraseQuery) Slop ¶
func (q *MatchPhraseQuery) Slop(slop int) *MatchPhraseQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MatchPhraseQuery) Source ¶
func (q *MatchPhraseQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*MatchPhraseQuery) ZeroTermsQuery ¶
func (q *MatchPhraseQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchPhraseQuery
ZeroTermsQuery can be "all" or "none".
type MatchQuery ¶
type MatchQuery struct {
// contains filtered or unexported fields
}
MatchQuery is a family of queries that accepts text/numerics/dates, analyzes them, and constructs a query.
To create a new MatchQuery, use NewMatchQuery. To create specific types of queries, e.g. a match_phrase query, use NewMatchPhrQuery(...).Type("phrase"), or use one of the shortcuts e.g. NewMatchPhraseQuery(...).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-query.html
func NewMatchQuery ¶
func NewMatchQuery(name string, text interface{}) *MatchQuery
NewMatchQuery creates and initializes a new MatchQuery.
func (*MatchQuery) Analyzer ¶
func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchQuery) Boost ¶
func (q *MatchQuery) Boost(boost float64) *MatchQuery
Boost sets the boost to apply to this query.
func (*MatchQuery) CutoffFrequency ¶
func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery
CutoffFrequency can be a value in [0..1] (or an absolute number >=1). It represents the maximum treshold of a terms document frequency to be considered a low frequency term.
func (*MatchQuery) Fuzziness ¶
func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery
Fuzziness sets the fuzziness when evaluated to a fuzzy query type. Defaults to "AUTO".
func (*MatchQuery) FuzzyRewrite ¶
func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery
FuzzyRewrite sets the fuzzy_rewrite parameter controlling how the fuzzy query will get rewritten.
func (*MatchQuery) FuzzyTranspositions ¶
func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery
FuzzyTranspositions sets whether transpositions are supported in fuzzy queries.
The default metric used by fuzzy queries to determine a match is the Damerau-Levenshtein distance formula which supports transpositions. Setting transposition to false will * switch to classic Levenshtein distance. * If not set, Damerau-Levenshtein distance metric will be used.
func (*MatchQuery) Lenient ¶
func (q *MatchQuery) Lenient(lenient bool) *MatchQuery
Lenient specifies whether format based failures will be ignored.
func (*MatchQuery) MaxExpansions ¶
func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery
MaxExpansions is used with fuzzy or prefix type queries. It specifies the number of term expansions to use. It defaults to unbounded so that its recommended to set it to a reasonable value for faster execution.
func (*MatchQuery) MinimumShouldMatch ¶
func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery
MinimumShouldMatch sets the optional minimumShouldMatch value to apply to the query.
func (*MatchQuery) Operator ¶
func (q *MatchQuery) Operator(operator string) *MatchQuery
Operator sets the operator to use when using a boolean query. Can be "AND" or "OR" (default).
func (*MatchQuery) PrefixLength ¶
func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery
PrefixLength sets the length of a length of common (non-fuzzy) prefix for fuzzy match queries. It must be non-negative.
func (*MatchQuery) QueryName ¶
func (q *MatchQuery) QueryName(queryName string) *MatchQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchQuery) Source ¶
func (q *MatchQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*MatchQuery) ZeroTermsQuery ¶
func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery
ZeroTermsQuery can be "all" or "none".
type MatrixStatsAggregation ¶
type MatrixStatsAggregation struct {
// contains filtered or unexported fields
}
MatrixMatrixStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
The stats that are returned consist of: min, max, sum, count and avg.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-stats-aggregation.html for details.
func NewMatrixStatsAggregation ¶
func NewMatrixStatsAggregation() *MatrixStatsAggregation
NewMatrixStatsAggregation initializes a new MatrixStatsAggregation.
func (*MatrixStatsAggregation) Fields ¶
func (a *MatrixStatsAggregation) Fields(fields ...string) *MatrixStatsAggregation
func (*MatrixStatsAggregation) Format ¶
func (a *MatrixStatsAggregation) Format(format string) *MatrixStatsAggregation
func (*MatrixStatsAggregation) Meta ¶
func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MatrixStatsAggregation) Missing ¶
func (a *MatrixStatsAggregation) Missing(missing interface{}) *MatrixStatsAggregation
Missing configures the value to use when documents miss a value.
func (*MatrixStatsAggregation) Mode ¶
func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation
Mode specifies how to operate. Valid values are: sum, avg, median, min, or max.
func (*MatrixStatsAggregation) Source ¶
func (a *MatrixStatsAggregation) Source() (interface{}, error)
Source returns the JSON to serialize into the request, or an error.
func (*MatrixStatsAggregation) SubAggregation ¶
func (a *MatrixStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *MatrixStatsAggregation
func (*MatrixStatsAggregation) ValueType ¶
func (a *MatrixStatsAggregation) ValueType(valueType interface{}) *MatrixStatsAggregation
type MaxAggregation ¶
type MaxAggregation struct {
// contains filtered or unexported fields
}
MaxAggregation is a single-value metrics aggregation that keeps track and returns the maximum value among the numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-max-aggregation.html
func NewMaxAggregation ¶
func NewMaxAggregation() *MaxAggregation
func (*MaxAggregation) Field ¶
func (a *MaxAggregation) Field(field string) *MaxAggregation
func (*MaxAggregation) Format ¶
func (a *MaxAggregation) Format(format string) *MaxAggregation
func (*MaxAggregation) Meta ¶
func (a *MaxAggregation) Meta(metaData map[string]interface{}) *MaxAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MaxAggregation) Missing ¶
func (a *MaxAggregation) Missing(missing interface{}) *MaxAggregation
func (*MaxAggregation) Script ¶
func (a *MaxAggregation) Script(script *Script) *MaxAggregation
func (*MaxAggregation) Source ¶
func (a *MaxAggregation) Source() (interface{}, error)
func (*MaxAggregation) SubAggregation ¶
func (a *MaxAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxAggregation
type MaxBucketAggregation ¶
type MaxBucketAggregation struct {
// contains filtered or unexported fields
}
MaxBucketAggregation is a sibling pipeline aggregation which identifies the bucket(s) with the maximum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s). The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-max-bucket-aggregation.html
func NewMaxBucketAggregation ¶
func NewMaxBucketAggregation() *MaxBucketAggregation
NewMaxBucketAggregation creates and initializes a new MaxBucketAggregation.
func (*MaxBucketAggregation) BucketsPath ¶
func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MaxBucketAggregation) Format ¶
func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation
Format to use on the output of this aggregation.
func (*MaxBucketAggregation) GapInsertZeros ¶
func (a *MaxBucketAggregation) GapInsertZeros() *MaxBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MaxBucketAggregation) GapPolicy ¶
func (a *MaxBucketAggregation) GapPolicy(gapPolicy string) *MaxBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MaxBucketAggregation) GapSkip ¶
func (a *MaxBucketAggregation) GapSkip() *MaxBucketAggregation
GapSkip skips gaps in the series.
func (*MaxBucketAggregation) Meta ¶
func (a *MaxBucketAggregation) Meta(metaData map[string]interface{}) *MaxBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MaxBucketAggregation) Source ¶
func (a *MaxBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type MedianAbsoluteDeviationAggregation ¶
type MedianAbsoluteDeviationAggregation struct {
// contains filtered or unexported fields
}
MedianAbsoluteDeviationAggregation is a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.6/search-aggregations-metrics-median-absolute-deviation-aggregation.html for details.
func NewMedianAbsoluteDeviationAggregation ¶
func NewMedianAbsoluteDeviationAggregation() *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Compression ¶
func (a *MedianAbsoluteDeviationAggregation) Compression(compression float64) *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Field ¶
func (a *MedianAbsoluteDeviationAggregation) Field(field string) *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Format ¶
func (a *MedianAbsoluteDeviationAggregation) Format(format string) *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Meta ¶
func (a *MedianAbsoluteDeviationAggregation) Meta(metaData map[string]interface{}) *MedianAbsoluteDeviationAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MedianAbsoluteDeviationAggregation) Missing ¶
func (a *MedianAbsoluteDeviationAggregation) Missing(missing interface{}) *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Script ¶
func (a *MedianAbsoluteDeviationAggregation) Script(script *Script) *MedianAbsoluteDeviationAggregation
func (*MedianAbsoluteDeviationAggregation) Source ¶
func (a *MedianAbsoluteDeviationAggregation) Source() (interface{}, error)
func (*MedianAbsoluteDeviationAggregation) SubAggregation ¶
func (a *MedianAbsoluteDeviationAggregation) SubAggregation(name string, subAggregation Aggregation) *MedianAbsoluteDeviationAggregation
type MinAggregation ¶
type MinAggregation struct {
// contains filtered or unexported fields
}
MinAggregation is a single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-min-aggregation.html
func NewMinAggregation ¶
func NewMinAggregation() *MinAggregation
func (*MinAggregation) Field ¶
func (a *MinAggregation) Field(field string) *MinAggregation
func (*MinAggregation) Format ¶
func (a *MinAggregation) Format(format string) *MinAggregation
func (*MinAggregation) Meta ¶
func (a *MinAggregation) Meta(metaData map[string]interface{}) *MinAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MinAggregation) Missing ¶
func (a *MinAggregation) Missing(missing interface{}) *MinAggregation
func (*MinAggregation) Script ¶
func (a *MinAggregation) Script(script *Script) *MinAggregation
func (*MinAggregation) Source ¶
func (a *MinAggregation) Source() (interface{}, error)
func (*MinAggregation) SubAggregation ¶
func (a *MinAggregation) SubAggregation(name string, subAggregation Aggregation) *MinAggregation
type MinBucketAggregation ¶
type MinBucketAggregation struct {
// contains filtered or unexported fields
}
MinBucketAggregation is a sibling pipeline aggregation which identifies the bucket(s) with the maximum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s). The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-min-bucket-aggregation.html
func NewMinBucketAggregation ¶
func NewMinBucketAggregation() *MinBucketAggregation
NewMinBucketAggregation creates and initializes a new MinBucketAggregation.
func (*MinBucketAggregation) BucketsPath ¶
func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MinBucketAggregation) Format ¶
func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation
Format to use on the output of this aggregation.
func (*MinBucketAggregation) GapInsertZeros ¶
func (a *MinBucketAggregation) GapInsertZeros() *MinBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MinBucketAggregation) GapPolicy ¶
func (a *MinBucketAggregation) GapPolicy(gapPolicy string) *MinBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MinBucketAggregation) GapSkip ¶
func (a *MinBucketAggregation) GapSkip() *MinBucketAggregation
GapSkip skips gaps in the series.
func (*MinBucketAggregation) Meta ¶
func (a *MinBucketAggregation) Meta(metaData map[string]interface{}) *MinBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MinBucketAggregation) Source ¶
func (a *MinBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type MissingAggregation ¶
type MissingAggregation struct {
// contains filtered or unexported fields
}
MissingAggregation is a field data based single bucket aggregation, that creates a bucket of all documents in the current document set context that are missing a field value (effectively, missing a field or having the configured NULL value set). This aggregator will often be used in conjunction with other field data bucket aggregators (such as ranges) to return information for all the documents that could not be placed in any of the other buckets due to missing field data values. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-missing-aggregation.html
func NewMissingAggregation ¶
func NewMissingAggregation() *MissingAggregation
func (*MissingAggregation) Field ¶
func (a *MissingAggregation) Field(field string) *MissingAggregation
func (*MissingAggregation) Meta ¶
func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MissingAggregation) Source ¶
func (a *MissingAggregation) Source() (interface{}, error)
func (*MissingAggregation) SubAggregation ¶
func (a *MissingAggregation) SubAggregation(name string, subAggregation Aggregation) *MissingAggregation
type MoreLikeThisQuery ¶
type MoreLikeThisQuery struct {
// contains filtered or unexported fields
}
MoreLikeThis query (MLT Query) finds documents that are "like" a given set of documents. In order to do so, MLT selects a set of representative terms of these input documents, forms a query using these terms, executes the query and returns the results. The user controls the input documents, how the terms should be selected and how the query is formed.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-mlt-query.html
func NewMoreLikeThisQuery ¶
func NewMoreLikeThisQuery() *MoreLikeThisQuery
NewMoreLikeThisQuery creates and initializes a new MoreLikeThisQuery.
func (*MoreLikeThisQuery) Analyzer ¶
func (q *MoreLikeThisQuery) Analyzer(analyzer string) *MoreLikeThisQuery
Analyzer specifies the analyzer that will be use to analyze the text. Defaults to the analyzer associated with the field.
func (*MoreLikeThisQuery) Boost ¶
func (q *MoreLikeThisQuery) Boost(boost float64) *MoreLikeThisQuery
Boost sets the boost for this query.
func (*MoreLikeThisQuery) BoostTerms ¶
func (q *MoreLikeThisQuery) BoostTerms(boostTerms float64) *MoreLikeThisQuery
BoostTerms sets the boost factor to use when boosting terms. It defaults to 1.
func (*MoreLikeThisQuery) FailOnUnsupportedField ¶
func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery
FailOnUnsupportedField indicates whether to fail or return no result when this query is run against a field which is not supported such as a binary/numeric field.
func (*MoreLikeThisQuery) Field ¶
func (q *MoreLikeThisQuery) Field(fields ...string) *MoreLikeThisQuery
Field adds one or more field names to the query.
func (*MoreLikeThisQuery) Ids ¶
func (q *MoreLikeThisQuery) Ids(ids ...string) *MoreLikeThisQuery
Ids sets the document ids to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) IgnoreLikeItems ¶
func (q *MoreLikeThisQuery) IgnoreLikeItems(ignoreDocs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
IgnoreLikeItems sets the documents from which the terms should not be selected from.
func (*MoreLikeThisQuery) IgnoreLikeText ¶
func (q *MoreLikeThisQuery) IgnoreLikeText(ignoreLikeText ...string) *MoreLikeThisQuery
IgnoreLikeText sets the text from which the terms should not be selected from.
func (*MoreLikeThisQuery) Include ¶
func (q *MoreLikeThisQuery) Include(include bool) *MoreLikeThisQuery
Include specifies whether the input documents should also be included in the results returned. Defaults to false.
func (*MoreLikeThisQuery) LikeItems ¶
func (q *MoreLikeThisQuery) LikeItems(docs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
LikeItems sets the documents to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) LikeText ¶
func (q *MoreLikeThisQuery) LikeText(likeTexts ...string) *MoreLikeThisQuery
LikeText sets the text to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) MaxDocFreq ¶
func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery
MaxDocFreq sets the maximum frequency for which words may still appear. Words that appear in more than this many docs will be ignored. It defaults to unbounded.
func (*MoreLikeThisQuery) MaxQueryTerms ¶
func (q *MoreLikeThisQuery) MaxQueryTerms(maxQueryTerms int) *MoreLikeThisQuery
MaxQueryTerms sets the maximum number of query terms that will be included in any generated query. It defaults to 25.
func (*MoreLikeThisQuery) MaxWordLength ¶
func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery
MaxWordLength sets the maximum word length above which words will be ignored. Defaults to unbounded (0).
func (*MoreLikeThisQuery) MinDocFreq ¶
func (q *MoreLikeThisQuery) MinDocFreq(minDocFreq int) *MoreLikeThisQuery
MinDocFreq sets the frequency at which words will be ignored which do not occur in at least this many docs. The default is 5.
func (*MoreLikeThisQuery) MinTermFreq ¶
func (q *MoreLikeThisQuery) MinTermFreq(minTermFreq int) *MoreLikeThisQuery
MinTermFreq is the frequency below which terms will be ignored in the source doc. The default frequency is 2.
func (*MoreLikeThisQuery) MinWordLength ¶
func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery
MinWordLength sets the minimum word length below which words will be ignored. It defaults to 0.
func (*MoreLikeThisQuery) MinimumShouldMatch ¶
func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery
MinimumShouldMatch sets the number of terms that must match the generated query expressed in the common syntax for minimum should match. The default value is "30%".
This used to be "PercentTermsToMatch" in Elasticsearch versions before 2.0.
func (*MoreLikeThisQuery) QueryName ¶
func (q *MoreLikeThisQuery) QueryName(queryName string) *MoreLikeThisQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*MoreLikeThisQuery) Source ¶
func (q *MoreLikeThisQuery) Source() (interface{}, error)
Source creates the source for the MLT query. It may return an error if the caller forgot to specify any documents to be "liked" in the MoreLikeThisQuery.
func (*MoreLikeThisQuery) StopWord ¶
func (q *MoreLikeThisQuery) StopWord(stopWords ...string) *MoreLikeThisQuery
StopWord sets the stopwords. Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".
type MoreLikeThisQueryItem ¶
type MoreLikeThisQueryItem struct {
// contains filtered or unexported fields
}
MoreLikeThisQueryItem represents a single item of a MoreLikeThisQuery to be "liked" or "unliked".
func NewMoreLikeThisQueryItem ¶
func NewMoreLikeThisQueryItem() *MoreLikeThisQueryItem
NewMoreLikeThisQueryItem creates and initializes a MoreLikeThisQueryItem.
func (*MoreLikeThisQueryItem) Doc ¶
func (item *MoreLikeThisQueryItem) Doc(doc interface{}) *MoreLikeThisQueryItem
Doc represents a raw document template for the item.
func (*MoreLikeThisQueryItem) FetchSourceContext ¶
func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem
FetchSourceContext represents the fetch source of the item which controls if and how _source should be returned.
func (*MoreLikeThisQueryItem) Fields ¶
func (item *MoreLikeThisQueryItem) Fields(fields ...string) *MoreLikeThisQueryItem
Fields represents the list of fields of the item.
func (*MoreLikeThisQueryItem) Id ¶
func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem
Id represents the document id of the item.
func (*MoreLikeThisQueryItem) Index ¶
func (item *MoreLikeThisQueryItem) Index(index string) *MoreLikeThisQueryItem
Index represents the index of the item.
func (*MoreLikeThisQueryItem) LikeText ¶
func (item *MoreLikeThisQueryItem) LikeText(likeText string) *MoreLikeThisQueryItem
LikeText represents a text to be "liked".
func (*MoreLikeThisQueryItem) Routing ¶
func (item *MoreLikeThisQueryItem) Routing(routing string) *MoreLikeThisQueryItem
Routing sets the routing associated with the item.
func (*MoreLikeThisQueryItem) Source ¶
func (item *MoreLikeThisQueryItem) Source() (interface{}, error)
Source returns the JSON-serializable fragment of the entity.
func (*MoreLikeThisQueryItem) Type
deprecated
func (item *MoreLikeThisQueryItem) Type(typ string) *MoreLikeThisQueryItem
Type represents the document type of the item.
Deprecated: Types are in the process of being removed.
func (*MoreLikeThisQueryItem) Version ¶
func (item *MoreLikeThisQueryItem) Version(version int64) *MoreLikeThisQueryItem
Version specifies the version of the item.
func (*MoreLikeThisQueryItem) VersionType ¶
func (item *MoreLikeThisQueryItem) VersionType(versionType string) *MoreLikeThisQueryItem
VersionType represents the version type of the item.
type MovAvgAggregation
deprecated
type MovAvgAggregation struct {
// contains filtered or unexported fields
}
MovAvgAggregation operates on a series of data. It will slide a window across the data and emit the average value of that window.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func NewMovAvgAggregation
deprecated
func NewMovAvgAggregation() *MovAvgAggregation
NewMovAvgAggregation creates and initializes a new MovAvgAggregation.
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (*MovAvgAggregation) BucketsPath ¶
func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MovAvgAggregation) Format ¶
func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation
Format to use on the output of this aggregation.
func (*MovAvgAggregation) GapInsertZeros ¶
func (a *MovAvgAggregation) GapInsertZeros() *MovAvgAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MovAvgAggregation) GapPolicy ¶
func (a *MovAvgAggregation) GapPolicy(gapPolicy string) *MovAvgAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MovAvgAggregation) GapSkip ¶
func (a *MovAvgAggregation) GapSkip() *MovAvgAggregation
GapSkip skips gaps in the series.
func (*MovAvgAggregation) Meta ¶
func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MovAvgAggregation) Minimize ¶
func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation
Minimize determines if the model should be fit to the data using a cost minimizing algorithm.
func (*MovAvgAggregation) Model ¶
func (a *MovAvgAggregation) Model(model MovAvgModel) *MovAvgAggregation
Model is used to define what type of moving average you want to use in the series.
func (*MovAvgAggregation) Predict ¶
func (a *MovAvgAggregation) Predict(numPredictions int) *MovAvgAggregation
Predict sets the number of predictions that should be returned. Each prediction will be spaced at the intervals in the histogram. E.g. a predict of 2 will return two new buckets at the end of the histogram with the predicted values.
func (*MovAvgAggregation) Source ¶
func (a *MovAvgAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*MovAvgAggregation) Window ¶
func (a *MovAvgAggregation) Window(window int) *MovAvgAggregation
Window sets the window size for the moving average. This window will "slide" across the series, and the values inside that window will be used to calculate the moving avg value.
type MovAvgModel ¶
MovAvgModel specifies the model to use with the MovAvgAggregation.
type MovFnAggregation ¶
type MovFnAggregation struct {
// contains filtered or unexported fields
}
MovFnAggregation, given an ordered series of data, will slice a window across the data and allow the user to specify a custom script that is executed for each window of data.
You must pass a script to process the values. There are a number of predefined script functions you can use as described here: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movfn-aggregation.html#_pre_built_functions.
Example:
agg := elastic.NewMovFnAggregation( "the_sum", // bucket path elastic.NewScript("MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))"), 10, // window size )
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movfn-aggregation.html.
func NewMovFnAggregation
deprecated
func NewMovFnAggregation(bucketsPath string, script *Script, window int) *MovFnAggregation
NewMovFnAggregation creates and initializes a new MovFnAggregation.
Deprecated: The MovFnAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (*MovFnAggregation) BucketsPath ¶
func (a *MovFnAggregation) BucketsPath(bucketsPaths ...string) *MovFnAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MovFnAggregation) Format ¶
func (a *MovFnAggregation) Format(format string) *MovFnAggregation
Format to use on the output of this aggregation.
func (*MovFnAggregation) GapInsertZeros ¶
func (a *MovFnAggregation) GapInsertZeros() *MovFnAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MovFnAggregation) GapPolicy ¶
func (a *MovFnAggregation) GapPolicy(gapPolicy string) *MovFnAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MovFnAggregation) GapSkip ¶
func (a *MovFnAggregation) GapSkip() *MovFnAggregation
GapSkip skips gaps in the series.
func (*MovFnAggregation) Meta ¶
func (a *MovFnAggregation) Meta(metaData map[string]interface{}) *MovFnAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MovFnAggregation) Script ¶
func (a *MovFnAggregation) Script(script *Script) *MovFnAggregation
Script is the script to run.
func (*MovFnAggregation) Source ¶
func (a *MovFnAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*MovFnAggregation) Window ¶
func (a *MovFnAggregation) Window(window int) *MovFnAggregation
Window sets the window size for this aggregation.
type MultiMatchQuery ¶
type MultiMatchQuery struct {
// contains filtered or unexported fields
}
MultiMatchQuery builds on the MatchQuery to allow multi-field queries.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-multi-match-query.html
func NewMultiMatchQuery ¶
func NewMultiMatchQuery(text interface{}, fields ...string) *MultiMatchQuery
MultiMatchQuery creates and initializes a new MultiMatchQuery.
func (*MultiMatchQuery) Analyzer ¶
func (q *MultiMatchQuery) Analyzer(analyzer string) *MultiMatchQuery
Analyzer sets the analyzer to use explicitly. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MultiMatchQuery) Boost ¶
func (q *MultiMatchQuery) Boost(boost float64) *MultiMatchQuery
Boost sets the boost for this query.
func (*MultiMatchQuery) CutoffFrequency ¶
func (q *MultiMatchQuery) CutoffFrequency(cutoff float64) *MultiMatchQuery
CutoffFrequency sets a cutoff value in [0..1] (or absolute number >=1) representing the maximum threshold of a terms document frequency to be considered a low frequency term.
func (*MultiMatchQuery) Field ¶
func (q *MultiMatchQuery) Field(field string) *MultiMatchQuery
Field adds a field to run the multi match against.
func (*MultiMatchQuery) FieldWithBoost ¶
func (q *MultiMatchQuery) FieldWithBoost(field string, boost float64) *MultiMatchQuery
FieldWithBoost adds a field to run the multi match against with a specific boost.
func (*MultiMatchQuery) Fuzziness ¶
func (q *MultiMatchQuery) Fuzziness(fuzziness string) *MultiMatchQuery
Fuzziness sets the fuzziness used when evaluated to a fuzzy query type. It defaults to "AUTO".
func (*MultiMatchQuery) FuzzyRewrite ¶
func (q *MultiMatchQuery) FuzzyRewrite(fuzzyRewrite string) *MultiMatchQuery
func (*MultiMatchQuery) Lenient ¶
func (q *MultiMatchQuery) Lenient(lenient bool) *MultiMatchQuery
Lenient indicates whether format based failures will be ignored.
func (*MultiMatchQuery) MaxExpansions ¶
func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery
MaxExpansions is the number of term expansions to use when using fuzzy or prefix type query. It defaults to unbounded so it's recommended to set it to a reasonable value for faster execution.
func (*MultiMatchQuery) MinimumShouldMatch ¶
func (q *MultiMatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MultiMatchQuery
MinimumShouldMatch represents the minimum number of optional should clauses to match.
func (*MultiMatchQuery) Operator ¶
func (q *MultiMatchQuery) Operator(operator string) *MultiMatchQuery
Operator sets the operator to use when using boolean query. It can be either AND or OR (default).
func (*MultiMatchQuery) PrefixLength ¶
func (q *MultiMatchQuery) PrefixLength(prefixLength int) *MultiMatchQuery
PrefixLength for the fuzzy process.
func (*MultiMatchQuery) QueryName ¶
func (q *MultiMatchQuery) QueryName(queryName string) *MultiMatchQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MultiMatchQuery) Rewrite ¶
func (q *MultiMatchQuery) Rewrite(rewrite string) *MultiMatchQuery
func (*MultiMatchQuery) Slop ¶
func (q *MultiMatchQuery) Slop(slop int) *MultiMatchQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MultiMatchQuery) Source ¶
func (q *MultiMatchQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*MultiMatchQuery) TieBreaker ¶
func (q *MultiMatchQuery) TieBreaker(tieBreaker float64) *MultiMatchQuery
TieBreaker for "best-match" disjunction queries (OR queries). The tie breaker capability allows documents that match more than one query clause (in this case on more than one field) to be scored better than documents that match only the best of the fields, without confusing this with the better case of two distinct matches in the multiple fields.
A tie-breaker value of 1.0 is interpreted as a signal to score queries as "most-match" queries where all matching query clauses are considered for scoring.
func (*MultiMatchQuery) Type ¶
func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery
Type can be "best_fields", "boolean", "most_fields", "cross_fields", "phrase", "phrase_prefix" or "bool_prefix"
func (*MultiMatchQuery) ZeroTermsQuery ¶
func (q *MultiMatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MultiMatchQuery
ZeroTermsQuery can be "all" or "none".
type MultiSearchService ¶
type MultiSearchService struct {
// contains filtered or unexported fields
}
MultiSearch executes one or more searches in one roundtrip.
func (*MultiSearchService) Add ¶
func (s *MultiSearchService) Add(requests ...*SearchRequest) *MultiSearchService
func (*MultiSearchService) ErrorTrace ¶
func (s *MultiSearchService) ErrorTrace(errorTrace bool) *MultiSearchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*MultiSearchService) FilterPath ¶
func (s *MultiSearchService) FilterPath(filterPath ...string) *MultiSearchService
FilterPath specifies a list of filters used to reduce the response.
func (*MultiSearchService) Header ¶
func (s *MultiSearchService) Header(name string, value string) *MultiSearchService
Header adds a header to the request.
func (*MultiSearchService) Headers ¶
func (s *MultiSearchService) Headers(headers http.Header) *MultiSearchService
Headers specifies the headers of the request.
func (*MultiSearchService) Human ¶
func (s *MultiSearchService) Human(human bool) *MultiSearchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*MultiSearchService) Index ¶
func (s *MultiSearchService) Index(indices ...string) *MultiSearchService
func (*MultiSearchService) MaxConcurrentSearches ¶
func (s *MultiSearchService) MaxConcurrentSearches(max int) *MultiSearchService
func (*MultiSearchService) PreFilterShardSize ¶
func (s *MultiSearchService) PreFilterShardSize(size int) *MultiSearchService
func (*MultiSearchService) Pretty ¶
func (s *MultiSearchService) Pretty(pretty bool) *MultiSearchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
type MultiTerm ¶
type MultiTerm struct { Field string Missing interface{} }
MultiTerm specifies a single term field for a multi terms aggregation.
type MultiTermsAggregation ¶
type MultiTermsAggregation struct {
// contains filtered or unexported fields
}
MultiTermsAggregation is a multi-bucket value source based aggregation where buckets are dynamically built - one per unique set of values. The multi terms aggregation is very similar to the terms aggregation, however in most cases it will be slower than the terms aggregation and will consume more memory. Therefore, if the same set of fields is constantly used, it would be more efficient to index a combined key for this fields as a separate field and use the terms aggregation on this field.
func NewMultiTermsAggregation ¶
func NewMultiTermsAggregation() *MultiTermsAggregation
NewMultiTermsAggregation initializes a new MultiTermsAggregation.
func (*MultiTermsAggregation) CollectionMode ¶
func (a *MultiTermsAggregation) CollectionMode(collectionMode string) *MultiTermsAggregation
Collection mode can be depth_first or breadth_first as of 1.4.0.
func (*MultiTermsAggregation) Meta ¶
func (a *MultiTermsAggregation) Meta(metaData map[string]interface{}) *MultiTermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MultiTermsAggregation) MinDocCount ¶
func (a *MultiTermsAggregation) MinDocCount(minDocCount int) *MultiTermsAggregation
func (*MultiTermsAggregation) MultiTerms ¶
func (a *MultiTermsAggregation) MultiTerms(multiTerms ...MultiTerm) *MultiTermsAggregation
MultiTerms adds a slice of MultiTerm instances to return in the aggregation.
Notice that it appends to existing terms, so you can use MultiTerms more than once, and mix with Terms method.
func (*MultiTermsAggregation) Order ¶
func (a *MultiTermsAggregation) Order(order string, asc bool) *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByAggregation ¶
func (a *MultiTermsAggregation) OrderByAggregation(aggName string, asc bool) *MultiTermsAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*MultiTermsAggregation) OrderByAggregationAndMetric ¶
func (a *MultiTermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *MultiTermsAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*MultiTermsAggregation) OrderByCount ¶
func (a *MultiTermsAggregation) OrderByCount(asc bool) *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByCountAsc ¶
func (a *MultiTermsAggregation) OrderByCountAsc() *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByCountDesc ¶
func (a *MultiTermsAggregation) OrderByCountDesc() *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByKey ¶
func (a *MultiTermsAggregation) OrderByKey(asc bool) *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByKeyAsc ¶
func (a *MultiTermsAggregation) OrderByKeyAsc() *MultiTermsAggregation
func (*MultiTermsAggregation) OrderByKeyDesc ¶
func (a *MultiTermsAggregation) OrderByKeyDesc() *MultiTermsAggregation
func (*MultiTermsAggregation) ShardMinDocCount ¶
func (a *MultiTermsAggregation) ShardMinDocCount(shardMinDocCount int) *MultiTermsAggregation
func (*MultiTermsAggregation) ShardSize ¶
func (a *MultiTermsAggregation) ShardSize(shardSize int) *MultiTermsAggregation
func (*MultiTermsAggregation) ShowTermDocCountError ¶
func (a *MultiTermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *MultiTermsAggregation
func (*MultiTermsAggregation) Size ¶
func (a *MultiTermsAggregation) Size(size int) *MultiTermsAggregation
func (*MultiTermsAggregation) Source ¶
func (a *MultiTermsAggregation) Source() (interface{}, error)
func (*MultiTermsAggregation) SubAggregation ¶
func (a *MultiTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *MultiTermsAggregation
func (*MultiTermsAggregation) Terms ¶
func (a *MultiTermsAggregation) Terms(fields ...string) *MultiTermsAggregation
Terms adds a slice of field names to return in the aggregation.
Notice that it appends to existing terms, so you can use Terms more than once, and mix with MultiTerms method.
type MultiTermsOrder ¶
MultiTermsOrder specifies a single order field for a multi terms aggregation.
func (*MultiTermsOrder) Source ¶
func (order *MultiTermsOrder) Source() (interface{}, error)
Source returns serializable JSON of the MultiTermsOrder.
type MultiTermvectorItem ¶
type MultiTermvectorItem struct {
// contains filtered or unexported fields
}
MultiTermvectorItem is a single document to retrieve via MultiTermvectorService.
func NewMultiTermvectorItem ¶
func NewMultiTermvectorItem() *MultiTermvectorItem
func (*MultiTermvectorItem) Doc ¶
func (s *MultiTermvectorItem) Doc(doc interface{}) *MultiTermvectorItem
Doc is the document to analyze.
func (*MultiTermvectorItem) FieldStatistics ¶
func (s *MultiTermvectorItem) FieldStatistics(fieldStatistics bool) *MultiTermvectorItem
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
func (*MultiTermvectorItem) Fields ¶
func (s *MultiTermvectorItem) Fields(fields ...string) *MultiTermvectorItem
Fields a list of fields to return.
func (*MultiTermvectorItem) Id ¶
func (s *MultiTermvectorItem) Id(id string) *MultiTermvectorItem
func (*MultiTermvectorItem) Index ¶
func (s *MultiTermvectorItem) Index(index string) *MultiTermvectorItem
func (*MultiTermvectorItem) Offsets ¶
func (s *MultiTermvectorItem) Offsets(offsets bool) *MultiTermvectorItem
Offsets specifies if term offsets should be returned.
func (*MultiTermvectorItem) Parent ¶
func (s *MultiTermvectorItem) Parent(parent string) *MultiTermvectorItem
Parent id of documents.
func (*MultiTermvectorItem) Payloads ¶
func (s *MultiTermvectorItem) Payloads(payloads bool) *MultiTermvectorItem
Payloads specifies if term payloads should be returned.
func (*MultiTermvectorItem) PerFieldAnalyzer ¶
func (s *MultiTermvectorItem) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *MultiTermvectorItem
PerFieldAnalyzer allows to specify a different analyzer than the one at the field.
func (*MultiTermvectorItem) Positions ¶
func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem
Positions specifies if term positions should be returned.
func (*MultiTermvectorItem) Preference ¶
func (s *MultiTermvectorItem) Preference(preference string) *MultiTermvectorItem
Preference specify the node or shard the operation should be performed on (default: random).
func (*MultiTermvectorItem) Realtime ¶
func (s *MultiTermvectorItem) Realtime(realtime bool) *MultiTermvectorItem
Realtime specifies if request is real-time as opposed to near-real-time (default: true).
func (*MultiTermvectorItem) Routing ¶
func (s *MultiTermvectorItem) Routing(routing string) *MultiTermvectorItem
Routing is a specific routing value.
func (*MultiTermvectorItem) Source ¶
func (s *MultiTermvectorItem) Source() interface{}
Source returns the serialized JSON to be sent to Elasticsearch as part of a MultiTermvector.
func (*MultiTermvectorItem) TermStatistics ¶
func (s *MultiTermvectorItem) TermStatistics(termStatistics bool) *MultiTermvectorItem
TermStatistics specifies if total term frequency and document frequency should be returned.
func (*MultiTermvectorItem) Type ¶
func (s *MultiTermvectorItem) Type(typ string) *MultiTermvectorItem
type MultiTermvectorResponse ¶
type MultiTermvectorResponse struct {
Docs []*TermvectorsResponse `json:"docs"`
}
MultiTermvectorResponse is the response of MultiTermvectorService.Do.
type MultiTermvectorService ¶
type MultiTermvectorService struct {
// contains filtered or unexported fields
}
MultiTermvectorService returns information and statistics on terms in the fields of a particular document. The document could be stored in the index or artificially provided by the user.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-multi-termvectors.html for documentation.
func NewMultiTermvectorService ¶
func NewMultiTermvectorService() *MultiTermvectorService
NewMultiTermvectorService creates a new MultiTermvectorService.
func (*MultiTermvectorService) Add ¶
func (s *MultiTermvectorService) Add(docs ...*MultiTermvectorItem) *MultiTermvectorService
Add adds documents to MultiTermvectors service.
func (*MultiTermvectorService) BodyJson ¶
func (s *MultiTermvectorService) BodyJson(body interface{}) *MultiTermvectorService
BodyJson is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
func (*MultiTermvectorService) BodyString ¶
func (s *MultiTermvectorService) BodyString(body string) *MultiTermvectorService
BodyString is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
func (*MultiTermvectorService) ErrorTrace ¶
func (s *MultiTermvectorService) ErrorTrace(errorTrace bool) *MultiTermvectorService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*MultiTermvectorService) FieldStatistics ¶
func (s *MultiTermvectorService) FieldStatistics(fieldStatistics bool) *MultiTermvectorService
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Fields ¶
func (s *MultiTermvectorService) Fields(fields []string) *MultiTermvectorService
Fields is a comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) FilterPath ¶
func (s *MultiTermvectorService) FilterPath(filterPath ...string) *MultiTermvectorService
FilterPath specifies a list of filters used to reduce the response.
func (*MultiTermvectorService) Header ¶
func (s *MultiTermvectorService) Header(name string, value string) *MultiTermvectorService
Header adds a header to the request.
func (*MultiTermvectorService) Headers ¶
func (s *MultiTermvectorService) Headers(headers http.Header) *MultiTermvectorService
Headers specifies the headers of the request.
func (*MultiTermvectorService) Human ¶
func (s *MultiTermvectorService) Human(human bool) *MultiTermvectorService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*MultiTermvectorService) Ids ¶
func (s *MultiTermvectorService) Ids(ids []string) *MultiTermvectorService
Ids is a comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body.
func (*MultiTermvectorService) Index ¶
func (s *MultiTermvectorService) Index(index string) *MultiTermvectorService
Index in which the document resides.
func (*MultiTermvectorService) Offsets ¶
func (s *MultiTermvectorService) Offsets(offsets bool) *MultiTermvectorService
Offsets specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Parent ¶
func (s *MultiTermvectorService) Parent(parent string) *MultiTermvectorService
Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Payloads ¶
func (s *MultiTermvectorService) Payloads(payloads bool) *MultiTermvectorService
Payloads specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Positions ¶
func (s *MultiTermvectorService) Positions(positions bool) *MultiTermvectorService
Positions specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Preference ¶
func (s *MultiTermvectorService) Preference(preference string) *MultiTermvectorService
Preference specifies the node or shard the operation should be performed on (default: random). Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Pretty ¶
func (s *MultiTermvectorService) Pretty(pretty bool) *MultiTermvectorService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*MultiTermvectorService) Realtime ¶
func (s *MultiTermvectorService) Realtime(realtime bool) *MultiTermvectorService
Realtime specifies if requests are real-time as opposed to near-real-time (default: true).
func (*MultiTermvectorService) Routing ¶
func (s *MultiTermvectorService) Routing(routing string) *MultiTermvectorService
Routing specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Source ¶
func (s *MultiTermvectorService) Source() interface{}
func (*MultiTermvectorService) TermStatistics ¶
func (s *MultiTermvectorService) TermStatistics(termStatistics bool) *MultiTermvectorService
TermStatistics specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Type ¶
func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService
Type of the document.
func (*MultiTermvectorService) Validate ¶
func (s *MultiTermvectorService) Validate() error
Validate checks if the operation is valid.
func (*MultiTermvectorService) Version ¶
func (s *MultiTermvectorService) Version(version interface{}) *MultiTermvectorService
Version is explicit version number for concurrency control.
func (*MultiTermvectorService) VersionType ¶
func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService
VersionType is specific version type.
type MultiValuesSourceFieldConfig ¶
type MultiValuesSourceFieldConfig struct { FieldName string Missing interface{} Script *Script TimeZone string }
MultiValuesSourceFieldConfig represents a field configuration used e.g. in WeightedAvgAggregation.
func (*MultiValuesSourceFieldConfig) Source ¶
func (f *MultiValuesSourceFieldConfig) Source() (interface{}, error)
type MutualInformationSignificanceHeuristic ¶
type MutualInformationSignificanceHeuristic struct {
// contains filtered or unexported fields
}
MutualInformationSignificanceHeuristic implements Mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_mutual_information for details.
func NewMutualInformationSignificanceHeuristic ¶
func NewMutualInformationSignificanceHeuristic() *MutualInformationSignificanceHeuristic
NewMutualInformationSignificanceHeuristic initializes a new instance of MutualInformationSignificanceHeuristic.
func (*MutualInformationSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *MutualInformationSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *MutualInformationSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*MutualInformationSignificanceHeuristic) IncludeNegatives ¶
func (sh *MutualInformationSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *MutualInformationSignificanceHeuristic
IncludeNegatives indicates whether to filter out the terms that appear much less in the subset than in the background without the subset.
func (*MutualInformationSignificanceHeuristic) Name ¶
func (sh *MutualInformationSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*MutualInformationSignificanceHeuristic) Source ¶
func (sh *MutualInformationSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type NestedAggregation ¶
type NestedAggregation struct {
// contains filtered or unexported fields
}
NestedAggregation is a special single bucket aggregation that enables aggregating nested documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-nested-aggregation.html
func NewNestedAggregation ¶
func NewNestedAggregation() *NestedAggregation
func (*NestedAggregation) Meta ¶
func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation
Meta sets the meta data to be included in the aggregation response.
func (*NestedAggregation) Path ¶
func (a *NestedAggregation) Path(path string) *NestedAggregation
func (*NestedAggregation) Source ¶
func (a *NestedAggregation) Source() (interface{}, error)
func (*NestedAggregation) SubAggregation ¶
func (a *NestedAggregation) SubAggregation(name string, subAggregation Aggregation) *NestedAggregation
type NestedHit ¶
type NestedHit struct { Field string `json:"field"` Offset int `json:"offset,omitempty"` Child *NestedHit `json:"_nested,omitempty"` }
NestedHit is a nested innerhit
type NestedQuery ¶
type NestedQuery struct {
// contains filtered or unexported fields
}
NestedQuery allows to query nested objects / docs. The query is executed against the nested objects / docs as if they were indexed as separate docs (they are, internally) and resulting in the root parent doc (or parent nested mapping).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-nested-query.html
func NewNestedQuery ¶
func NewNestedQuery(path string, query Query) *NestedQuery
NewNestedQuery creates and initializes a new NestedQuery.
func (*NestedQuery) Boost ¶
func (q *NestedQuery) Boost(boost float64) *NestedQuery
Boost sets the boost for this query.
func (*NestedQuery) IgnoreUnmapped ¶
func (q *NestedQuery) IgnoreUnmapped(value bool) *NestedQuery
IgnoreUnmapped sets the ignore_unmapped option for the filter that ignores unmapped nested fields
func (*NestedQuery) InnerHit ¶
func (q *NestedQuery) InnerHit(innerHit *InnerHit) *NestedQuery
InnerHit sets the inner hit definition in the scope of this nested query and reusing the defined path and query.
func (*NestedQuery) QueryName ¶
func (q *NestedQuery) QueryName(queryName string) *NestedQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*NestedQuery) ScoreMode ¶
func (q *NestedQuery) ScoreMode(scoreMode string) *NestedQuery
ScoreMode specifies the score mode.
func (*NestedQuery) Source ¶
func (q *NestedQuery) Source() (interface{}, error)
Source returns JSON for the query.
type NestedSort ¶
type NestedSort struct { Sorter // contains filtered or unexported fields }
NestedSort is used for fields that are inside a nested object. It takes a "path" argument and an optional nested filter that the nested objects should match with in order to be taken into account for sorting.
NestedSort is available from 6.1 and replaces nestedFilter and nestedPath in the other sorters.
func NewNestedSort ¶
func NewNestedSort(path string) *NestedSort
NewNestedSort creates a new NestedSort.
func (*NestedSort) Filter ¶
func (s *NestedSort) Filter(filter Query) *NestedSort
Filter sets the filter.
func (*NestedSort) NestedSort ¶
func (s *NestedSort) NestedSort(nestedSort *NestedSort) *NestedSort
NestedSort embeds another level of nested sorting.
func (*NestedSort) Source ¶
func (s *NestedSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
type NumberDecoder ¶
type NumberDecoder struct{}
NumberDecoder uses json.NewDecoder, with UseNumber() enabled, from the Go standard library to decode JSON data.
func (*NumberDecoder) Decode ¶
func (u *NumberDecoder) Decode(data []byte, v interface{}) error
Decode decodes with json.Unmarshal from the Go standard library.
type OpenPointInTimeService ¶
type OpenPointInTimeService struct {
// contains filtered or unexported fields
}
OpenPointInTimeService opens a point in time that can be used in subsequent searches.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.x/point-in-time-api.html for details.
func NewOpenPointInTimeService ¶
func NewOpenPointInTimeService() *OpenPointInTimeService
NewOpenPointInTimeService creates a new OpenPointInTimeService.
func (*OpenPointInTimeService) BodyJson ¶
func (s *OpenPointInTimeService) BodyJson(body interface{}) *OpenPointInTimeService
BodyJson is the document as a serializable JSON interface.
func (*OpenPointInTimeService) BodyString ¶
func (s *OpenPointInTimeService) BodyString(body string) *OpenPointInTimeService
BodyString is the document encoded as a string.
func (*OpenPointInTimeService) ErrorTrace ¶
func (s *OpenPointInTimeService) ErrorTrace(errorTrace bool) *OpenPointInTimeService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*OpenPointInTimeService) ExpandWildcards ¶
func (s *OpenPointInTimeService) ExpandWildcards(expandWildcards string) *OpenPointInTimeService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*OpenPointInTimeService) FilterPath ¶
func (s *OpenPointInTimeService) FilterPath(filterPath ...string) *OpenPointInTimeService
FilterPath specifies a list of filters used to reduce the response.
func (*OpenPointInTimeService) Header ¶
func (s *OpenPointInTimeService) Header(name string, value string) *OpenPointInTimeService
Header adds a header to the request.
func (*OpenPointInTimeService) Headers ¶
func (s *OpenPointInTimeService) Headers(headers http.Header) *OpenPointInTimeService
Headers specifies the headers of the request.
func (*OpenPointInTimeService) Human ¶
func (s *OpenPointInTimeService) Human(human bool) *OpenPointInTimeService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*OpenPointInTimeService) IgnoreUnavailable ¶
func (s *OpenPointInTimeService) IgnoreUnavailable(ignoreUnavailable bool) *OpenPointInTimeService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*OpenPointInTimeService) Index ¶
func (s *OpenPointInTimeService) Index(index ...string) *OpenPointInTimeService
Index is the name of the index (or indices).
func (*OpenPointInTimeService) KeepAlive ¶
func (s *OpenPointInTimeService) KeepAlive(keepAlive string) *OpenPointInTimeService
KeepAlive indicates the specific time to live for the point in time.
func (*OpenPointInTimeService) Preference ¶
func (s *OpenPointInTimeService) Preference(preference string) *OpenPointInTimeService
Preference specifies the node or shard the operation should be performed on.
func (*OpenPointInTimeService) Pretty ¶
func (s *OpenPointInTimeService) Pretty(pretty bool) *OpenPointInTimeService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*OpenPointInTimeService) Routing ¶
func (s *OpenPointInTimeService) Routing(routing string) *OpenPointInTimeService
Routing is a specific routing value.
func (*OpenPointInTimeService) Validate ¶
func (s *OpenPointInTimeService) Validate() error
Validate checks if the operation is valid.
type ParentIdQuery ¶
type ParentIdQuery struct {
// contains filtered or unexported fields
}
ParentIdQuery can be used to find child documents which belong to a particular parent. Given the following mapping definition.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-parent-id-query.html
func NewParentIdQuery ¶
func NewParentIdQuery(typ, id string) *ParentIdQuery
NewParentIdQuery creates and initializes a new parent_id query.
func (*ParentIdQuery) Boost ¶
func (q *ParentIdQuery) Boost(boost float64) *ParentIdQuery
Boost sets the boost for this query.
func (*ParentIdQuery) IgnoreUnmapped ¶
func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery
IgnoreUnmapped specifies whether unmapped types should be ignored. If set to false, the query failes when an unmapped type is found.
func (*ParentIdQuery) InnerHit ¶
func (q *ParentIdQuery) InnerHit(innerHit *InnerHit) *ParentIdQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*ParentIdQuery) QueryName ¶
func (q *ParentIdQuery) QueryName(queryName string) *ParentIdQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*ParentIdQuery) Source ¶
func (q *ParentIdQuery) Source() (interface{}, error)
Source returns JSON for the parent_id query.
func (*ParentIdQuery) Type ¶
func (q *ParentIdQuery) Type(typ string) *ParentIdQuery
Type sets the parent type.
type PercentageScoreSignificanceHeuristic ¶
type PercentageScoreSignificanceHeuristic struct{}
PercentageScoreSignificanceHeuristic implements the algorithm described in https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
func NewPercentageScoreSignificanceHeuristic ¶
func NewPercentageScoreSignificanceHeuristic() *PercentageScoreSignificanceHeuristic
NewPercentageScoreSignificanceHeuristic initializes a new instance of PercentageScoreSignificanceHeuristic.
func (*PercentageScoreSignificanceHeuristic) Name ¶
func (sh *PercentageScoreSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*PercentageScoreSignificanceHeuristic) Source ¶
func (sh *PercentageScoreSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type PercentileRanksAggregation ¶
type PercentileRanksAggregation struct {
// contains filtered or unexported fields
}
PercentileRanksAggregation See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-percentile-rank-aggregation.html
func NewPercentileRanksAggregation ¶
func NewPercentileRanksAggregation() *PercentileRanksAggregation
func (*PercentileRanksAggregation) Compression ¶
func (a *PercentileRanksAggregation) Compression(compression float64) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Estimator ¶
func (a *PercentileRanksAggregation) Estimator(estimator string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Field ¶
func (a *PercentileRanksAggregation) Field(field string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Format ¶
func (a *PercentileRanksAggregation) Format(format string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Meta ¶
func (a *PercentileRanksAggregation) Meta(metaData map[string]interface{}) *PercentileRanksAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentileRanksAggregation) Missing ¶
func (a *PercentileRanksAggregation) Missing(missing interface{}) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Script ¶
func (a *PercentileRanksAggregation) Script(script *Script) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Source ¶
func (a *PercentileRanksAggregation) Source() (interface{}, error)
func (*PercentileRanksAggregation) SubAggregation ¶
func (a *PercentileRanksAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Values ¶
func (a *PercentileRanksAggregation) Values(values ...float64) *PercentileRanksAggregation
type PercentilesAggregation ¶
type PercentilesAggregation struct {
// contains filtered or unexported fields
}
PercentilesAggregation is a multi-value metrics aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
func NewPercentilesAggregation ¶
func NewPercentilesAggregation() *PercentilesAggregation
func (*PercentilesAggregation) Compression ¶
func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation
func (*PercentilesAggregation) Estimator ¶
func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation
func (*PercentilesAggregation) Field ¶
func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation
func (*PercentilesAggregation) Format ¶
func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation
func (*PercentilesAggregation) Meta ¶
func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentilesAggregation) Method ¶
func (a *PercentilesAggregation) Method(method string) *PercentilesAggregation
Method is the percentiles method, which can be "tdigest" (default) or "hdr".
func (*PercentilesAggregation) Missing ¶
func (a *PercentilesAggregation) Missing(missing interface{}) *PercentilesAggregation
func (*PercentilesAggregation) NumberOfSignificantValueDigits ¶
func (a *PercentilesAggregation) NumberOfSignificantValueDigits(digits int) *PercentilesAggregation
func (*PercentilesAggregation) Percentiles ¶
func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation
func (*PercentilesAggregation) Script ¶
func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation
func (*PercentilesAggregation) Source ¶
func (a *PercentilesAggregation) Source() (interface{}, error)
func (*PercentilesAggregation) SubAggregation ¶
func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation
type PercentilesBucketAggregation ¶
type PercentilesBucketAggregation struct {
// contains filtered or unexported fields
}
PercentilesBucketAggregation is a sibling pipeline aggregation which calculates percentiles across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
func NewPercentilesBucketAggregation ¶
func NewPercentilesBucketAggregation() *PercentilesBucketAggregation
NewPercentilesBucketAggregation creates and initializes a new PercentilesBucketAggregation.
func (*PercentilesBucketAggregation) BucketsPath ¶
func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *PercentilesBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*PercentilesBucketAggregation) Format ¶
func (p *PercentilesBucketAggregation) Format(format string) *PercentilesBucketAggregation
Format to apply the output value of this aggregation.
func (*PercentilesBucketAggregation) GapInsertZeros ¶
func (p *PercentilesBucketAggregation) GapInsertZeros() *PercentilesBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*PercentilesBucketAggregation) GapPolicy ¶
func (p *PercentilesBucketAggregation) GapPolicy(gapPolicy string) *PercentilesBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*PercentilesBucketAggregation) GapSkip ¶
func (p *PercentilesBucketAggregation) GapSkip() *PercentilesBucketAggregation
GapSkip skips gaps in the series.
func (*PercentilesBucketAggregation) Meta ¶
func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentilesBucketAggregation) Percents ¶
func (p *PercentilesBucketAggregation) Percents(percents ...float64) *PercentilesBucketAggregation
Percents to calculate percentiles for in this aggregation.
func (*PercentilesBucketAggregation) Source ¶
func (p *PercentilesBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type PercolatorQuery ¶
type PercolatorQuery struct {
// contains filtered or unexported fields
}
PercolatorQuery can be used to match queries stored in an index.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-percolate-query.html
func NewPercolatorQuery ¶
func NewPercolatorQuery() *PercolatorQuery
NewPercolatorQuery creates and initializes a new Percolator query.
func (*PercolatorQuery) Document ¶
func (q *PercolatorQuery) Document(docs ...interface{}) *PercolatorQuery
func (*PercolatorQuery) DocumentType
deprecated
func (q *PercolatorQuery) DocumentType(typ string) *PercolatorQuery
Deprecated: DocumentType is deprecated as of 6.0.
func (*PercolatorQuery) Field ¶
func (q *PercolatorQuery) Field(field string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentId ¶
func (q *PercolatorQuery) IndexedDocumentId(id string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentIndex ¶
func (q *PercolatorQuery) IndexedDocumentIndex(index string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentPreference ¶
func (q *PercolatorQuery) IndexedDocumentPreference(preference string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentRouting ¶
func (q *PercolatorQuery) IndexedDocumentRouting(routing string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentType ¶
func (q *PercolatorQuery) IndexedDocumentType(typ string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentVersion ¶
func (q *PercolatorQuery) IndexedDocumentVersion(version int64) *PercolatorQuery
func (*PercolatorQuery) Name ¶
func (q *PercolatorQuery) Name(name string) *PercolatorQuery
Name used for identification purposes in "_percolator_document_slot" response field when multiple percolate queries have been specified in the main query.
func (*PercolatorQuery) Source ¶
func (q *PercolatorQuery) Source() (interface{}, error)
Source returns JSON for the percolate query.
type PhraseSuggester ¶
type PhraseSuggester struct { Suggester // contains filtered or unexported fields }
PhraseSuggester provides an API to access word alternatives on a per token basis within a certain string distance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-phrase.html.
func NewPhraseSuggester ¶
func NewPhraseSuggester(name string) *PhraseSuggester
NewPhraseSuggester creates a new PhraseSuggester.
func (*PhraseSuggester) Analyzer ¶
func (q *PhraseSuggester) Analyzer(analyzer string) *PhraseSuggester
func (*PhraseSuggester) CandidateGenerator ¶
func (q *PhraseSuggester) CandidateGenerator(generator CandidateGenerator) *PhraseSuggester
func (*PhraseSuggester) CandidateGenerators ¶
func (q *PhraseSuggester) CandidateGenerators(generators ...CandidateGenerator) *PhraseSuggester
func (*PhraseSuggester) ClearCandidateGenerator ¶
func (q *PhraseSuggester) ClearCandidateGenerator() *PhraseSuggester
func (*PhraseSuggester) CollateParams ¶
func (q *PhraseSuggester) CollateParams(collateParams map[string]interface{}) *PhraseSuggester
func (*PhraseSuggester) CollatePreference ¶
func (q *PhraseSuggester) CollatePreference(collatePreference string) *PhraseSuggester
func (*PhraseSuggester) CollatePrune ¶
func (q *PhraseSuggester) CollatePrune(collatePrune bool) *PhraseSuggester
func (*PhraseSuggester) CollateQuery ¶
func (q *PhraseSuggester) CollateQuery(collateQuery *Script) *PhraseSuggester
func (*PhraseSuggester) Confidence ¶
func (q *PhraseSuggester) Confidence(confidence float64) *PhraseSuggester
func (*PhraseSuggester) ContextQueries ¶
func (q *PhraseSuggester) ContextQueries(queries ...SuggesterContextQuery) *PhraseSuggester
func (*PhraseSuggester) ContextQuery ¶
func (q *PhraseSuggester) ContextQuery(query SuggesterContextQuery) *PhraseSuggester
func (*PhraseSuggester) Field ¶
func (q *PhraseSuggester) Field(field string) *PhraseSuggester
func (*PhraseSuggester) ForceUnigrams ¶
func (q *PhraseSuggester) ForceUnigrams(forceUnigrams bool) *PhraseSuggester
func (*PhraseSuggester) GramSize ¶
func (q *PhraseSuggester) GramSize(gramSize int) *PhraseSuggester
func (*PhraseSuggester) Highlight ¶
func (q *PhraseSuggester) Highlight(preTag, postTag string) *PhraseSuggester
func (*PhraseSuggester) MaxErrors ¶
func (q *PhraseSuggester) MaxErrors(maxErrors float64) *PhraseSuggester
func (*PhraseSuggester) Name ¶
func (q *PhraseSuggester) Name() string
func (*PhraseSuggester) RealWordErrorLikelihood ¶
func (q *PhraseSuggester) RealWordErrorLikelihood(realWordErrorLikelihood float64) *PhraseSuggester
func (*PhraseSuggester) Separator ¶
func (q *PhraseSuggester) Separator(separator string) *PhraseSuggester
func (*PhraseSuggester) ShardSize ¶
func (q *PhraseSuggester) ShardSize(shardSize int) *PhraseSuggester
func (*PhraseSuggester) Size ¶
func (q *PhraseSuggester) Size(size int) *PhraseSuggester
func (*PhraseSuggester) SmoothingModel ¶
func (q *PhraseSuggester) SmoothingModel(smoothingModel SmoothingModel) *PhraseSuggester
func (*PhraseSuggester) Source ¶
func (q *PhraseSuggester) Source(includeName bool) (interface{}, error)
Source generates the source for the phrase suggester.
func (*PhraseSuggester) Text ¶
func (q *PhraseSuggester) Text(text string) *PhraseSuggester
func (*PhraseSuggester) TokenLimit ¶
func (q *PhraseSuggester) TokenLimit(tokenLimit int) *PhraseSuggester
type PinnedQuery ¶
type PinnedQuery struct {
// contains filtered or unexported fields
}
PinnedQuery is a query that promotes selected documents to rank higher than those matching a given query.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/query-dsl-pinned-query.html
func NewPinnedQuery ¶
func NewPinnedQuery() *PinnedQuery
NewPinnedQuery creates and initializes a new pinned query.
func (*PinnedQuery) Ids ¶
func (q *PinnedQuery) Ids(ids ...string) *PinnedQuery
Ids sets an array of document IDs listed in the order they are to appear in results.
func (*PinnedQuery) Organic ¶
func (q *PinnedQuery) Organic(query Query) *PinnedQuery
Organic sets a choice of query used to rank documents which will be ranked below the "pinned" document ids.
func (*PinnedQuery) Source ¶
func (q *PinnedQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
type PointInTime ¶
type PointInTime struct { // Id that uniquely identifies the point in time, as created with the // OpenPointInTime API. Id string `json:"id,omitempty"` // KeepAlive is the time for which this specific PointInTime will be // kept alive by Elasticsearch. KeepAlive string `json:"keep_alive,omitempty"` }
PointInTime is a lightweight view into the state of the data that existed when initiated. It can be created with OpenPointInTime API and be used when searching, e.g. in Search API or with SearchSource.
func NewPointInTime ¶
func NewPointInTime(id string) *PointInTime
NewPointInTime creates a new PointInTime.
func NewPointInTimeWithKeepAlive ¶
func NewPointInTimeWithKeepAlive(id, keepAlive string) *PointInTime
NewPointInTimeWithKeepAlive creates a new PointInTime with the given time to keep alive.
func (*PointInTime) Source ¶
func (pit *PointInTime) Source() (interface{}, error)
Source generates the JSON serializable fragment for the PointInTime.
type PrefixQuery ¶
type PrefixQuery struct {
// contains filtered or unexported fields
}
PrefixQuery matches documents that have fields containing terms with a specified prefix (not analyzed).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-prefix-query.html
func NewPrefixQuery ¶
func NewPrefixQuery(name string, prefix string) *PrefixQuery
NewPrefixQuery creates and initializes a new PrefixQuery.
func (*PrefixQuery) Boost ¶
func (q *PrefixQuery) Boost(boost float64) *PrefixQuery
Boost sets the boost for this query.
func (*PrefixQuery) CaseInsensitive ¶
func (q *PrefixQuery) CaseInsensitive(caseInsensitive bool) *PrefixQuery
func (*PrefixQuery) QueryName ¶
func (q *PrefixQuery) QueryName(queryName string) *PrefixQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*PrefixQuery) Rewrite ¶
func (q *PrefixQuery) Rewrite(rewrite string) *PrefixQuery
func (*PrefixQuery) Source ¶
func (q *PrefixQuery) Source() (interface{}, error)
Source returns JSON for the query.
type ProfileResult ¶
type ProfileResult struct { Type string `json:"type"` Description string `json:"description,omitempty"` NodeTime string `json:"time,omitempty"` NodeTimeNanos int64 `json:"time_in_nanos,omitempty"` Breakdown map[string]int64 `json:"breakdown,omitempty"` Children []ProfileResult `json:"children,omitempty"` Debug map[string]interface{} `json:"debug,omitempty"` }
ProfileResult is the internal representation of a profiled query, corresponding to a single node in the query tree.
type PutScriptService ¶
type PutScriptService struct {
// contains filtered or unexported fields
}
PutScriptService adds or updates a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html for details.
func NewPutScriptService ¶
func NewPutScriptService() *PutScriptService
NewPutScriptService creates a new PutScriptService.
func (*PutScriptService) BodyJson ¶
func (s *PutScriptService) BodyJson(body interface{}) *PutScriptService
BodyJson is the document as a serializable JSON interface.
func (*PutScriptService) BodyString ¶
func (s *PutScriptService) BodyString(body string) *PutScriptService
BodyString is the document encoded as a string.
func (*PutScriptService) Context ¶
func (s *PutScriptService) Context(context string) *PutScriptService
Context specifies the script context (optional).
func (*PutScriptService) ErrorTrace ¶
func (s *PutScriptService) ErrorTrace(errorTrace bool) *PutScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*PutScriptService) FilterPath ¶
func (s *PutScriptService) FilterPath(filterPath ...string) *PutScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*PutScriptService) Header ¶
func (s *PutScriptService) Header(name string, value string) *PutScriptService
Header adds a header to the request.
func (*PutScriptService) Headers ¶
func (s *PutScriptService) Headers(headers http.Header) *PutScriptService
Headers specifies the headers of the request.
func (*PutScriptService) Human ¶
func (s *PutScriptService) Human(human bool) *PutScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*PutScriptService) Id ¶
func (s *PutScriptService) Id(id string) *PutScriptService
Id is the script ID.
func (*PutScriptService) MasterTimeout ¶
func (s *PutScriptService) MasterTimeout(masterTimeout string) *PutScriptService
MasterTimeout is the timeout for connecting to master.
func (*PutScriptService) Pretty ¶
func (s *PutScriptService) Pretty(pretty bool) *PutScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*PutScriptService) Timeout ¶
func (s *PutScriptService) Timeout(timeout string) *PutScriptService
Timeout is an explicit operation timeout.
type Query ¶
type Query interface { // Source returns the JSON-serializable query request. Source() (interface{}, error) }
Query represents the generic query interface. A query's sole purpose is to return the source of the query as a JSON-serializable object. Returning map[string]interface{} is the norm for queries.
type QueryProfileShardResult ¶
type QueryProfileShardResult struct { Query []ProfileResult `json:"query,omitempty"` RewriteTime int64 `json:"rewrite_time,omitempty"` Collector []interface{} `json:"collector,omitempty"` }
QueryProfileShardResult is a container class to hold the profile results for a single shard in the request. It comtains a list of query profiles, a collector tree and a total rewrite tree.
type QueryRescorer ¶
type QueryRescorer struct {
// contains filtered or unexported fields
}
func NewQueryRescorer ¶
func NewQueryRescorer(query Query) *QueryRescorer
func (*QueryRescorer) Name ¶
func (r *QueryRescorer) Name() string
func (*QueryRescorer) QueryWeight ¶
func (r *QueryRescorer) QueryWeight(queryWeight float64) *QueryRescorer
func (*QueryRescorer) RescoreQueryWeight ¶
func (r *QueryRescorer) RescoreQueryWeight(rescoreQueryWeight float64) *QueryRescorer
func (*QueryRescorer) ScoreMode ¶
func (r *QueryRescorer) ScoreMode(scoreMode string) *QueryRescorer
func (*QueryRescorer) Source ¶
func (r *QueryRescorer) Source() (interface{}, error)
type QueryStringQuery ¶
type QueryStringQuery struct {
// contains filtered or unexported fields
}
QueryStringQuery uses the query parser in order to parse its content.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-query-string-query.html
func NewQueryStringQuery ¶
func NewQueryStringQuery(queryString string) *QueryStringQuery
NewQueryStringQuery creates and initializes a new QueryStringQuery.
func (*QueryStringQuery) AllowLeadingWildcard ¶
func (q *QueryStringQuery) AllowLeadingWildcard(allowLeadingWildcard bool) *QueryStringQuery
AllowLeadingWildcard specifies whether leading wildcards should be allowed or not (defaults to true).
func (*QueryStringQuery) AnalyzeWildcard ¶
func (q *QueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *QueryStringQuery
AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
func (*QueryStringQuery) Analyzer ¶
func (q *QueryStringQuery) Analyzer(analyzer string) *QueryStringQuery
Analyzer is an optional analyzer used to analyze the query string. Note, if a field has search analyzer defined for it, then it will be used automatically. Defaults to the smart search analyzer.
func (*QueryStringQuery) Boost ¶
func (q *QueryStringQuery) Boost(boost float64) *QueryStringQuery
Boost sets the boost for this query.
func (*QueryStringQuery) DefaultField ¶
func (q *QueryStringQuery) DefaultField(defaultField string) *QueryStringQuery
DefaultField specifies the field to run against when no prefix field is specified. Only relevant when not explicitly adding fields the query string will run against.
func (*QueryStringQuery) DefaultOperator ¶
func (q *QueryStringQuery) DefaultOperator(operator string) *QueryStringQuery
DefaultOperator sets the boolean operator of the query parser used to parse the query string.
In default mode (OR) terms without any modifiers are considered optional, e.g. "capital of Hungary" is equal to "capital OR of OR Hungary".
In AND mode, terms are considered to be in conjunction. The above mentioned query is then parsed as "capital AND of AND Hungary".
func (*QueryStringQuery) EnablePositionIncrements ¶
func (q *QueryStringQuery) EnablePositionIncrements(enablePositionIncrements bool) *QueryStringQuery
EnablePositionIncrements indicates whether to enable position increments in result query. Defaults to true.
When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token.
func (*QueryStringQuery) Escape ¶
func (q *QueryStringQuery) Escape(escape bool) *QueryStringQuery
Escape performs escaping of the query string.
func (*QueryStringQuery) Field ¶
func (q *QueryStringQuery) Field(field string) *QueryStringQuery
Field adds a field to run the query string against.
func (*QueryStringQuery) FieldWithBoost ¶
func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery
FieldWithBoost adds a field to run the query string against with a specific boost.
func (*QueryStringQuery) Fuzziness ¶
func (q *QueryStringQuery) Fuzziness(fuzziness string) *QueryStringQuery
Fuzziness sets the edit distance for fuzzy queries. Default is "AUTO".
func (*QueryStringQuery) FuzzyMaxExpansions ¶
func (q *QueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *QueryStringQuery
func (*QueryStringQuery) FuzzyPrefixLength ¶
func (q *QueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *QueryStringQuery
FuzzyPrefixLength sets the minimum prefix length for fuzzy queries. Default is 1.
func (*QueryStringQuery) FuzzyRewrite ¶
func (q *QueryStringQuery) FuzzyRewrite(fuzzyRewrite string) *QueryStringQuery
func (*QueryStringQuery) Lenient ¶
func (q *QueryStringQuery) Lenient(lenient bool) *QueryStringQuery
Lenient indicates whether the query string parser should be lenient when parsing field values. It defaults to the index setting and if not set, defaults to false.
func (*QueryStringQuery) Locale
deprecated
func (q *QueryStringQuery) Locale(locale string) *QueryStringQuery
Locale specifies the locale to be used for string conversions.
Deprecated: Decision is now made by the analyzer.
func (*QueryStringQuery) LowercaseExpandedTerms
deprecated
func (q *QueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *QueryStringQuery
LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy and range queries are automatically lower-cased or not. Default is true.
Deprecated: Decision is now made by the analyzer.
func (*QueryStringQuery) MaxDeterminizedState ¶
func (q *QueryStringQuery) MaxDeterminizedState(maxDeterminizedStates int) *QueryStringQuery
MaxDeterminizedState protects against too-difficult regular expression queries.
func (*QueryStringQuery) MinimumShouldMatch ¶
func (q *QueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *QueryStringQuery
func (*QueryStringQuery) PhraseSlop ¶
func (q *QueryStringQuery) PhraseSlop(phraseSlop int) *QueryStringQuery
PhraseSlop sets the default slop for phrases. If zero, then exact matches are required. Default value is zero.
func (*QueryStringQuery) QueryName ¶
func (q *QueryStringQuery) QueryName(queryName string) *QueryStringQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*QueryStringQuery) QuoteAnalyzer ¶
func (q *QueryStringQuery) QuoteAnalyzer(quoteAnalyzer string) *QueryStringQuery
QuoteAnalyzer is an optional analyzer to be used to analyze the query string for phrase searches. Note, if a field has search analyzer defined for it, then it will be used automatically. Defaults to the smart search analyzer.
func (*QueryStringQuery) QuoteFieldSuffix ¶
func (q *QueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *QueryStringQuery
QuoteFieldSuffix is an optional field name suffix to automatically try and add to the field searched when using quoted text.
func (*QueryStringQuery) Rewrite ¶
func (q *QueryStringQuery) Rewrite(rewrite string) *QueryStringQuery
func (*QueryStringQuery) Source ¶
func (q *QueryStringQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*QueryStringQuery) TieBreaker ¶
func (q *QueryStringQuery) TieBreaker(tieBreaker float64) *QueryStringQuery
TieBreaker is used when more than one field is used with the query string, and combined queries are using dismax.
func (*QueryStringQuery) TimeZone ¶
func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery
TimeZone can be used to automatically adjust to/from fields using a timezone. Only used with date fields, of course.
func (*QueryStringQuery) Type ¶
func (q *QueryStringQuery) Type(typ string) *QueryStringQuery
Type sets how multiple fields should be combined to build textual part queries, e.g. "best_fields".
type RandomFunction ¶
type RandomFunction struct {
// contains filtered or unexported fields
}
RandomFunction builds a random score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_random for details.
func NewRandomFunction ¶
func NewRandomFunction() *RandomFunction
NewRandomFunction initializes and returns a new RandomFunction.
func (*RandomFunction) Field ¶
func (fn *RandomFunction) Field(field string) *RandomFunction
Field is the field to be used for random number generation. This parameter is compulsory when a Seed is set and ignored otherwise. Note that documents that have the same value for a field will get the same score.
func (*RandomFunction) GetWeight ¶
func (fn *RandomFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*RandomFunction) Name ¶
func (fn *RandomFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*RandomFunction) Seed ¶
func (fn *RandomFunction) Seed(seed interface{}) *RandomFunction
Seed sets the seed based on which the random number will be generated. Using the same seed is guaranteed to generate the same random number for a specific doc. Seed must be an integer, e.g. int or int64. It is specified as an interface{} here for compatibility with older versions (which also accepted strings).
func (*RandomFunction) Source ¶
func (fn *RandomFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*RandomFunction) Weight ¶
func (fn *RandomFunction) Weight(weight float64) *RandomFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type RangeAggregation ¶
type RangeAggregation struct {
// contains filtered or unexported fields
}
RangeAggregation is a multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket. During the aggregation process, the values extracted from each document will be checked against each bucket range and "bucket" the relevant/matching document. Note that this aggregration includes the from value and excludes the to value for each range. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-range-aggregation.html
func NewRangeAggregation ¶
func NewRangeAggregation() *RangeAggregation
func (*RangeAggregation) AddRange ¶
func (a *RangeAggregation) AddRange(from, to interface{}) *RangeAggregation
func (*RangeAggregation) AddRangeWithKey ¶
func (a *RangeAggregation) AddRangeWithKey(key string, from, to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedFrom ¶
func (a *RangeAggregation) AddUnboundedFrom(to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedFromWithKey ¶
func (a *RangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedTo ¶
func (a *RangeAggregation) AddUnboundedTo(from interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedToWithKey ¶
func (a *RangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *RangeAggregation
func (*RangeAggregation) Between ¶
func (a *RangeAggregation) Between(from, to interface{}) *RangeAggregation
func (*RangeAggregation) BetweenWithKey ¶
func (a *RangeAggregation) BetweenWithKey(key string, from, to interface{}) *RangeAggregation
func (*RangeAggregation) Field ¶
func (a *RangeAggregation) Field(field string) *RangeAggregation
func (*RangeAggregation) Gt ¶
func (a *RangeAggregation) Gt(from interface{}) *RangeAggregation
func (*RangeAggregation) GtWithKey ¶
func (a *RangeAggregation) GtWithKey(key string, from interface{}) *RangeAggregation
func (*RangeAggregation) Keyed ¶
func (a *RangeAggregation) Keyed(keyed bool) *RangeAggregation
func (*RangeAggregation) Lt ¶
func (a *RangeAggregation) Lt(to interface{}) *RangeAggregation
func (*RangeAggregation) LtWithKey ¶
func (a *RangeAggregation) LtWithKey(key string, to interface{}) *RangeAggregation
func (*RangeAggregation) Meta ¶
func (a *RangeAggregation) Meta(metaData map[string]interface{}) *RangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*RangeAggregation) Missing ¶
func (a *RangeAggregation) Missing(missing interface{}) *RangeAggregation
Missing configures the value to use when documents miss a value.
func (*RangeAggregation) Script ¶
func (a *RangeAggregation) Script(script *Script) *RangeAggregation
func (*RangeAggregation) Source ¶
func (a *RangeAggregation) Source() (interface{}, error)
func (*RangeAggregation) SubAggregation ¶
func (a *RangeAggregation) SubAggregation(name string, subAggregation Aggregation) *RangeAggregation
func (*RangeAggregation) Unmapped ¶
func (a *RangeAggregation) Unmapped(unmapped bool) *RangeAggregation
type RangeQuery ¶
type RangeQuery struct {
// contains filtered or unexported fields
}
RangeQuery matches documents with fields that have terms within a certain range.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-range-query.html
func NewRangeQuery ¶
func NewRangeQuery(name string) *RangeQuery
NewRangeQuery creates and initializes a new RangeQuery.
func (*RangeQuery) Boost ¶
func (q *RangeQuery) Boost(boost float64) *RangeQuery
Boost sets the boost for this query.
func (*RangeQuery) Format ¶
func (q *RangeQuery) Format(format string) *RangeQuery
Format is used for date fields. In that case, we can set the format to be used instead of the mapper format.
func (*RangeQuery) From ¶
func (q *RangeQuery) From(from interface{}) *RangeQuery
From indicates the from part of the RangeQuery. Use nil to indicate an unbounded from part.
func (*RangeQuery) Gt ¶
func (q *RangeQuery) Gt(from interface{}) *RangeQuery
Gt indicates a greater-than value for the from part. Use nil to indicate an unbounded from part.
func (*RangeQuery) Gte ¶
func (q *RangeQuery) Gte(from interface{}) *RangeQuery
Gte indicates a greater-than-or-equal value for the from part. Use nil to indicate an unbounded from part.
func (*RangeQuery) IncludeLower ¶
func (q *RangeQuery) IncludeLower(includeLower bool) *RangeQuery
IncludeLower indicates whether the lower bound should be included or not. Defaults to true.
func (*RangeQuery) IncludeUpper ¶
func (q *RangeQuery) IncludeUpper(includeUpper bool) *RangeQuery
IncludeUpper indicates whether the upper bound should be included or not. Defaults to true.
func (*RangeQuery) Lt ¶
func (q *RangeQuery) Lt(to interface{}) *RangeQuery
Lt indicates a less-than value for the to part. Use nil to indicate an unbounded to part.
func (*RangeQuery) Lte ¶
func (q *RangeQuery) Lte(to interface{}) *RangeQuery
Lte indicates a less-than-or-equal value for the to part. Use nil to indicate an unbounded to part.
func (*RangeQuery) QueryName ¶
func (q *RangeQuery) QueryName(queryName string) *RangeQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*RangeQuery) Relation ¶
func (q *RangeQuery) Relation(relation string) *RangeQuery
Relation is used for range fields. which can be one of "within", "contains", "intersects" (default) and "disjoint".
func (*RangeQuery) Source ¶
func (q *RangeQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*RangeQuery) TimeZone ¶
func (q *RangeQuery) TimeZone(timeZone string) *RangeQuery
TimeZone is used for date fields. In that case, we can adjust the from/to fields using a timezone.
func (*RangeQuery) To ¶
func (q *RangeQuery) To(to interface{}) *RangeQuery
To indicates the to part of the RangeQuery. Use nil to indicate an unbounded to part.
type RankFeatureLinearScoreFunction ¶
type RankFeatureLinearScoreFunction struct { }
RankFeatureLinearScoreFunction represents a Linear score function for a RankFeatureQuery.
See here for details: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html#rank-feature-query-linear
func NewRankFeatureLinearScoreFunction ¶
func NewRankFeatureLinearScoreFunction() *RankFeatureLinearScoreFunction
NewRankFeatureLinearScoreFunction initializes a new RankFeatureLinearScoreFunction.
func (*RankFeatureLinearScoreFunction) Name ¶
func (f *RankFeatureLinearScoreFunction) Name() string
Name of the score function.
func (*RankFeatureLinearScoreFunction) Source ¶
func (f *RankFeatureLinearScoreFunction) Source() (interface{}, error)
Source returns a serializable JSON object for building the query.
type RankFeatureLogScoreFunction ¶
type RankFeatureLogScoreFunction struct {
// contains filtered or unexported fields
}
RankFeatureLogScoreFunction represents a Logarithmic score function for a RankFeatureQuery.
See here for details: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html#rank-feature-query-logarithm
func NewRankFeatureLogScoreFunction ¶
func NewRankFeatureLogScoreFunction(scalingFactor float64) *RankFeatureLogScoreFunction
NewRankFeatureLogScoreFunction returns a new RankFeatureLogScoreFunction with the given scaling factor.
func (*RankFeatureLogScoreFunction) Name ¶
func (f *RankFeatureLogScoreFunction) Name() string
Name of the score function.
func (*RankFeatureLogScoreFunction) Source ¶
func (f *RankFeatureLogScoreFunction) Source() (interface{}, error)
Source returns a serializable JSON object for building the query.
type RankFeatureQuery ¶
type RankFeatureQuery struct {
// contains filtered or unexported fields
}
RankFeatureQuery boosts the relevance score of documents based on the numeric value of a rank_feature or rank_features field.
The RankFeatureQuery is typically used in the should clause of a BoolQuery so its relevance scores are added to other scores from the BoolQuery.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html
func NewRankFeatureQuery ¶
func NewRankFeatureQuery(field string) *RankFeatureQuery
NewRankFeatureQuery creates and initializes a new RankFeatureQuery.
func (*RankFeatureQuery) Boost ¶
func (q *RankFeatureQuery) Boost(boost float64) *RankFeatureQuery
Boost sets the boost for this query.
func (*RankFeatureQuery) Field ¶
func (q *RankFeatureQuery) Field(field string) *RankFeatureQuery
Field name.
func (*RankFeatureQuery) QueryName ¶
func (q *RankFeatureQuery) QueryName(queryName string) *RankFeatureQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*RankFeatureQuery) ScoreFunction ¶
func (q *RankFeatureQuery) ScoreFunction(f RankFeatureScoreFunction) *RankFeatureQuery
ScoreFunction specifies the score function for the RankFeatureQuery.
func (*RankFeatureQuery) Source ¶
func (q *RankFeatureQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
type RankFeatureSaturationScoreFunction ¶
type RankFeatureSaturationScoreFunction struct {
// contains filtered or unexported fields
}
RankFeatureSaturationScoreFunction represents a Log score function for a RankFeatureQuery.
See here for details: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html#rank-feature-query-saturation
func NewRankFeatureSaturationScoreFunction ¶
func NewRankFeatureSaturationScoreFunction() *RankFeatureSaturationScoreFunction
NewRankFeatureSaturationScoreFunction initializes a new RankFeatureSaturationScoreFunction.
func (*RankFeatureSaturationScoreFunction) Name ¶
func (f *RankFeatureSaturationScoreFunction) Name() string
Name of the score function.
func (*RankFeatureSaturationScoreFunction) Pivot ¶
func (f *RankFeatureSaturationScoreFunction) Pivot(pivot float64) *RankFeatureSaturationScoreFunction
Pivot specifies the pivot to use.
func (*RankFeatureSaturationScoreFunction) Source ¶
func (f *RankFeatureSaturationScoreFunction) Source() (interface{}, error)
Source returns a serializable JSON object for building the query.
type RankFeatureScoreFunction ¶
RankFeatureScoreFunction specifies the interface for score functions in the context of a RankFeatureQuery.
type RankFeatureSigmoidScoreFunction ¶
type RankFeatureSigmoidScoreFunction struct {
// contains filtered or unexported fields
}
RankFeatureSigmoidScoreFunction represents a Sigmoid score function for a RankFeatureQuery.
See here for details: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html#rank-feature-query-sigmoid
func NewRankFeatureSigmoidScoreFunction ¶
func NewRankFeatureSigmoidScoreFunction(pivot, exponent float64) *RankFeatureSigmoidScoreFunction
NewRankFeatureSigmoidScoreFunction returns a new RankFeatureSigmoidScoreFunction with the given scaling factor.
func (*RankFeatureSigmoidScoreFunction) Name ¶
func (f *RankFeatureSigmoidScoreFunction) Name() string
Name of the score function.
func (*RankFeatureSigmoidScoreFunction) Source ¶
func (f *RankFeatureSigmoidScoreFunction) Source() (interface{}, error)
Source returns a serializable JSON object for building the query.
type RareTermsAggregation ¶
type RareTermsAggregation struct {
// contains filtered or unexported fields
}
RareTermsAggregation is a multi-bucket value source based aggregation which finds "rare" terms — terms that are at the long-tail of the distribution and are not frequent. Conceptually, this is like a terms aggregation that is sorted by _count ascending.
See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-rare-terms-aggregation.html for details.
func NewRareTermsAggregation ¶
func NewRareTermsAggregation() *RareTermsAggregation
func (*RareTermsAggregation) Exclude ¶
func (a *RareTermsAggregation) Exclude(regexp string) *RareTermsAggregation
func (*RareTermsAggregation) ExcludeValues ¶
func (a *RareTermsAggregation) ExcludeValues(values ...interface{}) *RareTermsAggregation
func (*RareTermsAggregation) Field ¶
func (a *RareTermsAggregation) Field(field string) *RareTermsAggregation
func (*RareTermsAggregation) Include ¶
func (a *RareTermsAggregation) Include(regexp string) *RareTermsAggregation
func (*RareTermsAggregation) IncludeExclude ¶
func (a *RareTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *RareTermsAggregation
func (*RareTermsAggregation) IncludeValues ¶
func (a *RareTermsAggregation) IncludeValues(values ...interface{}) *RareTermsAggregation
func (*RareTermsAggregation) MaxDocCount ¶
func (a *RareTermsAggregation) MaxDocCount(maxDocCount int) *RareTermsAggregation
func (*RareTermsAggregation) Meta ¶
func (a *RareTermsAggregation) Meta(metaData map[string]interface{}) *RareTermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*RareTermsAggregation) Missing ¶
func (a *RareTermsAggregation) Missing(missing interface{}) *RareTermsAggregation
func (*RareTermsAggregation) Precision ¶
func (a *RareTermsAggregation) Precision(precision float64) *RareTermsAggregation
func (*RareTermsAggregation) Source ¶
func (a *RareTermsAggregation) Source() (interface{}, error)
func (*RareTermsAggregation) SubAggregation ¶
func (a *RareTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *RareTermsAggregation
type RawStringQuery ¶
type RawStringQuery string
RawStringQuery can be used to treat a string representation of an ES query as a Query. Example usage:
q := RawStringQuery("{\"match_all\":{}}") db.Search().Query(q).From(1).Size(100).Do()
func NewRawStringQuery ¶
func NewRawStringQuery(q string) RawStringQuery
NewRawStringQuery ininitializes a new RawStringQuery. It is the same as RawStringQuery(q).
func (RawStringQuery) Source ¶
func (q RawStringQuery) Source() (interface{}, error)
Source returns the JSON encoded body
type RecoverySource ¶
type RecoverySource struct {
Type string `json:"type"`
}
type RegexCompletionSuggesterOptions ¶
type RegexCompletionSuggesterOptions struct {
// contains filtered or unexported fields
}
RegexCompletionSuggesterOptions represents the options for regex completion suggester.
func NewRegexCompletionSuggesterOptions ¶
func NewRegexCompletionSuggesterOptions() *RegexCompletionSuggesterOptions
NewRegexCompletionSuggesterOptions initializes a new RegexCompletionSuggesterOptions instance.
func (*RegexCompletionSuggesterOptions) Flags ¶
func (o *RegexCompletionSuggesterOptions) Flags(flags interface{}) *RegexCompletionSuggesterOptions
Flags represents internal regex flags. Possible flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-completion.html#regex for details.
func (*RegexCompletionSuggesterOptions) MaxDeterminizedStates ¶
func (o *RegexCompletionSuggesterOptions) MaxDeterminizedStates(max int) *RegexCompletionSuggesterOptions
MaxDeterminizedStates represents the maximum automaton states allowed for regex expansion.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-completion.html#regex for details.
func (*RegexCompletionSuggesterOptions) Source ¶
func (o *RegexCompletionSuggesterOptions) Source() (interface{}, error)
Source creates the JSON data.
type RegexpQuery ¶
type RegexpQuery struct {
// contains filtered or unexported fields
}
RegexpQuery allows you to use regular expression term queries.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-regexp-query.html
func NewRegexpQuery ¶
func NewRegexpQuery(name string, regexp string) *RegexpQuery
NewRegexpQuery creates and initializes a new RegexpQuery.
func (*RegexpQuery) Boost ¶
func (q *RegexpQuery) Boost(boost float64) *RegexpQuery
Boost sets the boost for this query.
func (*RegexpQuery) CaseInsensitive ¶
func (q *RegexpQuery) CaseInsensitive(caseInsensitive bool) *RegexpQuery
func (*RegexpQuery) Flags ¶
func (q *RegexpQuery) Flags(flags string) *RegexpQuery
Flags sets the regexp flags.
func (*RegexpQuery) MaxDeterminizedStates ¶
func (q *RegexpQuery) MaxDeterminizedStates(maxDeterminizedStates int) *RegexpQuery
MaxDeterminizedStates protects against complex regular expressions.
func (*RegexpQuery) QueryName ¶
func (q *RegexpQuery) QueryName(queryName string) *RegexpQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*RegexpQuery) Rewrite ¶
func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery
func (*RegexpQuery) Source ¶
func (q *RegexpQuery) Source() (interface{}, error)
Source returns the JSON-serializable query data.
type Request ¶
Elasticsearch-specific HTTP request
func NewRequest ¶
NewRequest is a http.Request and adds features such as encoding the body.
func (*Request) SetBasicAuth ¶
SetBasicAuth wraps http.Request's SetBasicAuth.
type Rescore ¶
type Rescore struct {
// contains filtered or unexported fields
}
func NewRescore ¶
func NewRescore() *Rescore
func (*Rescore) WindowSize ¶
type ReverseNestedAggregation ¶
type ReverseNestedAggregation struct {
// contains filtered or unexported fields
}
ReverseNestedAggregation defines a special single bucket aggregation that enables aggregating on parent docs from nested documents. Effectively this aggregation can break out of the nested block structure and link to other nested structures or the root document, which allows nesting other aggregations that aren’t part of the nested object in a nested aggregation.
func NewReverseNestedAggregation ¶
func NewReverseNestedAggregation() *ReverseNestedAggregation
NewReverseNestedAggregation initializes a new ReverseNestedAggregation bucket aggregation.
func (*ReverseNestedAggregation) Meta ¶
func (a *ReverseNestedAggregation) Meta(metaData map[string]interface{}) *ReverseNestedAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ReverseNestedAggregation) Path ¶
func (a *ReverseNestedAggregation) Path(path string) *ReverseNestedAggregation
Path set the path to use for this nested aggregation. The path must match the path to a nested object in the mappings. If it is not specified then this aggregation will go back to the root document.
func (*ReverseNestedAggregation) Source ¶
func (a *ReverseNestedAggregation) Source() (interface{}, error)
func (*ReverseNestedAggregation) SubAggregation ¶
func (a *ReverseNestedAggregation) SubAggregation(name string, subAggregation Aggregation) *ReverseNestedAggregation
type RuntimeMappings ¶
type RuntimeMappings map[string]interface{}
RuntimeMappings specify fields that are evaluated at query time.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.14/runtime.html for details.
func (*RuntimeMappings) Source ¶
func (m *RuntimeMappings) Source() (interface{}, error)
Source deserializes the runtime mappings.
type SamplerAggregation ¶
type SamplerAggregation struct {
// contains filtered or unexported fields
}
SamplerAggregation is a filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents. Optionally, diversity settings can be used to limit the number of matches that share a common value such as an "author".
func NewSamplerAggregation ¶
func NewSamplerAggregation() *SamplerAggregation
func (*SamplerAggregation) Meta ¶
func (a *SamplerAggregation) Meta(metaData map[string]interface{}) *SamplerAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SamplerAggregation) ShardSize ¶
func (a *SamplerAggregation) ShardSize(shardSize int) *SamplerAggregation
ShardSize sets the maximum number of docs returned from each shard.
func (*SamplerAggregation) Source ¶
func (a *SamplerAggregation) Source() (interface{}, error)
func (*SamplerAggregation) SubAggregation ¶
func (a *SamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *SamplerAggregation
type ScoreFunction ¶
type ScoreFunction interface { Name() string GetWeight() *float64 // returns the weight which must be serialized at the level of FunctionScoreQuery Source() (interface{}, error) }
ScoreFunction is used in combination with the Function Score Query.
type ScoreSort ¶
type ScoreSort struct { Sorter // contains filtered or unexported fields }
ScoreSort sorts by relevancy score.
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
Script holds all the parameters necessary to compile or find in cache and then execute a script.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html for details of scripting.
func NewScript ¶
NewScript creates and initializes a new Script. By default, it is of type "inline". Use NewScriptStored for a stored script (where type is "id").
func NewScriptInline ¶
NewScriptInline creates and initializes a new inline script, i.e. code.
func NewScriptStored ¶
NewScriptStored creates and initializes a new stored script.
func (*Script) Lang ¶
Lang sets the language of the script. The default scripting language is Painless ("painless"). See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html for details.
func (*Script) Param ¶
Param adds a key/value pair to the parameters that this script will be executed with.
func (*Script) Script ¶
Script is either the cache key of the script to be compiled/executed or the actual script source code for inline scripts. For indexed scripts this is the id used in the request. For file scripts this is the file name.
type ScriptErrorPosition ¶
type ScriptErrorPosition struct { Offset int `json:"offset"` Start int `json:"start"` End int `json:"end"` }
ScriptErrorPosition specifies the position of the error in a script. It is used in ErrorDetails for scripting errors.
type ScriptField ¶
type ScriptField struct { FieldName string // name of the field // contains filtered or unexported fields }
ScriptField is a single script field.
func NewScriptField ¶
func NewScriptField(fieldName string, script *Script) *ScriptField
NewScriptField creates and initializes a new ScriptField.
func (*ScriptField) IgnoreFailure ¶
func (f *ScriptField) IgnoreFailure(ignore bool) *ScriptField
IgnoreFailure indicates whether to ignore failures. It is used in e.g. ScriptSource.
func (*ScriptField) Source ¶
func (f *ScriptField) Source() (interface{}, error)
Source returns the serializable JSON for the ScriptField.
type ScriptFunction ¶
type ScriptFunction struct {
// contains filtered or unexported fields
}
ScriptFunction builds a script score function. It uses a script to compute or influence the score of documents that match with the inner query or filter.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_script_score for details.
func NewScriptFunction ¶
func NewScriptFunction(script *Script) *ScriptFunction
NewScriptFunction initializes and returns a new ScriptFunction.
func (*ScriptFunction) GetWeight ¶
func (fn *ScriptFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*ScriptFunction) Name ¶
func (fn *ScriptFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*ScriptFunction) Script ¶
func (fn *ScriptFunction) Script(script *Script) *ScriptFunction
Script specifies the script to be executed.
func (*ScriptFunction) Source ¶
func (fn *ScriptFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*ScriptFunction) Weight ¶
func (fn *ScriptFunction) Weight(weight float64) *ScriptFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type ScriptQuery ¶
type ScriptQuery struct {
// contains filtered or unexported fields
}
ScriptQuery allows to define scripts as filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-script-query.html
func NewScriptQuery ¶
func NewScriptQuery(script *Script) *ScriptQuery
NewScriptQuery creates and initializes a new ScriptQuery.
func (*ScriptQuery) QueryName ¶
func (q *ScriptQuery) QueryName(queryName string) *ScriptQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*ScriptQuery) Source ¶
func (q *ScriptQuery) Source() (interface{}, error)
Source returns JSON for the query.
type ScriptScoreQuery ¶
type ScriptScoreQuery struct {
// contains filtered or unexported fields
}
ScriptScoreQuery uses a script to provide a custom score for returned documents.
A ScriptScoreQuery 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.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl-script-score-query.html
func NewScriptScoreQuery ¶
func NewScriptScoreQuery(query Query, script *Script) *ScriptScoreQuery
NewScriptScoreQuery creates and initializes a new script_score query.
func (*ScriptScoreQuery) Boost ¶
func (q *ScriptScoreQuery) Boost(boost float64) *ScriptScoreQuery
Boost sets the boost for this query.
func (*ScriptScoreQuery) MinScore ¶
func (q *ScriptScoreQuery) MinScore(minScore float64) *ScriptScoreQuery
MinScore sets the minimum score.
func (*ScriptScoreQuery) Query ¶
func (q *ScriptScoreQuery) Query(query Query) *ScriptScoreQuery
Query to be used in the ScriptScoreQuery.
func (*ScriptScoreQuery) QueryName ¶
func (q *ScriptScoreQuery) QueryName(queryName string) *ScriptScoreQuery
QueryName sets the query name for the filter.
func (*ScriptScoreQuery) Script ¶
func (q *ScriptScoreQuery) Script(script *Script) *ScriptScoreQuery
Script to calculate the score.
func (*ScriptScoreQuery) Source ¶
func (q *ScriptScoreQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type ScriptSignificanceHeuristic ¶
type ScriptSignificanceHeuristic struct {
// contains filtered or unexported fields
}
ScriptSignificanceHeuristic implements a scripted significance heuristic. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_scripted for details.
func NewScriptSignificanceHeuristic ¶
func NewScriptSignificanceHeuristic() *ScriptSignificanceHeuristic
NewScriptSignificanceHeuristic initializes a new instance of ScriptSignificanceHeuristic.
func (*ScriptSignificanceHeuristic) Name ¶
func (sh *ScriptSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*ScriptSignificanceHeuristic) Script ¶
func (sh *ScriptSignificanceHeuristic) Script(script *Script) *ScriptSignificanceHeuristic
Script specifies the script to use to get custom scores. The following parameters are available in the script: `_subset_freq`, `_superset_freq`, `_subset_size`, and `_superset_size`.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html#_scripted for details.
func (*ScriptSignificanceHeuristic) Source ¶
func (sh *ScriptSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type ScriptSort ¶
type ScriptSort struct { Sorter // contains filtered or unexported fields }
ScriptSort sorts by a custom script. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/modules-scripting.html#modules-scripting for details about scripting.
func NewScriptSort ¶
func NewScriptSort(script *Script, typ string) *ScriptSort
NewScriptSort creates and initializes a new ScriptSort. You must provide a script and a type, e.g. "string" or "number".
func (*ScriptSort) NestedFilter ¶
func (s *ScriptSort) NestedFilter(nestedFilter Query) *ScriptSort
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*ScriptSort) NestedPath ¶
func (s *ScriptSort) NestedPath(nestedPath string) *ScriptSort
NestedPath is used if sorting occurs on a field that is inside a nested object.
func (*ScriptSort) NestedSort ¶
func (s *ScriptSort) NestedSort(nestedSort *NestedSort) *ScriptSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath.
func (*ScriptSort) Order ¶
func (s *ScriptSort) Order(ascending bool) *ScriptSort
Order defines whether sorting ascending (default) or descending.
func (*ScriptSort) SortMode ¶
func (s *ScriptSort) SortMode(sortMode string) *ScriptSort
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min or max.
func (*ScriptSort) Source ¶
func (s *ScriptSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*ScriptSort) Type ¶
func (s *ScriptSort) Type(typ string) *ScriptSort
Type sets the script type, which can be either "string" or "number".
type ScriptedMetricAggregation ¶
type ScriptedMetricAggregation struct {
// contains filtered or unexported fields
}
ScriptedMetricAggregation is a a metric aggregation that executes using scripts to provide a metric output.
func NewScriptedMetricAggregation ¶
func NewScriptedMetricAggregation() *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) CombineScript ¶
func (a *ScriptedMetricAggregation) CombineScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) InitScript ¶
func (a *ScriptedMetricAggregation) InitScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) MapScript ¶
func (a *ScriptedMetricAggregation) MapScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) Meta ¶
func (a *ScriptedMetricAggregation) Meta(metaData map[string]interface{}) *ScriptedMetricAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ScriptedMetricAggregation) Params ¶
func (a *ScriptedMetricAggregation) Params(params map[string]interface{}) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) ReduceScript ¶
func (a *ScriptedMetricAggregation) ReduceScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) Source ¶
func (a *ScriptedMetricAggregation) Source() (interface{}, error)
type SearchExplanation ¶
type SearchExplanation struct { Value float64 `json:"value"` // e.g. 1.0 Description string `json:"description"` // e.g. "boost" or "ConstantScore(*:*), product of:" Details []SearchExplanation `json:"details,omitempty"` // recursive details }
SearchExplanation explains how the score for a hit was computed. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-explain.html.
type SearchHit ¶
type SearchHit struct { Score *float64 `json:"_score,omitempty"` // computed score Index string `json:"_index,omitempty"` // index name Type string `json:"_type,omitempty"` // type meta field Id string `json:"_id,omitempty"` // external or internal Uid string `json:"_uid,omitempty"` // uid meta field (see MapperService.java for all meta fields) Routing string `json:"_routing,omitempty"` // routing meta field Parent string `json:"_parent,omitempty"` // parent meta field Version *int64 `json:"_version,omitempty"` // version number, when Version is set to true in SearchService SeqNo *int64 `json:"_seq_no"` PrimaryTerm *int64 `json:"_primary_term"` Sort []interface{} `json:"sort,omitempty"` // sort information Highlight SearchHitHighlight `json:"highlight,omitempty"` // highlighter information Source json.RawMessage `json:"_source,omitempty"` // stored document source Fields SearchHitFields `json:"fields,omitempty"` // returned (stored) fields Explanation *SearchExplanation `json:"_explanation,omitempty"` // explains how the score was computed MatchedQueries []string `json:"matched_queries,omitempty"` // matched queries InnerHits map[string]*SearchHitInnerHits `json:"inner_hits,omitempty"` // inner hits with ES >= 1.5.0 Nested *NestedHit `json:"_nested,omitempty"` // for nested inner hits Shard string `json:"_shard,omitempty"` // used e.g. in Search Explain Node string `json:"_node,omitempty"` // used e.g. in Search Explain }
SearchHit is a single hit.
type SearchHitFields ¶
type SearchHitFields map[string]interface{}
SearchHitFields helps to simplify resolving slices of specific types.
type SearchHitHighlight ¶
SearchHitHighlight is the highlight information of a search hit. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-highlighting.html for a general discussion of highlighting.
type SearchHitInnerHits ¶
type SearchHitInnerHits struct {
Hits *SearchHits `json:"hits,omitempty"`
}
SearchHitInnerHits is used for inner hits.
type SearchHits ¶
type SearchHits struct { TotalHits *TotalHits `json:"total,omitempty"` // total number of hits found MaxScore *float64 `json:"max_score,omitempty"` // maximum score of all hits Hits []*SearchHit `json:"hits,omitempty"` // the actual hits returned }
SearchHits specifies the list of search hits.
type SearchProfile ¶
type SearchProfile struct {
Shards []SearchProfileShardResult `json:"shards"`
}
SearchProfile is a list of shard profiling data collected during query execution in the "profile" section of a SearchResult
type SearchProfileShardResult ¶
type SearchProfileShardResult struct { ID string `json:"id"` Searches []QueryProfileShardResult `json:"searches"` Aggregations []ProfileResult `json:"aggregations"` Fetch *ProfileResult `json:"fetch"` }
SearchProfileShardResult returns the profiling data for a single shard accessed during the search query or aggregation.
type SearchRequest ¶
type SearchRequest struct {
// contains filtered or unexported fields
}
SearchRequest combines a search request and its query details (see SearchSource). It is used in combination with MultiSearch.
func NewSearchRequest ¶
func NewSearchRequest() *SearchRequest
NewSearchRequest creates a new search request.
func (*SearchRequest) Aggregation ¶
func (r *SearchRequest) Aggregation(name string, aggregation Aggregation) *SearchRequest
Aggregation adds an aggreation to perform as part of the search.
func (*SearchRequest) AllowNoIndices ¶
func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*SearchRequest) AllowPartialSearchResults ¶
func (r *SearchRequest) AllowPartialSearchResults(allow bool) *SearchRequest
AllowPartialSearchResults indicates if this request should allow partial results. (If method is not called, will default to the cluster level setting).
func (*SearchRequest) BatchedReduceSize ¶
func (r *SearchRequest) BatchedReduceSize(size int) *SearchRequest
BatchedReduceSize specifies the number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
func (*SearchRequest) Body ¶
func (r *SearchRequest) Body() (string, error)
Body allows to access the search body of the request, as generated by the DSL. Notice that Body is read-only. You must not change the request body.
Body is used e.g. by MultiSearch to get information about the search body of one SearchRequest. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-multi-search.html
func (*SearchRequest) ClearRescorers ¶
func (r *SearchRequest) ClearRescorers() *SearchRequest
ClearRescorers removes all rescorers from the search.
func (*SearchRequest) Collapse ¶
func (r *SearchRequest) Collapse(collapse *CollapseBuilder) *SearchRequest
Collapse adds field collapsing.
func (*SearchRequest) DocValueField ¶
func (r *SearchRequest) DocValueField(field string) *SearchRequest
DocValueField adds a docvalue based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFieldWithFormat ¶
func (r *SearchRequest) DocValueFieldWithFormat(field DocvalueField) *SearchRequest
DocValueFieldWithFormat adds a docvalue based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFields ¶
func (r *SearchRequest) DocValueFields(fields ...string) *SearchRequest
DocValueFields adds one or more docvalue based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFieldsWithFormat ¶
func (r *SearchRequest) DocValueFieldsWithFormat(fields ...DocvalueField) *SearchRequest
DocValueFieldsWithFormat adds one or more docvalue based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) ExpandWildcards ¶
func (s *SearchRequest) ExpandWildcards(expandWildcards string) *SearchRequest
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*SearchRequest) Explain ¶
func (r *SearchRequest) Explain(explain bool) *SearchRequest
Explain indicates whether to return an explanation for each hit.
func (*SearchRequest) FetchSource ¶
func (r *SearchRequest) FetchSource(fetchSource bool) *SearchRequest
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchRequest) FetchSourceContext ¶
func (r *SearchRequest) FetchSourceContext(fsc *FetchSourceContext) *SearchRequest
FetchSourceContext indicates how the _source should be fetched.
func (*SearchRequest) FetchSourceIncludeExclude ¶
func (r *SearchRequest) FetchSourceIncludeExclude(include, exclude []string) *SearchRequest
FetchSourceIncludeExclude specifies that _source should be returned with each hit, where "include" and "exclude" serve as a simple wildcard matcher that gets applied to its fields (e.g. include := []string{"obj1.*","obj2.*"}, exclude := []string{"description.*"}).
func (*SearchRequest) From ¶
func (r *SearchRequest) From(from int) *SearchRequest
From index to start search from (default is 0).
func (*SearchRequest) HasIndices ¶
func (r *SearchRequest) HasIndices() bool
HasIndices returns true if there are indices used, false otherwise.
func (*SearchRequest) Highlight ¶
func (r *SearchRequest) Highlight(highlight *Highlight) *SearchRequest
Highlight adds highlighting to the search.
func (*SearchRequest) IgnoreUnavailable ¶
func (s *SearchRequest) IgnoreUnavailable(ignoreUnavailable bool) *SearchRequest
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*SearchRequest) Index ¶
func (r *SearchRequest) Index(indices ...string) *SearchRequest
Index specifies the indices to use in the request.
func (*SearchRequest) IndexBoost ¶
func (r *SearchRequest) IndexBoost(index string, boost float64) *SearchRequest
IndexBoost sets a boost a specific index will receive when the query is executed against it.
func (*SearchRequest) MaxConcurrentShardRequests ¶
func (r *SearchRequest) MaxConcurrentShardRequests(size int) *SearchRequest
MaxConcurrentShardRequests sets the number of shard requests that should be executed concurrently. This value should be used as a protection mechanism to reduce the number of shard requests fired per high level search request. Searches that hit the entire cluster can be throttled with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most 256.
func (*SearchRequest) MinScore ¶
func (r *SearchRequest) MinScore(minScore float64) *SearchRequest
MinScore below which documents are filtered out.
func (*SearchRequest) NoStoredFields ¶
func (r *SearchRequest) NoStoredFields() *SearchRequest
NoStoredFields indicates that no fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchRequest) PointInTime ¶
func (s *SearchRequest) PointInTime(pointInTime *PointInTime) *SearchRequest
PointInTime specifies an optional PointInTime to be used in the context of this search.
func (*SearchRequest) PostFilter ¶
func (r *SearchRequest) PostFilter(filter Query) *SearchRequest
PostFilter is a filter that will be executed after the query has been executed and only has affect on the search hits (not aggregations). This filter is always executed as last filtering mechanism.
func (*SearchRequest) PreFilterShardSize ¶
func (r *SearchRequest) PreFilterShardSize(size int) *SearchRequest
PreFilterShardSize sets a threshold that enforces a pre-filter roundtrip to pre-filter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. The default is 128.
func (*SearchRequest) Preference ¶
func (r *SearchRequest) Preference(preference string) *SearchRequest
Preference to execute the search. Defaults to randomize across shards. Can be set to "_local" to prefer local shards, "_primary" to execute only on primary shards, or a custom value, which guarantees that the same order will be used across different requests.
func (*SearchRequest) Profile ¶
func (r *SearchRequest) Profile(profile bool) *SearchRequest
Profile specifies that this search source should activate the Profile API for queries made on it.
func (*SearchRequest) Query ¶
func (r *SearchRequest) Query(query Query) *SearchRequest
Query for the search.
func (*SearchRequest) RequestCache ¶
func (r *SearchRequest) RequestCache(requestCache bool) *SearchRequest
RequestCache specifies if this request should use the request cache or not, assuming that it can. By default, will default to the index level setting if request cache is enabled or not.
func (*SearchRequest) Rescorer ¶
func (r *SearchRequest) Rescorer(rescore *Rescore) *SearchRequest
Rescorer adds a rescorer to the search.
func (*SearchRequest) Routing ¶
func (r *SearchRequest) Routing(routing string) *SearchRequest
Routing specifies the routing parameter. It is a comma-separated list.
func (*SearchRequest) Routings ¶
func (r *SearchRequest) Routings(routings ...string) *SearchRequest
Routings to be used in the request.
func (*SearchRequest) ScriptField ¶
func (r *SearchRequest) ScriptField(field *ScriptField) *SearchRequest
ScriptField adds a script based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) ScriptFields ¶
func (r *SearchRequest) ScriptFields(fields ...*ScriptField) *SearchRequest
ScriptFields adds one or more script based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) Scroll ¶
func (r *SearchRequest) Scroll(scroll string) *SearchRequest
Scroll, if set, will enable scrolling of the search request. Pass a timeout value, e.g. "2m" or "30s" as a value.
func (*SearchRequest) SearchAfter ¶
func (r *SearchRequest) SearchAfter(sortValues ...interface{}) *SearchRequest
SearchAfter sets the sort values that indicates which docs this request should "search after".
func (*SearchRequest) SearchSource ¶
func (r *SearchRequest) SearchSource(searchSource *SearchSource) *SearchRequest
SearchSource allows passing your own SearchSource, overriding all values set on the request (except Source).
func (*SearchRequest) SearchType ¶
func (r *SearchRequest) SearchType(searchType string) *SearchRequest
SearchType must be one of "dfs_query_then_fetch", "dfs_query_and_fetch", "query_then_fetch", or "query_and_fetch".
func (*SearchRequest) SearchTypeDfsQueryThenFetch ¶
func (r *SearchRequest) SearchTypeDfsQueryThenFetch() *SearchRequest
SearchTypeDfsQueryThenFetch sets search type to "dfs_query_then_fetch".
func (*SearchRequest) SearchTypeQueryThenFetch ¶
func (r *SearchRequest) SearchTypeQueryThenFetch() *SearchRequest
SearchTypeQueryThenFetch sets search type to "query_then_fetch".
func (*SearchRequest) Size ¶
func (r *SearchRequest) Size(size int) *SearchRequest
Size is the number of search hits to return (default is 10).
func (*SearchRequest) Slice ¶
func (r *SearchRequest) Slice(sliceQuery Query) *SearchRequest
Slice allows partitioning the documents in multiple slices. It is e.g. used to slice a scroll operation, supported in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-scroll.html#sliced-scroll for details.
func (*SearchRequest) Sort ¶
func (r *SearchRequest) Sort(field string, ascending bool) *SearchRequest
Sort adds a sort order.
func (*SearchRequest) SortBy ¶
func (r *SearchRequest) SortBy(sorter ...Sorter) *SearchRequest
SortBy adds a sort order.
func (*SearchRequest) SortWithInfo ¶
func (r *SearchRequest) SortWithInfo(info SortInfo) *SearchRequest
SortWithInfo adds a sort order.
func (*SearchRequest) Source ¶
func (r *SearchRequest) Source(source interface{}) *SearchRequest
Source allows passing your own request body. It will have preference over all other properties set on the request.
func (*SearchRequest) Stats ¶
func (r *SearchRequest) Stats(statsGroup ...string) *SearchRequest
Stats groups that this request will be aggregated under.
func (*SearchRequest) StoredField ¶
func (r *SearchRequest) StoredField(field string) *SearchRequest
StoredField adds a stored field to load and return (note, it must be stored) as part of the search request.
func (*SearchRequest) StoredFields ¶
func (r *SearchRequest) StoredFields(fields ...string) *SearchRequest
StoredFields adds one or more stored field to load and return (note, they must be stored) as part of the search request.
func (*SearchRequest) Suggester ¶
func (r *SearchRequest) Suggester(suggester Suggester) *SearchRequest
Suggester adds a suggester to the search.
func (*SearchRequest) TerminateAfter ¶
func (r *SearchRequest) TerminateAfter(docs int) *SearchRequest
TerminateAfter, when set, specifies an optional document count, upon collecting which the search query will terminate early.
func (*SearchRequest) Timeout ¶
func (r *SearchRequest) Timeout(timeout string) *SearchRequest
Timeout value for the request, e.g. "30s" or "2m".
func (*SearchRequest) TrackScores ¶
func (r *SearchRequest) TrackScores(trackScores bool) *SearchRequest
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchRequest) TrackTotalHits ¶
func (r *SearchRequest) TrackTotalHits(trackTotalHits interface{}) *SearchRequest
TrackTotalHits indicates if the total hit count for the query should be tracked. Defaults to true.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-track-total-hits.html for details.
func (*SearchRequest) Type
deprecated
func (r *SearchRequest) Type(types ...string) *SearchRequest
Type specifies one or more types to be used.
Deprecated: Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document.
func (*SearchRequest) Version ¶
func (r *SearchRequest) Version(version bool) *SearchRequest
Version indicates whether each hit should be returned with its version.
type SearchResult ¶
type SearchResult struct { Header http.Header `json:"-"` TookInMillis int64 `json:"took,omitempty"` // search time in milliseconds TerminatedEarly bool `json:"terminated_early,omitempty"` // request terminated early NumReducePhases int `json:"num_reduce_phases,omitempty"` Clusters *SearchResultCluster `json:"_clusters,omitempty"` // 6.1.0+ ScrollId string `json:"_scroll_id,omitempty"` // only used with Scroll and Scan operations Hits *SearchHits `json:"hits,omitempty"` // the actual search hits Suggest SearchSuggest `json:"suggest,omitempty"` // results from suggesters Aggregations Aggregations `json:"aggregations,omitempty"` // results from aggregations TimedOut bool `json:"timed_out,omitempty"` // true if the search timed out Error *ErrorDetails `json:"error,omitempty"` // only used in MultiGet Profile *SearchProfile `json:"profile,omitempty"` // profiling results, if optional Profile API was active for this search Shards *ShardsInfo `json:"_shards,omitempty"` // shard information Status int `json:"status,omitempty"` // used in MultiSearch PitId string `json:"pit_id,omitempty"` // Point In Time ID }
SearchResult is the result of a search in Elasticsearch. FIXME: Is this up-to-date?
func (*SearchResult) Each ¶
func (r *SearchResult) Each(typ reflect.Type) []interface{}
Each is a utility function to iterate over all hits. It saves you from checking for nil values. Notice that Each will ignore errors in serializing JSON and hits with empty/nil _source will get an empty value
func (*SearchResult) TotalHits ¶
func (r *SearchResult) TotalHits() int64
TotalHits is a convenience function to return the number of hits for a search result. The return value might not be accurate, unless track_total_hits parameter has set to true.
type SearchResultCluster ¶
type SearchResultCluster struct { Successful int `json:"successful,omitempty"` Total int `json:"total,omitempty"` Skipped int `json:"skipped,omitempty"` }
SearchResultCluster holds information about a search response from a cluster.
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
Search for documents in Elasticsearch.
func NewSearchService ¶
func NewSearchService() *SearchService
NewSearchService creates a new service for searching in Elasticsearch.
func (*SearchService) Aggregation ¶
func (s *SearchService) Aggregation(name string, aggregation Aggregation) *SearchService
Aggregation adds an aggreation to perform as part of the search.
func (*SearchService) Collapse ¶
func (s *SearchService) Collapse(collapse *CollapseBuilder) *SearchService
Collapse adds field collapsing.
func (*SearchService) DefaultRescoreWindowSize ¶
func (s *SearchService) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchService
DefaultRescoreWindowSize sets the rescore window size for rescores that don't specify their window.
func (*SearchService) DocvalueField ¶
func (s *SearchService) DocvalueField(docvalueField string) *SearchService
DocvalueField adds a single field to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFieldWithFormat ¶
func (s *SearchService) DocvalueFieldWithFormat(docvalueField DocvalueField) *SearchService
DocvalueFieldWithFormat adds a single field to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFields ¶
func (s *SearchService) DocvalueFields(docvalueFields ...string) *SearchService
DocvalueFields adds one or more fields to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFieldsWithFormat ¶
func (s *SearchService) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchService
DocvalueFieldsWithFormat adds one or more fields to load from the field data cache and return as part of the search.
func (*SearchService) Explain ¶
func (s *SearchService) Explain(explain bool) *SearchService
Explain indicates whether each search hit should be returned with an explanation of the hit (ranking).
func (*SearchService) FetchSource ¶
func (s *SearchService) FetchSource(fetchSource bool) *SearchService
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchService) FetchSourceContext ¶
func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService
FetchSourceContext indicates how the _source should be fetched.
func (*SearchService) From ¶
func (s *SearchService) From(from int) *SearchService
From index to start the search from. Defaults to 0.
func (*SearchService) GlobalSuggestText ¶
func (s *SearchService) GlobalSuggestText(globalText string) *SearchService
GlobalSuggestText defines the global text to use with all suggesters. This avoids repetition.
func (*SearchService) Highlight ¶
func (s *SearchService) Highlight(highlight *Highlight) *SearchService
Highlight adds highlighting to the search.
func (*SearchService) MinScore ¶
func (s *SearchService) MinScore(minScore float64) *SearchService
MinScore sets the minimum score below which docs will be filtered out.
func (*SearchService) NoStoredFields ¶
func (s *SearchService) NoStoredFields() *SearchService
NoStoredFields indicates that no stored fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchService) PointInTime ¶
func (s *SearchService) PointInTime(pointInTime *PointInTime) *SearchService
PointInTime specifies an optional PointInTime to be used in the context of this search.
func (*SearchService) PostFilter ¶
func (s *SearchService) PostFilter(postFilter Query) *SearchService
PostFilter will be executed after the query has been executed and only affects the search hits, not the aggregations. This filter is always executed as the last filtering mechanism.
func (*SearchService) Profile ¶
func (s *SearchService) Profile(profile bool) *SearchService
Profile sets the Profile API flag on the search source. When enabled, a search executed by this service will return query profiling data.
func (*SearchService) Query ¶
func (s *SearchService) Query(query Query) *SearchService
Query sets the query to perform, e.g. MatchAllQuery.
func (*SearchService) Rescorer ¶
func (s *SearchService) Rescorer(rescore *Rescore) *SearchService
Rescorer adds a rescorer to the search.
func (*SearchService) RuntimeMappings ¶
func (s *SearchService) RuntimeMappings(runtimeMappings RuntimeMappings) *SearchService
RuntimeMappings specifies optional runtime mappings.
func (*SearchService) SearchAfter ¶
func (s *SearchService) SearchAfter(sortValues ...interface{}) *SearchService
SearchAfter allows a different form of pagination by using a live cursor, using the results of the previous page to help the retrieval of the next.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-search-after.html
func (*SearchService) SearchSource ¶
func (s *SearchService) SearchSource(searchSource *SearchSource) *SearchService
SearchSource sets the search source builder to use with this service.
func (*SearchService) Size ¶
func (s *SearchService) Size(size int) *SearchService
Size is the number of search hits to return. Defaults to 10.
func (*SearchService) Sort ¶
func (s *SearchService) Sort(field string, ascending bool) *SearchService
Sort adds a sort order.
func (*SearchService) SortBy ¶
func (s *SearchService) SortBy(sorter ...Sorter) *SearchService
SortBy adds a sort order.
func (*SearchService) SortWithInfo ¶
func (s *SearchService) SortWithInfo(info SortInfo) *SearchService
SortWithInfo adds a sort order.
func (*SearchService) Source ¶
func (s *SearchService) Source(source interface{}) *SearchService
Source allows the user to set the request body manually without using any of the structs and interfaces in Elastic.
func (*SearchService) StoredField ¶
func (s *SearchService) StoredField(fieldName string) *SearchService
StoredField adds a single field to load and return (note, must be stored) as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchService) StoredFields ¶
func (s *SearchService) StoredFields(fields ...string) *SearchService
StoredFields sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchService) Suggester ¶
func (s *SearchService) Suggester(suggester Suggester) *SearchService
Suggester adds a suggester to the search.
func (*SearchService) TerminateAfter ¶
func (s *SearchService) TerminateAfter(terminateAfter int) *SearchService
TerminateAfter specifies the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*SearchService) Timeout ¶
func (s *SearchService) Timeout(timeout string) *SearchService
Timeout sets the timeout to use, e.g. "1s" or "1000ms".
func (*SearchService) TimeoutInMillis ¶
func (s *SearchService) TimeoutInMillis(timeoutInMillis int) *SearchService
TimeoutInMillis sets the timeout in milliseconds.
func (*SearchService) TrackScores ¶
func (s *SearchService) TrackScores(trackScores bool) *SearchService
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchService) TrackTotalHits ¶
func (s *SearchService) TrackTotalHits(trackTotalHits interface{}) *SearchService
TrackTotalHits controls if the total hit count for the query should be tracked.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.1/search-request-track-total-hits.html for details.
func (*SearchService) Version ¶
func (s *SearchService) Version(version bool) *SearchService
Version indicates whether each search hit should be returned with a version associated to it.
type SearchShardsService ¶
type SearchShardsService struct {
// contains filtered or unexported fields
}
SearchShardsService returns the indices and shards that a search request would be executed against. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-shards.html
func (*SearchShardsService) AllowNoIndices ¶
func (s *SearchShardsService) AllowNoIndices(allowNoIndices bool) *SearchShardsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*SearchShardsService) ErrorTrace ¶
func (s *SearchShardsService) ErrorTrace(errorTrace bool) *SearchShardsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SearchShardsService) ExpandWildcards ¶
func (s *SearchShardsService) ExpandWildcards(expandWildcards string) *SearchShardsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*SearchShardsService) FilterPath ¶
func (s *SearchShardsService) FilterPath(filterPath ...string) *SearchShardsService
FilterPath specifies a list of filters used to reduce the response.
func (*SearchShardsService) Header ¶
func (s *SearchShardsService) Header(name string, value string) *SearchShardsService
Header adds a header to the request.
func (*SearchShardsService) Headers ¶
func (s *SearchShardsService) Headers(headers http.Header) *SearchShardsService
Headers specifies the headers of the request.
func (*SearchShardsService) Human ¶
func (s *SearchShardsService) Human(human bool) *SearchShardsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SearchShardsService) IgnoreUnavailable ¶
func (s *SearchShardsService) IgnoreUnavailable(ignoreUnavailable bool) *SearchShardsService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*SearchShardsService) Index ¶
func (s *SearchShardsService) Index(index ...string) *SearchShardsService
Index sets the names of the indices to restrict the results.
func (*SearchShardsService) Local ¶
func (s *SearchShardsService) Local(local bool) *SearchShardsService
A boolean value whether to read the cluster state locally in order to determine where shards are allocated instead of using the Master node’s cluster state.
func (*SearchShardsService) Preference ¶
func (s *SearchShardsService) Preference(preference string) *SearchShardsService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*SearchShardsService) Pretty ¶
func (s *SearchShardsService) Pretty(pretty bool) *SearchShardsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SearchShardsService) Routing ¶
func (s *SearchShardsService) Routing(routing string) *SearchShardsService
Routing sets a specific routing value.
type SearchSource ¶
type SearchSource struct {
// contains filtered or unexported fields
}
SearchSource enables users to build the search source. It resembles the SearchSourceBuilder in Elasticsearch.
func NewSearchSource ¶
func NewSearchSource() *SearchSource
NewSearchSource initializes a new SearchSource.
func (*SearchSource) Aggregation ¶
func (s *SearchSource) Aggregation(name string, aggregation Aggregation) *SearchSource
Aggregation adds an aggreation to perform as part of the search.
func (*SearchSource) ClearRescorers ¶
func (s *SearchSource) ClearRescorers() *SearchSource
ClearRescorers removes all rescorers from the search.
func (*SearchSource) Collapse ¶
func (s *SearchSource) Collapse(collapse *CollapseBuilder) *SearchSource
Collapse adds field collapsing.
func (*SearchSource) DefaultRescoreWindowSize ¶
func (s *SearchSource) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchSource
DefaultRescoreWindowSize sets the rescore window size for rescores that don't specify their window.
func (*SearchSource) DocvalueField ¶
func (s *SearchSource) DocvalueField(fieldDataField string) *SearchSource
DocvalueField adds a single field to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFieldWithFormat ¶
func (s *SearchSource) DocvalueFieldWithFormat(fieldDataFieldWithFormat DocvalueField) *SearchSource
DocvalueField adds a single docvalue field to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFields ¶
func (s *SearchSource) DocvalueFields(docvalueFields ...string) *SearchSource
DocvalueFields adds one or more fields to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFieldsWithFormat ¶
func (s *SearchSource) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchSource
DocvalueFields adds one or more docvalue fields to load from the field data cache and return as part of the search request.
func (*SearchSource) Explain ¶
func (s *SearchSource) Explain(explain bool) *SearchSource
Explain indicates whether each search hit should be returned with an explanation of the hit (ranking).
func (*SearchSource) FetchSource ¶
func (s *SearchSource) FetchSource(fetchSource bool) *SearchSource
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchSource) FetchSourceContext ¶
func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource
FetchSourceContext indicates how the _source should be fetched.
func (*SearchSource) FetchSourceIncludeExclude ¶
func (s *SearchSource) FetchSourceIncludeExclude(include, exclude []string) *SearchSource
FetchSourceIncludeExclude specifies that _source should be returned with each hit, where "include" and "exclude" serve as a simple wildcard matcher that gets applied to its fields (e.g. include := []string{"obj1.*","obj2.*"}, exclude := []string{"description.*"}).
func (*SearchSource) From ¶
func (s *SearchSource) From(from int) *SearchSource
From index to start the search from. Defaults to 0.
func (*SearchSource) GlobalSuggestText ¶
func (s *SearchSource) GlobalSuggestText(text string) *SearchSource
GlobalSuggestText defines the global text to use with all suggesters. This avoids repetition.
func (*SearchSource) Highlight ¶
func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource
Highlight adds highlighting to the search.
func (*SearchSource) Highlighter ¶
func (s *SearchSource) Highlighter() *Highlight
Highlighter returns the highlighter.
func (*SearchSource) IndexBoost ¶
func (s *SearchSource) IndexBoost(index string, boost float64) *SearchSource
IndexBoost sets the boost that a specific index will receive when the query is executed against it.
func (*SearchSource) IndexBoosts ¶
func (s *SearchSource) IndexBoosts(boosts ...IndexBoost) *SearchSource
IndexBoosts sets the boosts for specific indices.
func (*SearchSource) InnerHit ¶
func (s *SearchSource) InnerHit(name string, innerHit *InnerHit) *SearchSource
InnerHit adds an inner hit to return with the result.
func (*SearchSource) MarshalJSON ¶
func (q *SearchSource) MarshalJSON() ([]byte, error)
MarshalJSON enables serializing the type as JSON.
func (*SearchSource) MinScore ¶
func (s *SearchSource) MinScore(minScore float64) *SearchSource
MinScore sets the minimum score below which docs will be filtered out.
func (*SearchSource) NoStoredFields ¶
func (s *SearchSource) NoStoredFields() *SearchSource
NoStoredFields indicates that no fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchSource) PointInTime ¶
func (s *SearchSource) PointInTime(pointInTime *PointInTime) *SearchSource
PointInTime specifies an optional PointInTime to be used in the context of this search.
func (*SearchSource) PostFilter ¶
func (s *SearchSource) PostFilter(postFilter Query) *SearchSource
PostFilter will be executed after the query has been executed and only affects the search hits, not the aggregations. This filter is always executed as the last filtering mechanism.
func (*SearchSource) Profile ¶
func (s *SearchSource) Profile(profile bool) *SearchSource
Profile specifies that this search source should activate the Profile API for queries made on it.
func (*SearchSource) Query ¶
func (s *SearchSource) Query(query Query) *SearchSource
Query sets the query to use with this search source.
func (*SearchSource) Rescorer ¶
func (s *SearchSource) Rescorer(rescore *Rescore) *SearchSource
Rescorer adds a rescorer to the search.
func (*SearchSource) RuntimeMappings ¶
func (s *SearchSource) RuntimeMappings(runtimeMappings RuntimeMappings) *SearchSource
RuntimeMappings specifies optional runtime mappings.
func (*SearchSource) ScriptField ¶
func (s *SearchSource) ScriptField(scriptField *ScriptField) *SearchSource
ScriptField adds a single script field with the provided script.
func (*SearchSource) ScriptFields ¶
func (s *SearchSource) ScriptFields(scriptFields ...*ScriptField) *SearchSource
ScriptFields adds one or more script fields with the provided scripts.
func (*SearchSource) SearchAfter ¶
func (s *SearchSource) SearchAfter(sortValues ...interface{}) *SearchSource
SearchAfter allows a different form of pagination by using a live cursor, using the results of the previous page to help the retrieval of the next.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-search-after.html
func (*SearchSource) SeqNoAndPrimaryTerm ¶
func (s *SearchSource) SeqNoAndPrimaryTerm(enabled bool) *SearchSource
SeqNoAndPrimaryTerm indicates whether SearchHits should be returned with the sequence number and primary term of the last modification of the document.
func (*SearchSource) Size ¶
func (s *SearchSource) Size(size int) *SearchSource
Size is the number of search hits to return. Defaults to 10.
func (*SearchSource) Slice ¶
func (s *SearchSource) Slice(sliceQuery Query) *SearchSource
Slice allows partitioning the documents in multiple slices. It is e.g. used to slice a scroll operation, supported in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-scroll.html#sliced-scroll for details.
func (*SearchSource) Sort ¶
func (s *SearchSource) Sort(field string, ascending bool) *SearchSource
Sort adds a sort order.
func (*SearchSource) SortBy ¶
func (s *SearchSource) SortBy(sorter ...Sorter) *SearchSource
SortBy adds a sort order.
func (*SearchSource) SortWithInfo ¶
func (s *SearchSource) SortWithInfo(info SortInfo) *SearchSource
SortWithInfo adds a sort order.
func (*SearchSource) Source ¶
func (s *SearchSource) Source() (interface{}, error)
Source returns the serializable JSON for the source builder.
func (*SearchSource) Stats ¶
func (s *SearchSource) Stats(statsGroup ...string) *SearchSource
Stats group this request will be aggregated under.
func (*SearchSource) StoredField ¶
func (s *SearchSource) StoredField(storedFieldName string) *SearchSource
StoredField adds a single field to load and return (note, must be stored) as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchSource) StoredFields ¶
func (s *SearchSource) StoredFields(storedFieldNames ...string) *SearchSource
StoredFields sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchSource) Suggester ¶
func (s *SearchSource) Suggester(suggester Suggester) *SearchSource
Suggester adds a suggester to the search.
func (*SearchSource) TerminateAfter ¶
func (s *SearchSource) TerminateAfter(terminateAfter int) *SearchSource
TerminateAfter specifies the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*SearchSource) Timeout ¶
func (s *SearchSource) Timeout(timeout string) *SearchSource
Timeout controls how long a search is allowed to take, e.g. "1s" or "500ms".
func (*SearchSource) TimeoutInMillis ¶
func (s *SearchSource) TimeoutInMillis(timeoutInMillis int) *SearchSource
TimeoutInMillis controls how many milliseconds a search is allowed to take before it is canceled.
func (*SearchSource) TrackScores ¶
func (s *SearchSource) TrackScores(trackScores bool) *SearchSource
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchSource) TrackTotalHits ¶
func (s *SearchSource) TrackTotalHits(trackTotalHits interface{}) *SearchSource
TrackTotalHits controls how the total number of hits should be tracked. Defaults to 10000 which will count the total hit accurately up to 10,000 hits.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-track-total-hits.html for details.
func (*SearchSource) Version ¶
func (s *SearchSource) Version(version bool) *SearchSource
Version indicates whether each search hit should be returned with a version associated to it.
type SearchSuggest ¶
type SearchSuggest map[string][]SearchSuggestion
SearchSuggest is a map of suggestions. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters.html.
type SearchSuggestion ¶
type SearchSuggestion struct { Text string `json:"text"` Offset int `json:"offset"` Length int `json:"length"` Options []SearchSuggestionOption `json:"options"` }
SearchSuggestion is a single search suggestion. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters.html.
type SearchSuggestionOption ¶
type SearchSuggestionOption struct { Text string `json:"text"` Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Score float64 `json:"score"` // term and phrase suggesters uses "score" as of 6.2.4 ScoreUnderscore float64 `json:"_score"` // completion and context suggesters uses "_score" as of 6.2.4 Highlighted string `json:"highlighted"` CollateMatch bool `json:"collate_match"` Freq int `json:"freq"` // from TermSuggestion.Option in Java API Source json.RawMessage `json:"_source"` Contexts map[string][]string `json:"contexts,omitempty"` }
SearchSuggestionOption is an option of a SearchSuggestion. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters.html.
type SerialDiffAggregation ¶
type SerialDiffAggregation struct {
// contains filtered or unexported fields
}
SerialDiffAggregation implements serial differencing. Serial differencing is a technique where values in a time series are subtracted from itself at different time lags or periods.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-serialdiff-aggregation.html
func NewSerialDiffAggregation ¶
func NewSerialDiffAggregation() *SerialDiffAggregation
NewSerialDiffAggregation creates and initializes a new SerialDiffAggregation.
func (*SerialDiffAggregation) BucketsPath ¶
func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*SerialDiffAggregation) Format ¶
func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation
Format to use on the output of this aggregation.
func (*SerialDiffAggregation) GapInsertZeros ¶
func (a *SerialDiffAggregation) GapInsertZeros() *SerialDiffAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*SerialDiffAggregation) GapPolicy ¶
func (a *SerialDiffAggregation) GapPolicy(gapPolicy string) *SerialDiffAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*SerialDiffAggregation) GapSkip ¶
func (a *SerialDiffAggregation) GapSkip() *SerialDiffAggregation
GapSkip skips gaps in the series.
func (*SerialDiffAggregation) Lag ¶
func (a *SerialDiffAggregation) Lag(lag int) *SerialDiffAggregation
Lag specifies the historical bucket to subtract from the current value. E.g. a lag of 7 will subtract the current value from the value 7 buckets ago. Lag must be a positive, non-zero integer.
func (*SerialDiffAggregation) Meta ¶
func (a *SerialDiffAggregation) Meta(metaData map[string]interface{}) *SerialDiffAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SerialDiffAggregation) Source ¶
func (a *SerialDiffAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type ShardOperationFailedException ¶
type ShardOperationFailedException struct { Shard int `json:"shard,omitempty"` Index string `json:"index,omitempty"` Status string `json:"status,omitempty"` Reason map[string]interface{} `json:"reason,omitempty"` // TODO(oe) Do we still have those? Node string `json:"_node,omitempty"` // TODO(oe) Do we still have those? Primary bool `json:"primary,omitempty"` }
type ShardsInfo ¶
type ShardsInfo struct { Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` Failures []*ShardOperationFailedException `json:"failures,omitempty"` Skipped int `json:"skipped,omitempty"` }
ShardsInfo represents information from a shard.
type SignificanceHeuristic ¶
type SignificantTermsAggregation ¶
type SignificantTermsAggregation struct {
// contains filtered or unexported fields
}
SignificantTermsAggregation is an aggregation that returns interesting or unusual occurrences of terms in a set. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significantterms-aggregation.html
func NewSignificantTermsAggregation ¶
func NewSignificantTermsAggregation() *SignificantTermsAggregation
func (*SignificantTermsAggregation) BackgroundFilter ¶
func (a *SignificantTermsAggregation) BackgroundFilter(filter Query) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Exclude ¶
func (a *SignificantTermsAggregation) Exclude(regexp string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ExcludeValues ¶
func (a *SignificantTermsAggregation) ExcludeValues(values ...interface{}) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ExecutionHint ¶
func (a *SignificantTermsAggregation) ExecutionHint(hint string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Field ¶
func (a *SignificantTermsAggregation) Field(field string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Include ¶
func (a *SignificantTermsAggregation) Include(regexp string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) IncludeExclude ¶
func (a *SignificantTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTermsAggregation
func (*SignificantTermsAggregation) IncludeValues ¶
func (a *SignificantTermsAggregation) IncludeValues(values ...interface{}) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Meta ¶
func (a *SignificantTermsAggregation) Meta(metaData map[string]interface{}) *SignificantTermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SignificantTermsAggregation) MinDocCount ¶
func (a *SignificantTermsAggregation) MinDocCount(minDocCount int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) NumPartitions ¶
func (a *SignificantTermsAggregation) NumPartitions(n int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Partition ¶
func (a *SignificantTermsAggregation) Partition(p int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) RequiredSize ¶
func (a *SignificantTermsAggregation) RequiredSize(requiredSize int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ShardMinDocCount ¶
func (a *SignificantTermsAggregation) ShardMinDocCount(shardMinDocCount int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ShardSize ¶
func (a *SignificantTermsAggregation) ShardSize(shardSize int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) SignificanceHeuristic ¶
func (a *SignificantTermsAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Source ¶
func (a *SignificantTermsAggregation) Source() (interface{}, error)
func (*SignificantTermsAggregation) SubAggregation ¶
func (a *SignificantTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTermsAggregation
type SignificantTextAggregation ¶
type SignificantTextAggregation struct {
// contains filtered or unexported fields
}
SignificantTextAggregation returns interesting or unusual occurrences of free-text terms in a set. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-bucket-significanttext-aggregation.html
func NewSignificantTextAggregation ¶
func NewSignificantTextAggregation() *SignificantTextAggregation
func (*SignificantTextAggregation) BackgroundFilter ¶
func (a *SignificantTextAggregation) BackgroundFilter(filter Query) *SignificantTextAggregation
func (*SignificantTextAggregation) Exclude ¶
func (a *SignificantTextAggregation) Exclude(regexp string) *SignificantTextAggregation
func (*SignificantTextAggregation) ExcludeValues ¶
func (a *SignificantTextAggregation) ExcludeValues(values ...interface{}) *SignificantTextAggregation
func (*SignificantTextAggregation) Field ¶
func (a *SignificantTextAggregation) Field(field string) *SignificantTextAggregation
func (*SignificantTextAggregation) FilterDuplicateText ¶
func (a *SignificantTextAggregation) FilterDuplicateText(filter bool) *SignificantTextAggregation
func (*SignificantTextAggregation) Include ¶
func (a *SignificantTextAggregation) Include(regexp string) *SignificantTextAggregation
func (*SignificantTextAggregation) IncludeExclude ¶
func (a *SignificantTextAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTextAggregation
func (*SignificantTextAggregation) IncludeValues ¶
func (a *SignificantTextAggregation) IncludeValues(values ...interface{}) *SignificantTextAggregation
func (*SignificantTextAggregation) Meta ¶
func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SignificantTextAggregation) MinDocCount ¶
func (a *SignificantTextAggregation) MinDocCount(minDocCount int64) *SignificantTextAggregation
func (*SignificantTextAggregation) NumPartitions ¶
func (a *SignificantTextAggregation) NumPartitions(n int) *SignificantTextAggregation
func (*SignificantTextAggregation) Partition ¶
func (a *SignificantTextAggregation) Partition(p int) *SignificantTextAggregation
func (*SignificantTextAggregation) ShardMinDocCount ¶
func (a *SignificantTextAggregation) ShardMinDocCount(shardMinDocCount int64) *SignificantTextAggregation
func (*SignificantTextAggregation) ShardSize ¶
func (a *SignificantTextAggregation) ShardSize(shardSize int) *SignificantTextAggregation
func (*SignificantTextAggregation) SignificanceHeuristic ¶
func (a *SignificantTextAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTextAggregation
func (*SignificantTextAggregation) Size ¶
func (a *SignificantTextAggregation) Size(size int) *SignificantTextAggregation
func (*SignificantTextAggregation) Source ¶
func (a *SignificantTextAggregation) Source() (interface{}, error)
func (*SignificantTextAggregation) SourceFieldNames ¶
func (a *SignificantTextAggregation) SourceFieldNames(names ...string) *SignificantTextAggregation
func (*SignificantTextAggregation) SubAggregation ¶
func (a *SignificantTextAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTextAggregation
type SimpleMovAvgModel ¶
type SimpleMovAvgModel struct { }
SimpleMovAvgModel calculates a simple unweighted (arithmetic) moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-movavg-aggregation.html#_simple
func NewSimpleMovAvgModel ¶
func NewSimpleMovAvgModel() *SimpleMovAvgModel
NewSimpleMovAvgModel creates and initializes a new SimpleMovAvgModel.
func (*SimpleMovAvgModel) Settings ¶
func (m *SimpleMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type SimpleQueryStringQuery ¶
type SimpleQueryStringQuery struct {
// contains filtered or unexported fields
}
SimpleQueryStringQuery is a query that uses the SimpleQueryParser to parse its context. Unlike the regular query_string query, the simple_query_string query will never throw an exception, and discards invalid parts of the query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-simple-query-string-query.html
func NewSimpleQueryStringQuery ¶
func NewSimpleQueryStringQuery(text string) *SimpleQueryStringQuery
NewSimpleQueryStringQuery creates and initializes a new SimpleQueryStringQuery.
func (*SimpleQueryStringQuery) AnalyzeWildcard ¶
func (q *SimpleQueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *SimpleQueryStringQuery
AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
func (*SimpleQueryStringQuery) Analyzer ¶
func (q *SimpleQueryStringQuery) Analyzer(analyzer string) *SimpleQueryStringQuery
Analyzer specifies the analyzer to use for the query.
func (*SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery ¶
func (q *SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *SimpleQueryStringQuery
AutoGenerateSynonymsPhraseQuery indicates whether phrase queries should be automatically generated for multi terms synonyms. Defaults to true.
func (*SimpleQueryStringQuery) Boost ¶
func (q *SimpleQueryStringQuery) Boost(boost float64) *SimpleQueryStringQuery
Boost sets the boost for this query.
func (*SimpleQueryStringQuery) DefaultOperator ¶
func (q *SimpleQueryStringQuery) DefaultOperator(defaultOperator string) *SimpleQueryStringQuery
DefaultOperator specifies the default operator for the query.
func (*SimpleQueryStringQuery) Field ¶
func (q *SimpleQueryStringQuery) Field(field string) *SimpleQueryStringQuery
Field adds a field to run the query against.
func (*SimpleQueryStringQuery) FieldWithBoost ¶
func (q *SimpleQueryStringQuery) FieldWithBoost(field string, boost float64) *SimpleQueryStringQuery
Field adds a field to run the query against with a specific boost.
func (*SimpleQueryStringQuery) Flags ¶
func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery
Flags sets the flags for the query.
func (*SimpleQueryStringQuery) FuzzyMaxExpansions ¶
func (q *SimpleQueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *SimpleQueryStringQuery
FuzzyMaxExpansions defines the number of terms fuzzy queries will expand to.
func (*SimpleQueryStringQuery) FuzzyPrefixLength ¶
func (q *SimpleQueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *SimpleQueryStringQuery
FuzzyPrefixLength defines the prefix length in fuzzy queries.
func (*SimpleQueryStringQuery) FuzzyTranspositions ¶
func (q *SimpleQueryStringQuery) FuzzyTranspositions(fuzzyTranspositions bool) *SimpleQueryStringQuery
FuzzyTranspositions defines whether to use transpositions in fuzzy queries.
func (*SimpleQueryStringQuery) Lenient ¶
func (q *SimpleQueryStringQuery) Lenient(lenient bool) *SimpleQueryStringQuery
Lenient indicates whether the query string parser should be lenient when parsing field values. It defaults to the index setting and if not set, defaults to false.
func (*SimpleQueryStringQuery) Locale
deprecated
func (q *SimpleQueryStringQuery) Locale(locale string) *SimpleQueryStringQuery
Locale to be used in the query.
Deprecated: Decision is now made by the analyzer.
func (*SimpleQueryStringQuery) LowercaseExpandedTerms
deprecated
func (q *SimpleQueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *SimpleQueryStringQuery
LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy and range queries are automatically lower-cased or not. Default is true.
Deprecated: Decision is now made by the analyzer.
func (*SimpleQueryStringQuery) MinimumShouldMatch ¶
func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery
MinimumShouldMatch specifies the minimumShouldMatch to apply to the resulting query should that be a Boolean query.
func (*SimpleQueryStringQuery) QueryName ¶
func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SimpleQueryStringQuery) QuoteFieldSuffix ¶
func (q *SimpleQueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *SimpleQueryStringQuery
QuoteFieldSuffix is an optional field name suffix to automatically try and add to the field searched when using quoted text.
func (*SimpleQueryStringQuery) Source ¶
func (q *SimpleQueryStringQuery) Source() (interface{}, error)
Source returns JSON for the query.
type SliceQuery ¶
type SliceQuery struct {
// contains filtered or unexported fields
}
SliceQuery allows to partition the documents into several slices. It is used e.g. to slice scroll operations in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-scroll.html#sliced-scroll for details.
func (*SliceQuery) Field ¶
func (s *SliceQuery) Field(field string) *SliceQuery
Field is the name of the field to slice against (_uid by default).
func (*SliceQuery) Max ¶
func (s *SliceQuery) Max(max int) *SliceQuery
Max is the maximum number of slices.
func (*SliceQuery) Source ¶
func (s *SliceQuery) Source() (interface{}, error)
Source returns the JSON body.
type SmoothingModel ¶
type SortByDoc ¶
type SortByDoc struct {
Sorter
}
SortByDoc sorts by the "_doc" field, as described in https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-scroll.html.
Example:
ss := elastic.NewSearchSource() ss = ss.SortBy(elastic.SortByDoc{})
type SortInfo ¶
type SortInfo struct { Sorter Field string Ascending bool Missing interface{} IgnoreUnmapped *bool UnmappedType string SortMode string NestedFilter Query // deprecated in 6.1 and replaced by Filter Filter Query NestedPath string // deprecated in 6.1 and replaced by Path Path string NestedSort *NestedSort // deprecated in 6.1 and replaced by Nested Nested *NestedSort }
SortInfo contains information about sorting a field.
type Sorter ¶
type Sorter interface {
Source() (interface{}, error)
}
Sorter is an interface for sorting strategies, e.g. ScoreSort or FieldSort. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-request-sort.html.
type SpanFirstQuery ¶
type SpanFirstQuery struct {
// contains filtered or unexported fields
}
SpanFirstQuery spans near the beginning of a field. The span first query maps to Lucene SpanFirstQuery
See https://www.elastic.co/guide/en/elasticsearch/reference/7.7/query-dsl-span-first-query.html for details.
func NewSpanFirstQuery ¶
func NewSpanFirstQuery(query Query, end int) *SpanFirstQuery
NewSpanFirstQuery creates a new SpanFirstQuery.
func (*SpanFirstQuery) Boost ¶
func (q *SpanFirstQuery) Boost(boost float64) *SpanFirstQuery
Boost sets the boost for this query.
func (*SpanFirstQuery) End ¶
func (q *SpanFirstQuery) End(end int) *SpanFirstQuery
End specifies the maximum end position of the match, which needs to be positive.
func (*SpanFirstQuery) Match ¶
func (q *SpanFirstQuery) Match(query Query) *SpanFirstQuery
Match sets the query, e.g. a SpanTermQuery.
func (*SpanFirstQuery) QueryName ¶
func (q *SpanFirstQuery) QueryName(queryName string) *SpanFirstQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanFirstQuery) Source ¶
func (q *SpanFirstQuery) Source() (interface{}, error)
Source returns the JSON body.
type SpanNearQuery ¶
type SpanNearQuery struct {
// contains filtered or unexported fields
}
SpanNearQuery matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order. The span near query maps to Lucene SpanNearQuery.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.7/query-dsl-span-near-query.html for details.
func NewSpanNearQuery ¶
func NewSpanNearQuery(clauses ...Query) *SpanNearQuery
NewSpanNearQuery creates a new SpanNearQuery.
func (*SpanNearQuery) Add ¶
func (q *SpanNearQuery) Add(clauses ...Query) *SpanNearQuery
Add clauses to use in the query.
func (*SpanNearQuery) Boost ¶
func (q *SpanNearQuery) Boost(boost float64) *SpanNearQuery
Boost sets the boost for this query.
func (*SpanNearQuery) Clauses ¶
func (q *SpanNearQuery) Clauses(clauses ...Query) *SpanNearQuery
Clauses to use in the query.
func (*SpanNearQuery) InOrder ¶
func (q *SpanNearQuery) InOrder(inOrder bool) *SpanNearQuery
InOrder, when true, the spans from each clause must be in the same order as in Clauses and must be non-overlapping. Defaults to true.
func (*SpanNearQuery) QueryName ¶
func (q *SpanNearQuery) QueryName(queryName string) *SpanNearQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanNearQuery) Slop ¶
func (q *SpanNearQuery) Slop(slop int) *SpanNearQuery
Slop controls the maximum number of intervening unmatched positions permitted.
func (*SpanNearQuery) Source ¶
func (q *SpanNearQuery) Source() (interface{}, error)
Source returns the JSON body.
type SpanTermQuery ¶
type SpanTermQuery struct {
// contains filtered or unexported fields
}
SpanTermQuery matches spans containing a term. The span term query maps to Lucene SpanTermQuery.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.7/query-dsl-span-term-query.html for details.
func NewSpanTermQuery ¶
func NewSpanTermQuery(field string, value ...interface{}) *SpanTermQuery
NewSpanTermQuery creates a new SpanTermQuery. When passing values, the first one is used to initialize the value.
func (*SpanTermQuery) Boost ¶
func (q *SpanTermQuery) Boost(boost float64) *SpanTermQuery
Boost sets the boost for this query.
func (*SpanTermQuery) Field ¶
func (q *SpanTermQuery) Field(field string) *SpanTermQuery
Field name to match the term against.
func (*SpanTermQuery) QueryName ¶
func (q *SpanTermQuery) QueryName(queryName string) *SpanTermQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanTermQuery) Source ¶
func (q *SpanTermQuery) Source() (interface{}, error)
Source returns the JSON body.
func (*SpanTermQuery) Value ¶
func (q *SpanTermQuery) Value(value interface{}) *SpanTermQuery
Value of the term.
type StatsAggregation ¶
type StatsAggregation struct {
// contains filtered or unexported fields
}
StatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-stats-aggregation.html
func NewStatsAggregation ¶
func NewStatsAggregation() *StatsAggregation
func (*StatsAggregation) Field ¶
func (a *StatsAggregation) Field(field string) *StatsAggregation
func (*StatsAggregation) Format ¶
func (a *StatsAggregation) Format(format string) *StatsAggregation
func (*StatsAggregation) Meta ¶
func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*StatsAggregation) Missing ¶
func (a *StatsAggregation) Missing(missing interface{}) *StatsAggregation
func (*StatsAggregation) Script ¶
func (a *StatsAggregation) Script(script *Script) *StatsAggregation
func (*StatsAggregation) Source ¶
func (a *StatsAggregation) Source() (interface{}, error)
func (*StatsAggregation) SubAggregation ¶
func (a *StatsAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsAggregation
type StatsBucketAggregation ¶
type StatsBucketAggregation struct {
// contains filtered or unexported fields
}
StatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-stats-bucket-aggregation.html
func NewStatsBucketAggregation ¶
func NewStatsBucketAggregation() *StatsBucketAggregation
NewStatsBucketAggregation creates and initializes a new StatsBucketAggregation.
func (*StatsBucketAggregation) BucketsPath ¶
func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*StatsBucketAggregation) Format ¶
func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation
Format to use on the output of this aggregation.
func (*StatsBucketAggregation) GapInsertZeros ¶
func (s *StatsBucketAggregation) GapInsertZeros() *StatsBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*StatsBucketAggregation) GapPolicy ¶
func (s *StatsBucketAggregation) GapPolicy(gapPolicy string) *StatsBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*StatsBucketAggregation) GapSkip ¶
func (s *StatsBucketAggregation) GapSkip() *StatsBucketAggregation
GapSkip skips gaps in the series.
func (*StatsBucketAggregation) Meta ¶
func (s *StatsBucketAggregation) Meta(metaData map[string]interface{}) *StatsBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*StatsBucketAggregation) Source ¶
func (s *StatsBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type StupidBackoffSmoothingModel ¶
type StupidBackoffSmoothingModel struct {
// contains filtered or unexported fields
}
StupidBackoffSmoothingModel implements a stupid backoff smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewStupidBackoffSmoothingModel ¶
func NewStupidBackoffSmoothingModel(discount float64) *StupidBackoffSmoothingModel
func (*StupidBackoffSmoothingModel) Source ¶
func (sm *StupidBackoffSmoothingModel) Source() (interface{}, error)
func (*StupidBackoffSmoothingModel) Type ¶
func (sm *StupidBackoffSmoothingModel) Type() string
type SuggestField ¶
type SuggestField struct {
// contains filtered or unexported fields
}
SuggestField can be used by the caller to specify a suggest field at index time. For a detailed example, see e.g. https://www.elastic.co/blog/you-complete-me.
func NewSuggestField ¶
func NewSuggestField(input ...string) *SuggestField
func (*SuggestField) ContextQuery ¶
func (f *SuggestField) ContextQuery(queries ...SuggesterContextQuery) *SuggestField
func (*SuggestField) Input ¶
func (f *SuggestField) Input(input ...string) *SuggestField
func (*SuggestField) MarshalJSON ¶
func (f *SuggestField) MarshalJSON() ([]byte, error)
MarshalJSON encodes SuggestField into JSON.
func (*SuggestField) Weight ¶
func (f *SuggestField) Weight(weight int) *SuggestField
type Suggester ¶
Represents the generic suggester interface. A suggester's only purpose is to return the source of the query as a JSON-serializable object. Returning a map[string]interface{} will do.
type SuggesterCategoryIndex ¶
type SuggesterCategoryIndex struct {
// contains filtered or unexported fields
}
func NewSuggesterCategoryIndex ¶
func NewSuggesterCategoryIndex(name string, values ...string) *SuggesterCategoryIndex
NewSuggesterCategoryIndex creates a new SuggesterCategoryIndex.
func (*SuggesterCategoryIndex) Source ¶
func (q *SuggesterCategoryIndex) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
func (*SuggesterCategoryIndex) Values ¶
func (q *SuggesterCategoryIndex) Values(values ...string) *SuggesterCategoryIndex
type SuggesterCategoryMapping ¶
type SuggesterCategoryMapping struct {
// contains filtered or unexported fields
}
SuggesterCategoryMapping provides a mapping for a category context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/suggester-context.html#_category_mapping.
func NewSuggesterCategoryMapping ¶
func NewSuggesterCategoryMapping(name string) *SuggesterCategoryMapping
NewSuggesterCategoryMapping creates a new SuggesterCategoryMapping.
func (*SuggesterCategoryMapping) DefaultValues ¶
func (q *SuggesterCategoryMapping) DefaultValues(values ...string) *SuggesterCategoryMapping
func (*SuggesterCategoryMapping) FieldName ¶
func (q *SuggesterCategoryMapping) FieldName(fieldName string) *SuggesterCategoryMapping
func (*SuggesterCategoryMapping) Source ¶
func (q *SuggesterCategoryMapping) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterCategoryQuery ¶
type SuggesterCategoryQuery struct {
// contains filtered or unexported fields
}
SuggesterCategoryQuery provides querying a category context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/suggester-context.html#_category_query.
func NewSuggesterCategoryQuery ¶
func NewSuggesterCategoryQuery(name string, values ...string) *SuggesterCategoryQuery
NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
func (*SuggesterCategoryQuery) Source ¶
func (q *SuggesterCategoryQuery) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
func (*SuggesterCategoryQuery) Value ¶
func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery
func (*SuggesterCategoryQuery) ValueWithBoost ¶
func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery
func (*SuggesterCategoryQuery) Values ¶
func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery
type SuggesterContextQuery ¶
type SuggesterContextQuery interface {
Source() (interface{}, error)
}
SuggesterContextQuery is used to define context information within a suggestion request.
type SuggesterGeoIndex ¶
type SuggesterGeoIndex struct {
// contains filtered or unexported fields
}
func NewSuggesterGeoIndex ¶
func NewSuggesterGeoIndex(name string) *SuggesterGeoIndex
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
func (*SuggesterGeoIndex) Locations ¶
func (q *SuggesterGeoIndex) Locations(locations ...*GeoPoint) *SuggesterGeoIndex
func (*SuggesterGeoIndex) Source ¶
func (q *SuggesterGeoIndex) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterGeoMapping ¶
type SuggesterGeoMapping struct {
// contains filtered or unexported fields
}
SuggesterGeoMapping provides a mapping for a geolocation context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/suggester-context.html#_geo_location_mapping.
func NewSuggesterGeoMapping ¶
func NewSuggesterGeoMapping(name string) *SuggesterGeoMapping
NewSuggesterGeoMapping creates a new SuggesterGeoMapping.
func (*SuggesterGeoMapping) DefaultLocations ¶
func (q *SuggesterGeoMapping) DefaultLocations(locations ...*GeoPoint) *SuggesterGeoMapping
func (*SuggesterGeoMapping) FieldName ¶
func (q *SuggesterGeoMapping) FieldName(fieldName string) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Neighbors ¶
func (q *SuggesterGeoMapping) Neighbors(neighbors bool) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Precision ¶
func (q *SuggesterGeoMapping) Precision(precision ...string) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Source ¶
func (q *SuggesterGeoMapping) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterGeoQuery ¶
type SuggesterGeoQuery struct {
// contains filtered or unexported fields
}
SuggesterGeoQuery provides querying a geolocation context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/suggester-context.html#_geo_location_query
func NewSuggesterGeoQuery ¶
func NewSuggesterGeoQuery(name string, location *GeoPoint) *SuggesterGeoQuery
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
func (*SuggesterGeoQuery) Boost ¶
func (q *SuggesterGeoQuery) Boost(boost int) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Neighbours ¶
func (q *SuggesterGeoQuery) Neighbours(neighbours ...string) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Precision ¶
func (q *SuggesterGeoQuery) Precision(precision string) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Source ¶
func (q *SuggesterGeoQuery) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SumAggregation ¶
type SumAggregation struct {
// contains filtered or unexported fields
}
SumAggregation is a single-value metrics aggregation that sums up numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-sum-aggregation.html
func NewSumAggregation ¶
func NewSumAggregation() *SumAggregation
func (*SumAggregation) Field ¶
func (a *SumAggregation) Field(field string) *SumAggregation
func (*SumAggregation) Format ¶
func (a *SumAggregation) Format(format string) *SumAggregation
func (*SumAggregation) Meta ¶
func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SumAggregation) Missing ¶
func (a *SumAggregation) Missing(missing interface{}) *SumAggregation
func (*SumAggregation) Script ¶
func (a *SumAggregation) Script(script *Script) *SumAggregation
func (*SumAggregation) Source ¶
func (a *SumAggregation) Source() (interface{}, error)
func (*SumAggregation) SubAggregation ¶
func (a *SumAggregation) SubAggregation(name string, subAggregation Aggregation) *SumAggregation
type SumBucketAggregation ¶
type SumBucketAggregation struct {
// contains filtered or unexported fields
}
SumBucketAggregation is a sibling pipeline aggregation which calculates the sum across all buckets of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-pipeline-sum-bucket-aggregation.html
func NewSumBucketAggregation ¶
func NewSumBucketAggregation() *SumBucketAggregation
NewSumBucketAggregation creates and initializes a new SumBucketAggregation.
func (*SumBucketAggregation) BucketsPath ¶
func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*SumBucketAggregation) Format ¶
func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation
Format to use on the output of this aggregation.
func (*SumBucketAggregation) GapInsertZeros ¶
func (a *SumBucketAggregation) GapInsertZeros() *SumBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*SumBucketAggregation) GapPolicy ¶
func (a *SumBucketAggregation) GapPolicy(gapPolicy string) *SumBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*SumBucketAggregation) GapSkip ¶
func (a *SumBucketAggregation) GapSkip() *SumBucketAggregation
GapSkip skips gaps in the series.
func (*SumBucketAggregation) Meta ¶
func (a *SumBucketAggregation) Meta(metaData map[string]interface{}) *SumBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SumBucketAggregation) Source ¶
func (a *SumBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type TermQuery ¶
type TermQuery struct {
// contains filtered or unexported fields
}
TermQuery finds documents that contain the exact term specified in the inverted index.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-term-query.html
func NewTermQuery ¶
NewTermQuery creates and initializes a new TermQuery.
func (*TermQuery) CaseInsensitive ¶
type TermSuggester ¶
type TermSuggester struct { Suggester // contains filtered or unexported fields }
TermSuggester suggests terms based on edit distance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-suggesters-term.html.
func NewTermSuggester ¶
func NewTermSuggester(name string) *TermSuggester
NewTermSuggester creates a new TermSuggester.
func (*TermSuggester) Accuracy ¶
func (q *TermSuggester) Accuracy(accuracy float64) *TermSuggester
func (*TermSuggester) Analyzer ¶
func (q *TermSuggester) Analyzer(analyzer string) *TermSuggester
func (*TermSuggester) ContextQueries ¶
func (q *TermSuggester) ContextQueries(queries ...SuggesterContextQuery) *TermSuggester
func (*TermSuggester) ContextQuery ¶
func (q *TermSuggester) ContextQuery(query SuggesterContextQuery) *TermSuggester
func (*TermSuggester) Field ¶
func (q *TermSuggester) Field(field string) *TermSuggester
func (*TermSuggester) MaxEdits ¶
func (q *TermSuggester) MaxEdits(maxEdits int) *TermSuggester
func (*TermSuggester) MaxInspections ¶
func (q *TermSuggester) MaxInspections(maxInspections int) *TermSuggester
func (*TermSuggester) MaxTermFreq ¶
func (q *TermSuggester) MaxTermFreq(maxTermFreq float64) *TermSuggester
func (*TermSuggester) MinDocFreq ¶
func (q *TermSuggester) MinDocFreq(minDocFreq float64) *TermSuggester
func (*TermSuggester) MinWordLength ¶
func (q *TermSuggester) MinWordLength(minWordLength int) *TermSuggester
func (*TermSuggester) Name ¶
func (q *TermSuggester) Name() string
func (*TermSuggester) PrefixLength ¶
func (q *TermSuggester) PrefixLength(prefixLength int) *TermSuggester
func (*TermSuggester) ShardSize ¶
func (q *TermSuggester) ShardSize(shardSize int) *TermSuggester
func (*TermSuggester) Size ¶
func (q *TermSuggester) Size(size int) *TermSuggester
func (*TermSuggester) Sort ¶
func (q *TermSuggester) Sort(sort string) *TermSuggester
func (*TermSuggester) Source ¶
func (q *TermSuggester) Source(includeName bool) (interface{}, error)
Source generates the source for the term suggester.
func (*TermSuggester) StringDistance ¶
func (q *TermSuggester) StringDistance(stringDistance string) *TermSuggester
func (*TermSuggester) SuggestMode ¶
func (q *TermSuggester) SuggestMode(suggestMode string) *TermSuggester
func (*TermSuggester) Text ¶
func (q *TermSuggester) Text(text string) *TermSuggester
type TermVectorsFieldInfo ¶
type TermVectorsFieldInfo struct { FieldStatistics FieldStatistics `json:"field_statistics"` Terms map[string]TermsInfo `json:"terms"` }
type TermsAggregation ¶
type TermsAggregation struct {
// contains filtered or unexported fields
}
TermsAggregation is a multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.
func NewTermsAggregation ¶
func NewTermsAggregation() *TermsAggregation
func (*TermsAggregation) CollectionMode ¶
func (a *TermsAggregation) CollectionMode(collectionMode string) *TermsAggregation
Collection mode can be depth_first or breadth_first as of 1.4.0.
func (*TermsAggregation) Exclude ¶
func (a *TermsAggregation) Exclude(regexp string) *TermsAggregation
func (*TermsAggregation) ExcludeValues ¶
func (a *TermsAggregation) ExcludeValues(values ...interface{}) *TermsAggregation
func (*TermsAggregation) ExecutionHint ¶
func (a *TermsAggregation) ExecutionHint(hint string) *TermsAggregation
func (*TermsAggregation) Field ¶
func (a *TermsAggregation) Field(field string) *TermsAggregation
func (*TermsAggregation) Include ¶
func (a *TermsAggregation) Include(regexp string) *TermsAggregation
func (*TermsAggregation) IncludeExclude ¶
func (a *TermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *TermsAggregation
func (*TermsAggregation) IncludeValues ¶
func (a *TermsAggregation) IncludeValues(values ...interface{}) *TermsAggregation
func (*TermsAggregation) Meta ¶
func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*TermsAggregation) MinDocCount ¶
func (a *TermsAggregation) MinDocCount(minDocCount int) *TermsAggregation
func (*TermsAggregation) Missing ¶
func (a *TermsAggregation) Missing(missing interface{}) *TermsAggregation
Missing configures the value to use when documents miss a value.
func (*TermsAggregation) NumPartitions ¶
func (a *TermsAggregation) NumPartitions(n int) *TermsAggregation
func (*TermsAggregation) Order ¶
func (a *TermsAggregation) Order(order string, asc bool) *TermsAggregation
func (*TermsAggregation) OrderByAggregation ¶
func (a *TermsAggregation) OrderByAggregation(aggName string, asc bool) *TermsAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*TermsAggregation) OrderByAggregationAndMetric ¶
func (a *TermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *TermsAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*TermsAggregation) OrderByCount ¶
func (a *TermsAggregation) OrderByCount(asc bool) *TermsAggregation
func (*TermsAggregation) OrderByCountAsc ¶
func (a *TermsAggregation) OrderByCountAsc() *TermsAggregation
func (*TermsAggregation) OrderByCountDesc ¶
func (a *TermsAggregation) OrderByCountDesc() *TermsAggregation
func (*TermsAggregation) OrderByKey ¶
func (a *TermsAggregation) OrderByKey(asc bool) *TermsAggregation
func (*TermsAggregation) OrderByKeyAsc ¶
func (a *TermsAggregation) OrderByKeyAsc() *TermsAggregation
func (*TermsAggregation) OrderByKeyDesc ¶
func (a *TermsAggregation) OrderByKeyDesc() *TermsAggregation
func (*TermsAggregation) OrderByTerm
deprecated
func (a *TermsAggregation) OrderByTerm(asc bool) *TermsAggregation
Deprecated: Use OrderByKey instead.
func (*TermsAggregation) OrderByTermAsc
deprecated
func (a *TermsAggregation) OrderByTermAsc() *TermsAggregation
Deprecated: Use OrderByKeyAsc instead.
func (*TermsAggregation) OrderByTermDesc
deprecated
func (a *TermsAggregation) OrderByTermDesc() *TermsAggregation
Deprecated: Use OrderByKeyDesc instead.
func (*TermsAggregation) Partition ¶
func (a *TermsAggregation) Partition(p int) *TermsAggregation
func (*TermsAggregation) RequiredSize ¶
func (a *TermsAggregation) RequiredSize(requiredSize int) *TermsAggregation
func (*TermsAggregation) Script ¶
func (a *TermsAggregation) Script(script *Script) *TermsAggregation
func (*TermsAggregation) ShardMinDocCount ¶
func (a *TermsAggregation) ShardMinDocCount(shardMinDocCount int) *TermsAggregation
func (*TermsAggregation) ShardSize ¶
func (a *TermsAggregation) ShardSize(shardSize int) *TermsAggregation
func (*TermsAggregation) ShowTermDocCountError ¶
func (a *TermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *TermsAggregation
func (*TermsAggregation) Size ¶
func (a *TermsAggregation) Size(size int) *TermsAggregation
func (*TermsAggregation) Source ¶
func (a *TermsAggregation) Source() (interface{}, error)
func (*TermsAggregation) SubAggregation ¶
func (a *TermsAggregation) SubAggregation(name string, subAggregation Aggregation) *TermsAggregation
func (*TermsAggregation) ValueType ¶
func (a *TermsAggregation) ValueType(valueType string) *TermsAggregation
ValueType can be string, long, or double.
type TermsAggregationIncludeExclude ¶
type TermsAggregationIncludeExclude struct { Include string Exclude string IncludeValues []interface{} ExcludeValues []interface{} Partition int NumPartitions int }
TermsAggregationIncludeExclude allows for include/exclude in a TermsAggregation.
func (*TermsAggregationIncludeExclude) MergeInto ¶
func (ie *TermsAggregationIncludeExclude) MergeInto(source map[string]interface{}) error
MergeInto merges the values of the include/exclude options into source.
func (*TermsAggregationIncludeExclude) Source ¶
func (ie *TermsAggregationIncludeExclude) Source() (interface{}, error)
Source returns a JSON serializable struct.
type TermsLookup ¶
type TermsLookup struct {
// contains filtered or unexported fields
}
TermsLookup encapsulates the parameters needed to fetch terms.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-terms-query.html#query-dsl-terms-lookup.
func NewTermsLookup ¶
func NewTermsLookup() *TermsLookup
NewTermsLookup creates and initializes a new TermsLookup.
func (*TermsLookup) Path ¶
func (t *TermsLookup) Path(path string) *TermsLookup
Path to use for lookup.
func (*TermsLookup) Routing ¶
func (t *TermsLookup) Routing(routing string) *TermsLookup
Routing value.
func (*TermsLookup) Source ¶
func (t *TermsLookup) Source() (interface{}, error)
Source creates the JSON source of the builder.
func (*TermsLookup) Type
deprecated
func (t *TermsLookup) Type(typ string) *TermsLookup
Type name.
Deprecated: Types are in the process of being removed.
type TermsOrder ¶
TermsOrder specifies a single order field for a terms aggregation.
func (*TermsOrder) Source ¶
func (order *TermsOrder) Source() (interface{}, error)
Source returns serializable JSON of the TermsOrder.
type TermsQuery ¶
type TermsQuery struct {
// contains filtered or unexported fields
}
TermsQuery filters documents that have fields that match any of the provided terms (not analyzed).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-terms-query.html
func NewTermsQuery ¶
func NewTermsQuery(name string, values ...interface{}) *TermsQuery
NewTermsQuery creates and initializes a new TermsQuery.
func NewTermsQueryFromStrings ¶
func NewTermsQueryFromStrings(name string, values ...string) *TermsQuery
NewTermsQueryFromStrings creates and initializes a new TermsQuery from strings.
func (*TermsQuery) Boost ¶
func (q *TermsQuery) Boost(boost float64) *TermsQuery
Boost sets the boost for this query.
func (*TermsQuery) QueryName ¶
func (q *TermsQuery) QueryName(queryName string) *TermsQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*TermsQuery) Source ¶
func (q *TermsQuery) Source() (interface{}, error)
Creates the query source for the term query.
func (*TermsQuery) TermsLookup ¶
func (q *TermsQuery) TermsLookup(lookup *TermsLookup) *TermsQuery
TermsLookup adds terms lookup details to the query.
type TermsSetQuery ¶
type TermsSetQuery struct {
// contains filtered or unexported fields
}
TermsSetQuery returns any documents that match with at least one or more of the provided terms. The terms are not analyzed and thus must match exactly. The number of terms that must match varies per document and is either controlled by a minimum should match field or computed per document in a minimum should match script.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-terms-set-query.html
func NewTermsSetQuery ¶
func NewTermsSetQuery(name string, values ...interface{}) *TermsSetQuery
NewTermsSetQuery creates and initializes a new TermsSetQuery.
func (*TermsSetQuery) Boost ¶
func (q *TermsSetQuery) Boost(boost float64) *TermsSetQuery
Boost sets the boost for this query.
func (*TermsSetQuery) MinimumShouldMatchField ¶
func (q *TermsSetQuery) MinimumShouldMatchField(minimumShouldMatchField string) *TermsSetQuery
MinimumShouldMatchField specifies the field to match.
func (*TermsSetQuery) MinimumShouldMatchScript ¶
func (q *TermsSetQuery) MinimumShouldMatchScript(minimumShouldMatchScript *Script) *TermsSetQuery
MinimumShouldMatchScript specifies the script to match.
func (*TermsSetQuery) QueryName ¶
func (q *TermsSetQuery) QueryName(queryName string) *TermsSetQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*TermsSetQuery) Source ¶
func (q *TermsSetQuery) Source() (interface{}, error)
Source creates the query source for the term query.
type TermvectorsFilterSettings ¶
type TermvectorsFilterSettings struct {
// contains filtered or unexported fields
}
TermvectorsFilterSettings adds additional filters to a Termsvector request. It allows to filter terms based on their tf-idf scores. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-termvectors.html#_terms_filtering for more information.
func NewTermvectorsFilterSettings ¶
func NewTermvectorsFilterSettings() *TermvectorsFilterSettings
NewTermvectorsFilterSettings creates and initializes a new TermvectorsFilterSettings struct.
func (*TermvectorsFilterSettings) MaxDocFreq ¶
func (fs *TermvectorsFilterSettings) MaxDocFreq(value int64) *TermvectorsFilterSettings
MaxDocFreq ignores terms which occur in more than this many docs.
func (*TermvectorsFilterSettings) MaxNumTerms ¶
func (fs *TermvectorsFilterSettings) MaxNumTerms(value int64) *TermvectorsFilterSettings
MaxNumTerms specifies the maximum number of terms the must be returned per field.
func (*TermvectorsFilterSettings) MaxTermFreq ¶
func (fs *TermvectorsFilterSettings) MaxTermFreq(value int64) *TermvectorsFilterSettings
MaxTermFreq ignores words with more than this frequency in the source doc.
func (*TermvectorsFilterSettings) MaxWordLength ¶
func (fs *TermvectorsFilterSettings) MaxWordLength(value int64) *TermvectorsFilterSettings
MaxWordLength specifies the maximum word length above which words will be ignored.
func (*TermvectorsFilterSettings) MinDocFreq ¶
func (fs *TermvectorsFilterSettings) MinDocFreq(value int64) *TermvectorsFilterSettings
MinDocFreq ignores terms which do not occur in at least this many docs.
func (*TermvectorsFilterSettings) MinTermFreq ¶
func (fs *TermvectorsFilterSettings) MinTermFreq(value int64) *TermvectorsFilterSettings
MinTermFreq ignores words with less than this frequency in the source doc.
func (*TermvectorsFilterSettings) MinWordLength ¶
func (fs *TermvectorsFilterSettings) MinWordLength(value int64) *TermvectorsFilterSettings
MinWordLength specifies the minimum word length below which words will be ignored.
func (*TermvectorsFilterSettings) Source ¶
func (fs *TermvectorsFilterSettings) Source() (interface{}, error)
Source returns JSON for the query.
type TermvectorsResponse ¶
type TermvectorsResponse struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id,omitempty"` Version int `json:"_version"` Found bool `json:"found"` Took int64 `json:"took"` TermVectors map[string]TermVectorsFieldInfo `json:"term_vectors"` }
TermvectorsResponse is the response of TermvectorsService.Do.
type TermvectorsService ¶
type TermvectorsService struct {
// contains filtered or unexported fields
}
TermvectorsService returns information and statistics on terms in the fields of a particular document. The document could be stored in the index or artificially provided by the user.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-termvectors.html for documentation.
func (*TermvectorsService) BodyJson ¶
func (s *TermvectorsService) BodyJson(body interface{}) *TermvectorsService
BodyJson defines the body parameters. See documentation.
func (*TermvectorsService) BodyString ¶
func (s *TermvectorsService) BodyString(body string) *TermvectorsService
BodyString defines the body parameters as a string. See documentation.
func (*TermvectorsService) Dfs ¶
func (s *TermvectorsService) Dfs(dfs bool) *TermvectorsService
Dfs specifies if distributed frequencies should be returned instead shard frequencies.
func (*TermvectorsService) Doc ¶
func (s *TermvectorsService) Doc(doc interface{}) *TermvectorsService
Doc is the document to analyze.
func (*TermvectorsService) ErrorTrace ¶
func (s *TermvectorsService) ErrorTrace(errorTrace bool) *TermvectorsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*TermvectorsService) FieldStatistics ¶
func (s *TermvectorsService) FieldStatistics(fieldStatistics bool) *TermvectorsService
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
func (*TermvectorsService) Fields ¶
func (s *TermvectorsService) Fields(fields ...string) *TermvectorsService
Fields a list of fields to return.
func (*TermvectorsService) Filter ¶
func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService
Filter adds terms filter settings.
func (*TermvectorsService) FilterPath ¶
func (s *TermvectorsService) FilterPath(filterPath ...string) *TermvectorsService
FilterPath specifies a list of filters used to reduce the response.
func (*TermvectorsService) Header ¶
func (s *TermvectorsService) Header(name string, value string) *TermvectorsService
Header adds a header to the request.
func (*TermvectorsService) Headers ¶
func (s *TermvectorsService) Headers(headers http.Header) *TermvectorsService
Headers specifies the headers of the request.
func (*TermvectorsService) Human ¶
func (s *TermvectorsService) Human(human bool) *TermvectorsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*TermvectorsService) Id ¶
func (s *TermvectorsService) Id(id string) *TermvectorsService
Id of the document.
func (*TermvectorsService) Index ¶
func (s *TermvectorsService) Index(index string) *TermvectorsService
Index in which the document resides.
func (*TermvectorsService) Offsets ¶
func (s *TermvectorsService) Offsets(offsets bool) *TermvectorsService
Offsets specifies if term offsets should be returned.
func (*TermvectorsService) Parent ¶
func (s *TermvectorsService) Parent(parent string) *TermvectorsService
Parent id of documents.
func (*TermvectorsService) Payloads ¶
func (s *TermvectorsService) Payloads(payloads bool) *TermvectorsService
Payloads specifies if term payloads should be returned.
func (*TermvectorsService) PerFieldAnalyzer ¶
func (s *TermvectorsService) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *TermvectorsService
PerFieldAnalyzer allows to specify a different analyzer than the one at the field.
func (*TermvectorsService) Positions ¶
func (s *TermvectorsService) Positions(positions bool) *TermvectorsService
Positions specifies if term positions should be returned.
func (*TermvectorsService) Preference ¶
func (s *TermvectorsService) Preference(preference string) *TermvectorsService
Preference specify the node or shard the operation should be performed on (default: random).
func (*TermvectorsService) Pretty ¶
func (s *TermvectorsService) Pretty(pretty bool) *TermvectorsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*TermvectorsService) Realtime ¶
func (s *TermvectorsService) Realtime(realtime bool) *TermvectorsService
Realtime specifies if request is real-time as opposed to near-real-time (default: true).
func (*TermvectorsService) Routing ¶
func (s *TermvectorsService) Routing(routing string) *TermvectorsService
Routing is a specific routing value.
func (*TermvectorsService) TermStatistics ¶
func (s *TermvectorsService) TermStatistics(termStatistics bool) *TermvectorsService
TermStatistics specifies if total term frequency and document frequency should be returned.
func (*TermvectorsService) Type
deprecated
func (s *TermvectorsService) Type(typ string) *TermvectorsService
Type of the document.
Deprecated: Types are in the process of being removed.
func (*TermvectorsService) Version ¶
func (s *TermvectorsService) Version(version interface{}) *TermvectorsService
Version an explicit version number for concurrency control.
func (*TermvectorsService) VersionType ¶
func (s *TermvectorsService) VersionType(versionType string) *TermvectorsService
VersionType specifies a version type ("internal", "external", or "external_gte").
type TopHitsAggregation ¶
type TopHitsAggregation struct {
// contains filtered or unexported fields
}
TopHitsAggregation keeps track of the most relevant document being aggregated. This aggregator is intended to be used as a sub aggregator, so that the top matching documents can be aggregated per bucket.
It can effectively be used to group result sets by certain fields via a bucket aggregator. One or more bucket aggregators determines by which properties a result set get sliced into.
func NewTopHitsAggregation ¶
func NewTopHitsAggregation() *TopHitsAggregation
func (*TopHitsAggregation) DocvalueField ¶
func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFieldWithFormat ¶
func (a *TopHitsAggregation) DocvalueFieldWithFormat(docvalueField DocvalueField) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFields ¶
func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFieldsWithFormat ¶
func (a *TopHitsAggregation) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *TopHitsAggregation
func (*TopHitsAggregation) Explain ¶
func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation
func (*TopHitsAggregation) FetchSource ¶
func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation
func (*TopHitsAggregation) FetchSourceContext ¶
func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation
func (*TopHitsAggregation) From ¶
func (a *TopHitsAggregation) From(from int) *TopHitsAggregation
func (*TopHitsAggregation) Highlight ¶
func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation
func (*TopHitsAggregation) Highlighter ¶
func (a *TopHitsAggregation) Highlighter() *Highlight
func (*TopHitsAggregation) NoStoredFields ¶
func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation
func (*TopHitsAggregation) ScriptField ¶
func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation
func (*TopHitsAggregation) ScriptFields ¶
func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation
func (*TopHitsAggregation) SearchSource ¶
func (a *TopHitsAggregation) SearchSource(searchSource *SearchSource) *TopHitsAggregation
func (*TopHitsAggregation) Size ¶
func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation
func (*TopHitsAggregation) Sort ¶
func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation
func (*TopHitsAggregation) SortBy ¶
func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation
func (*TopHitsAggregation) SortWithInfo ¶
func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation
func (*TopHitsAggregation) Source ¶
func (a *TopHitsAggregation) Source() (interface{}, error)
func (*TopHitsAggregation) TrackScores ¶
func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation
func (*TopHitsAggregation) Version ¶
func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation
type TopMetricsAggregation ¶
type TopMetricsAggregation struct {
// contains filtered or unexported fields
}
TopMetricsAggregation selects metrics from the document with the largest or smallest "sort" value. top_metrics is fairly similar to top_hits in spirit but because it is more limited it is able to do its job using less memory and is often faster.
func NewTopMetricsAggregation ¶
func NewTopMetricsAggregation() *TopMetricsAggregation
func (*TopMetricsAggregation) Field ¶
func (a *TopMetricsAggregation) Field(field string) *TopMetricsAggregation
Field adds a field to run aggregation against.
func (*TopMetricsAggregation) Size ¶
func (a *TopMetricsAggregation) Size(size int) *TopMetricsAggregation
Size sets the number of top documents returned by the aggregation. The default size is 1.
func (*TopMetricsAggregation) Sort ¶
func (a *TopMetricsAggregation) Sort(field string, ascending bool) *TopMetricsAggregation
Sort adds a sort order.
func (*TopMetricsAggregation) SortBy ¶
func (a *TopMetricsAggregation) SortBy(sorter Sorter) *TopMetricsAggregation
SortBy adds a sort order.
func (*TopMetricsAggregation) SortWithInfo ¶
func (a *TopMetricsAggregation) SortWithInfo(info SortInfo) *TopMetricsAggregation
SortWithInfo adds a sort order.
func (*TopMetricsAggregation) Source ¶
func (a *TopMetricsAggregation) Source() (interface{}, error)
type TotalHits ¶
type TotalHits struct { Value int64 `json:"value"` // value of the total hit count Relation string `json:"relation"` // how the value should be interpreted: accurate ("eq") or a lower bound ("gte") }
TotalHits specifies total number of hits and its relation
func (*TotalHits) UnmarshalJSON ¶
UnmarshalJSON into TotalHits, accepting both the new response structure in ES 7.x as well as the older response structure in earlier versions. The latter can be enabled with RestTotalHitsAsInt(true).
type TypeQuery ¶
type TypeQuery struct {
// contains filtered or unexported fields
}
TypeQuery filters documents matching the provided document / mapping type.
For details, see: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-type-query.html
func NewTypeQuery ¶
type UnassignedInfo ¶
type ValidateService ¶
type ValidateService struct {
// contains filtered or unexported fields
}
ValidateService allows a user to validate a potentially expensive query without executing it. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-validate.html.
func (*ValidateService) AllShards ¶
func (s *ValidateService) AllShards(allShards *bool) *ValidateService
Execute validation on all shards instead of one random shard per index.
func (*ValidateService) AllowNoIndices ¶
func (s *ValidateService) AllowNoIndices(allowNoIndices bool) *ValidateService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*ValidateService) AnalyzeWildcard ¶
func (s *ValidateService) AnalyzeWildcard(analyzeWildcard bool) *ValidateService
AnalyzeWildcard specifies whether wildcards and prefix queries in the query string query should be analyzed (default: false).
func (*ValidateService) Analyzer ¶
func (s *ValidateService) Analyzer(analyzer string) *ValidateService
Analyzer is the analyzer for the query string query.
func (*ValidateService) BodyJson ¶
func (s *ValidateService) BodyJson(body interface{}) *ValidateService
BodyJson sets the query definition using the Query DSL.
func (*ValidateService) BodyString ¶
func (s *ValidateService) BodyString(body string) *ValidateService
BodyString sets the query definition using the Query DSL as a string.
func (*ValidateService) DefaultOperator ¶
func (s *ValidateService) DefaultOperator(defaultOperator string) *ValidateService
DefaultOperator is the default operator for query string query (AND or OR).
func (*ValidateService) Df ¶
func (s *ValidateService) Df(df string) *ValidateService
Df is the default field for query string query (default: _all).
func (*ValidateService) ErrorTrace ¶
func (s *ValidateService) ErrorTrace(errorTrace bool) *ValidateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ValidateService) ExpandWildcards ¶
func (s *ValidateService) ExpandWildcards(expandWildcards string) *ValidateService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*ValidateService) Explain ¶
func (s *ValidateService) Explain(explain *bool) *ValidateService
An explain parameter can be specified to get more detailed information about why a query failed.
func (*ValidateService) FilterPath ¶
func (s *ValidateService) FilterPath(filterPath ...string) *ValidateService
FilterPath specifies a list of filters used to reduce the response.
func (*ValidateService) Header ¶
func (s *ValidateService) Header(name string, value string) *ValidateService
Header adds a header to the request.
func (*ValidateService) Headers ¶
func (s *ValidateService) Headers(headers http.Header) *ValidateService
Headers specifies the headers of the request.
func (*ValidateService) Human ¶
func (s *ValidateService) Human(human bool) *ValidateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ValidateService) IgnoreUnavailable ¶
func (s *ValidateService) IgnoreUnavailable(ignoreUnavailable bool) *ValidateService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*ValidateService) Index ¶
func (s *ValidateService) Index(index ...string) *ValidateService
Index sets the names of the indices to use for search.
func (*ValidateService) Lenient ¶
func (s *ValidateService) Lenient(lenient bool) *ValidateService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*ValidateService) Pretty ¶
func (s *ValidateService) Pretty(pretty bool) *ValidateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ValidateService) Q ¶
func (s *ValidateService) Q(q string) *ValidateService
Query in the Lucene query string syntax.
func (*ValidateService) Query ¶
func (s *ValidateService) Query(query Query) *ValidateService
Query sets a query definition using the Query DSL.
func (*ValidateService) Rewrite ¶
func (s *ValidateService) Rewrite(rewrite *bool) *ValidateService
Provide a more detailed explanation showing the actual Lucene query that will be executed.
func (*ValidateService) Type
deprecated
func (s *ValidateService) Type(typ ...string) *ValidateService
Type adds search restrictions for a list of types.
Deprecated: Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document.
type ValueCountAggregation ¶
type ValueCountAggregation struct {
// contains filtered or unexported fields
}
ValueCountAggregation is a single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents. These values can be extracted either from specific fields in the documents, or be generated by a provided script. Typically, this aggregator will be used in conjunction with other single-value aggregations. For example, when computing the avg one might be interested in the number of values the average is computed over. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-valuecount-aggregation.html
func NewValueCountAggregation ¶
func NewValueCountAggregation() *ValueCountAggregation
func (*ValueCountAggregation) Field ¶
func (a *ValueCountAggregation) Field(field string) *ValueCountAggregation
func (*ValueCountAggregation) Format ¶
func (a *ValueCountAggregation) Format(format string) *ValueCountAggregation
func (*ValueCountAggregation) Meta ¶
func (a *ValueCountAggregation) Meta(metaData map[string]interface{}) *ValueCountAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ValueCountAggregation) Script ¶
func (a *ValueCountAggregation) Script(script *Script) *ValueCountAggregation
func (*ValueCountAggregation) Source ¶
func (a *ValueCountAggregation) Source() (interface{}, error)
func (*ValueCountAggregation) SubAggregation ¶
func (a *ValueCountAggregation) SubAggregation(name string, subAggregation Aggregation) *ValueCountAggregation
type WeightFactorFunction ¶
type WeightFactorFunction struct {
// contains filtered or unexported fields
}
WeightFactorFunction builds a weight factor function that multiplies the weight to the score. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_weight for details.
func NewWeightFactorFunction ¶
func NewWeightFactorFunction(weight float64) *WeightFactorFunction
NewWeightFactorFunction initializes and returns a new WeightFactorFunction.
func (*WeightFactorFunction) GetWeight ¶
func (fn *WeightFactorFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*WeightFactorFunction) Name ¶
func (fn *WeightFactorFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*WeightFactorFunction) Source ¶
func (fn *WeightFactorFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*WeightFactorFunction) Weight ¶
func (fn *WeightFactorFunction) Weight(weight float64) *WeightFactorFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-function-score-query.html#_using_function_score for details.
type WeightedAvgAggregation ¶
type WeightedAvgAggregation struct {
// contains filtered or unexported fields
}
WeightedAvgAggregation is a single-value metrics aggregation that computes the weighted average of numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents.
func NewWeightedAvgAggregation ¶
func NewWeightedAvgAggregation() *WeightedAvgAggregation
func (*WeightedAvgAggregation) Field ¶
func (a *WeightedAvgAggregation) Field(field string, config *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Format ¶
func (a *WeightedAvgAggregation) Format(format string) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Meta ¶
func (a *WeightedAvgAggregation) Meta(metaData map[string]interface{}) *WeightedAvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*WeightedAvgAggregation) Source ¶
func (a *WeightedAvgAggregation) Source() (interface{}, error)
func (*WeightedAvgAggregation) SubAggregation ¶
func (a *WeightedAvgAggregation) SubAggregation(name string, subAggregation Aggregation) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Value ¶
func (a *WeightedAvgAggregation) Value(value *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
func (*WeightedAvgAggregation) ValueType ¶
func (a *WeightedAvgAggregation) ValueType(valueType string) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Weight ¶
func (a *WeightedAvgAggregation) Weight(weight *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
type WildcardQuery ¶
type WildcardQuery struct {
// contains filtered or unexported fields
}
WildcardQuery matches documents that have fields matching a wildcard expression (not analyzed). Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow wildcard queries, a wildcard term should not start with one of the wildcards * or ?. The wildcard query maps to Lucene WildcardQuery.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/query-dsl-wildcard-query.html
func NewWildcardQuery ¶
func NewWildcardQuery(name, wildcard string) *WildcardQuery
NewWildcardQuery creates and initializes a new WildcardQuery.
func (*WildcardQuery) Boost ¶
func (q *WildcardQuery) Boost(boost float64) *WildcardQuery
Boost sets the boost for this query.
func (*WildcardQuery) CaseInsensitive ¶
func (q *WildcardQuery) CaseInsensitive(caseInsensitive bool) *WildcardQuery
CaseInsensitive sets case insensitive matching of this query.
func (*WildcardQuery) QueryName ¶
func (q *WildcardQuery) QueryName(queryName string) *WildcardQuery
QueryName sets the name of this query.
func (*WildcardQuery) Rewrite ¶
func (q *WildcardQuery) Rewrite(rewrite string) *WildcardQuery
func (*WildcardQuery) Source ¶
func (q *WildcardQuery) Source() (interface{}, error)
Source returns the JSON serializable body of this query.
type WrapperQuery ¶
type WrapperQuery struct {
// contains filtered or unexported fields
}
WrapperQuery accepts any other query as base64 encoded string.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-wrapper-query.html.
func NewWrapperQuery ¶
func NewWrapperQuery(source string) *WrapperQuery
NewWrapperQuery creates and initializes a new WrapperQuery.
func (*WrapperQuery) Source ¶
func (q *WrapperQuery) Source() (interface{}, error)
Source returns JSON for the query.
Source Files
¶
- decoder.go
- docvalue_field.go
- errors.go
- fetch_source_context.go
- geo_point.go
- highlight.go
- inner_hit.go
- logger.go
- msearch.go
- mtermvectors.go
- pit.go
- pit_close.go
- pit_open.go
- query.go
- request.go
- rescore.go
- rescorer.go
- runtime_mappings.go
- script.go
- script_delete.go
- script_get.go
- script_put.go
- search.go
- search_aggs.go
- search_aggs_bucket_adjacency_matrix.go
- search_aggs_bucket_auto_date_histogram.go
- search_aggs_bucket_children.go
- search_aggs_bucket_composite.go
- search_aggs_bucket_count_thresholds.go
- search_aggs_bucket_date_histogram.go
- search_aggs_bucket_date_range.go
- search_aggs_bucket_diversified_sampler.go
- search_aggs_bucket_filter.go
- search_aggs_bucket_filters.go
- search_aggs_bucket_geo_distance.go
- search_aggs_bucket_geohash_grid.go
- search_aggs_bucket_geotile_grid.go
- search_aggs_bucket_global.go
- search_aggs_bucket_histogram.go
- search_aggs_bucket_ip_range.go
- search_aggs_bucket_missing.go
- search_aggs_bucket_multi_terms.go
- search_aggs_bucket_nested.go
- search_aggs_bucket_range.go
- search_aggs_bucket_rare_terms.go
- search_aggs_bucket_reverse_nested.go
- search_aggs_bucket_sampler.go
- search_aggs_bucket_significant_terms.go
- search_aggs_bucket_significant_text.go
- search_aggs_bucket_terms.go
- search_aggs_matrix_stats.go
- search_aggs_metrics_avg.go
- search_aggs_metrics_cardinality.go
- search_aggs_metrics_extended_stats.go
- search_aggs_metrics_geo_bounds.go
- search_aggs_metrics_geo_centroid.go
- search_aggs_metrics_max.go
- search_aggs_metrics_median_absolute_deviation.go
- search_aggs_metrics_min.go
- search_aggs_metrics_percentile_ranks.go
- search_aggs_metrics_percentiles.go
- search_aggs_metrics_scripted_metric.go
- search_aggs_metrics_stats.go
- search_aggs_metrics_sum.go
- search_aggs_metrics_top_hits.go
- search_aggs_metrics_top_metrics.go
- search_aggs_metrics_value_count.go
- search_aggs_metrics_weighted_avg.go
- search_aggs_pipeline_avg_bucket.go
- search_aggs_pipeline_bucket_script.go
- search_aggs_pipeline_bucket_selector.go
- search_aggs_pipeline_bucket_sort.go
- search_aggs_pipeline_cumulative_sum.go
- search_aggs_pipeline_derivative.go
- search_aggs_pipeline_extended_stats_bucket.go
- search_aggs_pipeline_max_bucket.go
- search_aggs_pipeline_min_bucket.go
- search_aggs_pipeline_mov_avg.go
- search_aggs_pipeline_mov_fn.go
- search_aggs_pipeline_percentiles_bucket.go
- search_aggs_pipeline_serial_diff.go
- search_aggs_pipeline_stats_bucket.go
- search_aggs_pipeline_sum_bucket.go
- search_collapse_builder.go
- search_queries_bool.go
- search_queries_boosting.go
- search_queries_combined_fields.go
- search_queries_common_terms.go
- search_queries_constant_score.go
- search_queries_dis_max.go
- search_queries_distance_feature_query.go
- search_queries_exists.go
- search_queries_fsq.go
- search_queries_fsq_score_funcs.go
- search_queries_fuzzy.go
- search_queries_geo_bounding_box.go
- search_queries_geo_distance.go
- search_queries_geo_polygon.go
- search_queries_has_child.go
- search_queries_has_parent.go
- search_queries_ids.go
- search_queries_interval.go
- search_queries_interval_filter.go
- search_queries_interval_rules_all_of.go
- search_queries_interval_rules_any_of.go
- search_queries_interval_rules_fuzzy.go
- search_queries_interval_rules_match.go
- search_queries_interval_rules_prefix.go
- search_queries_interval_rules_wildcard.go
- search_queries_match.go
- search_queries_match_all.go
- search_queries_match_bool_prefix.go
- search_queries_match_none.go
- search_queries_match_phrase.go
- search_queries_match_phrase_prefix.go
- search_queries_more_like_this.go
- search_queries_multi_match.go
- search_queries_nested.go
- search_queries_parent_id.go
- search_queries_percolator.go
- search_queries_pinned.go
- search_queries_prefix.go
- search_queries_query_string.go
- search_queries_range.go
- search_queries_rank_feature.go
- search_queries_raw_string.go
- search_queries_regexp.go
- search_queries_script.go
- search_queries_script_score.go
- search_queries_simple_query_string.go
- search_queries_slice.go
- search_queries_span_first.go
- search_queries_span_near.go
- search_queries_span_term.go
- search_queries_term.go
- search_queries_terms.go
- search_queries_terms_set.go
- search_queries_type.go
- search_queries_wildcard.go
- search_queries_wrapper.go
- search_request.go
- search_shards.go
- search_source.go
- search_terms_lookup.go
- sort.go
- suggest_field.go
- suggester.go
- suggester_completion.go
- suggester_context.go
- suggester_context_category.go
- suggester_context_geo.go
- suggester_phrase.go
- suggester_term.go
- termvectors.go
- validate.go