Documentation ¶
Overview ¶
Package elastic provides an interface to the Elasticsearch server (https://www.elastic.co/products/elasticsearch).
The first thing you do is to create a Client. If you have Elasticsearch installed and running with its default settings (i.e. available at http://127.0.0.1:9200), all you need to do is:
client, err := elastic.NewClient() if err != nil { // Handle error }
If your Elasticsearch server is running on a different IP and/or port, just provide a URL to NewClient:
// Create a client and connect to http://192.168.2.10:9201 client, err := elastic.NewClient(elastic.SetURL("http://192.168.2.10:9201")) if err != nil { // Handle error }
You can pass many more configuration parameters to NewClient. Review the documentation of NewClient for more information.
If no Elasticsearch server is available, services will fail when creating a new request and will return ErrNoClient.
A Client provides services. The services usually come with a variety of methods to prepare the query and a Do function to execute it against the Elasticsearch REST interface and return a response. Here is an example of the IndexExists service that checks if a given index already exists.
exists, err := client.IndexExists("twitter").Do(context.Background()) if err != nil { // Handle error } if !exists { // Index does not exist yet. }
Look up the documentation for Client to get an idea of the services provided and what kinds of responses you get when executing the Do function of a service. Also see the wiki on Github for more details.
Example ¶
package main import ( "context" "encoding/json" "fmt" "log" "os" "reflect" "time" elastic "gopkg.in/olivere/elastic.v5" ) type Tweet struct { User string `json:"user"` Message string `json:"message"` Retweets int `json:"retweets"` Image string `json:"image,omitempty"` Created time.Time `json:"created,omitempty"` Tags []string `json:"tags,omitempty"` Location string `json:"location,omitempty"` Suggest *elastic.SuggestField `json:"suggest_field,omitempty"` } func main() { errorlog := log.New(os.Stdout, "APP ", log.LstdFlags) // Obtain a client. You can also provide your own HTTP client here. client, err := elastic.NewClient(elastic.SetErrorLog(errorlog)) if err != nil { // Handle error panic(err) } // Trace request and response details like this //client.SetTracer(log.New(os.Stdout, "", 0)) // Ping the Elasticsearch server to get e.g. the version number info, code, err := client.Ping("http://127.0.0.1:9200").Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Elasticsearch returned with code %d and version %s\n", code, info.Version.Number) // Getting the ES version number is quite common, so there's a shortcut esversion, err := client.ElasticsearchVersion("http://127.0.0.1:9200") if err != nil { // Handle error panic(err) } fmt.Printf("Elasticsearch version %s\n", esversion) // Use the IndexExists service to check if a specified index exists. exists, err := client.IndexExists("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if !exists { // Create a new index. mapping := ` { "settings":{ "number_of_shards":1, "number_of_replicas":0 }, "mappings":{ "_default_": { "_all": { "enabled": true } }, "tweet":{ "properties":{ "user":{ "type":"keyword" }, "message":{ "type":"text", "store": true, "fielddata": true }, "retweets":{ "type":"long" }, "tags":{ "type":"keyword" }, "location":{ "type":"geo_point" }, "suggest_field":{ "type":"completion" } } } } } ` createIndex, err := client.CreateIndex("twitter").Body(mapping).Do(context.Background()) if err != nil { // Handle error panic(err) } if !createIndex.Acknowledged { // Not acknowledged } } // Index a tweet (using JSON serialization) tweet1 := Tweet{User: "olivere", Message: "Take Five", Retweets: 0} put1, err := client.Index(). Index("twitter"). Type("tweet"). Id("1"). BodyJson(tweet1). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Indexed tweet %s to index %s, type %s\n", put1.Id, put1.Index, put1.Type) // Index a second tweet (by string) tweet2 := `{"user" : "olivere", "message" : "It's a Raggy Waltz"}` put2, err := client.Index(). Index("twitter"). Type("tweet"). Id("2"). BodyString(tweet2). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Indexed tweet %s to index %s, type %s\n", put2.Id, put2.Index, put2.Type) // Get tweet with specified ID get1, err := client.Get(). Index("twitter"). Type("tweet"). Id("1"). Do(context.Background()) if err != nil { // Handle error panic(err) } if get1.Found { fmt.Printf("Got document %s in version %d from index %s, type %s\n", get1.Id, get1.Version, get1.Index, get1.Type) } // Flush to make sure the documents got written. _, err = client.Flush().Index("twitter").Do(context.Background()) if err != nil { panic(err) } // Search with a term query termQuery := elastic.NewTermQuery("user", "olivere") searchResult, err := client.Search(). Index("twitter"). // search in index "twitter" Query(termQuery). // specify the query Sort("user", true). // sort by "user" field, ascending From(0).Size(10). // take documents 0-9 Pretty(true). // pretty print request and response JSON Do(context.Background()) // execute if err != nil { // Handle error panic(err) } // searchResult is of type SearchResult and returns hits, suggestions, // and all kinds of other information from Elasticsearch. fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis) // Each is a convenience function that iterates over hits in a search result. // It makes sure you don't need to check for nil values in the response. // However, it ignores errors in serialization. If you want full control // over iterating the hits, see below. var ttyp Tweet for _, item := range searchResult.Each(reflect.TypeOf(ttyp)) { t := item.(Tweet) fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } // TotalHits is another convenience function that works even when something goes wrong. fmt.Printf("Found a total of %d tweets\n", searchResult.TotalHits()) // Here's how you iterate through results with full control over each step. if searchResult.Hits.TotalHits > 0 { fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits) // Iterate through results for _, hit := range searchResult.Hits.Hits { // hit.Index contains the name of the index // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}). var t Tweet err := json.Unmarshal(*hit.Source, &t) if err != nil { // Deserialization failed } // Work with tweet fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } } else { // No hits fmt.Print("Found no tweets\n") } // Update a tweet by the update API of Elasticsearch. // We just increment the number of retweets. script := elastic.NewScript("ctx._source.retweets += params.num").Param("num", 1) update, err := client.Update().Index("twitter").Type("tweet").Id("1"). Script(script). Upsert(map[string]interface{}{"retweets": 0}). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("New version of tweet %q is now %d", update.Id, update.Version) // ... // Delete an index. deleteIndex, err := client.DeleteIndex("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if !deleteIndex.Acknowledged { // Not acknowledged } }
Output:
Index ¶
- Constants
- Variables
- func IsConflict(err interface{}) bool
- func IsConnErr(err error) bool
- func IsContextErr(err error) bool
- func IsNotFound(err interface{}) bool
- func IsStatusCode(err interface{}, code int) bool
- func IsTimeout(err interface{}) bool
- func Retry(o Operation, b Backoff) error
- func RetryNotify(operation Operation, b Backoff, notify Notify) error
- type AcknowledgedResponse
- 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 AggregationBucketFilters
- type AggregationBucketHistogramItem
- type AggregationBucketHistogramItems
- type AggregationBucketKeyItem
- type AggregationBucketKeyItems
- type AggregationBucketKeyedHistogramItems
- type AggregationBucketKeyedRangeItems
- 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 AggregationSingleBucket
- type AggregationStatsMetric
- type AggregationTopHitsMetric
- type AggregationValueMetric
- type Aggregations
- func (a Aggregations) AdjacencyMatrix(name string) (*AggregationBucketAdjacencyMatrix, 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) 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) 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) 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) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool)
- func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Sampler(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) 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) TopHits(name string) (*AggregationTopHitsMetric, bool)
- func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
- type AliasAction
- type AliasAddAction
- func (a *AliasAddAction) Filter(filter Query) *AliasAddAction
- func (a *AliasAddAction) Index(index ...string) *AliasAddAction
- func (a *AliasAddAction) IndexRouting(routing string) *AliasAddAction
- func (a *AliasAddAction) Routing(routing string) *AliasAddAction
- func (a *AliasAddAction) SearchRouting(routing ...string) *AliasAddAction
- func (a *AliasAddAction) Source() (interface{}, error)
- func (a *AliasAddAction) Validate() error
- type AliasRemoveAction
- type AliasResult
- type AliasService
- func (s *AliasService) Action(action ...AliasAction) *AliasService
- func (s *AliasService) Add(indexName string, aliasName string) *AliasService
- func (s *AliasService) AddWithFilter(indexName string, aliasName string, filter Query) *AliasService
- func (s *AliasService) Do(ctx context.Context) (*AliasResult, error)
- func (s *AliasService) Pretty(pretty bool) *AliasService
- func (s *AliasService) Remove(indexName string, aliasName string) *AliasService
- type AliasesResult
- type AliasesService
- 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) 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)
- func (a *AvgBucketAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgBucketAggregation
- type Backoff
- type BackoffFunc
- type BackoffRetrier
- type BoolQuery
- func (q *BoolQuery) AdjustPureNegative(adjustPureNegative bool) *BoolQuery
- func (q *BoolQuery) Boost(boost float64) *BoolQuery
- func (q *BoolQuery) DisableCoord(disableCoord bool) *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 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)
- func (a *BucketScriptAggregation) SubAggregation(name string, subAggregation Aggregation) *BucketScriptAggregation
- 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)
- func (a *BucketSelectorAggregation) SubAggregation(name string, subAggregation Aggregation) *BucketSelectorAggregation
- type BulkAfterFunc
- type BulkBeforeFunc
- type BulkDeleteRequest
- func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Index(index string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Parent(parent string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Routing(routing string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Source() ([]string, error)
- func (r *BulkDeleteRequest) String() string
- func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) UseEasyJSON(enable bool) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Version(version int64) *BulkDeleteRequest
- func (r *BulkDeleteRequest) VersionType(versionType string) *BulkDeleteRequest
- type BulkIndexByScrollResponse
- type BulkIndexRequest
- func (r *BulkIndexRequest) Doc(doc interface{}) *BulkIndexRequest
- func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest
- func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest
- func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest
- func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest
- func (r *BulkIndexRequest) Pipeline(pipeline string) *BulkIndexRequest
- func (r *BulkIndexRequest) RetryOnConflict(retryOnConflict int) *BulkIndexRequest
- func (r *BulkIndexRequest) Routing(routing string) *BulkIndexRequest
- func (r *BulkIndexRequest) Source() ([]string, error)
- func (r *BulkIndexRequest) String() string
- func (r *BulkIndexRequest) TTL(ttl string) *BulkIndexRequest
- func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest
- func (r *BulkIndexRequest) UseEasyJSON(enable bool) *BulkIndexRequest
- func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest
- func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest
- type BulkProcessor
- type BulkProcessorService
- func (s *BulkProcessorService) After(fn BulkAfterFunc) *BulkProcessorService
- func (s *BulkProcessorService) Backoff(backoff Backoff) *BulkProcessorService
- func (s *BulkProcessorService) Before(fn BulkBeforeFunc) *BulkProcessorService
- func (s *BulkProcessorService) BulkActions(bulkActions int) *BulkProcessorService
- func (s *BulkProcessorService) BulkSize(bulkSize int) *BulkProcessorService
- func (s *BulkProcessorService) Do(ctx context.Context) (*BulkProcessor, error)
- func (s *BulkProcessorService) FlushInterval(interval time.Duration) *BulkProcessorService
- func (s *BulkProcessorService) Name(name string) *BulkProcessorService
- func (s *BulkProcessorService) Stats(wantStats bool) *BulkProcessorService
- func (s *BulkProcessorService) Workers(num int) *BulkProcessorService
- type BulkProcessorStats
- type BulkProcessorWorkerStats
- type BulkResponse
- func (r *BulkResponse) ByAction(action string) []*BulkResponseItem
- func (r *BulkResponse) ById(id string) []*BulkResponseItem
- func (r *BulkResponse) Created() []*BulkResponseItem
- func (r *BulkResponse) Deleted() []*BulkResponseItem
- func (r *BulkResponse) Failed() []*BulkResponseItem
- func (r *BulkResponse) Indexed() []*BulkResponseItem
- func (r *BulkResponse) Succeeded() []*BulkResponseItem
- func (r *BulkResponse) Updated() []*BulkResponseItem
- type BulkResponseItem
- type BulkService
- func (s *BulkService) Add(requests ...BulkableRequest) *BulkService
- func (s *BulkService) Do(ctx context.Context) (*BulkResponse, error)
- func (s *BulkService) EstimatedSizeInBytes() int64
- func (s *BulkService) Index(index string) *BulkService
- func (s *BulkService) NumberOfActions() int
- func (s *BulkService) Pipeline(pipeline string) *BulkService
- func (s *BulkService) Pretty(pretty bool) *BulkService
- func (s *BulkService) Refresh(refresh string) *BulkService
- func (s *BulkService) Reset()
- func (s *BulkService) Retrier(retrier Retrier) *BulkService
- func (s *BulkService) Routing(routing string) *BulkService
- func (s *BulkService) Timeout(timeout string) *BulkService
- func (s *BulkService) Type(typ string) *BulkService
- func (s *BulkService) WaitForActiveShards(waitForActiveShards string) *BulkService
- type BulkUpdateRequest
- func (r *BulkUpdateRequest) DetectNoop(detectNoop bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Doc(doc interface{}) *BulkUpdateRequest
- func (r *BulkUpdateRequest) DocAsUpsert(docAsUpsert bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Id(id string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Index(index string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Parent(parent string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) RetryOnConflict(retryOnConflict int) *BulkUpdateRequest
- func (r *BulkUpdateRequest) ReturnSource(source bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Routing(routing string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest
- func (r *BulkUpdateRequest) ScriptedUpsert(upsert bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Source() ([]string, error)
- func (r *BulkUpdateRequest) String() string
- func (r *BulkUpdateRequest) Type(typ string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Upsert(doc interface{}) *BulkUpdateRequest
- func (r *BulkUpdateRequest) UseEasyJSON(enable bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Version(version int64) *BulkUpdateRequest
- func (r *BulkUpdateRequest) VersionType(versionType string) *BulkUpdateRequest
- type BulkableRequest
- 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) 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 CatAliasesResponse
- type CatAliasesResponseRow
- type CatAliasesService
- func (s *CatAliasesService) Alias(alias ...string) *CatAliasesService
- func (s *CatAliasesService) Columns(columns ...string) *CatAliasesService
- func (s *CatAliasesService) Do(ctx context.Context) (CatAliasesResponse, error)
- func (s *CatAliasesService) ErrorTrace(errorTrace bool) *CatAliasesService
- func (s *CatAliasesService) FilterPath(filterPath ...string) *CatAliasesService
- func (s *CatAliasesService) Header(name string, value string) *CatAliasesService
- func (s *CatAliasesService) Headers(headers http.Header) *CatAliasesService
- func (s *CatAliasesService) Human(human bool) *CatAliasesService
- func (s *CatAliasesService) Local(local bool) *CatAliasesService
- func (s *CatAliasesService) MasterTimeout(masterTimeout string) *CatAliasesService
- func (s *CatAliasesService) Pretty(pretty bool) *CatAliasesService
- func (s *CatAliasesService) Sort(fields ...string) *CatAliasesService
- type CatAllocationResponse
- type CatAllocationResponseRow
- type CatAllocationService
- func (s *CatAllocationService) Bytes(bytes string) *CatAllocationService
- func (s *CatAllocationService) Columns(columns ...string) *CatAllocationService
- func (s *CatAllocationService) Do(ctx context.Context) (CatAllocationResponse, error)
- func (s *CatAllocationService) ErrorTrace(errorTrace bool) *CatAllocationService
- func (s *CatAllocationService) FilterPath(filterPath ...string) *CatAllocationService
- func (s *CatAllocationService) Header(name string, value string) *CatAllocationService
- func (s *CatAllocationService) Headers(headers http.Header) *CatAllocationService
- func (s *CatAllocationService) Human(human bool) *CatAllocationService
- func (s *CatAllocationService) Local(local bool) *CatAllocationService
- func (s *CatAllocationService) MasterTimeout(masterTimeout string) *CatAllocationService
- func (s *CatAllocationService) NodeID(nodes ...string) *CatAllocationService
- func (s *CatAllocationService) Pretty(pretty bool) *CatAllocationService
- func (s *CatAllocationService) Sort(fields ...string) *CatAllocationService
- type CatCountResponse
- type CatCountResponseRow
- type CatCountService
- func (s *CatCountService) Columns(columns ...string) *CatCountService
- func (s *CatCountService) Do(ctx context.Context) (CatCountResponse, error)
- func (s *CatCountService) ErrorTrace(errorTrace bool) *CatCountService
- func (s *CatCountService) FilterPath(filterPath ...string) *CatCountService
- func (s *CatCountService) Header(name string, value string) *CatCountService
- func (s *CatCountService) Headers(headers http.Header) *CatCountService
- func (s *CatCountService) Human(human bool) *CatCountService
- func (s *CatCountService) Index(index ...string) *CatCountService
- func (s *CatCountService) Local(local bool) *CatCountService
- func (s *CatCountService) MasterTimeout(masterTimeout string) *CatCountService
- func (s *CatCountService) Pretty(pretty bool) *CatCountService
- func (s *CatCountService) Sort(fields ...string) *CatCountService
- type CatHealthResponse
- type CatHealthResponseRow
- type CatHealthService
- func (s *CatHealthService) Columns(columns ...string) *CatHealthService
- func (s *CatHealthService) DisableTimestamping(disable bool) *CatHealthService
- func (s *CatHealthService) Do(ctx context.Context) (CatHealthResponse, error)
- func (s *CatHealthService) ErrorTrace(errorTrace bool) *CatHealthService
- func (s *CatHealthService) FilterPath(filterPath ...string) *CatHealthService
- func (s *CatHealthService) Header(name string, value string) *CatHealthService
- func (s *CatHealthService) Headers(headers http.Header) *CatHealthService
- func (s *CatHealthService) Human(human bool) *CatHealthService
- func (s *CatHealthService) Local(local bool) *CatHealthService
- func (s *CatHealthService) MasterTimeout(masterTimeout string) *CatHealthService
- func (s *CatHealthService) Pretty(pretty bool) *CatHealthService
- func (s *CatHealthService) Sort(fields ...string) *CatHealthService
- type CatIndicesResponse
- type CatIndicesResponseRow
- type CatIndicesService
- func (s *CatIndicesService) Bytes(bytes string) *CatIndicesService
- func (s *CatIndicesService) Columns(columns ...string) *CatIndicesService
- func (s *CatIndicesService) Do(ctx context.Context) (CatIndicesResponse, error)
- func (s *CatIndicesService) ErrorTrace(errorTrace bool) *CatIndicesService
- func (s *CatIndicesService) FilterPath(filterPath ...string) *CatIndicesService
- func (s *CatIndicesService) Header(name string, value string) *CatIndicesService
- func (s *CatIndicesService) Headers(headers http.Header) *CatIndicesService
- func (s *CatIndicesService) Health(healthState string) *CatIndicesService
- func (s *CatIndicesService) Human(human bool) *CatIndicesService
- func (s *CatIndicesService) Index(index string) *CatIndicesService
- func (s *CatIndicesService) Local(local bool) *CatIndicesService
- func (s *CatIndicesService) MasterTimeout(masterTimeout string) *CatIndicesService
- func (s *CatIndicesService) Pretty(pretty bool) *CatIndicesService
- func (s *CatIndicesService) PrimaryOnly(primaryOnly bool) *CatIndicesService
- func (s *CatIndicesService) Sort(fields ...string) *CatIndicesService
- type CatShardsResponse
- type CatShardsResponseRow
- type CatShardsService
- func (s *CatShardsService) Bytes(bytes string) *CatShardsService
- func (s *CatShardsService) Columns(columns ...string) *CatShardsService
- func (s *CatShardsService) Do(ctx context.Context) (CatShardsResponse, error)
- func (s *CatShardsService) ErrorTrace(errorTrace bool) *CatShardsService
- func (s *CatShardsService) FilterPath(filterPath ...string) *CatShardsService
- func (s *CatShardsService) Header(name string, value string) *CatShardsService
- func (s *CatShardsService) Headers(headers http.Header) *CatShardsService
- func (s *CatShardsService) Human(human bool) *CatShardsService
- func (s *CatShardsService) Index(index ...string) *CatShardsService
- func (s *CatShardsService) Local(local bool) *CatShardsService
- func (s *CatShardsService) MasterTimeout(masterTimeout string) *CatShardsService
- func (s *CatShardsService) Pretty(pretty bool) *CatShardsService
- func (s *CatShardsService) Sort(fields ...string) *CatShardsService
- 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 ClearScrollResponse
- type ClearScrollService
- type Client
- func (c *Client) Alias() *AliasService
- func (c *Client) Aliases() *AliasesService
- func (c *Client) Bulk() *BulkService
- func (c *Client) BulkProcessor() *BulkProcessorService
- func (c *Client) CatAliases() *CatAliasesService
- func (c *Client) CatAllocation() *CatAllocationService
- func (c *Client) CatCount() *CatCountService
- func (c *Client) CatHealth() *CatHealthService
- func (c *Client) CatIndices() *CatIndicesService
- func (c *Client) CatShards() *CatShardsService
- func (c *Client) ClearScroll(scrollIds ...string) *ClearScrollService
- func (c *Client) CloseIndex(name string) *IndicesCloseService
- func (c *Client) ClusterHealth() *ClusterHealthService
- func (c *Client) ClusterState() *ClusterStateService
- func (c *Client) ClusterStats() *ClusterStatsService
- func (c *Client) Count(indices ...string) *CountService
- func (c *Client) CreateIndex(name string) *IndicesCreateService
- func (c *Client) Delete() *DeleteService
- func (c *Client) DeleteByQuery(indices ...string) *DeleteByQueryService
- func (c *Client) DeleteIndex(indices ...string) *IndicesDeleteService
- func (c *Client) DeleteTemplate() *DeleteTemplateService
- func (c *Client) ElasticsearchVersion(url string) (string, error)
- func (c *Client) Exists() *ExistsService
- func (c *Client) Explain(index, typ, id string) *ExplainService
- func (c *Client) FieldCaps(indices ...string) *FieldCapsService
- func (c *Client) FieldStats(indices ...string) *FieldStatsService
- func (c *Client) Flush(indices ...string) *IndicesFlushService
- func (c *Client) Forcemerge(indices ...string) *IndicesForcemergeService
- func (c *Client) Get() *GetService
- func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService
- func (c *Client) GetMapping() *IndicesGetMappingService
- func (c *Client) GetTemplate() *GetTemplateService
- func (c *Client) HasPlugin(name string) (bool, error)
- func (c *Client) Index() *IndexService
- func (c *Client) IndexAnalyze() *IndicesAnalyzeService
- func (c *Client) IndexDeleteTemplate(name string) *IndicesDeleteTemplateService
- func (c *Client) IndexExists(indices ...string) *IndicesExistsService
- func (c *Client) IndexGet(indices ...string) *IndicesGetService
- func (c *Client) IndexGetSettings(indices ...string) *IndicesGetSettingsService
- func (c *Client) IndexGetTemplate(names ...string) *IndicesGetTemplateService
- func (c *Client) IndexNames() ([]string, error)
- func (c *Client) IndexPutSettings(indices ...string) *IndicesPutSettingsService
- func (c *Client) IndexPutTemplate(name string) *IndicesPutTemplateService
- func (c *Client) IndexSegments(indices ...string) *IndicesSegmentsService
- func (c *Client) IndexStats(indices ...string) *IndicesStatsService
- func (c *Client) IndexTemplateExists(name string) *IndicesExistsTemplateService
- func (c *Client) IngestDeletePipeline(id string) *IngestDeletePipelineService
- func (c *Client) IngestGetPipeline(ids ...string) *IngestGetPipelineService
- func (c *Client) IngestPutPipeline(id string) *IngestPutPipelineService
- func (c *Client) IngestSimulatePipeline() *IngestSimulatePipelineService
- func (c *Client) IsRunning() bool
- func (c *Client) Mget() *MgetService
- func (c *Client) MultiGet() *MgetService
- func (c *Client) MultiSearch() *MultiSearchService
- func (c *Client) MultiTermVectors() *MultiTermvectorService
- func (c *Client) NodesInfo() *NodesInfoService
- func (c *Client) NodesStats() *NodesStatsService
- func (c *Client) OpenIndex(name string) *IndicesOpenService
- func (c *Client) PerformRequest(ctx context.Context, method, path string, params url.Values, body interface{}, ...) (*Response, error)
- func (c *Client) PerformRequestWithContentType(ctx context.Context, method, path string, params url.Values, body interface{}, ...) (*Response, error)
- func (c *Client) PerformRequestWithOptions(ctx context.Context, opt PerformRequestOptions) (*Response, error)
- func (c *Client) Ping(url string) *PingService
- func (c *Client) Plugins() ([]string, error)
- func (c *Client) PutMapping() *IndicesPutMappingService
- func (c *Client) PutTemplate() *PutTemplateService
- func (c *Client) Refresh(indices ...string) *RefreshService
- func (c *Client) Reindex() *ReindexService
- func (c *Client) RolloverIndex(alias string) *IndicesRolloverService
- func (c *Client) Scroll(indices ...string) *ScrollService
- func (c *Client) Search(indices ...string) *SearchService
- func (c *Client) SearchShards(indices ...string) *SearchShardsService
- func (c *Client) ShrinkIndex(source, target string) *IndicesShrinkService
- func (c *Client) SnapshotCreate(repository string, snapshot string) *SnapshotCreateService
- func (c *Client) SnapshotCreateRepository(repository string) *SnapshotCreateRepositoryService
- func (c *Client) SnapshotDeleteRepository(repositories ...string) *SnapshotDeleteRepositoryService
- func (c *Client) SnapshotGetRepository(repositories ...string) *SnapshotGetRepositoryService
- func (c *Client) SnapshotVerifyRepository(repository string) *SnapshotVerifyRepositoryService
- func (c *Client) Start()
- func (c *Client) Stop()
- func (c *Client) String() string
- func (c *Client) Suggest(indices ...string) *SuggestService
- func (c *Client) TasksCancel() *TasksCancelService
- func (c *Client) TasksGetTask() *TasksGetTaskService
- func (c *Client) TasksList() *TasksListService
- func (c *Client) TermVectors(index, typ string) *TermvectorsService
- func (c *Client) TypeExists() *IndicesExistsTypeService
- func (c *Client) Update() *UpdateService
- func (c *Client) UpdateByQuery(indices ...string) *UpdateByQueryService
- func (c *Client) Validate(indices ...string) *ValidateService
- func (c *Client) WaitForGreenStatus(timeout string) error
- func (c *Client) WaitForStatus(status string, timeout string) error
- func (c *Client) WaitForYellowStatus(timeout string) error
- type ClientOptionFunc
- func SetBasicAuth(username, password string) ClientOptionFunc
- func SetDecoder(decoder Decoder) ClientOptionFunc
- func SetErrorLog(logger Logger) ClientOptionFunc
- func SetGzip(enabled bool) ClientOptionFunc
- func SetHeaders(headers http.Header) ClientOptionFunc
- func SetHealthcheck(enabled bool) ClientOptionFunc
- func SetHealthcheckInterval(interval time.Duration) ClientOptionFunc
- func SetHealthcheckTimeout(timeout time.Duration) ClientOptionFunc
- func SetHealthcheckTimeoutStartup(timeout time.Duration) ClientOptionFunc
- func SetHttpClient(httpClient *http.Client) ClientOptionFunc
- func SetInfoLog(logger Logger) ClientOptionFunc
- func SetMaxRetries(maxRetries int) ClientOptionFuncdeprecated
- func SetRequiredPlugins(plugins ...string) ClientOptionFunc
- func SetRetrier(retrier Retrier) ClientOptionFunc
- func SetScheme(scheme string) ClientOptionFunc
- func SetSendGetBodyAs(httpMethod string) ClientOptionFunc
- func SetSniff(enabled bool) ClientOptionFunc
- func SetSnifferCallback(f SnifferCallback) ClientOptionFunc
- func SetSnifferInterval(interval time.Duration) ClientOptionFunc
- func SetSnifferTimeout(timeout time.Duration) ClientOptionFunc
- func SetSnifferTimeoutStartup(timeout time.Duration) ClientOptionFunc
- func SetTraceLog(logger Logger) ClientOptionFunc
- func SetURL(urls ...string) ClientOptionFunc
- type ClusterHealthResponse
- type ClusterHealthService
- func (s *ClusterHealthService) Do(ctx context.Context) (*ClusterHealthResponse, error)
- func (s *ClusterHealthService) Index(indices ...string) *ClusterHealthService
- func (s *ClusterHealthService) Level(level string) *ClusterHealthService
- func (s *ClusterHealthService) Local(local bool) *ClusterHealthService
- func (s *ClusterHealthService) MasterTimeout(masterTimeout string) *ClusterHealthService
- func (s *ClusterHealthService) Pretty(pretty bool) *ClusterHealthService
- func (s *ClusterHealthService) Timeout(timeout string) *ClusterHealthService
- func (s *ClusterHealthService) Validate() error
- func (s *ClusterHealthService) WaitForActiveShards(waitForActiveShards int) *ClusterHealthService
- func (s *ClusterHealthService) WaitForGreenStatus() *ClusterHealthService
- func (s *ClusterHealthService) WaitForNoRelocatingShards(waitForNoRelocatingShards bool) *ClusterHealthService
- func (s *ClusterHealthService) WaitForNodes(waitForNodes string) *ClusterHealthService
- func (s *ClusterHealthService) WaitForStatus(waitForStatus string) *ClusterHealthService
- func (s *ClusterHealthService) WaitForYellowStatus() *ClusterHealthService
- type ClusterIndexHealth
- type ClusterShardHealth
- type ClusterStateResponse
- type ClusterStateService
- func (s *ClusterStateService) AllowNoIndices(allowNoIndices bool) *ClusterStateService
- func (s *ClusterStateService) Do(ctx context.Context) (*ClusterStateResponse, error)
- func (s *ClusterStateService) ExpandWildcards(expandWildcards string) *ClusterStateService
- func (s *ClusterStateService) FlatSettings(flatSettings bool) *ClusterStateService
- func (s *ClusterStateService) IgnoreUnavailable(ignoreUnavailable bool) *ClusterStateService
- func (s *ClusterStateService) Index(indices ...string) *ClusterStateService
- func (s *ClusterStateService) Local(local bool) *ClusterStateService
- func (s *ClusterStateService) MasterTimeout(masterTimeout string) *ClusterStateService
- func (s *ClusterStateService) Metric(metrics ...string) *ClusterStateService
- func (s *ClusterStateService) Pretty(pretty bool) *ClusterStateService
- func (s *ClusterStateService) Validate() error
- type ClusterStatsIndices
- type ClusterStatsIndicesCompletion
- type ClusterStatsIndicesDocs
- type ClusterStatsIndicesFieldData
- type ClusterStatsIndicesFilterCache
- type ClusterStatsIndicesIdCache
- type ClusterStatsIndicesPercolate
- type ClusterStatsIndicesSegments
- type ClusterStatsIndicesShards
- type ClusterStatsIndicesShardsIndex
- type ClusterStatsIndicesShardsIndexFloat64MinMax
- type ClusterStatsIndicesShardsIndexIntMinMax
- type ClusterStatsIndicesStore
- type ClusterStatsNodes
- type ClusterStatsNodesCount
- type ClusterStatsNodesFsStats
- type ClusterStatsNodesJvmStats
- type ClusterStatsNodesJvmStatsMem
- type ClusterStatsNodesJvmStatsVersion
- type ClusterStatsNodesOsStats
- type ClusterStatsNodesOsStatsCPU
- type ClusterStatsNodesOsStatsMem
- type ClusterStatsNodesPlugin
- type ClusterStatsNodesProcessStats
- type ClusterStatsNodesProcessStatsCPU
- type ClusterStatsNodesProcessStatsOpenFileDescriptors
- type ClusterStatsResponse
- type ClusterStatsService
- func (s *ClusterStatsService) Do(ctx context.Context) (*ClusterStatsResponse, error)
- func (s *ClusterStatsService) FlatSettings(flatSettings bool) *ClusterStatsService
- func (s *ClusterStatsService) Human(human bool) *ClusterStatsService
- func (s *ClusterStatsService) NodeId(nodeId []string) *ClusterStatsService
- func (s *ClusterStatsService) Pretty(pretty bool) *ClusterStatsService
- func (s *ClusterStatsService) Validate() error
- type CollapseBuilder
- type CollectorResult
- type CommonTermsQuery
- func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery
- func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery
- func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) DisableCoord(disableCoord bool) *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) 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) Source(includeName bool) (interface{}, error)
- func (q *CompletionSuggester) Text(text string) *CompletionSuggester
- type ConstantBackoff
- 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 CountResponse
- type CountService
- func (s *CountService) AllowNoIndices(allowNoIndices bool) *CountService
- func (s *CountService) AnalyzeWildcard(analyzeWildcard bool) *CountService
- func (s *CountService) Analyzer(analyzer string) *CountService
- func (s *CountService) BodyJson(body interface{}) *CountService
- func (s *CountService) BodyString(body string) *CountService
- func (s *CountService) DefaultOperator(defaultOperator string) *CountService
- func (s *CountService) Df(df string) *CountService
- func (s *CountService) Do(ctx context.Context) (int64, error)
- func (s *CountService) ExpandWildcards(expandWildcards string) *CountService
- func (s *CountService) IgnoreUnavailable(ignoreUnavailable bool) *CountService
- func (s *CountService) Index(index ...string) *CountService
- func (s *CountService) Lenient(lenient bool) *CountService
- func (s *CountService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *CountService
- func (s *CountService) MinScore(minScore interface{}) *CountService
- func (s *CountService) Preference(preference string) *CountService
- func (s *CountService) Pretty(pretty bool) *CountService
- func (s *CountService) Q(q string) *CountService
- func (s *CountService) Query(query Query) *CountService
- func (s *CountService) Routing(routing string) *CountService
- func (s *CountService) TerminateAfter(terminateAfter int) *CountService
- func (s *CountService) Type(typ ...string) *CountService
- func (s *CountService) Validate() 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)
- func (a *CumulativeSumAggregation) SubAggregation(name string, subAggregation Aggregation) *CumulativeSumAggregation
- type DateHistogramAggregation