Categorygithub.com/utrack/elastic
modulepackage
5.0.45+incompatible
Repository: https://github.com/utrack/elastic.git
Documentation: pkg.go.dev

# README

Elastic

Elastic is an Elasticsearch client for the Go programming language.

Build Status Godoc license

See the wiki for additional information about Elastic.

Releases

The release branches (e.g. release-branch.v5) are actively being worked on and can break at any time. If you want to use stable versions of Elastic, please use the packages released via gopkg.in.

Here's the version matrix:

Elasticsearch versionElastic version -Package URL
5.x5.0gopkg.in/olivere/elastic.v5 (source doc)
2.x3.0gopkg.in/olivere/elastic.v3 (source doc)
1.x2.0gopkg.in/olivere/elastic.v2 (source doc)
0.9-1.31.0gopkg.in/olivere/elastic.v1 (source doc)

Example:

You have installed Elasticsearch 5.0.0 and want to use Elastic. As listed above, you should use Elastic 5.0. So you first install the stable release of Elastic 5.0 from gopkg.in.

$ go get gopkg.in/olivere/elastic.v5

You then import it with this import path:

import elastic "gopkg.in/olivere/elastic.v5"

Elastic 5.0

Elastic 5.0 targets Elasticsearch 5.0.0 and later. Elasticsearch 5.0.0 was released on 26th October 2016.

Notice that there are will be a lot of breaking changes in Elasticsearch 5.0 and we used this as an opportunity to clean up and refactor Elastic as we did in the transition from Elastic 2.0 (for Elasticsearch 1.x) to Elastic 3.0 (for Elasticsearch 2.x).

Furthermore, the jump in version numbers will give us a chance to be in sync with the Elastic Stack.

Elastic 3.0

Elastic 3.0 targets Elasticsearch 2.x and is published via gopkg.in/olivere/elastic.v3.

Elastic 3.0 will only get critical bug fixes. You should update to a recent version.

Elastic 2.0

Elastic 2.0 targets Elasticsearch 1.x and is published via gopkg.in/olivere/elastic.v2.

Elastic 2.0 will only get critical bug fixes. You should update to a recent version.

Elastic 1.0

Elastic 1.0 is deprecated. You should really update Elasticsearch and Elastic to a recent version.

However, if you cannot update for some reason, don't worry. Version 1.0 is still available. All you need to do is go-get it and change your import path as described above.

Status

We use Elastic in production since 2012. Elastic is stable but the API changes now and then. We strive for API compatibility. However, Elasticsearch sometimes introduces breaking changes and we sometimes have to adapt.

Having said that, there have been no big API changes that required you to rewrite your application big time. More often than not it's renaming APIs and adding/removing features so that Elastic is in sync with Elasticsearch.

Elastic has been used in production with the following Elasticsearch versions: 0.90, 1.0-1.7, and 2.0-2.4.1. Furthermore, we use Travis CI to test Elastic with the most recent versions of Elasticsearch and Go. See the .travis.yml file for the exact matrix and Travis for the results.

Elasticsearch has quite a few features. Most of them are implemented by Elastic. I add features and APIs as required. It's straightforward to implement missing pieces. I'm accepting pull requests :-)

Having said that, I hope you find the project useful.

Getting Started

The first thing you do is to create a Client. The client connects to Elasticsearch on http://127.0.0.1:9200 by default.

You typically create one client for your app. Here's a complete example of creating a client, creating an index, adding a document, executing a search etc.

// Create a context
ctx := context.Background()

// Create a client
client, err := elastic.NewClient()
if err != nil {
    // Handle error
    panic(err)
}

// Create an index
_, err = client.CreateIndex("twitter").Do(ctx)
if err != nil {
    // Handle error
    panic(err)
}

// Add a document to the index
tweet := Tweet{User: "olivere", Message: "Take Five"}
_, err = client.Index().
    Index("twitter").
    Type("tweet").
    Id("1").
    BodyJson(tweet).
    Refresh("true").
    Do(ctx)
if err != nil {
    // Handle error
    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(ctx)             // 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)) {
    if t, ok := item.(Tweet); ok {
        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")
}

// Delete the index again
_, err = client.DeleteIndex("twitter").Do(ctx)
if err != nil {
    // Handle error
    panic(err)
}

Here's a link to a complete working example.

See the wiki for more details.

API Status

Document APIs

  • Index API
  • Get API
  • Delete API
  • Delete By Query API
  • Update API
  • Update By Query API
  • Multi Get API
  • Bulk API
  • Reindex API
  • Term Vectors
  • Multi termvectors API

Search APIs

  • Search
  • Search Template
  • Multi Search Template
  • Search Shards API
  • Suggesters
    • Term Suggester
    • Phrase Suggester
    • Completion Suggester
    • Context Suggester
  • Multi Search API
  • Count API
  • Search Exists API
  • Validate API
  • Explain API
  • Profile API
  • Field Stats API

Aggregations

  • Metrics Aggregations
    • Avg
    • Cardinality
    • Extended Stats
    • Geo Bounds
    • Geo Centroid
    • Max
    • Min
    • Percentiles
    • Percentile Ranks
    • Scripted Metric
    • Stats
    • Sum
    • Top Hits
    • Value Count
  • Bucket Aggregations
    • Children
    • Date Histogram
    • Date Range
    • Filter
    • Filters
    • Geo Distance
    • GeoHash Grid
    • Global
    • Histogram
    • IP Range
    • Missing
    • Nested
    • Range
    • Reverse Nested
    • Sampler
    • Significant Terms
    • Terms
  • Pipeline Aggregations
    • Avg Bucket
    • Derivative
    • Max Bucket
    • Min Bucket
    • Sum Bucket
    • Stats Bucket
    • Extended Stats Bucket
    • Percentiles Bucket
    • Moving Average
    • Cumulative Sum
    • Bucket Script
    • Bucket Selector
    • Serial Differencing
  • Matrix Aggregations
    • Matrix Stats
  • Aggregation Metadata

Indices APIs

  • Create Index
  • Delete Index
  • Get Index
  • Indices Exists
  • Open / Close Index
  • Shrink Index
  • Rollover Index
  • Put Mapping
  • Get Mapping
  • Get Field Mapping
  • Types Exists
  • Index Aliases
  • Update Indices Settings
  • Get Settings
  • Analyze
  • Index Templates
  • Shadow Replica Indices
  • Indices Stats
  • Indices Segments
  • Indices Recovery
  • Indices Shard Stores
  • Clear Cache
  • Flush
  • Refresh
  • Force Merge
  • Upgrade

cat APIs

The cat APIs are not implemented as of now. We think they are better suited for operating with Elasticsearch on the command line.

  • cat aliases
  • cat allocation
  • cat count
  • cat fielddata
  • cat health
  • cat indices
  • cat master
  • cat nodeattrs
  • cat nodes
  • cat pending tasks
  • cat plugins
  • cat recovery
  • cat repositories
  • cat thread pool
  • cat shards
  • cat segments
  • cat snapshots

Cluster APIs

  • Cluster Health
  • Cluster State
  • Cluster Stats
  • Pending Cluster Tasks
  • Cluster Reroute
  • Cluster Update Settings
  • Nodes Stats
  • Nodes Info
  • Task Management API
  • Nodes hot_threads
  • Cluster Allocation Explain API

Query DSL

  • Match All Query
  • Inner hits
  • Full text queries
    • Match Query
    • Match Phrase Query
    • Match Phrase Prefix Query
    • Multi Match Query
    • Common Terms Query
    • Query String Query
    • Simple Query String Query
  • Term level queries
    • Term Query
    • Terms Query
    • Range Query
    • Exists Query
    • Prefix Query
    • Wildcard Query
    • Regexp Query
    • Fuzzy Query
    • Type Query
    • Ids Query
  • Compound queries
    • Constant Score Query
    • Bool Query
    • Dis Max Query
    • Function Score Query
    • Boosting Query
    • Indices Query
  • Joining queries
    • Nested Query
    • Has Child Query
    • Has Parent Query
    • Parent Id Query
  • Geo queries
    • GeoShape Query
    • Geo Bounding Box Query
    • Geo Distance Query
    • Geo Distance Range Query
    • Geo Polygon Query
    • Geohash Cell Query
  • Specialized queries
    • More Like This Query
    • Template Query
    • Script Query
    • Percolate Query
  • Span queries
    • Span Term Query
    • Span Multi Term Query
    • Span First Query
    • Span Near Query
    • Span Or Query
    • Span Not Query
    • Span Containing Query
    • Span Within Query
    • Span Field Masking Query
  • Minimum Should Match
  • Multi Term Query Rewrite

Modules

  • Snapshot and Restore
    • Repositories
    • Snapshot
    • Restore
    • Snapshot status
    • Monitoring snapshot/restore status
    • Stopping currently running snapshot and restore

Sorting

  • Sort by score
  • Sort by field
  • Sort by geo distance
  • Sort by script
  • Sort by doc

Scrolling

Scrolling is supported via a ScrollService. It supports an iterator-like interface. The ClearScroll API is implemented as well.

A pattern for efficiently scrolling in parallel is described in the Wiki.

How to contribute

Read the contribution guidelines.

Credits

Thanks a lot for the great folks working hard on Elasticsearch and Go.

Elastic uses portions of the uritemplates library by Joshua Tacoma, backoff by Cenk Altı and leaktest by Ian Chiles.

LICENSE

MIT-LICENSE. See LICENSE or the LICENSE file provided in the repository for details.

# Packages

No description provided by the author
Package config allows parsing a configuration for Elasticsearch from a URL.
No description provided by the author
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).

# Functions

GeoPointFromLatLon initializes a new GeoPoint by latitude and longitude.
GeoPointFromString initializes a new GeoPoint by a string that is formatted as "{latitude},{longitude}", e.g.
IsConflict returns true if the given error indicates that the Elasticsearch operation resulted in a version conflict.
IsConnError unwraps the given error value and checks if it is equal to elastic.ErrNoClient.
IsNotFound returns true if the given error indicates that Elasticsearch returned HTTP status 404.
IsStatusCode returns true if the given error indicates that the Elasticsearch operation returned the specified HTTP status code.
IsTimeout returns true if the given error indicates that Elasticsearch returned HTTP status 408.
NewAliasAddAction returns an action to add an alias.
NewAliasesService instantiates a new AliasesService.
NewAliasRemoveAction returns an action to remove an alias.
NewAliasService implements a service to manage aliases.
No description provided by the author
NewAvgBucketAggregation creates and initializes a new AvgBucketAggregation.
NewBackoffRetrier returns a retrier that uses the given backoff strategy.
Creates a new bool query.
Creates a new boosting query.
NewBucketScriptAggregation creates and initializes a new BucketScriptAggregation.
NewBucketSelectorAggregation creates and initializes a new BucketSelectorAggregation.
NewBulkDeleteRequest returns a new BulkDeleteRequest.
NewBulkIndexRequest returns a new BulkIndexRequest.
NewBulkProcessorService creates a new BulkProcessorService.
NewBulkService initializes a new BulkService.
NewBulkUpdateRequest returns a new BulkUpdateRequest.
No description provided by the author
No description provided by the author
NewChiSquareSignificanceHeuristic initializes a new ChiSquareSignificanceHeuristic.
NewClearScrollService creates a new ClearScrollService.
NewClient creates a new client to work with Elasticsearch.
NewClientFromConfig initializes a client from a configuration.
NewClusterHealthService creates a new ClusterHealthService.
NewClusterStateService creates a new ClusterStateService.
NewClusterStatsService creates a new ClusterStatsService.
NewCollapseBuilder creates a new CollapseBuilder.
NewCommonTermsQuery creates and initializes a new common terms query.
Creates a new completion suggester.
NewConstantBackoff returns a new ConstantBackoff.
ConstantScoreQuery creates and initializes a new constant score query.
NewCountService creates a new CountService.
NewCumulativeSumAggregation creates and initializes a new CumulativeSumAggregation.
NewDateHistogramAggregation creates a new DateHistogramAggregation.
No description provided by the author
NewDeleteByQueryService creates a new DeleteByQueryService.
NewDeleteService creates a new DeleteService.
NewDeleteTemplateService creates a new DeleteTemplateService.
NewDerivativeAggregation creates and initializes a new DerivativeAggregation.
No description provided by the author
NewDisMaxQuery creates and initializes a new dis max query.
NewEWMAMovAvgModel creates and initializes a new EWMAMovAvgModel.
NewExistsQuery creates and initializes a new dis max query.
NewExistsService creates a new ExistsService.
NewExplainService creates a new ExplainService.
NewExponentialBackoff returns a ExponentialBackoff backoff policy.
NewExponentialDecayFunction creates a new ExponentialDecayFunction.
No description provided by the author
NewFetchSourceContext returns a new FetchSourceContext.
NewFieldSort creates a new FieldSort.
NewFieldStatsService creates a new FieldStatsService.
NewFieldValueFactorFunction initializes and returns a new FieldValueFactorFunction.
No description provided by the author
NewFiltersAggregation initializes a new FiltersAggregation.
NewFunctionScoreQuery creates and initializes a new function score query.
Creates a new completion suggester.
NewFuzzyQuery creates a new fuzzy query.
NewGaussDecayFunction returns a new GaussDecayFunction.
NewGeoBoundingBoxQuery creates and initializes a new GeoBoundingBoxQuery.
No description provided by the author
No description provided by the author
NewGeoDistanceQuery creates and initializes a new GeoDistanceQuery.
NewGeoDistanceSort creates a new sorter for geo distances.
No description provided by the author
NewGeoPolygonQuery creates and initializes a new GeoPolygonQuery.
NewGetFieldMappingService is an alias for NewIndicesGetFieldMappingService.
NewGetMappingService is an alias for NewIndicesGetMappingService.
NewGetService creates a new GetService.
NewGetTemplateService creates a new GetTemplateService.
No description provided by the author
NewGNDSignificanceHeuristic implements a new GNDSignificanceHeuristic.
NewHasChildQuery creates and initializes a new has_child query.
NewHasParentQuery creates and initializes a new has_parent query.
No description provided by the author
No description provided by the author
No description provided by the author
NewHoltLinearMovAvgModel creates and initializes a new HoltLinearMovAvgModel.
NewHoltWintersMovAvgModel creates and initializes a new HoltWintersMovAvgModel.
NewIdsQuery creates and initializes a new ids query.
NewIndexService creates a new IndexService.
NewIndicesAnalyzeService creates a new IndicesAnalyzeService.
NewIndicesCloseService creates and initializes a new IndicesCloseService.
NewIndicesCreateService returns a new IndicesCreateService.
NewIndicesDeleteService creates and initializes a new IndicesDeleteService.
NewIndicesDeleteTemplateService creates a new IndicesDeleteTemplateService.
NewIndicesExistsService creates and initializes a new IndicesExistsService.
NewIndicesExistsTemplateService creates a new IndicesExistsTemplateService.
NewIndicesExistsTypeService creates a new IndicesExistsTypeService.
NewIndicesFlushService creates a new IndicesFlushService.
NewIndicesForcemergeService creates a new IndicesForcemergeService.
NewIndicesGetFieldMappingService creates a new IndicesGetFieldMappingService.
NewIndicesGetMappingService creates a new IndicesGetMappingService.
NewIndicesGetService creates a new IndicesGetService.
NewIndicesGetSettingsService creates a new IndicesGetSettingsService.
NewIndicesGetTemplateService creates a new IndicesGetTemplateService.
NewIndicesOpenService creates and initializes a new IndicesOpenService.
NewIndicesPutMappingService creates a new IndicesPutMappingService.
NewIndicesPutSettingsService creates a new IndicesPutSettingsService.
NewIndicesPutTemplateService creates a new IndicesPutTemplateService.
NewIndicesQuery creates and initializes a new indices query.
NewIndicesRolloverService creates a new IndicesRolloverService.
NewIndicesShrinkService creates a new IndicesShrinkService.
NewIndicesStatsService creates a new IndicesStatsService.
NewIngestDeletePipelineService creates a new IngestDeletePipelineService.
NewIngestGetPipelineService creates a new IngestGetPipelineService.
NewIngestPutPipelineService creates a new IngestPutPipelineService.
NewIngestSimulatePipelineService creates a new IngestSimulatePipeline.
NewInnerHit creates a new InnerHit.
NewJLHScoreSignificanceHeuristic initializes a new JLHScoreSignificanceHeuristic.
No description provided by the author
NewLinearDecayFunction initializes and returns a new LinearDecayFunction.
No description provided by the author
NewLinearMovAvgModel creates and initializes a new LinearMovAvgModel.
NewMatchAllQuery creates and initializes a new match all query.
NewMatchPhrasePrefixQuery creates and initializes a new MatchQuery of type phrase_prefix.
NewMatchPhraseQuery creates and initializes a new MatchQuery of type phrase.
NewMatchQuery creates and initializes a new MatchQuery.
NewMatrixStatsAggregation initializes a new MatrixStatsAggregation.
No description provided by the author
NewMaxBucketAggregation creates and initializes a new MaxBucketAggregation.
NewMgetService initializes a new Multi GET API request call.
No description provided by the author
NewMinBucketAggregation creates and initializes a new MinBucketAggregation.
No description provided by the author
NewMoreLikeThisQuery creates and initializes a new MoreLikeThisQuery.
NewMoreLikeThisQueryItem creates and initializes a MoreLikeThisQueryItem.
NewMovAvgAggregation creates and initializes a new MovAvgAggregation.
NewMultiGetItem initializes a new, single item for a Multi GET request.
MultiMatchQuery creates and initializes a new MultiMatchQuery.
No description provided by the author
No description provided by the author
NewMultiTermvectorService creates a new MultiTermvectorService.
NewMutualInformationSignificanceHeuristic initializes a new instance of MutualInformationSignificanceHeuristic.
No description provided by the author
NewNestedQuery creates and initializes a new NestedQuery.
NewNodesInfoService creates a new NodesInfoService.
NewNodesStatsService creates a new NodesStatsService.
NewParentIdQuery creates and initializes a new parent_id query.
NewPercentageScoreSignificanceHeuristic initializes a new instance of PercentageScoreSignificanceHeuristic.
No description provided by the author
No description provided by the author
NewPercentilesBucketAggregation creates and initializes a new PercentilesBucketAggregation.
NewPercolatorQuery creates and initializes a new Percolator query.
NewPhraseSuggester creates a new PhraseSuggester.
No description provided by the author
NewPrefixQuery creates and initializes a new PrefixQuery.
NewPutMappingService is an alias for NewIndicesPutMappingService.
NewPutTemplateService creates a new PutTemplateService.
No description provided by the author
NewQueryStringQuery creates and initializes a new QueryStringQuery.
NewRandomFunction initializes and returns a new RandomFunction.
No description provided by the author
NewRangeQuery creates and initializes a new RangeQuery.
NewRawStringQuery ininitializes a new RawStringQuery.
NewRefreshService creates a new instance of RefreshService.
NewRegexpQuery creates and initializes a new RegexpQuery.
NewReindexDestination returns a new ReindexDestination.
NewReindexRemoteInfo creates a new ReindexRemoteInfo.
NewReindexService creates a new ReindexService.
NewReindexSource creates a new ReindexSource.
NewRequest is a http.Request and adds features such as encoding the body.
No description provided by the author
NewReverseNestedAggregation initializes a new ReverseNestedAggregation bucket aggregation.
No description provided by the author
NewScoreSort creates a new ScoreSort.
NewScript creates and initializes a new Script.
NewScriptField creates and initializes a new ScriptField.
NewScriptFile creates and initializes a new Script of type "file".
NewScriptFunction initializes and returns a new ScriptFunction.
NewScriptId creates and initializes a new Script of type "id".
NewScriptInline creates and initializes a new Script of type "inline".
NewScriptQuery creates and initializes a new ScriptQuery.
NewScriptSignificanceHeuristic initializes a new instance of ScriptSignificanceHeuristic.
NewScriptSort creates and initializes a new ScriptSort.
NewScrollService initializes and returns a new ScrollService.
NewSearchRequest creates a new search request.
NewSearchService creates a new service for searching in Elasticsearch.
NewSearchSource initializes a new SearchSource.
NewSerialDiffAggregation creates and initializes a new SerialDiffAggregation.
No description provided by the author
NewSimpleBackoff creates a SimpleBackoff algorithm with the specified list of fixed intervals in milliseconds.
NewSimpleClient creates a new short-lived Client that can be used in use cases where you need e.g.
NewSimpleMovAvgModel creates and initializes a new SimpleMovAvgModel.
NewSimpleQueryStringQuery creates and initializes a new SimpleQueryStringQuery.
NewSliceQuery creates a new SliceQuery.
NewSnapshotCreateRepositoryService creates a new SnapshotCreateRepositoryService.
NewSnapshotCreateService creates a new SnapshotCreateService.
NewSnapshotDeleteRepositoryService creates a new SnapshotDeleteRepositoryService.
NewSnapshotGetRepositoryService creates a new SnapshotGetRepositoryService.
NewSnapshotVerifyRepositoryService creates a new SnapshotVerifyRepositoryService.
No description provided by the author
NewStatsBucketAggregation creates and initializes a new StatsBucketAggregation.
NewStopRetrier returns a retrier that does no retries.
No description provided by the author
NewSuggesterCategoryMapping creates a new SuggesterCategoryMapping.
NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
NewSuggesterGeoMapping creates a new SuggesterGeoMapping.
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
No description provided by the author
NewSuggestService creates a new instance of SuggestService.
No description provided by the author
NewSumBucketAggregation creates and initializes a new SumBucketAggregation.
NewTasksCancelService creates a new TasksCancelService.
NewTasksGetTaskService creates a new TasksGetTaskService.
NewTasksListService creates a new TasksListService.
NewTermQuery creates and initializes a new TermQuery.
No description provided by the author
NewTermsLookup creates and initializes a new TermsLookup.
NewTermsQuery creates and initializes a new TermsQuery.
NewTermSuggester creates a new TermSuggester.
NewTermvectorsFilterSettings creates and initializes a new TermvectorsFilterSettings struct.
NewTermvectorsService creates a new TermvectorsService.
No description provided by the author
No description provided by the author
NewUpdateByQueryService creates a new UpdateByQueryService.
NewUpdateService creates the service to update documents in Elasticsearch.
No description provided by the author
NewWeightFactorFunction initializes and returns a new WeightFactorFunction.
NewWildcardQuery creates and initializes a new WildcardQuery.
Retry the function f until it does not return error or BackOff stops.
RetryNotify calls notify function with the error and wait duration for each failed attempt before sleep.
SetBasicAuth can be used to specify the HTTP Basic Auth credentials to use when making HTTP requests to Elasticsearch.
SetDecoder sets the Decoder to use when decoding data from Elasticsearch.
SetErrorLog sets the logger for critical messages like nodes joining or leaving the cluster or failing requests.
SetGzip enables or disables gzip compression (disabled by default).
SetHealthcheck enables or disables healthchecks (enabled by default).
SetHealthcheckInterval sets the interval between two health checks.
SetHealthcheckTimeout sets the timeout for periodic health checks.
SetHealthcheckTimeoutStartup sets the timeout for the initial health check.
SetHttpClient can be used to specify the http.Client to use when making HTTP requests to Elasticsearch.
SetInfoLog sets the logger for informational messages, e.g.
SetMaxRetries sets the maximum number of retries before giving up when performing a HTTP request to Elasticsearch.
SetRequiredPlugins can be used to indicate that some plugins are required before a Client will be created.
SetRetrier specifies the retry strategy that handles errors during HTTP request/response with Elasticsearch.
SetScheme sets the HTTP scheme to look for when sniffing (http or https).
SetSendGetBodyAs specifies the HTTP method to use when sending a GET request with a body.
SetSniff enables or disables the sniffer (enabled by default).
SetSnifferCallback allows the caller to modify sniffer decisions.
SetSnifferInterval sets the interval between two sniffing processes.
SetSnifferTimeout sets the timeout for the sniffer that finds the nodes in a cluster.
SetSnifferTimeoutStartup sets the timeout for the sniffer that is used when creating a new client.
SetTraceLog specifies the log.Logger to use for output of HTTP requests and responses which is helpful during debugging.
SetURL defines the URL endpoints of the Elasticsearch nodes.

# Constants

DefaultGzipEnabled specifies if gzip compression is enabled by default.
DefaultHealthcheckEnabled specifies if healthchecks are enabled by default.
DefaultHealthcheckInterval is the default interval between two health checks of the nodes in the cluster.
DefaultHealthcheckTimeout specifies the time a running client waits for a response from Elasticsearch.
DefaultHealthcheckTimeoutStartup is the time the healthcheck waits for a response from Elasticsearch on startup, i.e.
DefaultScheme is the default protocol scheme to use when sniffing the Elasticsearch cluster.
DefaultScrollKeepAlive is the default time a scroll cursor will be kept alive.
DefaultSendGetBodyAs is the HTTP method to use when elastic is sending a GET request with a body.
DefaultSnifferEnabled specifies if the sniffer is enabled by default.
DefaultSnifferInterval is the interval between two sniffing procedures, i.e.
DefaultSnifferTimeout is the default timeout after which the sniffing process times out.
DefaultSnifferTimeoutStartup is the default timeout for the sniffing process that is initiated while creating a new client.
DefaultURL is the default endpoint of Elasticsearch on the local machine.
No description provided by the author
No description provided by the author
Version is the current version of Elastic.

# Variables

ErrNoClient is raised when no Elasticsearch node is available.
ErrRetry is raised when a request cannot be executed after the configured number of retries.
ErrTimeout is raised when a request timed out, e.g.

# Structs

AcknowledgedResponse is returned from various APIs.
AggregationBucketFilters is a multi-bucket aggregation that is returned with a filters aggregation.
AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.
AggregationBucketHistogramItems is a bucket aggregation that is returned with a date histogram aggregation.
AggregationBucketKeyedRangeItems is a bucket aggregation that is e.g.
AggregationBucketKeyItem is a single bucket of an AggregationBucketKeyItems structure.
AggregationBucketKeyItems is a bucket aggregation that is e.g.
AggregationBucketRangeItem is a single bucket of an AggregationBucketRangeItems structure.
AggregationBucketRangeItems is a bucket aggregation that is e.g.
AggregationBucketSignificantTerm is a single bucket of an AggregationBucketSignificantTerms structure.
AggregationBucketSignificantTerms is a bucket aggregation returned with a significant terms aggregation.
AggregationExtendedStatsMetric is a multi-value metric, returned by an ExtendedStats aggregation.
AggregationGeoBoundsMetric is a metric as returned by a GeoBounds aggregation.
AggregationMatrixStats is returned by a MatrixStats aggregation.
AggregationMatrixStatsField represents running stats of a single field returned from MatrixStats aggregation.
AggregationPercentilesMetric is a multi-value metric, returned by a Percentiles aggregation.
AggregationPipelineBucketMetricValue is a value returned e.g.
AggregationPipelineDerivative is the value returned by a Derivative aggregation.
AggregationPipelinePercentilesMetric is the value returned by a pipeline percentiles Metric aggregation.
AggregationPipelineSimpleValue is a simple value, returned e.g.
AggregationPipelineStatsMetric is a simple value, returned e.g.
AggregationSingleBucket is a single bucket, returned e.g.
AggregationStatsMetric is a multi-value metric, returned by a Stats aggregation.
AggregationTopHitsMetric is a metric returned by a TopHits aggregation.
AggregationValueMetric is a single-value metric, returned e.g.
AliasAddAction is an action to add to an alias.
No description provided by the author
AliasesService returns the aliases associated with one or more indices.
AliasRemoveAction is an action to remove an alias.
AliasResult is the outcome of calling Do on AliasService.
AliasService enables users to add or remove an alias.
AvgAggregation is a single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents.
AvgBucketAggregation is a sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation.
BackoffRetrier is an implementation that does nothing but return nil on Retry.
A bool query matches documents matching boolean combinations of other queries.
A boosting query can be used to effectively demote results that match a given query.
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.
BucketSelectorAggregation is a parent pipeline aggregation which determines whether the current bucket will be retained in the parent multi-bucket aggregation.
BulkDeleteRequest is a request to remove a document from Elasticsearch.
BulkIndexByScrollResponse is the outcome of executing Do with DeleteByQueryService and UpdateByQueryService.
BulkIndexRequest is a request to add a document to Elasticsearch.
BulkProcessor encapsulates a task that accepts bulk requests and orchestrates committing them to Elasticsearch via one or more workers.
BulkProcessorService allows to easily process bulk requests.
BulkProcessorStats contains various statistics of a bulk processor while it is running.
BulkProcessorWorkerStats represents per-worker statistics.
BulkResponse is a response to a bulk execution.
BulkResponseItem is the result of a single bulk request.
BulkService allows for batching bulk requests and sending them to Elasticsearch in one roundtrip.
BulkUpdateRequest is a request to update a document in Elasticsearch.
CardinalityAggregation is a single-value metrics aggregation that calculates an approximate count of distinct values.
ChildrenAggregation is a special single bucket aggregation that enables aggregating from buckets on parent document types to buckets on child documents.
ChiSquareSignificanceHeuristic implements Chi square as described in "Information Retrieval", Manning et al., Chapter 13.5.2.
ClearScrollResponse is the response of ClearScrollService.Do.
ClearScrollService clears one or more scroll contexts by their ids.
Client is an Elasticsearch client.
ClusterHealthResponse is the response of ClusterHealthService.Do.
ClusterHealthService allows to get a very simple status on the health of the cluster.
ClusterIndexHealth will be returned as part of ClusterHealthResponse.
ClusterShardHealth will be returned as part of ClusterHealthResponse.
ClusterStateResponse is the response of ClusterStateService.Do.
ClusterStateService allows to get a comprehensive state information of the whole cluster.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ClusterStatsResponse is the response of ClusterStatsService.Do.
ClusterStatsService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-stats.html.
CollapseBuilder enables field collapsing on a search request.
CollectorResult holds the profile timings of the collectors used in the search.
CommonTermsQuery is a modern alternative to stopwords which improves the precision and recall of search results (by taking stopwords into account), without sacrificing performance.
CompletionSuggester is a fast suggester for e.g.
ConstantBackoff is a backoff policy that always returns the same delay.
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.
CountResponse is the response of using the Count API.
CountService is a convenient service for determining the number of documents in an index.
CumulativeSumAggregation is a parent pipeline aggregation which calculates the cumulative sum of a specified metric in a parent histogram (or date_histogram) aggregation.
DateHistogramAggregation is a multi-bucket aggregation similar to the histogram except it can only be applied on date values.
DateRangeAggregation is a range aggregation that is dedicated for date values.
No description provided by the author
DefaultDecoder uses json.Unmarshal from the Go standard library to decode JSON data.
DeleteByQueryService deletes documents that match a query.
DeleteResponse is the outcome of running DeleteService.Do.
DeleteService allows to delete a typed JSON document from a specified index based on its id.
DeleteTemplateService deletes a search template.
DerivativeAggregation is a parent pipeline aggregation which calculates the derivative of a specified metric in a parent histogram (or date_histogram) aggregation.
DirectCandidateGenerator implements a direct candidate generator.
No description provided by the author
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.
Error encapsulates error details as returned from Elasticsearch.
ErrorDetails encapsulate error details from Elasticsearch.
EWMAMovAvgModel calculates an exponentially weighted moving average.
ExistsQuery is a query that only matches on documents that the field has a value in them.
ExistsService checks for the existence of a document using HEAD.
ExplainResponse is the response of ExplainService.Do.
ExplainService computes a score explanation for a query and a specific document.
ExponentialBackoff implements the simple exponential backoff described by Douglas Thain at http://dthain.blogspot.de/2009/02/exponential-backoff-in-distributed.html.
ExponentialDecayFunction builds an exponential decay score function.
ExtendedExtendedStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
No description provided by the author
FetchSourceContext enables source filtering, i.e.
FieldSort sorts by a given field.
No description provided by the author
FieldStats contains stats of an individual field.
FieldStatsComparison contain all comparison operations that can be used in FieldStatsConstraints.
FieldStatsConstraints is a constraint on a field.
FieldStatsRequest can be used to set up the body to be used in the Field Stats API.
FieldStatsResponse is the response body content.
FieldStatsService allows finding statistical properties of a field without executing a search, but looking up measurements that are natively available in the Lucene index.
FieldValueFactorFunction is a function score function that allows you to use a field from a document to influence the score.
FilterAggregation defines a single bucket of all the documents in the current document set context that match a specified filter.
FiltersAggregation defines a multi bucket aggregations where each bucket is associated with a filter.
FunctionScoreQuery allows you to modify the score of documents that are retrieved by a query.
Fuzziness defines the fuzziness which is used in FuzzyCompletionSuggester.
FuzzyFuzzyCompletionSuggester is a FuzzyCompletionSuggester that allows fuzzy completion.
FuzzyQuery uses similarity based on Levenshtein edit distance for string fields, and a +/- margin on numeric and date fields.
GaussDecayFunction builds a gauss decay score function.
GeoBoundingBoxQuery allows to filter hits based on a point location using a bounding box.
GeoBoundsAggregation is a metric aggregation that computes the bounding box containing all geo_point values for a field.
GeoDistanceAggregation is a multi-bucket aggregation that works on geo_point fields and conceptually works very similar to the range aggregation.
GeoDistanceQuery filters documents that include only hits that exists within a specific distance from a geo point.
GeoDistanceSort allows for sorting by geographic distance.
No description provided by the author
GeoPoint is a geographic position described via latitude and longitude.
GeoPolygonQuery allows to include hits that only fall within a polygon of points.
GetResult is the outcome of GetService.Do.
GetService allows to get a typed JSON document from the index based on its id.
No description provided by the author
GetTemplateService reads a search template.
GlobalAggregation defines a single bucket of all the documents within the search execution context.
GNDSignificanceHeuristic implements the "Google Normalized Distance" as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007.
HasChildQuery accepts a query and the child type to run against, and results in parent documents that have child docs matching the query.
HasParentQuery accepts a query and a parent type.
Highlight allows highlighting search results on one or more fields.
HighlighterField specifies a highlighted field.
HistogramAggregation is a multi-bucket values source based aggregation that can be applied on numeric values extracted from the documents.
HoltLinearMovAvgModel calculates a doubly exponential weighted moving average.
HoltWintersMovAvgModel calculates a triple exponential weighted moving average.
IdsQuery filters documents that only have the provided ids.
IndexFieldStats contains field stats for an index.
IndexResponse is the result of indexing a document in Elasticsearch.
IndexService adds or updates a typed JSON document in a specified index, making it searchable.
IndexStats is index stats for a specific index.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IndicesAnalyzeRequest specifies the parameters of the analyze request.
No description provided by the author
No description provided by the author
No description provided by the author
IndicesAnalyzeService performs the analysis process on a text and returns the tokens breakdown of the text.
IndicesCloseResponse is the response of IndicesCloseService.Do.
IndicesCloseService closes an index.
IndicesCreateResult is the outcome of creating a new index.
IndicesCreateService creates a new index.
IndicesDeleteResponse is the response of IndicesDeleteService.Do.
IndicesDeleteService allows to delete existing indices.
IndicesDeleteTemplateResponse is the response of IndicesDeleteTemplateService.Do.
IndicesDeleteTemplateService deletes index templates.
IndicesExistsService checks if an index or indices exist or not.
IndicesExistsTemplateService checks if a given template exists.
IndicesExistsTypeService checks if one or more types exist in one or more indices.
No description provided by the author
Flush allows to flush one or more indices.
IndicesForcemergeResponse is the response of IndicesForcemergeService.Do.
IndicesForcemergeService allows to force merging of one or more indices.
IndicesGetFieldMappingService retrieves the mapping definitions for the fields in an index or index/type.
IndicesGetMappingService retrieves the mapping definitions for an index or index/type.
IndicesGetResponse is part of the response of IndicesGetService.Do.
IndicesGetService retrieves information about one or more indices.
IndicesGetSettingsResponse is the response of IndicesGetSettingsService.Do.
IndicesGetSettingsService allows to retrieve settings of one or more indices.
IndicesGetTemplateResponse is the response of IndicesGetTemplateService.Do.
IndicesGetTemplateService returns an index template.
IndicesOpenResponse is the response of IndicesOpenService.Do.
IndicesOpenService opens an index.
IndicesPutMappingService allows to register specific mapping definition for a specific type.
IndicesPutSettingsResponse is the response of IndicesPutSettingsService.Do.
IndicesPutSettingsService changes specific index level settings in real time.
IndicesPutTemplateResponse is the response of IndicesPutTemplateService.Do.
IndicesPutTemplateService creates or updates index mappings.
IndicesQuery can be used when executed across multiple indices, allowing to have a query that executes only when executed on an index that matches a specific list of indices, and another query that executes when it is executed on an index that does not match the listed indices.
IndicesRolloverResponse is the response of IndicesRolloverService.Do.
IndicesRolloverService rolls an alias over to a new index when the existing index is considered to be too large or too old.
IndicesShrinkResponse is the response of IndicesShrinkService.Do.
IndicesShrinkService allows you to shrink an existing index into a new index with fewer primary shards.
IndicesStatsResponse is the response of IndicesStatsService.Do.
IndicesStatsService provides stats on various metrics of one or more indices.
IngestDeletePipelineResponse is the response of IngestDeletePipelineService.Do.
IngestDeletePipelineService deletes pipelines by ID.
No description provided by the author
IngestGetPipelineService returns pipelines based on ID.
IngestPutPipelineResponse is the response of IngestPutPipelineService.Do.
IngestPutPipelineService adds pipelines and updates existing pipelines in the cluster.
No description provided by the author
IngestSimulatePipelineResponse is the response of IngestSimulatePipeline.Do.
IngestSimulatePipelineService executes a specific pipeline against the set of documents provided in the body of the request.
No description provided by the author
InnerHit implements a simple join for parent/child, nested, and even top-level documents in Elasticsearch.
JLHScoreSignificanceHeuristic implements the JLH score as described in https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-bucket-significantterms-aggregation.html#_jlh_score.
LaplaceSmoothingModel implements a laplace smoothing model.
LinearDecayFunction builds a linear decay score function.
LinearInterpolationSmoothingModel implements a linear interpolation smoothing model.
LinearMovAvgModel calculates a linearly weighted moving average, such that older values are linearly less important.
MatchAllQuery is the most simple query, which matches all documents, giving them all a _score of 1.0.
MatchQuery is a family of queries that accepts text/numerics/dates, analyzes them, and constructs a query.
MatrixMatrixStatsAggregation ..
MaxAggregation is a single-value metrics aggregation that keeps track and returns the maximum value among the numeric values extracted from the aggregated documents.
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).
MgetResponse is the outcome of a Multi GET API request.
MgetService allows to get multiple documents based on an index, type (optional) and id (possibly routing).
MinAggregation is a single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents.
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).
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).
MoreLikeThis query (MLT Query) finds documents that are "like" a given set of documents.
MoreLikeThisQueryItem represents a single item of a MoreLikeThisQuery to be "liked" or "unliked".
MovAvgAggregation operates on a series of data.
MultiGetItem is a single document to retrieve via the MgetService.
MultiMatchQuery builds on the MatchQuery to allow multi-field queries.
No description provided by the author
MultiSearch executes one or more searches in one roundtrip.
MultiTermvectorItem is a single document to retrieve via MultiTermvectorService.
MultiTermvectorResponse is the response of MultiTermvectorService.Do.
MultiTermvectorService returns information and statistics on terms in the fields of a particular document.
MutualInformationSignificanceHeuristic implements Mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1.
NestedAggregation is a special single bucket aggregation that enables aggregating nested documents.
NestedQuery allows to query nested objects / docs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodesInfoResponse is the response of NodesInfoService.Do.
NodesInfoService allows to retrieve one or more or all of the cluster nodes information.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodesStatsResponse is the response of NodesStatsService.Do.
No description provided by the author
No description provided by the author
No description provided by the author
NodesStatsService returns node statistics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ParentIdQuery can be used to find child documents which belong to a particular parent.
PercentageScoreSignificanceHeuristic implements the algorithm described in https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
PercentileRanksAggregation See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-metrics-percentile-rank-aggregation.html.
PercentilesAggregation See: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations-metrics-percentile-aggregation.html.
PercentilesBucketAggregation is a sibling pipeline aggregation which calculates percentiles across all bucket of a specified metric in a sibling aggregation.
PercolatorQuery can be used to match queries stored in an index.
PhraseSuggester provides an API to access word alternatives on a per token basis within a certain string distance.
PingResult is the result returned from querying the Elasticsearch server.
PingService checks if an Elasticsearch server on a given URL is alive.
PrefixQuery matches documents that have fields containing terms with a specified prefix (not analyzed).
ProfileResult is the internal representation of a profiled query, corresponding to a single node in the query tree.
PutMappingResponse is the response of IndicesPutMappingService.Do.
PutTemplateService creates or updates a search template.
QueryProfileShardResult is a container class to hold the profile results for a single shard in the request.
No description provided by the author
QueryStringQuery uses the query parser in order to parse its content.
RandomFunction builds a random score function.
RangeAggregation is a multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.
RangeQuery matches documents with fields that have terms within a certain range.
RefreshResult is the outcome of RefreshService.Do.
RefreshService explicitly refreshes one or more indices.
RegexpQuery allows you to use regular expression term queries.
ReindexDestination is the destination of a Reindex API call.
ReindexRemoteInfo contains information for reindexing from a remote cluster.
ReindexService is a method to copy documents from one index to another.
ReindexSource specifies the source of a Reindex process.
No description provided by the author
Response represents a response from Elasticsearch.
No description provided by the author
ReverseNestedAggregation defines a special single bucket aggregation that enables aggregating on parent docs from nested documents.
SamplerAggregation is a filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents.
ScoreSort sorts by relevancy score.
Script holds all the paramaters necessary to compile or find in cache and then execute a script.
ScriptField is a single script field.
ScriptFunction builds a script score function.
ScriptQuery allows to define scripts as filters.
ScriptSignificanceHeuristic implements a scripted significance heuristic.
ScriptSort sorts by a custom script.
ScrollService iterates over pages of search results from Elasticsearch.
SearchExplanation explains how the score for a hit was computed.
SearchHit is a single hit.
No description provided by the author
SearchHits specifies the list of search hits.
SearchProfile is a list of shard profiling data collected during query execution in the "profile" section of a SearchResult.
SearchProfileShardResult returns the profiling data for a single shard accessed during the search query or aggregation.
SearchRequest combines a search request and its query details (see SearchSource).
SearchResult is the result of a search in Elasticsearch.
Search for documents in Elasticsearch.
SearchSource enables users to build the search source.
SearchSuggestion is a single search suggestion.
SearchSuggestionOption is an option of a SearchSuggestion.
SerialDiffAggregation implements serial differencing.
SignificantSignificantTermsAggregation is an aggregation that returns interesting or unusual occurrences of terms in a set.
SimpleBackoff takes a list of fixed values for backoff intervals.
SimpleMovAvgModel calculates a simple unweighted (arithmetic) moving average.
SimpleQueryStringQuery is a query that uses the SimpleQueryParser to parse its context.
SliceQuery allows to partition the documents into several slices.
SnapshotCreateRepositoryResponse is the response of SnapshotCreateRepositoryService.Do.
SnapshotCreateRepositoryService creates a snapshot repository.
SnapshotCreateResponse is the response of SnapshotCreateService.Do.
SnapshotCreateService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html.
SnapshotDeleteRepositoryResponse is the response of SnapshotDeleteRepositoryService.Do.
SnapshotDeleteRepositoryService deletes a snapshot repository.
SnapshotGetRepositoryService reads a snapshot repository.
SnapshotRepositoryMetaData contains all information about a single snapshot repository.
SnapshotShardFailure stores information about failures that occurred during shard snapshotting process.
No description provided by the author
SnapshotVerifyRepositoryResponse is the response of SnapshotVerifyRepositoryService.Do.
SnapshotVerifyRepositoryService verifies a snapshop repository.
SortByDoc sorts by the "_doc" field, as described in https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-scroll.html.
SortInfo contains information about sorting a field.
StartTaskResult is used in cases where a task gets started asynchronously and the operation simply returnes a TaskID to watch for via the Task Management API.
StatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
StatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.
StopBackoff is a fixed backoff policy that always returns false for Next(), meaning that the operation should never be retried.
StopRetrier is an implementation that does no retries.
StupidBackoffSmoothingModel implements a stupid backoff smoothing model.
SuggesterCategoryMapping provides a mapping for a category context in a suggester.
SuggesterCategoryQuery provides querying a category context in a suggester.
SuggesterGeoMapping provides a mapping for a geolocation context in a suggester.
SuggesterGeoQuery provides querying a geolocation context in a suggester.
SuggestField can be used by the caller to specify a suggest field at index time.
Suggestion is a single suggester outcome.
SuggestService returns suggestions for text.
SumAggregation is a single-value metrics aggregation that sums up numeric values that are extracted from the aggregated documents.
SumBucketAggregation is a sibling pipeline aggregation which calculates the sum across all buckets of a specified metric in a sibling aggregation.
No description provided by the author
No description provided by the author
TasksCancelService can cancel long-running tasks.
No description provided by the author
TasksGetTaskService retrieves the state of a task in the cluster.
TasksListResponse is the response of TasksListService.Do.
TasksListService retrieves the list of currently executing tasks on one ore more nodes in the cluster.
TermQuery finds documents that contain the exact term specified in the inverted index.
TermsAggregation is a multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.
TermsAggregationIncludeExclude allows for include/exclude in a TermsAggregation.
No description provided by the author
TermsLookup encapsulates the parameters needed to fetch terms.
TermsOrder specifies a single order field for a terms aggregation.
TermsQuery filters documents that have fields that match any of the provided terms (not analyzed).
TermSuggester suggests terms based on edit distance.
No description provided by the author
TermvectorsFilterSettings adds additional filters to a Termsvector request.
TermvectorsResponse is the response of TermvectorsService.Do.
TermvectorsService returns information and statistics on terms in the fields of a particular document.
No description provided by the author
TopHitsAggregation keeps track of the most relevant document being aggregated.
TypeQuery filters documents matching the provided document / mapping type.
UpdateByQueryService is documented at https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html.
UpdateResponse is the result of updating a document in Elasticsearch.
UpdateService updates a document in Elasticsearch.
ValueCountAggregation is a single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.
WeightFactorFunction builds a weight factor function that multiplies the weight to the score.
WildcardQuery matches documents that have fields matching a wildcard expression (not analyzed).
ZeroBackoff is a fixed backoff policy whose backoff time is always zero, meaning that the operation is retried immediately without waiting, indefinitely.

# Interfaces

Aggregations can be seen as a unit-of-work that build analytic information over a set of documents.
AliasAction is an action to apply to an alias, e.g.
Backoff allows callers to implement their own Backoff strategy.
BulkableRequest is a generic interface to bulkable requests.
No description provided by the author
Decoder is used to decode responses from Elasticsearch.
Logger specifies the interface for all log operations.
MovAvgModel specifies the model to use with the MovAvgAggregation.
Query represents the generic query interface.
No description provided by the author
Retrier decides whether to retry a failed HTTP request with Elasticsearch.
ScoreFunction is used in combination with the Function Score Query.
No description provided by the author
No description provided by the author
Sorter is an interface for sorting strategies, e.g.
Represents the generic suggester interface.
SuggesterContextQuery is used to define context information within a suggestion request.

# Type aliases

Aggregations is a list of aggregations that are part of a search result.
BackoffFunc specifies the signature of a function that returns the time to wait before the next call to a resource.
BulkAfterFunc defines the signature of callbacks that are executed after a commit to Elasticsearch.
BulkBeforeFunc defines the signature of callbacks that are executed before a commit to Elasticsearch.
ClientOptionFunc is a function that configures a Client.
IngestGetPipelineResponse is the response of IngestGetPipelineService.Do.
Notify is a notify-on-error function.
An Operation is executing by Retry() or RetryNotify().
RawStringQuery can be used to treat a string representation of an ES query as a Query.
Elasticsearch-specific HTTP request.
RetrierFunc specifies the signature of a Retry function.
SearchHitHighlight is the highlight information of a search hit.
SearchSuggest is a map of suggestions.
SnapshotGetRepositoryResponse is the response of SnapshotGetRepositoryService.Do.
SnifferCallback defines the protocol for sniffing decisions.
SuggestResult is the outcome of SuggestService.Do.