Documentation ¶
Index ¶
- type Aggregation
- type AggregationBucketFilters
- type AggregationBucketHistogramItem
- type AggregationBucketHistogramItems
- type AggregationBucketKeyItem
- type AggregationBucketKeyItems
- type AggregationBucketKeyedRangeItems
- type AggregationBucketRangeItem
- type AggregationBucketRangeItems
- type AggregationBucketSignificantTerm
- type AggregationBucketSignificantTerms
- type AggregationExtendedStatsMetric
- type AggregationGeoBoundsMetric
- type AggregationPercentilesMetric
- type AggregationPipelineBucketMetricValue
- type AggregationPipelineDerivative
- type AggregationPipelineSimpleValue
- type AggregationSingleBucket
- type AggregationStatsMetric
- type AggregationTopHitsMetric
- type AggregationValueMetric
- type Aggregations
- 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) 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) 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) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) IPv4Range(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
- func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, 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)
- 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) Range(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, 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) Sum(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) TopHits(name string) (*AggregationTopHitsMetric, bool)
- func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
- type DeleteResponse
- type DeleteService
- type DeleteServiceOptions
- type GetResponse
- type GetService
- type GetServiceOptions
- type GetStreamResponse
- type GetStreamService
- func (g *GetStreamService) Do() (*GetStreamResponse, error)
- func (g *GetStreamService) Id(_id string) *GetStreamService
- func (g *GetStreamService) Pretty() *GetStreamService
- func (g *GetStreamService) Type(_type string) *GetStreamService
- func (g *GetStreamService) URLParams(params url.Values) *GetStreamService
- type IndexResponse
- type IndexService
- func (i *IndexService) Body(body string) *IndexService
- func (i *IndexService) Do() (*IndexResponse, error)
- func (i *IndexService) Id(_id string) *IndexService
- func (i *IndexService) Pretty() *IndexService
- func (i *IndexService) Type(_type string) *IndexService
- func (i *IndexService) URLParams(params url.Values) *IndexService
- type IndexServiceOptions
- type SearchExplanation
- type SearchHit
- type SearchHitHighlight
- type SearchHitInnerHits
- type SearchHits
- type SearchResponse
- type SearchService
- func (s *SearchService) Body(body string) *SearchService
- func (s *SearchService) Do() (*SearchResponse, error)
- func (s *SearchService) Pretty() *SearchService
- func (s *SearchService) Type(_type string) *SearchService
- func (s *SearchService) Types(_types []string) *SearchService
- func (s *SearchService) URLParams(params url.Values) *SearchService
- type SearchServiceOptions
- type SearchStreamResponse
- type SearchStreamService
- func (s *SearchStreamService) Body(body string) *SearchStreamService
- func (s *SearchStreamService) Do() (*SearchStreamResponse, error)
- func (s *SearchStreamService) Pretty() *SearchStreamService
- func (s *SearchStreamService) Type(_type string) *SearchStreamService
- func (s *SearchStreamService) Types(_types []string) *SearchStreamService
- func (s *SearchStreamService) URLParams(params url.Values) *SearchStreamService
- type SearchStreamToURLOptions
- type SearchStreamToURLResponse
- type SearchStreamToURLService
- func (s *SearchStreamToURLService) AddWebhook(webhook interface{}) *SearchStreamToURLService
- func (s *SearchStreamToURLService) Do() (*SearchStreamToURLResponse, error)
- func (s *SearchStreamToURLService) Query(query string) *SearchStreamToURLService
- func (s *SearchStreamToURLService) Type(_type string) *SearchStreamToURLService
- func (s *SearchStreamToURLService) Types(_types []string) *SearchStreamToURLService
- type SearchSuggest
- type SearchSuggestion
- type SearchSuggestionOption
- type UpdateResponse
- type UpdateService
- func (u *UpdateService) Body(body string) *UpdateService
- func (u *UpdateService) Do() (*UpdateResponse, error)
- func (u *UpdateService) Id(_id string) *UpdateService
- func (u *UpdateService) Pretty() *UpdateService
- func (u *UpdateService) Type(_type string) *UpdateService
- func (u *UpdateService) URLParams(params url.Values) *UpdateService
- type UpdateServiceOptions
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations.html
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 int64 //`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"` 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 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 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 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 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 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 AggregationTopHitsMetric ¶
type AggregationTopHitsMetric struct { Aggregations Hits *SearchHits //`json:"hits"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationTopHitsMetric is a metric returned by a TopHits aggregation.
func (*AggregationTopHitsMetric) UnmarshalJSON ¶
func (a *AggregationTopHitsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationTopHitsMetric structure.
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) Avg ¶
func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool)
Avg returns average aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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/current/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/current/search-aggregations-pipeline-bucket-script-aggregation.html
func (Aggregations) Cardinality ¶
func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool)
Cardinality returns cardinality aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html
func (Aggregations) Children ¶
func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool)
Children returns children results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-children-aggregation.html
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/current/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: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html
func (Aggregations) DateRange ¶
func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool)
DateRange returns date range aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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/current/search-aggregations-pipeline-derivative-aggregation.html
func (Aggregations) ExtendedStats ¶
func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool)
ExtendedStats returns extended stats aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-extendedstats-aggregation.html
func (Aggregations) Filter ¶
func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool)
Filter returns filter results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filter-aggregation.html
func (Aggregations) Filters ¶
func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool)
Filters returns filters results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filters-aggregation.html
func (Aggregations) GeoBounds ¶
func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool)
GeoBounds returns geo-bounds aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-geobounds-aggregation.html
func (Aggregations) GeoDistance ¶
func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
GeoDistance returns geo distance aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geodistance-aggregation.html
func (Aggregations) GeoHash ¶
func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
GeoHash returns geo-hash aggregation results. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html
func (Aggregations) Global ¶
func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
Global returns global results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-global-aggregation.html
func (Aggregations) Histogram ¶
func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
Histogram returns histogram aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-histogram-aggregation.html
func (Aggregations) IPv4Range ¶
func (a Aggregations) IPv4Range(name string) (*AggregationBucketRangeItems, bool)
IPv4Range returns IPv4 range aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-iprange-aggregation.html
func (Aggregations) KeyedRange ¶
func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
KeyedRange returns keyed range aggregation results. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html.
func (Aggregations) Max ¶
func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
Max returns max aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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/current/search-aggregations-pipeline-max-bucket-aggregation.html
func (Aggregations) Min ¶
func (a Aggregations) Min(name string) (*AggregationValueMetric, bool)
Min returns min aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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/current/search-aggregations-pipeline-min-bucket-aggregation.html
func (Aggregations) Missing ¶
func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool)
Missing returns missing results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-missing-aggregation.html
func (Aggregations) MovAvg ¶
func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool)
MovAvg returns moving average pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-movavg-aggregation.html
func (Aggregations) Nested ¶
func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool)
Nested returns nested results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-nested-aggregation.html
func (Aggregations) PercentileRanks ¶
func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool)
PercentileRanks returns percentile ranks results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-rank-aggregation.html
func (Aggregations) Percentiles ¶
func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool)
Percentiles returns percentiles results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-aggregation.html
func (Aggregations) Range ¶
func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
Range returns range aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html
func (Aggregations) ReverseNested ¶
func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
ReverseNested returns reverse-nested results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-reverse-nested-aggregation.html
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/current/search-aggregations-pipeline-serialdiff-aggregation.html
func (Aggregations) SignificantTerms ¶
func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool)
SignificantTerms returns significant terms aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-significantterms-aggregation.html
func (Aggregations) Stats ¶
func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool)
Stats returns stats aggregation results. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-stats-aggregation.html
func (Aggregations) Sum ¶
func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool)
Sum returns sum aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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/current/search-aggregations-pipeline-sum-bucket-aggregation.html
func (Aggregations) Terms ¶
func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
Terms returns terms aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html
func (Aggregations) TopHits ¶
func (a Aggregations) TopHits(name string) (*AggregationTopHitsMetric, bool)
TopHits returns top-hits aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html
func (Aggregations) ValueCount ¶
func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
ValueCount returns value-count aggregation results. See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html
type DeleteResponse ¶
type DeleteService ¶
type DeleteService struct {
// contains filtered or unexported fields
}
func NewDeleteService ¶
func NewDeleteService(conn *connection.Connection) *DeleteService
func (*DeleteService) Do ¶
func (d *DeleteService) Do() (*DeleteResponse, error)
func (*DeleteService) Id ¶
func (d *DeleteService) Id(_id string) *DeleteService
func (*DeleteService) Pretty ¶
func (d *DeleteService) Pretty() *DeleteService
func (*DeleteService) Type ¶
func (d *DeleteService) Type(_type string) *DeleteService
func (*DeleteService) URLParams ¶
func (d *DeleteService) URLParams(params url.Values) *DeleteService
type DeleteServiceOptions ¶
type GetResponse ¶
type GetResponse struct { Index string `json:"_index"` // index meta field Type string `json:"_type"` // type meta field Id string `json:"_id"` // id meta field Parent string `json:"_parent"` // parent meta field Version int64 `json:"_version"` // version number, when Version is set to true in SearchService Source *json.RawMessage `json:"_source,omitempty"` Found bool `json:"found,omitempty"` Fields map[string]interface{} `json:"fields,omitempty"` }
type GetService ¶
type GetService struct {
// contains filtered or unexported fields
}
func NewGetService ¶
func NewGetService(conn *connection.Connection) *GetService
func (*GetService) Do ¶
func (g *GetService) Do() (*GetResponse, error)
func (*GetService) Id ¶
func (g *GetService) Id(_id string) *GetService
func (*GetService) Pretty ¶
func (g *GetService) Pretty() *GetService
func (*GetService) Type ¶
func (g *GetService) Type(_type string) *GetService
func (*GetService) URLParams ¶
func (g *GetService) URLParams(params url.Values) *GetService
type GetServiceOptions ¶
type GetStreamResponse ¶
type GetStreamResponse struct {
// contains filtered or unexported fields
}
func (*GetStreamResponse) Next ¶
func (g *GetStreamResponse) Next() (getResponse *GetResponse, err error)
type GetStreamService ¶
type GetStreamService struct {
GetService
}
func NewGetStreamService ¶
func NewGetStreamService(conn *connection.Connection) *GetStreamService
func (*GetStreamService) Do ¶
func (g *GetStreamService) Do() (*GetStreamResponse, error)
func (*GetStreamService) Id ¶
func (g *GetStreamService) Id(_id string) *GetStreamService
func (*GetStreamService) Pretty ¶
func (g *GetStreamService) Pretty() *GetStreamService
func (*GetStreamService) Type ¶
func (g *GetStreamService) Type(_type string) *GetStreamService
func (*GetStreamService) URLParams ¶
func (g *GetStreamService) URLParams(params url.Values) *GetStreamService
type IndexResponse ¶
type IndexService ¶
type IndexService struct {
// contains filtered or unexported fields
}
func NewIndexService ¶
func NewIndexService(conn *connection.Connection) *IndexService
func (*IndexService) Body ¶
func (i *IndexService) Body(body string) *IndexService
func (*IndexService) Do ¶
func (i *IndexService) Do() (*IndexResponse, error)
func (*IndexService) Id ¶
func (i *IndexService) Id(_id string) *IndexService
func (*IndexService) Pretty ¶
func (i *IndexService) Pretty() *IndexService
func (*IndexService) Type ¶
func (i *IndexService) Type(_type string) *IndexService
func (*IndexService) URLParams ¶
func (i *IndexService) URLParams(params url.Values) *IndexService
type IndexServiceOptions ¶
type SearchExplanation ¶
type SearchExplanation struct { Value float64 `json:"value"` // e.s. 1.0 Description string `json:"description"` // e.s. "boost" or "ConstantScore(*:*), product of:" Details []SearchExplanation `json:"details,omitempty"` // recursive details }
SearchExplanation explains how the score for a hit was computed. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-explain.html.
type SearchHit ¶
type SearchHit struct { Score *float64 `json:"_score"` // computed score Index string `json:"_index"` // index name Type string `json:"_type"` // type meta field Id string `json:"_id"` // external or internal Uid string `json:"_uid"` // uid meta field (see MapperService.java for all meta fields) Timestamp int64 `json:"_timestamp"` // timestamp meta field TTL int64 `json:"_ttl"` // ttl meta field Routing string `json:"_routing"` // routing meta field Parent string `json:"_parent"` // parent meta field Version *int64 `json:"_version"` // version number, when Version is set to true in SearchService Sort []interface{} `json:"sort"` // sort information Highlight SearchHitHighlight `json:"highlight"` // highlighter information Source *json.RawMessage `json:"_source"` // stored document source Fields map[string]interface{} `json:"fields"` // returned fields Explanation *SearchExplanation `json:"_explanation"` // explains how the score was computed MatchedQueries []string `json:"matched_queries"` // matched queries InnerHits map[string]*SearchHitInnerHits `json:"inner_hits"` // inner hits with ES >= 1.5.0 }
SearchHit is a single hit.
type SearchHitHighlight ¶
Highlighting SearchHitHighlight is the highlight information of a search hit. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlightins.html for a general discussion of highlightins.
type SearchHitInnerHits ¶
type SearchHitInnerHits struct {
Hits *SearchHits `json:"hits"`
}
type SearchHits ¶
type SearchHits struct { TotalHits int64 `json:"total"` // total number of hits found MaxScore *float64 `json:"max_score"` // maximum score of all hits Hits []*SearchHit `json:"hits"` // the actual hits returned }
SearchResponse specifies the list of search hits.
type SearchResponse ¶
type SearchResponse struct { TookInMillis int64 `json:"took"` // search time in milliseconds ScrollId string `json:"_scroll_id"` // only used with Scroll and Scan operations Hits *SearchHits `json:"hits"` // the actual search hits Suggest SearchSuggest `json:"suggest"` // results from suggesters Aggregations Aggregations `json:"aggregations"` // results from aggregations TimedOut bool `json:"timed_out"` // true if the search timed out }
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
func NewSearchService ¶
func NewSearchService(conn *connection.Connection) *SearchService
func (*SearchService) Body ¶
func (s *SearchService) Body(body string) *SearchService
func (*SearchService) Do ¶
func (s *SearchService) Do() (*SearchResponse, error)
func (*SearchService) Pretty ¶
func (s *SearchService) Pretty() *SearchService
func (*SearchService) Type ¶
func (s *SearchService) Type(_type string) *SearchService
func (*SearchService) Types ¶
func (s *SearchService) Types(_types []string) *SearchService
func (*SearchService) URLParams ¶
func (s *SearchService) URLParams(params url.Values) *SearchService
type SearchServiceOptions ¶
type SearchStreamResponse ¶
type SearchStreamResponse struct {
// contains filtered or unexported fields
}
func (*SearchStreamResponse) Next ¶
func (s *SearchStreamResponse) Next() (getResponse *GetResponse, err error)
type SearchStreamService ¶
type SearchStreamService struct {
SearchService
}
func NewSearchStreamService ¶
func NewSearchStreamService(conn *connection.Connection) *SearchStreamService
func (*SearchStreamService) Body ¶
func (s *SearchStreamService) Body(body string) *SearchStreamService
func (*SearchStreamService) Do ¶
func (s *SearchStreamService) Do() (*SearchStreamResponse, error)
func (*SearchStreamService) Pretty ¶
func (s *SearchStreamService) Pretty() *SearchStreamService
func (*SearchStreamService) Type ¶
func (s *SearchStreamService) Type(_type string) *SearchStreamService
func (*SearchStreamService) Types ¶
func (s *SearchStreamService) Types(_types []string) *SearchStreamService
func (*SearchStreamService) URLParams ¶
func (s *SearchStreamService) URLParams(params url.Values) *SearchStreamService
type SearchStreamToURLOptions ¶
type SearchStreamToURLOptions struct { Type []string `json:"type" validate:"required"` Webhooks []interface{} `json:"webhooks" validate:"required"` Query *json.RawMessage `json:"query" validate:"required"` // contains filtered or unexported fields }
type SearchStreamToURLResponse ¶
type SearchStreamToURLResponse struct { IndexResponse // contains filtered or unexported fields }
func (*SearchStreamToURLResponse) Stop ¶
func (s *SearchStreamToURLResponse) Stop() (*DeleteResponse, error)
type SearchStreamToURLService ¶
type SearchStreamToURLService struct {
// contains filtered or unexported fields
}
func NewSearchStreamToURLService ¶
func NewSearchStreamToURLService(conn *connection.Connection) *SearchStreamToURLService
func (*SearchStreamToURLService) AddWebhook ¶
func (s *SearchStreamToURLService) AddWebhook(webhook interface{}) *SearchStreamToURLService
func (*SearchStreamToURLService) Do ¶
func (s *SearchStreamToURLService) Do() (*SearchStreamToURLResponse, error)
func (*SearchStreamToURLService) Query ¶
func (s *SearchStreamToURLService) Query(query string) *SearchStreamToURLService
func (*SearchStreamToURLService) Type ¶
func (s *SearchStreamToURLService) Type(_type string) *SearchStreamToURLService
func (*SearchStreamToURLService) Types ¶
func (s *SearchStreamToURLService) Types(_types []string) *SearchStreamToURLService
type SearchSuggest ¶
type SearchSuggest map[string][]SearchSuggestion
Suggest SearchSuggest is a map of suggestions. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/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 http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html.
type SearchSuggestionOption ¶
type SearchSuggestionOption struct { Text string `json:"text"` Score float64 `json:"score"` Freq int `json:"freq"` Payload interface{} `json:"payload"` }
SearchSuggestionOption is an option of a SearchSuggestion. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html.
type UpdateResponse ¶
type UpdateService ¶
type UpdateService struct {
// contains filtered or unexported fields
}
func NewUpdateService ¶
func NewUpdateService(conn *connection.Connection) *UpdateService
func (*UpdateService) Body ¶
func (u *UpdateService) Body(body string) *UpdateService
func (*UpdateService) Do ¶
func (u *UpdateService) Do() (*UpdateResponse, error)
func (*UpdateService) Id ¶
func (u *UpdateService) Id(_id string) *UpdateService
func (*UpdateService) Pretty ¶
func (u *UpdateService) Pretty() *UpdateService
func (*UpdateService) Type ¶
func (u *UpdateService) Type(_type string) *UpdateService
func (*UpdateService) URLParams ¶
func (u *UpdateService) URLParams(params url.Values) *UpdateService