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

# README

Elastic

This is a development branch that is actively being worked on. DO NOT USE IN PRODUCTION! If you want to use stable versions of Elastic, please use a dependency manager like dep.

Elastic is an Elasticsearch client for the Go programming language.

[Build Status] Godoc license

See the wiki for additional information about Elastic.

Buy Me A Coffee

Releases

The release branches (e.g. release-branch.v6) are actively being worked on and can break at any time. If you want to use stable versions of Elastic, please use a dependency manager like dep.

Here's the version matrix:

Elasticsearch versionElastic versionPackage URLRemarks
6.x                  6.0            github.com/olivere/elastic (source doc)Use a dependency manager (see below).
5.x5.0gopkg.in/olivere/elastic.v5 (source doc)Actively maintained.
2.x3.0gopkg.in/olivere/elastic.v3 (source doc)Deprecated. Please update.
1.x2.0gopkg.in/olivere/elastic.v2 (source doc)Deprecated. Please update.
0.9-1.31.0gopkg.in/olivere/elastic.v1 (source doc)Deprecated. Please update.

Example:

You have installed Elasticsearch 6.0.0 and want to use Elastic. As listed above, you should use Elastic 6.0.

To use the required version of Elastic in your application, it is strongly advised to use a tool like dep or Go modules to manage dependencies. Make sure to use a version such as ^6.0.0.

To use Elastic, import:

import "github.com/olivere/elastic"

Elastic 6.0

Elastic 6.0 targets Elasticsearch 6.x which was released on 14th November 2017.

Notice that there are a lot of breaking changes in Elasticsearch 6.0 and we used this as an opportunity to clean up and refactor Elastic as we did in the transition from earlier versions of Elastic.

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 starting with Elasticsearch 0.90 up to recent 6.x versions. We recently switched to GitHub Actions for testing. Before that, we used Travis CI successfully for years).

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.

An example is available here.

Here's a link to a complete working example for v6.

Here are a few tips on how to get used to Elastic:

  1. Head over to the Wiki for detailed information and topics like e.g. how to add a middleware or how to connect to AWS.
  2. If you are unsure how to implement something, read the tests (all _test.go files). They not only serve as a guard against changes, but also as a reference.
  3. The recipes contains small examples on how to implement something, e.g. bulk indexing, scrolling etc.

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
  • Validate API
  • Explain API
  • Profile API
  • Field Capabilities 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
    • Adjacency Matrix
    • Children
    • Date Histogram
    • Date Range
    • Diversified Sampler
    • Filter
    • Filters
    • Geo Distance
    • GeoHash Grid
    • Global
    • Histogram
    • IP Range
    • Missing
    • Nested
    • Range
    • Reverse Nested
    • Sampler
    • Significant Terms
    • Significant Text
    • Terms
    • Composite
  • 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
    • Bucket Sort
    • 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
    • Explain Analyze
  • Index Templates
  • Indices Stats
  • Indices Segments
  • Indices Recovery
  • Indices Shard Stores
  • Clear Cache
  • Flush
    • Synced Flush
  • Refresh
  • Force Merge

Index Lifecycle Management APIs

  • Create Policy
  • Get Policy
  • Delete Policy
  • Move to Step
  • Remove Policy
  • Retry Policy
  • Get Ilm Status
  • Explain Lifecycle
  • Start Ilm
  • Stop Ilm

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
  • cat templates

Cluster APIs

  • Cluster Health
  • Cluster State
  • Cluster Stats
  • Pending Cluster Tasks
  • Cluster Reroute
  • Cluster Update Settings
  • Nodes Stats
  • Nodes Info
  • Nodes Feature Usage
  • Remote Cluster 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
    • Terms Set 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
  • 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 Polygon Query
  • Specialized queries
    • More Like This 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 get
    • Snapshot create
    • Snapshot delete
    • Restore
    • Snapshot status
    • Monitoring snapshot/restore status
    • Stopping currently running snapshot and restore
  • Scripting
    • GetScript
    • PutScript
    • DeleteScript

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
No description provided by the author
Package config allows parsing a configuration for Elasticsearch from a URL.
No description provided by the author
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

Dial will call DialContext with a background context.
DialContext will connect to Elasticsearch, just like NewClient does.
DialWithConfig will use the configuration settings parsed from config package to connect to Elasticsearch.
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.
IsConnErr returns true if the error indicates that Elastic could not find an Elasticsearch host to connect to.
IsContextErr returns true if the error is from a context that was canceled or deadline exceeded.
IsForbidden returns true if the given error indicates that Elasticsearch returned HTTP status 403.
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.
NewAdjacencyMatrixAggregation initializes a new AdjacencyMatrixAggregation.
NewAliasAddAction returns an action to add an alias.
NewAliasesService instantiates a new AliasesService.
NewAliasRemoveAction returns an action to remove an alias.
NewAliasRemoveIndexAction returns an action to remove an index.
NewAliasService implements a service to manage aliases.
NewAllocateEmptyPrimaryAllocationCommand creates a new AllocateEmptyPrimaryAllocationCommand.
NewAllocateReplicaAllocationCommand creates a new AllocateReplicaAllocationCommand.
NewAllocateStalePrimaryAllocationCommand creates a new AllocateStalePrimaryAllocationCommand.
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.
NewBucketSortAggregation creates and initializes a new BucketSortAggregation.
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.
NewCancelAllocationCommand creates a new CancelAllocationCommand.
No description provided by the author
NewCatAliasesService creates a new CatAliasesService.
NewCatAllocationService creates a new CatAllocationService.
NewCatCountService creates a new CatCountService.
NewCatHealthService creates a new CatHealthService.
NewCatIndicesService creates a new CatIndicesService.
NewCatShardsService creates a new CatShardsService.
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.
NewClusterRerouteService creates a new ClusterRerouteService.
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.
NewCompositeAggregation creates a new CompositeAggregation.
NewCompositeAggregationDateHistogramValuesSource creates and initializes a new CompositeAggregationDateHistogramValuesSource.
NewCompositeAggregationHistogramValuesSource creates and initializes a new CompositeAggregationHistogramValuesSource.
NewCompositeAggregationTermsValuesSource creates and initializes a new CompositeAggregationTermsValuesSource.
NewConstantBackoff returns a new ConstantBackoff.
ConstantScoreQuery creates and initializes a new constant score query.
Creates a new context suggester.
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.
NewDeleteScriptService creates a new DeleteScriptService.
NewDeleteService creates a new DeleteService.
NewDerivativeAggregation creates and initializes a new DerivativeAggregation.
No description provided by the author
NewDisMaxQuery creates and initializes a new dis max query.
No description provided by the author
NewEWMAMovAvgModel creates and initializes a new EWMAMovAvgModel.
NewExistsQuery creates and initializes a new exists 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
NewExtendedStatsBucketAggregation creates and initializes a new ExtendedStatsBucketAggregation.
NewFetchSourceContext returns a new FetchSourceContext.
NewFieldCapsService creates a new FieldCapsService.
NewFieldSort creates a new FieldSort.
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.
NewFuzzyCompletionSuggesterOptions initializes a new FuzzyCompletionSuggesterOptions instance.
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
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.
NewGetScriptService creates a new GetScriptService.
NewGetService creates a new GetService.
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.
NewIndicesClearCacheService initializes a new instance of IndicesClearCacheService.
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.
NewIndicesRolloverService creates a new IndicesRolloverService.
NewIndicesSegmentsService creates a new IndicesSegmentsService.
NewIndicesShrinkService creates a new IndicesShrinkService.
NewIndicesStatsService creates a new IndicesStatsService.
NewIndicesSyncedFlushService creates a new IndicesSyncedFlushService.
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.
No description provided by the author
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.
NewMatchNoneQuery creates and initializes a new match none query.
NewMatchPhrasePrefixQuery creates and initializes a new MatchPhrasePrefixQuery.
NewMatchPhraseQuery creates and initializes a new MatchPhraseQuery.
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.
NewMoveAllocationCommand creates a new MoveAllocationCommand.
NewMovFnAggregation creates and initializes a new MovFnAggregation.
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.
NewNestedSort creates a new NestedSort.
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.
NewPutScriptService creates a new PutScriptService.
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.
NewRegexCompletionSuggesterOptions initializes a new RegexCompletionSuggesterOptions instance.
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.
No description provided by the author
NewScriptField creates and initializes a new ScriptField.
NewScriptFunction initializes and returns a new ScriptFunction.
NewScriptInline creates and initializes a new inline script, i.e.
NewScriptQuery creates and initializes a new ScriptQuery.
NewScriptSignificanceHeuristic initializes a new instance of ScriptSignificanceHeuristic.
NewScriptSort creates and initializes a new ScriptSort.
NewScriptStored creates and initializes a new stored script.
NewScrollService initializes and returns a new ScrollService.
NewSearchRequest creates a new search request.
NewSearchService creates a new service for searching in Elasticsearch.
NewSearchShardsService creates a new SearchShardsService.
NewSearchSource initializes a new SearchSource.
NewSerialDiffAggregation creates and initializes a new SerialDiffAggregation.
No description provided by the author
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.
NewSnapshotDeleteService creates a new SnapshotDeleteService.
NewSnapshotGetRepositoryService creates a new SnapshotGetRepositoryService.
NewSnapshotGetService creates a new SnapshotGetService.
NewSnapshotCreateService creates a new SnapshotRestoreService.
NewSnapshotStatusService creates a new SnapshotStatusService.
NewSnapshotVerifyRepositoryService creates a new SnapshotVerifyRepositoryService.
NewSpanFirstQuery creates a new SpanFirstQuery.
NewSpanNearQuery creates a new SpanNearQuery.
NewSpanTermQuery creates a new SpanTermQuery.
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
NewSuggesterCategoryIndex creates a new SuggesterCategoryIndex.
NewSuggesterCategoryMapping creates a new SuggesterCategoryMapping.
NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
NewSuggesterGeoMapping creates a new SuggesterGeoMapping.
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
No description provided by the author
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.
NewTermsSetQuery creates and initializes a new TermsSetQuery.
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.
NewValidateService creates a new ValidateService.
No description provided by the author
No description provided by the author
NewWeightFactorFunction initializes and returns a new WeightFactorFunction.
NewWildcardQuery creates and initializes a new WildcardQuery.
NewWrapperQuery creates and initializes a new WrapperQuery.
NewXPackIlmDeleteLifecycleService creates a new XPackIlmDeleteLifecycleService.
NewXPackIlmGetLifecycleService creates a new XPackIlmGetLifecycleService.
NewXPackIlmPutLifecycleService creates a new XPackIlmPutLifecycleService.
NewXPackInfoService creates a new XPackInfoService.
NewXPackSecurityDeleteRoleMappingService creates a new XPackSecurityDeleteRoleMappingService.
NewXPackSecurityDeleteRoleService creates a new XPackSecurityDeleteRoleService.
NewXPackSecurityGetRoleMappingService creates a new XPackSecurityGetRoleMappingService.
NewXPackSecurityGetRoleService creates a new XPackSecurityGetRoleService.
NewXPackSecurityPutRoleMappingService creates a new XPackSecurityPutRoleMappingService.
NewXPackSecurityPutRoleService creates a new XPackSecurityPutRoleService.
NewXPackWatcherAckWatchService creates a new XPackWatcherAckWatchService.
NewXPackWatcherActivateWatchService creates a new XPackWatcherActivateWatchService.
NewXPackWatcherDeactivateWatchService creates a new XPackWatcherDeactivateWatchService.
NewXPackWatcherDeleteWatchService creates a new XPackWatcherDeleteWatchService.
NewXPackWatcherExecuteWatchService creates a new XPackWatcherExecuteWatchService.
NewXPackWatcherGetWatchService creates a new XPackWatcherGetWatchService.
NewXPackWatcherPutWatchService creates a new XPackWatcherPutWatchService.
NewXPackWatcherRestartService creates a new XPackWatcherRestartService.
NewXPackWatcherStartService creates a new XPackWatcherStartService.
NewXPackWatcherStatsService creates a new XPackWatcherStatsService.
NewXPackWatcherStopService creates a new XPackWatcherStopService.
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).
SetHeaders adds a list of default HTTP headers that will be added to each requests executed by PerformRequest.
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.
Version is the current version of Elastic.

# Variables

ErrBulkItemRetry is returned in BulkProcessor from a worker when a response item needs to be retried.
ErrNoClient is raised when no Elasticsearch node is available.
ErrResponseSize is raised if a response body exceeds the given max body size.
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.
AdjacencyMatrixAggregation returning a form of adjacency matrix.
AggregationBucketAdjacencyMatrix is a multi-bucket aggregation that is returned with a AdjacencyMatrix aggregation.
AggregationBucketCompositeItem is a single bucket of an AggregationBucketCompositeItems structure.
AggregationBucketCompositeItems implements the response structure for a bucket aggregation of type composite.
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.
AggregationBucketKeyedHistogramItems is a bucket aggregation that is returned with a (keyed) 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.
AggregationGeoCentroidMetric is a metric as returned by a GeoCentroid 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.
AggregationScriptedMetric is the value return by a scripted metric aggregation.
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.
AliasesResult is the outcome of calling AliasesService.Do.
AliasesService returns the aliases associated with one or more indices, or the indices associated with one or more aliases, or a combination of those filters.
AliasRemoveAction is an action to remove an alias.
AliasRemoveIndexAction is an action to remove an index during an alias operation.
AliasResult is the outcome of calling Do on AliasService.
AliasService enables users to add or remove an alias.
AllocateEmptyPrimaryAllocationCommand allocates an unassigned empty primary shard to a specific node.
AllocateReplicaAllocationCommand allocates an unassigned replica shard to a specific node.
AllocateStalePrimaryAllocationCommand allocates an unassigned stale primary shard to a specific node.
No description provided by the author
No description provided by the author
No description provided by the author
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.
BucketCountThresholds is used in e.g.
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.
BucketSortAggregation parent pipeline aggregation which sorts the buckets of its 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.
CancelAllocationCommand cancels relocation, or recovery of a given shard on a node.
CardinalityAggregation is a single-value metrics aggregation that calculates an approximate count of distinct values.
CatAliasesResponseRow is a single row in a CatAliasesResponse.
CatAliasesService shows information about currently configured aliases to indices including filter and routing infos.
CatAllocationResponseRow is a single row in a CatAllocationResponse.
CatAllocationService provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
CatCountResponseRow specifies the data returned for one index of a CatCountResponse.
CatCountService provides quick access to the document count of the entire cluster, or individual indices.
CatHealthResponseRow is a single row in a CatHealthResponse.
CatHealthService returns a terse representation of the same information as /_cluster/health.
CatIndicesResponseRow specifies the data returned for one index of a CatIndicesResponse.
CatIndicesService returns the list of indices plus some additional information about them.
CatShardsResponseRow specifies the data returned for one index of a CatShardsResponse.
CatShardsService returns the list of shards plus some additional information about them.
No description provided by the author
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.
ClusterRerouteResponse is the response of ClusterRerouteService.Do.
ClusterRerouteService allows for manual changes to the allocation of individual shards in the cluster.
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
ClusterStatsResponse is the response of ClusterStatsService.Do.
ClusterStatsService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/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.
CompositeAggregation is a multi-bucket values source based aggregation that can be used to calculate unique composite values from source documents.
CompositeAggregationDateHistogramValuesSource is a source for the CompositeAggregation that handles date histograms it works very similar to a date histogram aggregation with slightly different syntax See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html#_date_histogram for details.
CompositeAggregationHistogramValuesSource is a source for the CompositeAggregation that handles histograms it works very similar to a terms histogram with slightly different syntax See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html#_histogram for details.
CompositeAggregationTermsValuesSource is a source for the CompositeAggregation that handles terms it works very similar to a terms aggregation with slightly different syntax See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html#_terms for details.
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.
ContextSuggester is a fast suggester for e.g.
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.
DeleteScriptResponse is the result of deleting a stored script in Elasticsearch.
DeleteScriptService removes a stored script in Elasticsearch.
DeleteService allows to delete a typed JSON document from a specified index based on its id.
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.
DiversifiedSamplerAggregation Like the ‘sampler` aggregation this is a filtering aggregation used to limit any sub aggregations’ processing to a sample of the top-scoring documents.
DocvalueField represents a docvalue field, its name and its format (optional).
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.
ExtendedStatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation.
No description provided by the author
FetchSourceContext enables source filtering, i.e.
FieldCaps contains capabilities of an individual field.
FieldCapsRequest can be used to set up the body to be used in the Field Capabilities API.
FieldCapsResponse contains field capabilities.
FieldCapsService allows retrieving the capabilities of fields among multiple indices.
FieldSort sorts by a given field.
No description provided by the author
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.
FuzzyCompletionSuggesterOptions represents the options for fuzzy completion suggester.
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.
GeoCentroidAggregation is a metric aggregation that computes the weighted centroid from all coordinate values for a Geo-point datatype 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.
GetScriptResponse is the result of getting a stored script from Elasticsearch.
GetScriptService reads a stored script in Elasticsearch.
GetService allows to get a typed JSON document from the index based on its id.
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.
IndexResponse is the result of indexing a document in Elasticsearch.
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
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
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
IndicesAnalyzeService performs the analysis process on a text and returns the tokens breakdown of the text.
IndicesClearCacheResponse is the response of IndicesClearCacheService.Do.
IndicesClearCacheService allows to clear either all caches or specific cached associated with one or more indices.
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.
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.
IndicesSegmentsResponse is the response of IndicesSegmentsService.Do.
IndicesSegmentsService provides low level segments information that a Lucene index (shard level) is built with.
IndicesShardsSyncedFlushResult represents synced flush information about a specific index.
IndicesShardsSyncedFlushResultFailure represents a failure of a synced flush operation.
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.
IndicesSyncedFlushResponse is the outcome of a synched flush call.
IndicesSyncedFlushService performs a normal flush, then adds a generated unique marked (sync_id) to all shards.
IngestDeletePipelineResponse is the response of IngestDeletePipelineService.Do.
IngestDeletePipelineService deletes pipelines by ID.
IngestGetPipeline describes a specific ingest pipeline, its processors etc.
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.
IPRangeAggregation is a range aggregation that is dedicated for IP addresses.
No description provided by the author
JLHScoreSignificanceHeuristic implements the JLH score as described in https://www.elastic.co/guide/en/elasticsearch/reference/6.8/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.
MatchNoneQuery returns no documents.
MatchPhrasePrefixQuery is the same as match_phrase, except that it allows for prefix matches on the last term in the text.
MatchPhraseQuery analyzes the text and creates a phrase query out of the analyzed text.
MatchQuery is a family of queries that accepts text/numerics/dates, analyzes them, and constructs a query.
MatrixMatrixStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents.
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.
MoveAllocationCommand moves a shard from a specific node to another node.
MovFnAggregation, given an ordered series of data, will slice a window across the data and allow the user to specify a custom script that is executed for each window of data.
MultiGetItem is a single document to retrieve via the MgetService.
MultiMatchQuery builds on the MatchQuery to allow multi-field queries.
MultiSearchResult is the outcome of running a multi-search operation.
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.
MultiValuesSourceFieldConfig represents a field configuration used e.g.
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.
NestedHit is a nested innerhit.
NestedQuery allows to query nested objects / docs.
NestedSort is used for fields that are inside a nested object.
NodesInfoNode represents information about a node in the cluster.
NodesInfoNodeHTTP represents HTTP-related information.
NodesInfoNodeIngest represents information about the ingester.
NodesInfoNodeIngestProcessorInfo represents ingest processor info.
NodesInfoNodeJVM represents JVM-related information.
NodesInfoNodeModule represents information about a module.
NodesInfoNodeOS represents OS-specific details about a node.
NodesInfoNodePlugin represents information about a plugin.
NodesInfoNodeProcess represents process-related information.
NodesInfoNodeThreadPool represents information about the thread pool.
NodesInfoNodeThreadPoolSection represents information about a certain type of thread pool, e.g.
NodesInfoNodeTransport represents transport-related information.
NodesInfoNodeTransportProfile represents a transport profile.
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
NumberDecoder uses json.NewDecoder, with UseNumber() enabled, from the Go standard library to decode JSON data.
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/6.8/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
PercentileRanksAggregation See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-percentile-rank-aggregation.html.
PercentilesAggregation is a multi-value metrics aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents.
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.
PerformRequestOptions must be passed into PerformRequest.
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.
PutScriptResponse is the result of saving a stored script in Elasticsearch.
PutScriptService adds or updates a stored script in Elasticsearch.
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.
No description provided by the author
RefreshResult is the outcome of RefreshService.Do.
RefreshService explicitly refreshes one or more indices.
RegexCompletionSuggesterOptions represents the options for regex completion suggester.
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.
RerouteExplanation is returned in ClusterRerouteResponse if the "explain" parameter is set to "true".
No description provided by the author
Response represents a response from Elasticsearch.
RestoreInfo represents information about the restored snapshot.
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 parameters necessary to compile or find in cache and then execute a script.
ScriptedMetricAggregation is a a metric aggregation that executes using scripts to provide a metric output.
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.
SearchHitInnerHits is used for inner hits.
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.
SearchResultCluster holds information about a search response from a cluster.
Search for documents in Elasticsearch.
SearchShardsResponse is the response of SearchShardsService.Do.
No description provided by the author
SearchShardsService returns the indices and shards that a search request would be executed against.
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.
ShardFailure represents details about a failure.
ShardsInfo represents information from a shard.
SignificantTermsAggregation is an aggregation that returns interesting or unusual occurrences of terms in a set.
SignificantTextAggregation returns interesting or unusual occurrences of free-text 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.
Snapshot contains all information about a single snapshot.
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/6.8/modules-snapshots.html.
SnapshotDeleteRepositoryResponse is the response of SnapshotDeleteRepositoryService.Do.
SnapshotDeleteRepositoryService deletes a snapshot repository.
SnapshotDeleteResponse is the response of SnapshotDeleteService.Do.
SnapshotDeleteService deletes a snapshot from a snapshot repository.
SnapshotGetRepositoryService reads a snapshot repository.
SnapshotGetResponse is the response of SnapshotGetService.Do.
SnapshotGetService lists the snapshots on a repository See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
No description provided by the author
No description provided by the author
SnapshotRepositoryMetaData contains all information about a single snapshot repository.
SnapshotRestoreResponse represents the response for SnapshotRestoreService.Do.
SnapshotRestoreService restores a snapshot from a snapshot repository.
SnapshotShardFailure stores information about failures that occurred during shard snapshotting process.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SnapshotStatusService returns information about the status of a snapshot.
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/6.8/search-request-scroll.html.
SortInfo contains information about sorting a field.
SpanFirstQuery spans near the beginning of a field.
SpanNearQuery matches spans which are near one another.
SpanTermQuery matches spans containing a term.
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.
No description provided by the author
SuggesterCategoryMapping provides a mapping for a category context in a suggester.
SuggesterCategoryQuery provides querying a category context in a suggester.
No description provided by the author
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.
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.
TaskInfo represents information about a currently running task.
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).
TermsSetQuery returns any documents that match with at least one or more of the provided terms.
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.
No description provided by the author
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.
ValidateResponse is the response of ValidateService.Do.
ValidateService allows a user to validate a potentially expensive query without executing it.
ValueCountAggregation is a single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents.
WeightedAvgAggregation is a single-value metrics aggregation that computes the weighted average of numeric 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).
WrapperQuery accepts any other query as base64 encoded string.
XPackIlmDeleteLifecycleResponse is the response of XPackIlmDeleteLifecycleService.Do.
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-get-lifecycle.html.
XPackIlmGetLifecycleResponse is the response of XPackIlmGetLifecycleService.Do.
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-get-lifecycle.html.
XPackIlmPutLifecycleSResponse is the response of XPackIlmPutLifecycleService.Do.
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-put-lifecycle.html.
XPackInfoBuild is the xpack build info.
XPackInfoFeatures is the xpack feature info object.
XPackInfoGraph is the xpack graph plugin info.
XPackInfoLicense is the xpack license info.
XPackInfoLogstash is the xpack logstash plugin info.
XPackInfoML is the xpack machine learning plugin info.
XPackInfoMonitoring is the xpack monitoring plugin info.
XPackInfoRollup is the xpack rollup plugin info.
XPackInfoSecurity is the xpack security plugin info.
XPackInfoService retrieves xpack info.
XPackInfoServiceResponse is the response of XPackInfoService.Do.
XPackInfoWatcher is the xpack watcher plugin info.
XPackSecurityApplicationPrivileges is the application privileges object.
XPackSecurityDeleteRoleMappingResponse is the response of XPackSecurityDeleteRoleMappingService.Do.
XPackSecurityDeleteRoleMappingService delete a role mapping by its name.
XPackSecurityDeleteRoleResponse is the response of XPackSecurityDeleteRoleService.Do.
XPackSecurityDeleteRoleService delete a role by its name.
XPackSecurityGetRoleMappingService retrieves a role mapping by its name.
XPackSecurityGetRoleService retrieves a role by its name.
XPackSecurityIndicesPermissions is the indices permission object.
No description provided by the author
No description provided by the author
XPackSecurityPutRoleMappingResponse is the response of XPackSecurityPutRoleMappingService.Do.
XPackSecurityPutRoleMappingService create or update a role mapping by its name.
XPackSecurityPutRoleResponse is the response of XPackSecurityPutRoleService.Do.
XPackSecurityPutRoleService retrieves a role by its name.
XPackSecurityRole is the role object.
XPackSecurityRoleMapping is the role mapping object.
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
XPackWatcherAckWatchResponse is the response of XPackWatcherAckWatchService.Do.
XPackWatcherAckWatchService enables you to manually throttle execution of the watch’s actions.
XPackWatcherAckWatchStatus is the status of a XPackWatcherAckWatchResponse.
XPackWatcherActivateWatchResponse is the response of XPackWatcherActivateWatchService.Do.
XPackWatcherActivateWatchService enables you to activate a currently inactive watch.
XPackWatcherDeactivateWatchResponse is the response of XPackWatcherDeactivateWatchService.Do.
XPackWatcherDeactivateWatchService enables you to deactivate a currently active watch.
XPackWatcherDeleteWatchResponse is the response of XPackWatcherDeleteWatchService.Do.
XPackWatcherDeleteWatchService removes a watch.
XPackWatcherExecuteWatchResponse is the response of XPackWatcherExecuteWatchService.Do.
XPackWatcherExecuteWatchService forces the execution of a stored watch.
XPackWatcherGetWatchResponse is the response of XPackWatcherGetWatchService.Do.
XPackWatcherGetWatchService retrieves a watch by its ID.
XPackWatcherPutWatchResponse is the response of XPackWatcherPutWatchService.Do.
XPackWatcherPutWatchService either registers a new watch in Watcher or update an existing one.
XPackWatcherRestartResponse is the response of XPackWatcherRestartService.Do.
XPackWatcherRestartService stops the starts the watcher service.
XPackWatcherStartResponse is the response of XPackWatcherStartService.Do.
XPackWatcherStartService starts the watcher service if it is not already running.
XPackWatcherStats represents the stats used in XPackWatcherStatsResponse.
XPackWatcherStatsResponse is the response of XPackWatcherStatsService.Do.
XPackWatcherStatsService returns the current watcher metrics.
XPackWatcherStopResponse is the response of XPackWatcherStopService.Do.
XPackWatcherStopService stops the watcher service if it is running.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
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.
AllocationCommand is a command to be executed in a call to Cluster Reroute API.
Backoff allows callers to implement their own Backoff strategy.
BulkableRequest is a generic interface to bulkable requests.
No description provided by the author
CompositeAggregationValuesSource specifies the interface that all implementations for CompositeAggregation's Sources method need to implement.
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.
RerouteDecision is a decision the decider made while rerouting.
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.
CatAliasesResponse is the outcome of CatAliasesService.Do.
CatAllocationResponse is the outcome of CatAllocationService.Do.
CatCountResponse is the outcome of CatCountService.Do.
CatHealthResponse is the outcome of CatHealthService.Do.
CatIndicesResponse is the outcome of CatIndicesService.Do.
CatShardsResponse is the outcome of CatShardsService.Do.
ClientOptionFunc is a function that configures a Client.
DocvalueFields is a slice of DocvalueField instances.
FieldCapsType represents a mapping from type (e.g.
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, and is an adapter to allow the use of ordinary Retry functions.
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.
XPackSecurityGetRoleMappingResponse is the response of XPackSecurityGetRoleMappingService.Do.
XPackSecurityGetRoleResponse is the response of XPackSecurityGetRoleService.Do.