Categorygithub.com/coveo/elasticsearch-client-go
modulepackage
3.0.74+incompatible
Repository: https://github.com/coveo/elasticsearch-client-go.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.v3) 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
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 2.1.1 and want to use Elastic. As listed above, you should use Elastic 3.0. So you first install the stable release of Elastic 3.0 from gopkg.in.

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

You then import it with this import path:

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

Elastic 3.0

Elastic 3.0 targets Elasticsearch 2.0 and later. Elasticsearch 2.0.0 was released on 28th October 2015.

Notice that there are a lot of breaking changes in Elasticsearch 2.0 and we used this as an opportunity to clean up and refactor Elastic as well.

Elastic 2.0

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

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. 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 client
client, err := elastic.NewClient()
if err != nil {
    // Handle error
    panic(err)
}

// Create an index
_, err = client.CreateIndex("twitter").Do()
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()
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()                // 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
            panic(err)
        }

        // 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()
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
  • Search Shards API
  • Suggesters
    • Term Suggester
    • Phrase Suggester
    • Completion Suggester
    • Context Suggester
  • Multi Search API
  • Count API
  • Search Exists API
  • Validate API
  • Explain API
  • Percolator 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
  • Aggregation Metadata

Indices APIs

  • Create Index
  • Delete Index
  • Get Index
  • Indices Exists
  • Open / Close Index
  • Put Mapping
  • Get Mapping
  • Get Field Mapping
  • Types Exists
  • Index Aliases
  • Update Indices Settings
  • Get Settings
  • Analyze
  • Index Templates
  • Warmers
  • Indices Stats
  • Indices Segments
  • Indices Recovery
  • Clear Cache
  • Flush
  • Refresh
  • Optimize
  • Shadow Replica Indices
  • 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 nodes
  • cat pending tasks
  • cat plugins
  • cat recovery
  • cat thread pool
  • cat shards
  • cat segments

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

Query DSL

  • Match All Query
  • Inner hits
  • Full text queries
    • Match 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
    • Missing 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
    • And Query (deprecated)
    • Not Query
    • Or Query (deprecated)
    • Filtered Query (deprecated)
    • Limit Query (deprecated)
  • Joining queries
    • Nested Query
    • Has Child Query
    • Has Parent 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
  • 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

Modules

  • Snapshot and Restore

Sorting

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

Scan

Scrolling through documents (e.g. search_type=scan) are implemented via the Scroll and Scan services. The ClearScroll API is implemented as well.

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 and backoff by Cenk Altı.

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 uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).

# Functions

CopyToTargetIndex returns a ReindexerFunc that copies the SearchHit's _source, _parent, and _routing attributes into the targetIndex.
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.
IsNotFound returns true if the given error indicates that Elasticsearch returned HTTP status 404.
IsTimeout returns true if the given error indicates that Elasticsearch returned HTTP status 408.
NewAliasAddAction returns an action to add an alias.
No description provided by the author
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.
NewClusterHealthService creates a new ClusterHealthService.
NewClusterStateService creates a new ClusterStateService.
NewClusterStatsService creates a new ClusterStatsService.
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
No description provided by the author
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.
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.
NewIndicesDeleteWarmerService creates a new IndicesDeleteWarmerService.
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.
NewIndicesGetMappingService creates a new IndicesGetMappingService.
NewIndicesGetService creates a new IndicesGetService.
NewIndicesGetSettingsService creates a new IndicesGetSettingsService.
NewIndicesGetTemplateService creates a new IndicesGetTemplateService.
NewIndicesGetWarmerService creates a new IndicesGetWarmerService.
NewIndicesOpenService creates and initializes a new IndicesOpenService.
NewIndicesPutMappingService creates a new IndicesPutMappingService.
NewIndicesPutSettingsService creates a new IndicesPutSettingsService.
NewIndicesPutTemplateService creates a new IndicesPutTemplateService.
NewIndicesPutWarmerService creates a new IndicesPutWarmerService.
NewIndicesQuery creates and initializes a new indices query.
NewIndicesStatsService creates a new IndicesStatsService.
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.
No description provided by the author
NewMaxBucketAggregation creates and initializes a new MaxBucketAggregation.
No description provided by the author
No description provided by the author
NewMinBucketAggregation creates and initializes a new MinBucketAggregation.
No description provided by the author
NewMissingQuery creates and initializes a new MissingQuery.
NewMoreLikeThisQuery creates and initializes a new MoreLikeThisQuery.
NewMoreLikeThisQueryItem creates and initializes a MoreLikeThisQueryItem.
NewMovAvgAggregation creates and initializes a new MovAvgAggregation.
No description provided by the author
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.
NewNotQuery creates and initializes a new NotQuery.
No description provided by the author
NewPercentageScoreSignificanceHeuristic initializes a new instance of PercentageScoreSignificanceHeuristic.
No description provided by the author
No description provided by the author
NewPercolateService creates a new PercolateService.
Creates a new phrase suggester.
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.
No description provided by the author
NewRegexpQuery creates and initializes a new RegexpQuery.
NewReindexDestination returns a new ReindexDestination.
NewReindexer returns a new Reindexer.
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
newScanCursor returns a new initialized instance of scanCursor.
NewScanService creates a new service to iterate through the results of a query.
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.
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
No description provided by the author
No description provided by the author
NewSumBucketAggregation creates and initializes a new SumBucketAggregation.
NewTasksCancelService creates a new TasksCancelService.
NewTasksListService creates a new TasksListService.
NewTemplateQuery creates and initializes a new TemplateQuery.
NewTermQuery creates and initializes a new TermQuery.
No description provided by the author
NewTermsQuery creates and initializes a new TermsQuery.
Creates a new term suggester.
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.
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).
SendGetBodyAs 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.
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

End of stream (or scan).
ErrNoClient is raised when no Elasticsearch node is available.
No ScrollId.
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

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.
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.
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
No description provided by the author
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 bulk request to remove a document from Elasticsearch.
BulkIndexRequest is a bulk 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.
Bulk 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 http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/cluster-stats.html.
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.
DeleteByQueryResult is the outcome of executing Do with DeleteByQueryService.
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.
DeleteTemplateResponse is the response of DeleteTemplateService.Do.
DeleteTemplateService deletes a search template.
DeleteWarmerResponse is the response of IndicesDeleteWarmerService.Do.
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
No description provided by the author
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.
IndexDeleteByQueryResult is the result of a delete-by-query for a specific index.
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.
IndicesDeleteWarmerService allows to delete a warmer.
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.
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.
IndicesGetWarmerService allows to get the definition of a warmer for a specific index (or alias, or several indices) based on its name.
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.
IndicesPutWarmerService allows to register a warmer.
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.
IndicesStatsResponse is the response of IndicesStatsService.Do.
IndicesStatsService provides stats on various metrics of one or more indices.
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/current/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.
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).
No description provided by the author
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).
MissingQuery returns documents that have only null values or no value in the original field.
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
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
NotQuery filters out matched documents using a query.
No description provided by the author
No description provided by the author
PercentageScoreSignificanceHeuristic implements the algorithm described in https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
PercentileRanksAggregation See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-rank-aggregation.html.
PercentilesAggregation See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-aggregation.html.
PercolateMatch returns a single match in a PercolateResponse.
PercolateResponse is the response of PercolateService.Do.
PercolateService is documented at http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/search-percolate.html.
For more details, see http://www.elasticsearch.org/guide/reference/api/search/phrase-suggest/.
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).
PutMappingResponse is the response of IndicesPutMappingService.Do.
PutTemplateResponse is the response of PutTemplateService.Do.
PutTemplateService creates or updates a search template.
PutWarmerResponse is the response of IndicesPutWarmerService.Do.
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
No description provided by the author
RegexpQuery allows you to use regular expression term queries.
ReindexDestination is the destination of a Reindex API call.
Reindexer simplifies the process of reindexing an index.
ReindexerResponse is returned from the Do func in a Reindexer.
ReindexResponse is the response of ReindexService.Do.
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.
scanCursor represents a single page of results from an Elasticsearch Scan operation.
ScanService manages a cursor through documents in Elasticsearch.
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.
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.
SortByDoc sorts by the "_doc" field, as described in https://www.elastic.co/guide/en/elasticsearch/reference/master/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.
No description provided by the author
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.
TaskInfo represents information about a currently running task.
No description provided by the author
TasksCancelService can cancel long-running tasks.
TasksListResponse is the response of TasksListService.Do.
TasksListService retrieves the list of currently executing tasks on one ore more nodes in the cluster.
TemplateQuery is a query that accepts a query template and a map of key/value pairs to fill in template parameters.
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.
No description provided by the author
TermsQuery filters documents that have fields that match any of the provided terms (not analyzed).
For more details, see http://www.elasticsearch.org/guide/reference/api/search/term-suggest/.
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.
UpdateByQueryResponse is the response of UpdateByQueryService.Do.
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.
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.
RawStringQuery can be used to treat a string representation of an ES query as a Query.
A ReindexerFunc receives each hit from the sourceIndex.
ReindexerProgressFunc is a callback that can be used with Reindexer to report progress while reindexing data.
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.
SnifferCallback defines the protocol for sniffing decisions.
No description provided by the author