Documentation ¶
Overview ¶
Package elastic provides an interface to the Elasticsearch server (https://www.elastic.co/products/elasticsearch).
The first thing you do is to create a Client. If you have Elasticsearch installed and running with its default settings (i.e. available at http://127.0.0.1:9200), all you need to do is:
client, err := elastic.NewClient() if err != nil { // Handle error }
If your Elasticsearch server is running on a different IP and/or port, just provide a URL to NewClient:
// Create a client and connect to http://192.168.2.10:9201 client, err := elastic.NewClient(elastic.SetURL("http://192.168.2.10:9201")) if err != nil { // Handle error }
You can pass many more configuration parameters to NewClient. Review the documentation of NewClient for more information.
If no Elasticsearch server is available, services will fail when creating a new request and will return ErrNoClient.
A Client provides services. The services usually come with a variety of methods to prepare the query and a Do function to execute it against the Elasticsearch REST interface and return a response. Here is an example of the IndexExists service that checks if a given index already exists.
exists, err := client.IndexExists("twitter").Do(context.Background()) if err != nil { // Handle error } if !exists { // Index does not exist yet. }
Look up the documentation for Client to get an idea of the services provided and what kinds of responses you get when executing the Do function of a service. Also see the wiki on Github for more details.
Copyright 2012-present Oliver Eilhard. All rights reserved. Use of this source code is governed by a MIT-license. See http://olivere.mit-license.org/license.txt for details.
Example ¶
package main import ( "context" "encoding/json" "fmt" "log" "os" "reflect" "time" "github.com/olivere/elastic" ) type Tweet struct { User string `json:"user"` Message string `json:"message"` Retweets int `json:"retweets"` Image string `json:"image,omitempty"` Created time.Time `json:"created,omitempty"` Tags []string `json:"tags,omitempty"` Location string `json:"location,omitempty"` Suggest *elastic.SuggestField `json:"suggest_field,omitempty"` } func main() { errorlog := log.New(os.Stdout, "APP ", log.LstdFlags) // Obtain a client. You can also provide your own HTTP client here. client, err := elastic.NewClient(elastic.SetErrorLog(errorlog)) // Trace request and response details like this // client, err := elastic.NewClient(elastic.SetTraceLog(log.New(os.Stdout, "", 0))) if err != nil { // Handle error panic(err) } // Ping the Elasticsearch server to get e.g. the version number info, code, err := client.Ping("http://127.0.0.1:9200").Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Elasticsearch returned with code %d and version %s\n", code, info.Version.Number) // Getting the ES version number is quite common, so there's a shortcut esversion, err := client.ElasticsearchVersion("http://127.0.0.1:9200") if err != nil { // Handle error panic(err) } fmt.Printf("Elasticsearch version %s\n", esversion) // Use the IndexExists service to check if a specified index exists. exists, err := client.IndexExists("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if !exists { // Create a new index. mapping := ` { "settings":{ "number_of_shards":1, "number_of_replicas":0 }, "mappings":{ "doc":{ "properties":{ "user":{ "type":"keyword" }, "message":{ "type":"text", "store": true, "fielddata": true }, "retweets":{ "type":"long" }, "tags":{ "type":"keyword" }, "location":{ "type":"geo_point" }, "suggest_field":{ "type":"completion" } } } } } ` createIndex, err := client.CreateIndex("twitter").Body(mapping).IncludeTypeName(true).Do(context.Background()) if err != nil { // Handle error panic(err) } if !createIndex.Acknowledged { // Not acknowledged } } // Index a tweet (using JSON serialization) tweet1 := Tweet{User: "olivere", Message: "Take Five", Retweets: 0} put1, err := client.Index(). Index("twitter"). Type("doc"). Id("1"). BodyJson(tweet1). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Indexed tweet %s to index %s, type %s\n", put1.Id, put1.Index, put1.Type) // Index a second tweet (by string) tweet2 := `{"user" : "olivere", "message" : "It's a Raggy Waltz"}` put2, err := client.Index(). Index("twitter"). Type("doc"). Id("2"). BodyString(tweet2). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("Indexed tweet %s to index %s, type %s\n", put2.Id, put2.Index, put2.Type) // Get tweet with specified ID get1, err := client.Get(). Index("twitter"). Type("doc"). Id("1"). Do(context.Background()) if err != nil { switch { case elastic.IsNotFound(err): panic(fmt.Sprintf("Document not found: %v", err)) case elastic.IsTimeout(err): panic(fmt.Sprintf("Timeout retrieving document: %v", err)) case elastic.IsConnErr(err): panic(fmt.Sprintf("Connection problem: %v", err)) default: // Some other kind of error panic(err) } } fmt.Printf("Got document %s in version %d from index %s, type %s\n", get1.Id, get1.Version, get1.Index, get1.Type) // Flush to make sure the documents got written. _, err = client.Flush().Index("twitter").Do(context.Background()) if err != nil { panic(err) } // Search with a term query termQuery := elastic.NewTermQuery("user", "olivere") searchResult, err := client.Search(). Index("twitter"). // search in index "twitter" Query(termQuery). // specify the query Sort("user", true). // sort by "user" field, ascending From(0).Size(10). // take documents 0-9 Pretty(true). // pretty print request and response JSON Do(context.Background()) // execute if err != nil { // Handle error panic(err) } // searchResult is of type SearchResult and returns hits, suggestions, // and all kinds of other information from Elasticsearch. fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis) // Each is a convenience function that iterates over hits in a search result. // It makes sure you don't need to check for nil values in the response. // However, it ignores errors in serialization. If you want full control // over iterating the hits, see below. var ttyp Tweet for _, item := range searchResult.Each(reflect.TypeOf(ttyp)) { t := item.(Tweet) fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } // TotalHits is another convenience function that works even when something goes wrong. fmt.Printf("Found a total of %d tweets\n", searchResult.TotalHits()) // Here's how you iterate through results with full control over each step. if searchResult.Hits.TotalHits > 0 { fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits) // Iterate through results for _, hit := range searchResult.Hits.Hits { // hit.Index contains the name of the index // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}). var t Tweet err := json.Unmarshal(*hit.Source, &t) if err != nil { // Deserialization failed } // Work with tweet fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } } else { // No hits fmt.Print("Found no tweets\n") } // Update a tweet by the update API of Elasticsearch. // We just increment the number of retweets. script := elastic.NewScript("ctx._source.retweets += params.num").Param("num", 1) update, err := client.Update().Index("twitter").Type("doc").Id("1"). Script(script). Upsert(map[string]interface{}{"retweets": 0}). Do(context.Background()) if err != nil { // Handle error panic(err) } fmt.Printf("New version of tweet %q is now %d", update.Id, update.Version) // ... // Delete an index. deleteIndex, err := client.DeleteIndex("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if !deleteIndex.Acknowledged { // Not acknowledged } }
Output:
Index ¶
- Constants
- Variables
- func IsConflict(err interface{}) bool
- func IsConnErr(err error) bool
- func IsContextErr(err error) bool
- func IsForbidden(err interface{}) bool
- func IsNotFound(err interface{}) bool
- func IsStatusCode(err interface{}, code int) bool
- func IsTimeout(err interface{}) bool
- func Retry(o Operation, b Backoff) error
- func RetryNotify(operation Operation, b Backoff, notify Notify) error
- type AcknowledgedResponse
- type AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Filters(name string, filter Query) *AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Meta(metaData map[string]interface{}) *AdjacencyMatrixAggregation
- func (a *AdjacencyMatrixAggregation) Source() (interface{}, error)
- func (a *AdjacencyMatrixAggregation) SubAggregation(name string, subAggregation Aggregation) *AdjacencyMatrixAggregation
- type Aggregation
- type AggregationBucketAdjacencyMatrix
- type AggregationBucketCompositeItem
- type AggregationBucketCompositeItems
- type AggregationBucketFilters
- type AggregationBucketHistogramItem
- type AggregationBucketHistogramItems
- type AggregationBucketKeyItem
- type AggregationBucketKeyItems
- type AggregationBucketKeyedHistogramItems
- type AggregationBucketKeyedRangeItems
- type AggregationBucketRangeItem
- type AggregationBucketRangeItems
- type AggregationBucketSignificantTerm
- type AggregationBucketSignificantTerms
- type AggregationExtendedStatsMetric
- type AggregationGeoBoundsMetric
- type AggregationGeoCentroidMetric
- type AggregationMatrixStats
- type AggregationMatrixStatsField
- type AggregationPercentilesMetric
- type AggregationPipelineBucketMetricValue
- type AggregationPipelineDerivative
- type AggregationPipelinePercentilesMetric
- type AggregationPipelineSimpleValue
- type AggregationPipelineStatsMetric
- type AggregationScriptedMetric
- type AggregationSingleBucket
- type AggregationStatsMetric
- type AggregationTopHitsMetric
- type AggregationValueMetric
- type Aggregations
- func (a Aggregations) AdjacencyMatrix(name string) (*AggregationBucketAdjacencyMatrix, bool)
- func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) AvgBucket(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Composite(name string) (*AggregationBucketCompositeItems, bool)
- func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool)
- func (a Aggregations) DiversifiedSampler(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool)
- func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool)
- func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool)
- func (a Aggregations) GeoCentroid(name string) (*AggregationGeoCentroidMetric, bool)
- func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
- func (a Aggregations) IPRange(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) KeyedDateHistogram(name string) (*AggregationBucketKeyedHistogramItems, bool)
- func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
- func (a Aggregations) MatrixStats(name string) (*AggregationMatrixStats, bool)
- func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
- func (a Aggregations) Min(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) MinBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
- func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool)deprecated
- func (a Aggregations) MovFn(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool)
- func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool)
- func (a Aggregations) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool)
- func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
- func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) Sampler(name string) (*AggregationSingleBucket, bool)
- func (a Aggregations) ScriptedMetric(name string) (*AggregationScriptedMetric, bool)
- func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool)
- func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool)
- func (a Aggregations) StatsBucket(name string) (*AggregationPipelineStatsMetric, bool)
- func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool)
- func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
- func (a Aggregations) TopHits(name string) (*AggregationTopHitsMetric, bool)
- func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
- func (a Aggregations) WeightedAvg(name string) (*AggregationValueMetric, bool)
- type AliasAction
- type AliasAddAction
- func (a *AliasAddAction) Filter(filter Query) *AliasAddAction
- func (a *AliasAddAction) Index(index ...string) *AliasAddAction
- func (a *AliasAddAction) IndexRouting(routing string) *AliasAddAction
- func (a *AliasAddAction) IsWriteIndex(flag bool) *AliasAddAction
- func (a *AliasAddAction) Routing(routing string) *AliasAddAction
- func (a *AliasAddAction) SearchRouting(routing ...string) *AliasAddAction
- func (a *AliasAddAction) Source() (interface{}, error)
- func (a *AliasAddAction) Validate() error
- type AliasRemoveAction
- type AliasRemoveIndexAction
- type AliasResult
- type AliasService
- func (s *AliasService) Action(action ...AliasAction) *AliasService
- func (s *AliasService) Add(indexName string, aliasName string) *AliasService
- func (s *AliasService) AddWithFilter(indexName string, aliasName string, filter Query) *AliasService
- func (s *AliasService) Do(ctx context.Context) (*AliasResult, error)
- func (s *AliasService) ErrorTrace(errorTrace bool) *AliasService
- func (s *AliasService) FilterPath(filterPath ...string) *AliasService
- func (s *AliasService) Header(name string, value string) *AliasService
- func (s *AliasService) Headers(headers http.Header) *AliasService
- func (s *AliasService) Human(human bool) *AliasService
- func (s *AliasService) Pretty(pretty bool) *AliasService
- func (s *AliasService) Remove(indexName string, aliasName string) *AliasService
- type AliasesResult
- type AliasesService
- func (s *AliasesService) Alias(alias ...string) *AliasesService
- func (s *AliasesService) Do(ctx context.Context) (*AliasesResult, error)
- func (s *AliasesService) ErrorTrace(errorTrace bool) *AliasesService
- func (s *AliasesService) FilterPath(filterPath ...string) *AliasesService
- func (s *AliasesService) Header(name string, value string) *AliasesService
- func (s *AliasesService) Headers(headers http.Header) *AliasesService
- func (s *AliasesService) Human(human bool) *AliasesService
- func (s *AliasesService) Index(index ...string) *AliasesService
- func (s *AliasesService) Pretty(pretty bool) *AliasesService
- type AllocateEmptyPrimaryAllocationCommand
- type AllocateReplicaAllocationCommand
- type AllocateStalePrimaryAllocationCommand
- type AllocationCommand
- type AllocationId
- type AnalyzeToken
- type AnalyzeTokenList
- type AvgAggregation
- func (a *AvgAggregation) Field(field string) *AvgAggregation
- func (a *AvgAggregation) Format(format string) *AvgAggregation
- func (a *AvgAggregation) Meta(metaData map[string]interface{}) *AvgAggregation
- func (a *AvgAggregation) Missing(missing interface{}) *AvgAggregation
- func (a *AvgAggregation) Script(script *Script) *AvgAggregation
- func (a *AvgAggregation) Source() (interface{}, error)
- func (a *AvgAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgAggregation
- type AvgBucketAggregation
- func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapInsertZeros() *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapPolicy(gapPolicy string) *AvgBucketAggregation
- func (a *AvgBucketAggregation) GapSkip() *AvgBucketAggregation
- func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation
- func (a *AvgBucketAggregation) Source() (interface{}, error)
- type Backoff
- type BackoffFunc
- type BackoffRetrier
- type BoolQuery
- func (q *BoolQuery) AdjustPureNegative(adjustPureNegative bool) *BoolQuery
- func (q *BoolQuery) Boost(boost float64) *BoolQuery
- func (q *BoolQuery) Filter(filters ...Query) *BoolQuery
- func (q *BoolQuery) MinimumNumberShouldMatch(minimumNumberShouldMatch int) *BoolQuery
- func (q *BoolQuery) MinimumShouldMatch(minimumShouldMatch string) *BoolQuery
- func (q *BoolQuery) Must(queries ...Query) *BoolQuery
- func (q *BoolQuery) MustNot(queries ...Query) *BoolQuery
- func (q *BoolQuery) QueryName(queryName string) *BoolQuery
- func (q *BoolQuery) Should(queries ...Query) *BoolQuery
- func (q *BoolQuery) Source() (interface{}, error)
- type BoostingQuery
- func (q *BoostingQuery) Boost(boost float64) *BoostingQuery
- func (q *BoostingQuery) Negative(negative Query) *BoostingQuery
- func (q *BoostingQuery) NegativeBoost(negativeBoost float64) *BoostingQuery
- func (q *BoostingQuery) Positive(positive Query) *BoostingQuery
- func (q *BoostingQuery) Source() (interface{}, error)
- type BucketCountThresholds
- type BucketScriptAggregation
- func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapInsertZeros() *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapPolicy(gapPolicy string) *BucketScriptAggregation
- func (a *BucketScriptAggregation) GapSkip() *BucketScriptAggregation
- func (a *BucketScriptAggregation) Meta(metaData map[string]interface{}) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Script(script *Script) *BucketScriptAggregation
- func (a *BucketScriptAggregation) Source() (interface{}, error)
- type BucketSelectorAggregation
- func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapInsertZeros() *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapPolicy(gapPolicy string) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) GapSkip() *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Meta(metaData map[string]interface{}) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Script(script *Script) *BucketSelectorAggregation
- func (a *BucketSelectorAggregation) Source() (interface{}, error)
- type BucketSortAggregation
- func (a *BucketSortAggregation) From(from int) *BucketSortAggregation
- func (a *BucketSortAggregation) GapInsertZeros() *BucketSortAggregation
- func (a *BucketSortAggregation) GapPolicy(gapPolicy string) *BucketSortAggregation
- func (a *BucketSortAggregation) GapSkip() *BucketSortAggregation
- func (a *BucketSortAggregation) Meta(meta map[string]interface{}) *BucketSortAggregation
- func (a *BucketSortAggregation) Size(size int) *BucketSortAggregation
- func (a *BucketSortAggregation) Sort(field string, ascending bool) *BucketSortAggregation
- func (a *BucketSortAggregation) SortWithInfo(info SortInfo) *BucketSortAggregation
- func (a *BucketSortAggregation) Source() (interface{}, error)
- type BulkAfterFunc
- type BulkBeforeFunc
- type BulkDeleteRequest
- func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkDeleteRequest
- func (r *BulkDeleteRequest) IfSeqNo(ifSeqNo int64) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Index(index string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Parent(parent string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Routing(routing string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Source() ([]string, error)
- func (r *BulkDeleteRequest) String() string
- func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest
- func (r *BulkDeleteRequest) UseEasyJSON(enable bool) *BulkDeleteRequest
- func (r *BulkDeleteRequest) Version(version int64) *BulkDeleteRequest
- func (r *BulkDeleteRequest) VersionType(versionType string) *BulkDeleteRequest
- type BulkIndexByScrollResponse
- type BulkIndexRequest
- func (r *BulkIndexRequest) Doc(doc interface{}) *BulkIndexRequest
- func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest
- func (r *BulkIndexRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkIndexRequest
- func (r *BulkIndexRequest) IfSeqNo(ifSeqNo int64) *BulkIndexRequest
- func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest
- func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest
- func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest
- func (r *BulkIndexRequest) Pipeline(pipeline string) *BulkIndexRequest
- func (r *BulkIndexRequest) RetryOnConflict(retryOnConflict int) *BulkIndexRequest
- func (r *BulkIndexRequest) Routing(routing string) *BulkIndexRequest
- func (r *BulkIndexRequest) Source() ([]string, error)
- func (r *BulkIndexRequest) String() string
- func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest
- func (r *BulkIndexRequest) UseEasyJSON(enable bool) *BulkIndexRequest
- func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest
- func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest
- type BulkProcessor
- type BulkProcessorService
- func (s *BulkProcessorService) After(fn BulkAfterFunc) *BulkProcessorService
- func (s *BulkProcessorService) Backoff(backoff Backoff) *BulkProcessorService
- func (s *BulkProcessorService) Before(fn BulkBeforeFunc) *BulkProcessorService
- func (s *BulkProcessorService) BulkActions(bulkActions int) *BulkProcessorService
- func (s *BulkProcessorService) BulkSize(bulkSize int) *BulkProcessorService
- func (s *BulkProcessorService) Do(ctx context.Context) (*BulkProcessor, error)
- func (s *BulkProcessorService) FlushInterval(interval time.Duration) *BulkProcessorService
- func (s *BulkProcessorService) Name(name string) *BulkProcessorService
- func (s *BulkProcessorService) RetryItemStatusCodes(retryItemStatusCodes ...int) *BulkProcessorService
- func (s *BulkProcessorService) Stats(wantStats bool) *BulkProcessorService
- func (s *BulkProcessorService) Workers(num int) *BulkProcessorService
- type BulkProcessorStats
- type BulkProcessorWorkerStats
- type BulkResponse
- func (r *BulkResponse) ByAction(action string) []*BulkResponseItem
- func (r *BulkResponse) ById(id string) []*BulkResponseItem
- func (r *BulkResponse) Created() []*BulkResponseItem
- func (r *BulkResponse) Deleted() []*BulkResponseItem
- func (r *BulkResponse) Failed() []*BulkResponseItem
- func (r *BulkResponse) Indexed() []*BulkResponseItem
- func (r *BulkResponse) Succeeded() []*BulkResponseItem
- func (r *BulkResponse) Updated() []*BulkResponseItem
- type BulkResponseItem
- type BulkService
- func (s *BulkService) Add(requests ...BulkableRequest) *BulkService
- func (s *BulkService) Do(ctx context.Context) (*BulkResponse, error)
- func (s *BulkService) ErrorTrace(errorTrace bool) *BulkService
- func (s *BulkService) EstimatedSizeInBytes() int64
- func (s *BulkService) FilterPath(filterPath ...string) *BulkService
- func (s *BulkService) Header(name string, value string) *BulkService
- func (s *BulkService) Headers(headers http.Header) *BulkService
- func (s *BulkService) Human(human bool) *BulkService
- func (s *BulkService) Index(index string) *BulkService
- func (s *BulkService) NumberOfActions() int
- func (s *BulkService) Pipeline(pipeline string) *BulkService
- func (s *BulkService) Pretty(pretty bool) *BulkService
- func (s *BulkService) Refresh(refresh string) *BulkService
- func (s *BulkService) Reset()
- func (s *BulkService) Retrier(retrier Retrier) *BulkService
- func (s *BulkService) Routing(routing string) *BulkService
- func (s *BulkService) SetDumpConfig(config DumpConfig) *BulkService
- func (s *BulkService) Timeout(timeout string) *BulkService
- func (s *BulkService) Type(typ string) *BulkService
- func (s *BulkService) WaitForActiveShards(waitForActiveShards string) *BulkService
- type BulkUpdateRequest
- func (r *BulkUpdateRequest) DetectNoop(detectNoop bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Doc(doc interface{}) *BulkUpdateRequest
- func (r *BulkUpdateRequest) DocAsUpsert(docAsUpsert bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Id(id string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkUpdateRequest
- func (r *BulkUpdateRequest) IfSeqNo(ifSeqNo int64) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Index(index string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Parent(parent string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) RetryOnConflict(retryOnConflict int) *BulkUpdateRequest
- func (r *BulkUpdateRequest) ReturnSource(source bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Routing(routing string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest
- func (r *BulkUpdateRequest) ScriptedUpsert(upsert bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Source() ([]string, error)
- func (r *BulkUpdateRequest) String() string
- func (r *BulkUpdateRequest) Type(typ string) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Upsert(doc interface{}) *BulkUpdateRequest
- func (r *BulkUpdateRequest) UseEasyJSON(enable bool) *BulkUpdateRequest
- func (r *BulkUpdateRequest) Version(version int64) *BulkUpdateRequest
- func (r *BulkUpdateRequest) VersionType(versionType string) *BulkUpdateRequest
- type BulkableRequest
- type CancelAllocationCommand
- type CandidateGenerator
- type CardinalityAggregation
- func (a *CardinalityAggregation) Field(field string) *CardinalityAggregation
- func (a *CardinalityAggregation) Format(format string) *CardinalityAggregation
- func (a *CardinalityAggregation) Meta(metaData map[string]interface{}) *CardinalityAggregation
- func (a *CardinalityAggregation) Missing(missing interface{}) *CardinalityAggregation
- func (a *CardinalityAggregation) PrecisionThreshold(threshold int64) *CardinalityAggregation
- func (a *CardinalityAggregation) Rehash(rehash bool) *CardinalityAggregation
- func (a *CardinalityAggregation) Script(script *Script) *CardinalityAggregation
- func (a *CardinalityAggregation) Source() (interface{}, error)
- func (a *CardinalityAggregation) SubAggregation(name string, subAggregation Aggregation) *CardinalityAggregation
- type CatAliasesResponse
- type CatAliasesResponseRow
- type CatAliasesService
- func (s *CatAliasesService) Alias(alias ...string) *CatAliasesService
- func (s *CatAliasesService) Columns(columns ...string) *CatAliasesService
- func (s *CatAliasesService) Do(ctx context.Context) (CatAliasesResponse, error)
- func (s *CatAliasesService) ErrorTrace(errorTrace bool) *CatAliasesService
- func (s *CatAliasesService) FilterPath(filterPath ...string) *CatAliasesService
- func (s *CatAliasesService) Header(name string, value string) *CatAliasesService
- func (s *CatAliasesService) Headers(headers http.Header) *CatAliasesService
- func (s *CatAliasesService) Human(human bool) *CatAliasesService
- func (s *CatAliasesService) Local(local bool) *CatAliasesService
- func (s *CatAliasesService) MasterTimeout(masterTimeout string) *CatAliasesService
- func (s *CatAliasesService) Pretty(pretty bool) *CatAliasesService
- func (s *CatAliasesService) Sort(fields ...string) *CatAliasesService
- type CatAllocationResponse
- type CatAllocationResponseRow
- type CatAllocationService
- func (s *CatAllocationService) Bytes(bytes string) *CatAllocationService
- func (s *CatAllocationService) Columns(columns ...string) *CatAllocationService
- func (s *CatAllocationService) Do(ctx context.Context) (CatAllocationResponse, error)
- func (s *CatAllocationService) ErrorTrace(errorTrace bool) *CatAllocationService
- func (s *CatAllocationService) FilterPath(filterPath ...string) *CatAllocationService
- func (s *CatAllocationService) Header(name string, value string) *CatAllocationService
- func (s *CatAllocationService) Headers(headers http.Header) *CatAllocationService
- func (s *CatAllocationService) Human(human bool) *CatAllocationService
- func (s *CatAllocationService) Local(local bool) *CatAllocationService
- func (s *CatAllocationService) MasterTimeout(masterTimeout string) *CatAllocationService
- func (s *CatAllocationService) NodeID(nodes ...string) *CatAllocationService
- func (s *CatAllocationService) Pretty(pretty bool) *CatAllocationService
- func (s *CatAllocationService) Sort(fields ...string) *CatAllocationService
- type CatCountResponse
- type CatCountResponseRow
- type CatCountService
- func (s *CatCountService) Columns(columns ...string) *CatCountService
- func (s *CatCountService) Do(ctx context.Context) (CatCountResponse, error)
- func (s *CatCountService) ErrorTrace(errorTrace bool) *CatCountService
- func (s *CatCountService) FilterPath(filterPath ...string) *CatCountService
- func (s *CatCountService) Header(name string, value string) *CatCountService
- func (s *CatCountService) Headers(headers http.Header) *CatCountService
- func (s *CatCountService) Human(human bool) *CatCountService
- func (s *CatCountService) Index(index ...string) *CatCountService
- func (s *CatCountService) Local(local bool) *CatCountService
- func (s *CatCountService) MasterTimeout(masterTimeout string) *CatCountService
- func (s *CatCountService) Pretty(pretty bool) *CatCountService
- func (s *CatCountService) Sort(fields ...string) *CatCountService
- type CatHealthResponse
- type CatHealthResponseRow
- type CatHealthService
- func (s *CatHealthService) Columns(columns ...string) *CatHealthService
- func (s *CatHealthService) DisableTimestamping(disable bool) *CatHealthService
- func (s *CatHealthService) Do(ctx context.Context) (CatHealthResponse, error)
- func (s *CatHealthService) ErrorTrace(errorTrace bool) *CatHealthService
- func (s *CatHealthService) FilterPath(filterPath ...string) *CatHealthService
- func (s *CatHealthService) Header(name string, value string) *CatHealthService
- func (s *CatHealthService) Headers(headers http.Header) *CatHealthService
- func (s *CatHealthService) Human(human bool) *CatHealthService
- func (s *CatHealthService) Local(local bool) *CatHealthService
- func (s *CatHealthService) MasterTimeout(masterTimeout string) *CatHealthService
- func (s *CatHealthService) Pretty(pretty bool) *CatHealthService
- func (s *CatHealthService) Sort(fields ...string) *CatHealthService
- type CatIndicesResponse
- type CatIndicesResponseRow
- type CatIndicesService
- func (s *CatIndicesService) Bytes(bytes string) *CatIndicesService
- func (s *CatIndicesService) Columns(columns ...string) *CatIndicesService
- func (s *CatIndicesService) Do(ctx context.Context) (CatIndicesResponse, error)
- func (s *CatIndicesService) ErrorTrace(errorTrace bool) *CatIndicesService
- func (s *CatIndicesService) FilterPath(filterPath ...string) *CatIndicesService
- func (s *CatIndicesService) Header(name string, value string) *CatIndicesService
- func (s *CatIndicesService) Headers(headers http.Header) *CatIndicesService
- func (s *CatIndicesService) Health(healthState string) *CatIndicesService
- func (s *CatIndicesService) Human(human bool) *CatIndicesService
- func (s *CatIndicesService) Index(index string) *CatIndicesService
- func (s *CatIndicesService) Local(local bool) *CatIndicesService
- func (s *CatIndicesService) MasterTimeout(masterTimeout string) *CatIndicesService
- func (s *CatIndicesService) Pretty(pretty bool) *CatIndicesService
- func (s *CatIndicesService) PrimaryOnly(primaryOnly bool) *CatIndicesService
- func (s *CatIndicesService) Sort(fields ...string) *CatIndicesService
- type CatShardsResponse
- type CatShardsResponseRow
- type CatShardsService
- func (s *CatShardsService) Bytes(bytes string) *CatShardsService
- func (s *CatShardsService) Columns(columns ...string) *CatShardsService
- func (s *CatShardsService) Do(ctx context.Context) (CatShardsResponse, error)
- func (s *CatShardsService) ErrorTrace(errorTrace bool) *CatShardsService
- func (s *CatShardsService) FilterPath(filterPath ...string) *CatShardsService
- func (s *CatShardsService) Header(name string, value string) *CatShardsService
- func (s *CatShardsService) Headers(headers http.Header) *CatShardsService
- func (s *CatShardsService) Human(human bool) *CatShardsService
- func (s *CatShardsService) Index(index ...string) *CatShardsService
- func (s *CatShardsService) Local(local bool) *CatShardsService
- func (s *CatShardsService) MasterTimeout(masterTimeout string) *CatShardsService
- func (s *CatShardsService) Pretty(pretty bool) *CatShardsService
- func (s *CatShardsService) Sort(fields ...string) *CatShardsService
- func (s *CatShardsService) Time(time string) *CatShardsService
- type CharFilteredText
- type ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *ChiSquareSignificanceHeuristic
- func (sh *ChiSquareSignificanceHeuristic) Name() string
- func (sh *ChiSquareSignificanceHeuristic) Source() (interface{}, error)
- type ChildrenAggregation
- func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation
- func (a *ChildrenAggregation) Source() (interface{}, error)
- func (a *ChildrenAggregation) SubAggregation(name string, subAggregation Aggregation) *ChildrenAggregation
- func (a *ChildrenAggregation) Type(typ string) *ChildrenAggregation
- type ClearScrollResponse
- type ClearScrollService
- func (s *ClearScrollService) Do(ctx context.Context) (*ClearScrollResponse, error)
- func (s *ClearScrollService) ErrorTrace(errorTrace bool) *ClearScrollService
- func (s *ClearScrollService) FilterPath(filterPath ...string) *ClearScrollService
- func (s *ClearScrollService) Header(name string, value string) *ClearScrollService
- func (s *ClearScrollService) Headers(headers http.Header) *ClearScrollService
- func (s *ClearScrollService) Human(human bool) *ClearScrollService
- func (s *ClearScrollService) Pretty(pretty bool) *ClearScrollService
- func (s *ClearScrollService) ScrollId(scrollIds ...string) *ClearScrollService
- func (s *ClearScrollService) Validate() error
- type Client
- func Dial(options ...ClientOptionFunc) (*Client, error)
- func DialContext(ctx context.Context, options ...ClientOptionFunc) (*Client, error)
- func DialWithConfig(ctx context.Context, cfg *config.Config) (*Client, error)
- func NewClient(options ...ClientOptionFunc) (*Client, error)
- func NewClientFromConfig(cfg *config.Config) (*Client, error)
- func NewSimpleClient(options ...ClientOptionFunc) (*Client, error)
- func (c *Client) Alias() *AliasService
- func (c *Client) Aliases() *AliasesService
- func (c *Client) Bulk() *BulkService
- func (c *Client) BulkProcessor() *BulkProcessorService
- func (c *Client) CatAliases() *CatAliasesService
- func (c *Client) CatAllocation() *CatAllocationService
- func (c *Client) CatCount() *CatCountService
- func (c *Client) CatHealth() *CatHealthService
- func (c *Client) CatIndices() *CatIndicesService
- func (c *Client) CatShards() *CatShardsService
- func (c *Client) ClearCache(indices ...string) *IndicesClearCacheService
- func (c *Client) ClearScroll(scrollIds ...string) *ClearScrollService
- func (c *Client) CloseIndex(name string) *IndicesCloseService
- func (c *Client) ClusterHealth() *ClusterHealthService
- func (c *Client) ClusterReroute() *ClusterRerouteService
- func (c *Client) ClusterState() *ClusterStateService
- func (c *Client) ClusterStats() *ClusterStatsService
- func (c *Client) Count(indices ...string) *CountService
- func (c *Client) CreateIndex(name string) *IndicesCreateService
- func (c *Client) Delete() *DeleteService
- func (c *Client) DeleteByQuery(indices ...string) *DeleteByQueryService
- func (c *Client) DeleteIndex(indices ...string) *IndicesDeleteService
- func (c *Client) DeleteScript() *DeleteScriptService
- func (c *Client) ElasticsearchVersion(url string) (string, error)
- func (c *Client) Exists() *ExistsService
- func (c *Client) Explain(index, typ, id string) *ExplainService
- func (c *Client) FieldCaps(indices ...string) *FieldCapsService
- func (c *Client) Flush(indices ...string) *IndicesFlushService
- func (c *Client) Forcemerge(indices ...string) *IndicesForcemergeService
- func (c *Client) Get() *GetService
- func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService
- func (c *Client) GetMapping() *IndicesGetMappingService
- func (c *Client) GetScript() *GetScriptService
- func (c *Client) HasPlugin(name string) (bool, error)
- func (c *Client) Index() *IndexService
- func (c *Client) IndexAnalyze() *IndicesAnalyzeService
- func (c *Client) IndexDeleteTemplate(name string) *IndicesDeleteTemplateService
- func (c *Client) IndexExists(indices ...string) *IndicesExistsService
- func (c *Client) IndexGet(indices ...string) *IndicesGetService
- func (c *Client) IndexGetSettings(indices ...string) *IndicesGetSettingsService
- func (c *Client) IndexGetTemplate(names ...string) *IndicesGetTemplateService
- func (c *Client) IndexNames() ([]string, error)
- func (c *Client) IndexPutSettings(indices ...string) *IndicesPutSettingsService
- func (c *Client) IndexPutTemplate(name string) *IndicesPutTemplateService
- func (c *Client) IndexSegments(indices ...string) *IndicesSegmentsService
- func (c *Client) IndexStats(indices ...string) *IndicesStatsService
- func (c *Client) IndexTemplateExists(name string) *IndicesExistsTemplateService
- func (c *Client) IngestDeletePipeline(id string) *IngestDeletePipelineService
- func (c *Client) IngestGetPipeline(ids ...string) *IngestGetPipelineService
- func (c *Client) IngestPutPipeline(id string) *IngestPutPipelineService
- func (c *Client) IngestSimulatePipeline() *IngestSimulatePipelineService
- func (c *Client) IsRunning() bool
- func (c *Client) Mget() *MgetService
- func (c *Client) MultiGet() *MgetService
- func (c *Client) MultiSearch() *MultiSearchService
- func (c *Client) MultiTermVectors() *MultiTermvectorService
- func (c *Client) NodesInfo() *NodesInfoService
- func (c *Client) NodesStats() *NodesStatsService
- func (c *Client) OpenIndex(name string) *IndicesOpenService
- func (c *Client) PerformRequest(ctx context.Context, opt PerformRequestOptions) (*Response, error)
- func (c *Client) Ping(url string) *PingService
- func (c *Client) Plugins() ([]string, error)
- func (c *Client) PutMapping() *IndicesPutMappingService
- func (c *Client) PutScript() *PutScriptService
- func (c *Client) Refresh(indices ...string) *RefreshService
- func (c *Client) Reindex() *ReindexService
- func (c *Client) RolloverIndex(alias string) *IndicesRolloverService
- func (c *Client) Scroll(indices ...string) *ScrollService
- func (c *Client) Search(indices ...string) *SearchService
- func (c *Client) SearchShards(indices ...string) *SearchShardsService
- func (c *Client) ShrinkIndex(source, target string) *IndicesShrinkService
- func (c *Client) SnapshotCreate(repository, snapshot string) *SnapshotCreateService
- func (c *Client) SnapshotCreateRepository(repository string) *SnapshotCreateRepositoryService
- func (c *Client) SnapshotDelete(repository, snapshot string) *SnapshotDeleteService
- func (c *Client) SnapshotDeleteRepository(repositories ...string) *SnapshotDeleteRepositoryService
- func (c *Client) SnapshotGet(repository string) *SnapshotGetService
- func (c *Client) SnapshotGetRepository(repositories ...string) *SnapshotGetRepositoryService
- func (c *Client) SnapshotRestore(repository, snapshot string) *SnapshotRestoreService
- func (c *Client) SnapshotStatus() *SnapshotStatusService
- func (c *Client) SnapshotVerifyRepository(repository string) *SnapshotVerifyRepositoryService
- func (c *Client) Start()
- func (c *Client) Stop()
- func (c *Client) String() string
- func (c *Client) SyncedFlush(indices ...string) *IndicesSyncedFlushService
- func (c *Client) TasksCancel() *TasksCancelService
- func (c *Client) TasksGetTask() *TasksGetTaskService
- func (c *Client) TasksList() *TasksListService
- func (c *Client) TermVectors(index, typ string) *TermvectorsService
- func (c *Client) TypeExists() *IndicesExistsTypeService
- func (c *Client) Update() *UpdateService
- func (c *Client) UpdateByQuery(indices ...string) *UpdateByQueryService
- func (c *Client) Validate(indices ...string) *ValidateService
- func (c *Client) WaitForGreenStatus(timeout string) error
- func (c *Client) WaitForStatus(status string, timeout string) error
- func (c *Client) WaitForYellowStatus(timeout string) error
- func (c *Client) XPackIlmDeleteLifecycle() *XPackIlmDeleteLifecycleService
- func (c *Client) XPackIlmGetLifecycle() *XPackIlmGetLifecycleService
- func (c *Client) XPackIlmPutLifecycle() *XPackIlmPutLifecycleService
- func (c *Client) XPackInfo() *XPackInfoService
- func (c *Client) XPackSecurityDeleteRole(roleName string) *XPackSecurityDeleteRoleService
- func (c *Client) XPackSecurityDeleteRoleMapping(roleMappingName string) *XPackSecurityDeleteRoleMappingService
- func (c *Client) XPackSecurityDeleteUser(username string) *XPackSecurityDeleteUserService
- func (c *Client) XPackSecurityGetRole(roleName string) *XPackSecurityGetRoleService
- func (c *Client) XPackSecurityGetRoleMapping(roleMappingName string) *XPackSecurityGetRoleMappingService
- func (c *Client) XPackSecurityGetUser(usernames ...string) *XPackSecurityGetUserService
- func (c *Client) XPackSecurityPutRole(roleName string) *XPackSecurityPutRoleService
- func (c *Client) XPackSecurityPutRoleMapping(roleMappingName string) *XPackSecurityPutRoleMappingService
- func (c *Client) XPackSecurityPutUser(username string) *XPackSecurityPutUserService
- func (c *Client) XPackWatchAck(watchId string) *XPackWatcherAckWatchService
- func (c *Client) XPackWatchActivate(watchId string) *XPackWatcherActivateWatchService
- func (c *Client) XPackWatchDeactivate(watchId string) *XPackWatcherDeactivateWatchService
- func (c *Client) XPackWatchDelete(watchId string) *XPackWatcherDeleteWatchService
- func (c *Client) XPackWatchExecute() *XPackWatcherExecuteWatchService
- func (c *Client) XPackWatchGet(watchId string) *XPackWatcherGetWatchService
- func (c *Client) XPackWatchPut(watchId string) *XPackWatcherPutWatchService
- func (c *Client) XPackWatchRestart() *XPackWatcherRestartService
- func (c *Client) XPackWatchStart() *XPackWatcherStartService
- func (c *Client) XPackWatchStats() *XPackWatcherStatsService
- func (c *Client) XPackWatchStop() *XPackWatcherStopService
- type ClientOptionFunc
- func SetBasicAuth(username, password string) ClientOptionFunc
- func SetDecoder(decoder Decoder) ClientOptionFunc
- func SetDumpConfig(conf DumpConfig) ClientOptionFunc
- func SetErrorLog(logger Logger) ClientOptionFunc
- func SetGzip(enabled bool) ClientOptionFunc
- func SetHeaders(headers http.Header) ClientOptionFunc
- func SetHealthcheck(enabled bool) ClientOptionFunc
- func SetHealthcheckInterval(interval time.Duration) ClientOptionFunc
- func SetHealthcheckTimeout(timeout time.Duration) ClientOptionFunc
- func SetHealthcheckTimeoutStartup(timeout time.Duration) ClientOptionFunc
- func SetHttpClient(httpClient *http.Client) ClientOptionFunc
- func SetInfoLog(logger Logger) ClientOptionFunc
- func SetMaxRetries(maxRetries int) ClientOptionFuncdeprecated
- func SetRequiredPlugins(plugins ...string) ClientOptionFunc
- func SetRetrier(retrier Retrier) ClientOptionFunc
- func SetScheme(scheme string) ClientOptionFunc
- func SetSendGetBodyAs(httpMethod string) ClientOptionFunc
- func SetSniff(enabled bool) ClientOptionFunc
- func SetSnifferCallback(f SnifferCallback) ClientOptionFunc
- func SetSnifferInterval(interval time.Duration) ClientOptionFunc
- func SetSnifferTimeout(timeout time.Duration) ClientOptionFunc
- func SetSnifferTimeoutStartup(timeout time.Duration) ClientOptionFunc
- func SetTraceLog(logger Logger) ClientOptionFunc
- func SetURL(urls ...string) ClientOptionFunc
- type ClusterHealthResponse
- type ClusterHealthService
- func (s *ClusterHealthService) Do(ctx context.Context) (*ClusterHealthResponse, error)
- func (s *ClusterHealthService) ErrorTrace(errorTrace bool) *ClusterHealthService
- func (s *ClusterHealthService) FilterPath(filterPath ...string) *ClusterHealthService
- func (s *ClusterHealthService) Header(name string, value string) *ClusterHealthService
- func (s *ClusterHealthService) Headers(headers http.Header) *ClusterHealthService
- func (s *ClusterHealthService) Human(human bool) *ClusterHealthService
- func (s *ClusterHealthService) Index(indices ...string) *ClusterHealthService
- func (s *ClusterHealthService) Level(level string) *ClusterHealthService
- func (s *ClusterHealthService) Local(local bool) *ClusterHealthService
- func (s *ClusterHealthService) MasterTimeout(masterTimeout string) *ClusterHealthService
- func (s *ClusterHealthService) Pretty(pretty bool) *ClusterHealthService
- func (s *ClusterHealthService) Timeout(timeout string) *ClusterHealthService
- func (s *ClusterHealthService) Validate() error
- func (s *ClusterHealthService) WaitForActiveShards(waitForActiveShards int) *ClusterHealthService
- func (s *ClusterHealthService) WaitForGreenStatus() *ClusterHealthService
- func (s *ClusterHealthService) WaitForNoRelocatingShards(waitForNoRelocatingShards bool) *ClusterHealthService
- func (s *ClusterHealthService) WaitForNodes(waitForNodes string) *ClusterHealthService
- func (s *ClusterHealthService) WaitForStatus(waitForStatus string) *ClusterHealthService
- func (s *ClusterHealthService) WaitForYellowStatus() *ClusterHealthService
- type ClusterIndexHealth
- type ClusterRerouteResponse
- type ClusterRerouteService
- func (s *ClusterRerouteService) Add(commands ...AllocationCommand) *ClusterRerouteService
- func (s *ClusterRerouteService) Body(body interface{}) *ClusterRerouteService
- func (s *ClusterRerouteService) Do(ctx context.Context) (*ClusterRerouteResponse, error)
- func (s *ClusterRerouteService) DryRun(dryRun bool) *ClusterRerouteService
- func (s *ClusterRerouteService) ErrorTrace(errorTrace bool) *ClusterRerouteService
- func (s *ClusterRerouteService) Explain(explain bool) *ClusterRerouteService
- func (s *ClusterRerouteService) FilterPath(filterPath ...string) *ClusterRerouteService
- func (s *ClusterRerouteService) Header(name string, value string) *ClusterRerouteService
- func (s *ClusterRerouteService) Headers(headers http.Header) *ClusterRerouteService
- func (s *ClusterRerouteService) Human(human bool) *ClusterRerouteService
- func (s *ClusterRerouteService) MasterTimeout(masterTimeout string) *ClusterRerouteService
- func (s *ClusterRerouteService) Metric(metrics ...string) *ClusterRerouteService
- func (s *ClusterRerouteService) Pretty(pretty bool) *ClusterRerouteService
- func (s *ClusterRerouteService) RetryFailed(retryFailed bool) *ClusterRerouteService
- func (s *ClusterRerouteService) Timeout(timeout string) *ClusterRerouteService
- func (s *ClusterRerouteService) Validate() error
- type ClusterShardHealth
- type ClusterStateResponse
- type ClusterStateService
- func (s *ClusterStateService) AllowNoIndices(allowNoIndices bool) *ClusterStateService
- func (s *ClusterStateService) Do(ctx context.Context) (*ClusterStateResponse, error)
- func (s *ClusterStateService) ErrorTrace(errorTrace bool) *ClusterStateService
- func (s *ClusterStateService) ExpandWildcards(expandWildcards string) *ClusterStateService
- func (s *ClusterStateService) FilterPath(filterPath ...string) *ClusterStateService
- func (s *ClusterStateService) FlatSettings(flatSettings bool) *ClusterStateService
- func (s *ClusterStateService) Header(name string, value string) *ClusterStateService
- func (s *ClusterStateService) Headers(headers http.Header) *ClusterStateService
- func (s *ClusterStateService) Human(human bool) *ClusterStateService
- func (s *ClusterStateService) IgnoreUnavailable(ignoreUnavailable bool) *ClusterStateService
- func (s *ClusterStateService) Index(indices ...string) *ClusterStateService
- func (s *ClusterStateService) Local(local bool) *ClusterStateService
- func (s *ClusterStateService) MasterTimeout(masterTimeout string) *ClusterStateService
- func (s *ClusterStateService) Metric(metrics ...string) *ClusterStateService
- func (s *ClusterStateService) Pretty(pretty bool) *ClusterStateService
- func (s *ClusterStateService) Validate() error
- type ClusterStatsIndices
- type ClusterStatsIndicesCompletion
- type ClusterStatsIndicesDocs
- type ClusterStatsIndicesFieldData
- type ClusterStatsIndicesQueryCache
- type ClusterStatsIndicesSegments
- type ClusterStatsIndicesSegmentsFile
- type ClusterStatsIndicesShards
- type ClusterStatsIndicesShardsIndex
- type ClusterStatsIndicesShardsIndexFloat64MinMax
- type ClusterStatsIndicesShardsIndexIntMinMax
- type ClusterStatsIndicesStore
- type ClusterStatsNodes
- type ClusterStatsNodesCount
- type ClusterStatsNodesFsStats
- type ClusterStatsNodesJvmStats
- type ClusterStatsNodesJvmStatsMem
- type ClusterStatsNodesJvmStatsVersion
- type ClusterStatsNodesOsStats
- type ClusterStatsNodesOsStatsCPU
- type ClusterStatsNodesOsStatsMem
- type ClusterStatsNodesPlugin
- type ClusterStatsNodesProcessStats
- type ClusterStatsNodesProcessStatsCPU
- type ClusterStatsNodesProcessStatsOpenFileDescriptors
- type ClusterStatsResponse
- type ClusterStatsService
- func (s *ClusterStatsService) Do(ctx context.Context) (*ClusterStatsResponse, error)
- func (s *ClusterStatsService) ErrorTrace(errorTrace bool) *ClusterStatsService
- func (s *ClusterStatsService) FilterPath(filterPath ...string) *ClusterStatsService
- func (s *ClusterStatsService) FlatSettings(flatSettings bool) *ClusterStatsService
- func (s *ClusterStatsService) Header(name string, value string) *ClusterStatsService
- func (s *ClusterStatsService) Headers(headers http.Header) *ClusterStatsService
- func (s *ClusterStatsService) Human(human bool) *ClusterStatsService
- func (s *ClusterStatsService) NodeId(nodeId []string) *ClusterStatsService
- func (s *ClusterStatsService) Pretty(pretty bool) *ClusterStatsService
- func (s *ClusterStatsService) Validate() error
- type CollapseBuilder
- type CollectorResult
- type CommonTermsQuery
- func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery
- func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery
- func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreq(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
- func (q *CommonTermsQuery) HighFreqOperator(op string) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreq(f float64) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
- func (q *CommonTermsQuery) LowFreqOperator(op string) *CommonTermsQuery
- func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery
- func (q *CommonTermsQuery) Source() (interface{}, error)
- type CompletionSuggester
- func (q *CompletionSuggester) Analyzer(analyzer string) *CompletionSuggester
- func (q *CompletionSuggester) ContextQueries(queries ...SuggesterContextQuery) *CompletionSuggester
- func (q *CompletionSuggester) ContextQuery(query SuggesterContextQuery) *CompletionSuggester
- func (q *CompletionSuggester) Field(field string) *CompletionSuggester
- func (q *CompletionSuggester) Fuzziness(fuzziness interface{}) *CompletionSuggester
- func (q *CompletionSuggester) FuzzyOptions(options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) Name() string
- func (q *CompletionSuggester) Prefix(prefix string) *CompletionSuggester
- func (q *CompletionSuggester) PrefixWithEditDistance(prefix string, editDistance interface{}) *CompletionSuggester
- func (q *CompletionSuggester) PrefixWithOptions(prefix string, options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) Regex(regex string) *CompletionSuggester
- func (q *CompletionSuggester) RegexOptions(options *RegexCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) RegexWithOptions(regex string, options *RegexCompletionSuggesterOptions) *CompletionSuggester
- func (q *CompletionSuggester) ShardSize(shardSize int) *CompletionSuggester
- func (q *CompletionSuggester) Size(size int) *CompletionSuggester
- func (q *CompletionSuggester) SkipDuplicates(skipDuplicates bool) *CompletionSuggester
- func (q *CompletionSuggester) Source(includeName bool) (interface{}, error)
- func (q *CompletionSuggester) Text(text string) *CompletionSuggester
- type CompositeAggregation
- func (a *CompositeAggregation) AggregateAfter(after map[string]interface{}) *CompositeAggregation
- func (a *CompositeAggregation) Meta(metaData map[string]interface{}) *CompositeAggregation
- func (a *CompositeAggregation) Size(size int) *CompositeAggregation
- func (a *CompositeAggregation) Source() (interface{}, error)
- func (a *CompositeAggregation) Sources(sources ...CompositeAggregationValuesSource) *CompositeAggregation
- func (a *CompositeAggregation) SubAggregation(name string, subAggregation Aggregation) *CompositeAggregation
- type CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Asc() *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Desc() *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Field(field string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Format(format string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Interval(interval interface{}) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationDateHistogramValuesSourcedeprecated
- func (a *CompositeAggregationDateHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Order(order string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Script(script *Script) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationDateHistogramValuesSource) TimeZone(timeZone string) *CompositeAggregationDateHistogramValuesSource
- func (a *CompositeAggregationDateHistogramValuesSource) ValueType(valueType string) *CompositeAggregationDateHistogramValuesSource
- type CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Asc() *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Desc() *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Field(field string) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationHistogramValuesSourcedeprecated
- func (a *CompositeAggregationHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Order(order string) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Script(script *Script) *CompositeAggregationHistogramValuesSource
- func (a *CompositeAggregationHistogramValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource
- type CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Asc() *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Desc() *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Missing(missing interface{}) *CompositeAggregationTermsValuesSourcedeprecated
- func (a *CompositeAggregationTermsValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Order(order string) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Script(script *Script) *CompositeAggregationTermsValuesSource
- func (a *CompositeAggregationTermsValuesSource) Source() (interface{}, error)
- func (a *CompositeAggregationTermsValuesSource) ValueType(valueType string) *CompositeAggregationTermsValuesSource
- type CompositeAggregationValuesSource
- type ConstantBackoff
- type ConstantScoreQuery
- type ContextSuggester
- func (q *ContextSuggester) ContextQueries(queries ...SuggesterContextQuery) *ContextSuggester
- func (q *ContextSuggester) ContextQuery(query SuggesterContextQuery) *ContextSuggester
- func (q *ContextSuggester) Field(field string) *ContextSuggester
- func (q *ContextSuggester) Name() string
- func (q *ContextSuggester) Prefix(prefix string) *ContextSuggester
- func (q *ContextSuggester) Size(size int) *ContextSuggester
- func (q *ContextSuggester) Source(includeName bool) (interface{}, error)
- type CountResponse
- type CountService
- func (s *CountService) AllowNoIndices(allowNoIndices bool) *CountService
- func (s *CountService) AnalyzeWildcard(analyzeWildcard bool) *CountService
- func (s *CountService) Analyzer(analyzer string) *CountService
- func (s *CountService) BodyJson(body interface{}) *CountService
- func (s *CountService) BodyString(body string) *CountService
- func (s *CountService) DefaultOperator(defaultOperator string) *CountService
- func (s *CountService) Df(df string) *CountService
- func (s *CountService) Do(ctx context.Context) (int64, error)
- func (s *CountService) ErrorTrace(errorTrace bool) *CountService
- func (s *CountService) ExpandWildcards(expandWildcards string) *CountService
- func (s *CountService) FilterPath(filterPath ...string) *CountService
- func (s *CountService) Header(name string, value string) *CountService
- func (s *CountService) Headers(headers http.Header) *CountService
- func (s *CountService) Human(human bool) *CountService
- func (s *CountService) IgnoreUnavailable(ignoreUnavailable bool) *CountService
- func (s *CountService) Index(index ...string) *CountService
- func (s *CountService) Lenient(lenient bool) *CountService
- func (s *CountService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *CountService
- func (s *CountService) MinScore(minScore interface{}) *CountService
- func (s *CountService) Preference(preference string) *CountService
- func (s *CountService) Pretty(pretty bool) *CountService
- func (s *CountService) Q(q string) *CountService
- func (s *CountService) Query(query Query) *CountService
- func (s *CountService) Routing(routing string) *CountService
- func (s *CountService) TerminateAfter(terminateAfter int) *CountService
- func (s *CountService) Type(typ ...string) *CountService
- func (s *CountService) Validate() error
- type CumulativeSumAggregation
- func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Meta(metaData map[string]interface{}) *CumulativeSumAggregation
- func (a *CumulativeSumAggregation) Source() (interface{}, error)
- type DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBounds(min, max interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) ExtendedBoundsMin(min interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Format(format string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Keyed(keyed bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) MinDocCount(minDocCount int64) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation
- func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation
- func (a *DateHistogramAggregation) Source() (interface{}, error)
- func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation
- func (a *DateHistogramAggregation) TimeZone(timeZone string) *DateHistogramAggregation
- type DateRangeAggregation
- func (a *DateRangeAggregation) AddRange(from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddRangeWithKey(key string, from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedFrom(to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedTo(from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Between(from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) BetweenWithKey(key string, from, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Field(field string) *DateRangeAggregation
- func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation
- func (a *DateRangeAggregation) Gt(from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) GtWithKey(key string, from interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Keyed(keyed bool) *DateRangeAggregation
- func (a *DateRangeAggregation) Lt(to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) LtWithKey(key string, to interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Meta(metaData map[string]interface{}) *DateRangeAggregation
- func (a *DateRangeAggregation) Script(script *Script) *DateRangeAggregation
- func (a *DateRangeAggregation) Source() (interface{}, error)
- func (a *DateRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *DateRangeAggregation
- func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation
- func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation
- type DateRangeAggregationEntry
- type Decoder
- type DefaultDecoder
- type DeleteByQueryService
- func (s *DeleteByQueryService) AbortOnVersionConflict() *DeleteByQueryService
- func (s *DeleteByQueryService) AllowNoIndices(allow bool) *DeleteByQueryService
- func (s *DeleteByQueryService) AnalyzeWildcard(analyzeWildcard bool) *DeleteByQueryService
- func (s *DeleteByQueryService) Analyzer(analyzer string) *DeleteByQueryService
- func (s *DeleteByQueryService) Body(body string) *DeleteByQueryService
- func (s *DeleteByQueryService) Conflicts(conflicts string) *DeleteByQueryService
- func (s *DeleteByQueryService) DF(defaultField string) *DeleteByQueryService
- func (s *DeleteByQueryService) DefaultField(defaultField string) *DeleteByQueryService
- func (s *DeleteByQueryService) DefaultOperator(defaultOperator string) *DeleteByQueryService
- func (s *DeleteByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
- func (s *DeleteByQueryService) DoAsync(ctx context.Context) (*StartTaskResult, error)
- func (s *DeleteByQueryService) DocvalueFields(docvalueFields ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) ErrorTrace(errorTrace bool) *DeleteByQueryService
- func (s *DeleteByQueryService) ExpandWildcards(expand string) *DeleteByQueryService
- func (s *DeleteByQueryService) Explain(explain bool) *DeleteByQueryService
- func (s *DeleteByQueryService) FilterPath(filterPath ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) From(from int) *DeleteByQueryService
- func (s *DeleteByQueryService) Header(name string, value string) *DeleteByQueryService
- func (s *DeleteByQueryService) Headers(headers http.Header) *DeleteByQueryService
- func (s *DeleteByQueryService) Human(human bool) *DeleteByQueryService
- func (s *DeleteByQueryService) IgnoreUnavailable(ignore bool) *DeleteByQueryService
- func (s *DeleteByQueryService) Index(index ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) Lenient(lenient bool) *DeleteByQueryService
- func (s *DeleteByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *DeleteByQueryService
- func (s *DeleteByQueryService) Preference(preference string) *DeleteByQueryService
- func (s *DeleteByQueryService) Pretty(pretty bool) *DeleteByQueryService
- func (s *DeleteByQueryService) ProceedOnVersionConflict() *DeleteByQueryService
- func (s *DeleteByQueryService) Q(query string) *DeleteByQueryService
- func (s *DeleteByQueryService) Query(query Query) *DeleteByQueryService
- func (s *DeleteByQueryService) QueryString(query string) *DeleteByQueryService
- func (s *DeleteByQueryService) Refresh(refresh string) *DeleteByQueryService
- func (s *DeleteByQueryService) RequestCache(requestCache bool) *DeleteByQueryService
- func (s *DeleteByQueryService) RequestsPerSecond(requestsPerSecond int) *DeleteByQueryService
- func (s *DeleteByQueryService) Routing(routing ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) Scroll(scroll string) *DeleteByQueryService
- func (s *DeleteByQueryService) ScrollSize(scrollSize int) *DeleteByQueryService
- func (s *DeleteByQueryService) SearchTimeout(searchTimeout string) *DeleteByQueryService
- func (s *DeleteByQueryService) SearchType(searchType string) *DeleteByQueryService
- func (s *DeleteByQueryService) Size(size int) *DeleteByQueryService
- func (s *DeleteByQueryService) Slices(slices interface{}) *DeleteByQueryService
- func (s *DeleteByQueryService) Sort(sort ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) SortByField(field string, ascending bool) *DeleteByQueryService
- func (s *DeleteByQueryService) Stats(stats ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) StoredFields(storedFields ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) SuggestField(suggestField string) *DeleteByQueryService
- func (s *DeleteByQueryService) SuggestMode(suggestMode string) *DeleteByQueryService
- func (s *DeleteByQueryService) SuggestSize(suggestSize int) *DeleteByQueryService
- func (s *DeleteByQueryService) SuggestText(suggestText string) *DeleteByQueryService
- func (s *DeleteByQueryService) TerminateAfter(terminateAfter int) *DeleteByQueryService
- func (s *DeleteByQueryService) Timeout(timeout string) *DeleteByQueryService
- func (s *DeleteByQueryService) TimeoutInMillis(timeoutInMillis int) *DeleteByQueryService
- func (s *DeleteByQueryService) TrackScores(trackScores bool) *DeleteByQueryService
- func (s *DeleteByQueryService) Type(typ ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) Validate() error
- func (s *DeleteByQueryService) Version(version bool) *DeleteByQueryService
- func (s *DeleteByQueryService) WaitForActiveShards(waitForActiveShards string) *DeleteByQueryService
- func (s *DeleteByQueryService) WaitForCompletion(waitForCompletion bool) *DeleteByQueryService
- func (s *DeleteByQueryService) XSource(xSource ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) XSourceExclude(xSourceExclude ...string) *DeleteByQueryService
- func (s *DeleteByQueryService) XSourceInclude(xSourceInclude ...string) *DeleteByQueryService
- type DeleteResponse
- type DeleteScriptResponse
- type DeleteScriptService
- func (s *DeleteScriptService) Do(ctx context.Context) (*DeleteScriptResponse, error)
- func (s *DeleteScriptService) ErrorTrace(errorTrace bool) *DeleteScriptService
- func (s *DeleteScriptService) FilterPath(filterPath ...string) *DeleteScriptService
- func (s *DeleteScriptService) Header(name string, value string) *DeleteScriptService
- func (s *DeleteScriptService) Headers(headers http.Header) *DeleteScriptService
- func (s *DeleteScriptService) Human(human bool) *DeleteScriptService
- func (s *DeleteScriptService) Id(id string) *DeleteScriptService
- func (s *DeleteScriptService) MasterTimeout(masterTimeout string) *DeleteScriptService
- func (s *DeleteScriptService) Pretty(pretty bool) *DeleteScriptService
- func (s *DeleteScriptService) Timeout(timeout string) *DeleteScriptService
- func (s *DeleteScriptService) Validate() error
- type DeleteService
- func (s *DeleteService) Do(ctx context.Context) (*DeleteResponse, error)
- func (s *DeleteService) ErrorTrace(errorTrace bool) *DeleteService
- func (s *DeleteService) FilterPath(filterPath ...string) *DeleteService
- func (s *DeleteService) Header(name string, value string) *DeleteService
- func (s *DeleteService) Headers(headers http.Header) *DeleteService
- func (s *DeleteService) Human(human bool) *DeleteService
- func (s *DeleteService) Id(id string) *DeleteService
- func (s *DeleteService) IfPrimaryTerm(primaryTerm int64) *DeleteService
- func (s *DeleteService) IfSeqNo(seqNo int64) *DeleteService
- func (s *DeleteService) Index(index string) *DeleteService
- func (s *DeleteService) Parent(parent string) *DeleteService
- func (s *DeleteService) Pretty(pretty bool) *DeleteService
- func (s *DeleteService) Refresh(refresh string) *DeleteService
- func (s *DeleteService) Routing(routing string) *DeleteService
- func (s *DeleteService) Timeout(timeout string) *DeleteService
- func (s *DeleteService) Type(typ string) *DeleteService
- func (s *DeleteService) Validate() error
- func (s *DeleteService) Version(version interface{}) *DeleteService
- func (s *DeleteService) VersionType(versionType string) *DeleteService
- func (s *DeleteService) WaitForActiveShards(waitForActiveShards string) *DeleteService
- type DerivativeAggregation
- func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeAggregation
- func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation
- func (a *DerivativeAggregation) GapInsertZeros() *DerivativeAggregation
- func (a *DerivativeAggregation) GapPolicy(gapPolicy string) *DerivativeAggregation
- func (a *DerivativeAggregation) GapSkip() *DerivativeAggregation
- func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation
- func (a *DerivativeAggregation) Source() (interface{}, error)
- func (a *DerivativeAggregation) Unit(unit string) *DerivativeAggregation
- type DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Accuracy(accuracy float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Field(field string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxEdits(maxEdits int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxInspections(maxInspections int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MaxTermFreq(maxTermFreq float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MinDocFreq(minDocFreq float64) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) MinWordLength(minWordLength int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PostFilter(postFilter string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PreFilter(preFilter string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) PrefixLength(prefixLength int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Size(size int) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Sort(sort string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Source() (interface{}, error)
- func (g *DirectCandidateGenerator) StringDistance(stringDistance string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) SuggestMode(suggestMode string) *DirectCandidateGenerator
- func (g *DirectCandidateGenerator) Type() string
- type DisMaxQuery
- type DiscoveryNode
- type DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) ExecutionHint(hint string) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Field(field string) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Meta(metaData map[string]interface{}) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Script(script *Script) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) ShardSize(shardSize int) *DiversifiedSamplerAggregation
- func (a *DiversifiedSamplerAggregation) Source() (interface{}, error)
- func (a *DiversifiedSamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *DiversifiedSamplerAggregation
- type DocvalueField
- type DocvalueFields
- type DumpConfig
- type EWMAMovAvgModel
- type Error
- type ErrorDetails
- type ExistsQuery
- type ExistsService
- func (s *ExistsService) Do(ctx context.Context) (bool, error)
- func (s *ExistsService) ErrorTrace(errorTrace bool) *ExistsService
- func (s *ExistsService) FilterPath(filterPath ...string) *ExistsService
- func (s *ExistsService) Header(name string, value string) *ExistsService
- func (s *ExistsService) Headers(headers http.Header) *ExistsService
- func (s *ExistsService) Human(human bool) *ExistsService
- func (s *ExistsService) Id(id string) *ExistsService
- func (s *ExistsService) Index(index string) *ExistsService
- func (s *ExistsService) Parent(parent string) *ExistsService
- func (s *ExistsService) Preference(preference string) *ExistsService
- func (s *ExistsService) Pretty(pretty bool) *ExistsService
- func (s *ExistsService) Realtime(realtime bool) *ExistsService
- func (s *ExistsService) Refresh(refresh string) *ExistsService
- func (s *ExistsService) Routing(routing string) *ExistsService
- func (s *ExistsService) Type(typ string) *ExistsService
- func (s *ExistsService) Validate() error
- type ExplainResponse
- type ExplainService
- func (s *ExplainService) AnalyzeWildcard(analyzeWildcard bool) *ExplainService
- func (s *ExplainService) Analyzer(analyzer string) *ExplainService
- func (s *ExplainService) BodyJson(body interface{}) *ExplainService
- func (s *ExplainService) BodyString(body string) *ExplainService
- func (s *ExplainService) DefaultOperator(defaultOperator string) *ExplainService
- func (s *ExplainService) Df(df string) *ExplainService
- func (s *ExplainService) Do(ctx context.Context) (*ExplainResponse, error)
- func (s *ExplainService) ErrorTrace(errorTrace bool) *ExplainService
- func (s *ExplainService) Fields(fields ...string) *ExplainService
- func (s *ExplainService) FilterPath(filterPath ...string) *ExplainService
- func (s *ExplainService) Header(name string, value string) *ExplainService
- func (s *ExplainService) Headers(headers http.Header) *ExplainService
- func (s *ExplainService) Human(human bool) *ExplainService
- func (s *ExplainService) Id(id string) *ExplainService
- func (s *ExplainService) Index(index string) *ExplainService
- func (s *ExplainService) Lenient(lenient bool) *ExplainService
- func (s *ExplainService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *ExplainService
- func (s *ExplainService) Parent(parent string) *ExplainService
- func (s *ExplainService) Preference(preference string) *ExplainService
- func (s *ExplainService) Pretty(pretty bool) *ExplainService
- func (s *ExplainService) Q(q string) *ExplainService
- func (s *ExplainService) Query(query Query) *ExplainService
- func (s *ExplainService) Routing(routing string) *ExplainService
- func (s *ExplainService) Source(source string) *ExplainService
- func (s *ExplainService) Type(typ string) *ExplainService
- func (s *ExplainService) Validate() error
- func (s *ExplainService) XSource(xSource ...string) *ExplainService
- func (s *ExplainService) XSourceExclude(xSourceExclude ...string) *ExplainService
- func (s *ExplainService) XSourceInclude(xSourceInclude ...string) *ExplainService
- type ExponentialBackoff
- type ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Decay(decay float64) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) FieldName(fieldName string) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) GetWeight() *float64
- func (fn *ExponentialDecayFunction) MultiValueMode(mode string) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Name() string
- func (fn *ExponentialDecayFunction) Offset(offset interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Origin(origin interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Scale(scale interface{}) *ExponentialDecayFunction
- func (fn *ExponentialDecayFunction) Source() (interface{}, error)
- func (fn *ExponentialDecayFunction) Weight(weight float64) *ExponentialDecayFunction
- type ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Field(field string) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Format(format string) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Missing(missing interface{}) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Script(script *Script) *ExtendedStatsAggregation
- func (a *ExtendedStatsAggregation) Source() (interface{}, error)
- func (a *ExtendedStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *ExtendedStatsAggregation
- type ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) BucketsPath(bucketsPaths ...string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Format(format string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapInsertZeros() *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapPolicy(gapPolicy string) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) GapSkip() *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Sigma(sigma float32) *ExtendedStatsBucketAggregation
- func (s *ExtendedStatsBucketAggregation) Source() (interface{}, error)
- type FailedNodeException
- type FetchSourceContext
- func (fsc *FetchSourceContext) Exclude(excludes ...string) *FetchSourceContext
- func (fsc *FetchSourceContext) FetchSource() bool
- func (fsc *FetchSourceContext) Include(includes ...string) *FetchSourceContext
- func (fsc *FetchSourceContext) Query() url.Values
- func (fsc *FetchSourceContext) SetFetchSource(fetchSource bool)
- func (fsc *FetchSourceContext) Source() (interface{}, error)
- type FieldCaps
- type FieldCapsRequest
- type FieldCapsResponse
- type FieldCapsService
- func (s *FieldCapsService) AllowNoIndices(allowNoIndices bool) *FieldCapsService
- func (s *FieldCapsService) BodyJson(body interface{}) *FieldCapsService
- func (s *FieldCapsService) BodyString(body string) *FieldCapsService
- func (s *FieldCapsService) Do(ctx context.Context) (*FieldCapsResponse, error)
- func (s *FieldCapsService) ErrorTrace(errorTrace bool) *FieldCapsService
- func (s *FieldCapsService) ExpandWildcards(expandWildcards string) *FieldCapsService
- func (s *FieldCapsService) Fields(fields ...string) *FieldCapsService
- func (s *FieldCapsService) FilterPath(filterPath ...string) *FieldCapsService
- func (s *FieldCapsService) Header(name string, value string) *FieldCapsService
- func (s *FieldCapsService) Headers(headers http.Header) *FieldCapsService
- func (s *FieldCapsService) Human(human bool) *FieldCapsService
- func (s *FieldCapsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldCapsService
- func (s *FieldCapsService) Index(index ...string) *FieldCapsService
- func (s *FieldCapsService) Pretty(pretty bool) *FieldCapsService
- func (s *FieldCapsService) Validate() error
- type FieldCapsType
- type FieldSort
- func (s *FieldSort) Asc() *FieldSort
- func (s *FieldSort) Desc() *FieldSort
- func (s *FieldSort) FieldName(fieldName string) *FieldSort
- func (s *FieldSort) Filter(filter Query) *FieldSort
- func (s *FieldSort) Missing(missing interface{}) *FieldSort
- func (s *FieldSort) Nested(nested *NestedSort) *FieldSort
- func (s *FieldSort) NestedFilter(nestedFilter Query) *FieldSort
- func (s *FieldSort) NestedPath(nestedPath string) *FieldSort
- func (s *FieldSort) NestedSort(nestedSort *NestedSort) *FieldSort
- func (s *FieldSort) Order(ascending bool) *FieldSort
- func (s *FieldSort) Path(path string) *FieldSort
- func (s *FieldSort) SortMode(sortMode string) *FieldSort
- func (s *FieldSort) Source() (interface{}, error)
- func (s *FieldSort) UnmappedType(typ string) *FieldSort
- type FieldStatistics
- type FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Factor(factor float64) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Field(field string) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) GetWeight() *float64
- func (fn *FieldValueFactorFunction) Missing(missing float64) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Modifier(modifier string) *FieldValueFactorFunction
- func (fn *FieldValueFactorFunction) Name() string
- func (fn *FieldValueFactorFunction) Source() (interface{}, error)
- func (fn *FieldValueFactorFunction) Weight(weight float64) *FieldValueFactorFunction
- type FilterAggregation
- func (a *FilterAggregation) Filter(filter Query) *FilterAggregation
- func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation
- func (a *FilterAggregation) Source() (interface{}, error)
- func (a *FilterAggregation) SubAggregation(name string, subAggregation Aggregation) *FilterAggregation
- type FiltersAggregation
- func (a *FiltersAggregation) Filter(filter Query) *FiltersAggregation
- func (a *FiltersAggregation) FilterWithName(name string, filter Query) *FiltersAggregation
- func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation
- func (a *FiltersAggregation) Meta(metaData map[string]interface{}) *FiltersAggregation
- func (a *FiltersAggregation) OtherBucket(otherBucket bool) *FiltersAggregation
- func (a *FiltersAggregation) OtherBucketKey(key string) *FiltersAggregation
- func (a *FiltersAggregation) Source() (interface{}, error)
- func (a *FiltersAggregation) SubAggregation(name string, subAggregation Aggregation) *FiltersAggregation
- type FunctionScoreQuery
- func (q *FunctionScoreQuery) Add(filter Query, scoreFunc ScoreFunction) *FunctionScoreQuery
- func (q *FunctionScoreQuery) AddScoreFunc(scoreFunc ScoreFunction) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Boost(boost float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) BoostMode(boostMode string) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery
- func (q *FunctionScoreQuery) MaxBoost(maxBoost float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) MinScore(minScore float64) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Query(query Query) *FunctionScoreQuery
- func (q *FunctionScoreQuery) ScoreMode(scoreMode string) *FunctionScoreQuery
- func (q *FunctionScoreQuery) Source() (interface{}, error)
- type FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) EditDistance(editDistance interface{}) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) MaxDeterminizedStates(max int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) MinLength(minLength int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) PrefixLength(prefixLength int) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) Source() (interface{}, error)
- func (o *FuzzyCompletionSuggesterOptions) Transpositions(transpositions bool) *FuzzyCompletionSuggesterOptions
- func (o *FuzzyCompletionSuggesterOptions) UnicodeAware(unicodeAware bool) *FuzzyCompletionSuggesterOptions
- type FuzzyQuery
- func (q *FuzzyQuery) Boost(boost float64) *FuzzyQuery
- func (q *FuzzyQuery) Fuzziness(fuzziness interface{}) *FuzzyQuery
- func (q *FuzzyQuery) MaxExpansions(maxExpansions int) *FuzzyQuery
- func (q *FuzzyQuery) PrefixLength(prefixLength int) *FuzzyQuery
- func (q *FuzzyQuery) QueryName(queryName string) *FuzzyQuery
- func (q *FuzzyQuery) Rewrite(rewrite string) *FuzzyQuery
- func (q *FuzzyQuery) Source() (interface{}, error)
- func (q *FuzzyQuery) Transpositions(transpositions bool) *FuzzyQuery
- type GNDSignificanceHeuristic
- type GaussDecayFunction
- func (fn *GaussDecayFunction) Decay(decay float64) *GaussDecayFunction
- func (fn *GaussDecayFunction) FieldName(fieldName string) *GaussDecayFunction
- func (fn *GaussDecayFunction) GetWeight() *float64
- func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction
- func (fn *GaussDecayFunction) Name() string
- func (fn *GaussDecayFunction) Offset(offset interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Origin(origin interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Scale(scale interface{}) *GaussDecayFunction
- func (fn *GaussDecayFunction) Source() (interface{}, error)
- func (fn *GaussDecayFunction) Weight(weight float64) *GaussDecayFunction
- type GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomLeft(bottom, left float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomRight(bottom, right float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) BottomRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) QueryName(queryName string) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) Source() (interface{}, error)
- func (q *GeoBoundingBoxQuery) TopLeft(top, left float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopRight(top, right float64) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) TopRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
- func (q *GeoBoundingBoxQuery) Type(typ string) *GeoBoundingBoxQuery
- type GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Field(field string) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Meta(metaData map[string]interface{}) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Script(script *Script) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) Source() (interface{}, error)
- func (a *GeoBoundsAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoBoundsAggregation
- func (a *GeoBoundsAggregation) WrapLongitude(wrapLongitude bool) *GeoBoundsAggregation
- type GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Field(field string) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Meta(metaData map[string]interface{}) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Script(script *Script) *GeoCentroidAggregation
- func (a *GeoCentroidAggregation) Source() (interface{}, error)
- func (a *GeoCentroidAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoCentroidAggregation
- type GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddRange(from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddRangeWithKey(key string, from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedFrom(to float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedFromWithKey(key string, to float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedTo(from float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) AddUnboundedToWithKey(key string, from float64) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Between(from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) BetweenWithKey(key string, from, to interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) DistanceType(distanceType string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Field(field string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Meta(metaData map[string]interface{}) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Point(latLon string) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Source() (interface{}, error)
- func (a *GeoDistanceAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoDistanceAggregation
- func (a *GeoDistanceAggregation) Unit(unit string) *GeoDistanceAggregation
- type GeoDistanceQuery
- func (q *GeoDistanceQuery) Distance(distance string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) DistanceType(distanceType string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) GeoHash(geohash string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) GeoPoint(point *GeoPoint) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Lat(lat float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Lon(lon float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Point(lat, lon float64) *GeoDistanceQuery
- func (q *GeoDistanceQuery) QueryName(queryName string) *GeoDistanceQuery
- func (q *GeoDistanceQuery) Source() (interface{}, error)
- type GeoDistanceSort
- func (s *GeoDistanceSort) Asc() *GeoDistanceSort
- func (s *GeoDistanceSort) Desc() *GeoDistanceSort
- func (s *GeoDistanceSort) DistanceType(distanceType string) *GeoDistanceSort
- func (s *GeoDistanceSort) FieldName(fieldName string) *GeoDistanceSort
- func (s *GeoDistanceSort) GeoDistance(geoDistance string) *GeoDistanceSort
- func (s *GeoDistanceSort) GeoHashes(geohashes ...string) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedFilter(nestedFilter Query) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedPath(nestedPath string) *GeoDistanceSort
- func (s *GeoDistanceSort) NestedSort(nestedSort *NestedSort) *GeoDistanceSort
- func (s *GeoDistanceSort) Order(ascending bool) *GeoDistanceSort
- func (s *GeoDistanceSort) Point(lat, lon float64) *GeoDistanceSort
- func (s *GeoDistanceSort) Points(points ...*GeoPoint) *GeoDistanceSort
- func (s *GeoDistanceSort) SortMode(sortMode string) *GeoDistanceSort
- func (s *GeoDistanceSort) Source() (interface{}, error)
- func (s *GeoDistanceSort) Unit(unit string) *GeoDistanceSort
- type GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Field(field string) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Meta(metaData map[string]interface{}) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Precision(precision interface{}) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) ShardSize(shardSize int) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Size(size int) *GeoHashGridAggregation
- func (a *GeoHashGridAggregation) Source() (interface{}, error)
- func (a *GeoHashGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoHashGridAggregation
- type GeoPoint
- type GeoPolygonQuery
- type GetResult
- type GetScriptResponse
- type GetScriptService
- func (s *GetScriptService) Do(ctx context.Context) (*GetScriptResponse, error)
- func (s *GetScriptService) ErrorTrace(errorTrace bool) *GetScriptService
- func (s *GetScriptService) FilterPath(filterPath ...string) *GetScriptService
- func (s *GetScriptService) Header(name string, value string) *GetScriptService
- func (s *GetScriptService) Headers(headers http.Header) *GetScriptService
- func (s *GetScriptService) Human(human bool) *GetScriptService
- func (s *GetScriptService) Id(id string) *GetScriptService
- func (s *GetScriptService) Pretty(pretty bool) *GetScriptService
- func (s *GetScriptService) Validate() error
- type GetService
- func (s *GetService) Do(ctx context.Context) (*GetResult, error)
- func (s *GetService) ErrorTrace(errorTrace bool) *GetService
- func (s *GetService) FetchSource(fetchSource bool) *GetService
- func (s *GetService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *GetService
- func (s *GetService) FilterPath(filterPath ...string) *GetService
- func (s *GetService) Header(name string, value string) *GetService
- func (s *GetService) Headers(headers http.Header) *GetService
- func (s *GetService) Human(human bool) *GetService
- func (s *GetService) Id(id string) *GetService
- func (s *GetService) IgnoreErrorsOnGeneratedFields(ignore bool) *GetService
- func (s *GetService) Index(index string) *GetService
- func (s *GetService) Parent(parent string) *GetService
- func (s *GetService) Preference(preference string) *GetService
- func (s *GetService) Pretty(pretty bool) *GetService
- func (s *GetService) Realtime(realtime bool) *GetService
- func (s *GetService) Refresh(refresh string) *GetService
- func (s *GetService) Routing(routing string) *GetService
- func (s *GetService) StoredFields(storedFields ...string) *GetService
- func (s *GetService) Type(typ string) *GetService
- func (s *GetService) Validate() error
- func (s *GetService) Version(version interface{}) *GetService
- func (s *GetService) VersionType(versionType string) *GetService
- type GlobalAggregation
- type HasChildQuery
- func (q *HasChildQuery) Boost(boost float64) *HasChildQuery
- func (q *HasChildQuery) InnerHit(innerHit *InnerHit) *HasChildQuery
- func (q *HasChildQuery) MaxChildren(maxChildren int) *HasChildQuery
- func (q *HasChildQuery) MinChildren(minChildren int) *HasChildQuery
- func (q *HasChildQuery) QueryName(queryName string) *HasChildQuery
- func (q *HasChildQuery) ScoreMode(scoreMode string) *HasChildQuery
- func (q *HasChildQuery) ShortCircuitCutoff(shortCircuitCutoff int) *HasChildQuery
- func (q *HasChildQuery) Source() (interface{}, error)
- type HasParentQuery
- func (q *HasParentQuery) Boost(boost float64) *HasParentQuery
- func (q *HasParentQuery) IgnoreUnmapped(ignore bool) *HasParentQuery
- func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery
- func (q *HasParentQuery) QueryName(queryName string) *HasParentQuery
- func (q *HasParentQuery) Score(score bool) *HasParentQuery
- func (q *HasParentQuery) Source() (interface{}, error)
- type Highlight
- func (hl *Highlight) BoundaryChars(boundaryChars string) *Highlight
- func (hl *Highlight) BoundaryMaxScan(boundaryMaxScan int) *Highlight
- func (hl *Highlight) BoundaryScannerLocale(boundaryScannerLocale string) *Highlight
- func (hl *Highlight) BoundaryScannerType(boundaryScannerType string) *Highlight
- func (hl *Highlight) Encoder(encoder string) *Highlight
- func (hl *Highlight) Field(name string) *Highlight
- func (hl *Highlight) Fields(fields ...*HighlighterField) *Highlight
- func (hl *Highlight) ForceSource(forceSource bool) *Highlight
- func (hl *Highlight) FragmentSize(fragmentSize int) *Highlight
- func (hl *Highlight) Fragmenter(fragmenter string) *Highlight
- func (hl *Highlight) HighlightFilter(highlightFilter bool) *Highlight
- func (hl *Highlight) HighlightQuery(highlightQuery Query) *Highlight
- func (hl *Highlight) HighlighterType(highlighterType string) *Highlight
- func (hl *Highlight) NoMatchSize(noMatchSize int) *Highlight
- func (hl *Highlight) NumOfFragments(numOfFragments int) *Highlight
- func (hl *Highlight) Options(options map[string]interface{}) *Highlight
- func (hl *Highlight) Order(order string) *Highlight
- func (hl *Highlight) PostTags(postTags ...string) *Highlight
- func (hl *Highlight) PreTags(preTags ...string) *Highlight
- func (hl *Highlight) RequireFieldMatch(requireFieldMatch bool) *Highlight
- func (hl *Highlight) Source() (interface{}, error)
- func (hl *Highlight) TagsSchema(schemaName string) *Highlight
- func (hl *Highlight) UseExplicitFieldOrder(useExplicitFieldOrder bool) *Highlight
- type HighlighterField
- func (f *HighlighterField) BoundaryChars(boundaryChars ...rune) *HighlighterField
- func (f *HighlighterField) BoundaryMaxScan(boundaryMaxScan int) *HighlighterField
- func (f *HighlighterField) ForceSource(forceSource bool) *HighlighterField
- func (f *HighlighterField) FragmentOffset(fragmentOffset int) *HighlighterField
- func (f *HighlighterField) FragmentSize(fragmentSize int) *HighlighterField
- func (f *HighlighterField) Fragmenter(fragmenter string) *HighlighterField
- func (f *HighlighterField) HighlightFilter(highlightFilter bool) *HighlighterField
- func (f *HighlighterField) HighlightQuery(highlightQuery Query) *HighlighterField
- func (f *HighlighterField) HighlighterType(highlighterType string) *HighlighterField
- func (f *HighlighterField) MatchedFields(matchedFields ...string) *HighlighterField
- func (f *HighlighterField) NoMatchSize(noMatchSize int) *HighlighterField
- func (f *HighlighterField) NumOfFragments(numOfFragments int) *HighlighterField
- func (f *HighlighterField) Options(options map[string]interface{}) *HighlighterField
- func (f *HighlighterField) Order(order string) *HighlighterField
- func (f *HighlighterField) PhraseLimit(phraseLimit int) *HighlighterField
- func (f *HighlighterField) PostTags(postTags ...string) *HighlighterField
- func (f *HighlighterField) PreTags(preTags ...string) *HighlighterField
- func (f *HighlighterField) RequireFieldMatch(requireFieldMatch bool) *HighlighterField
- func (f *HighlighterField) Source() (interface{}, error)
- type HistogramAggregation
- func (a *HistogramAggregation) ExtendedBounds(min, max float64) *HistogramAggregation
- func (a *HistogramAggregation) ExtendedBoundsMax(max float64) *HistogramAggregation
- func (a *HistogramAggregation) ExtendedBoundsMin(min float64) *HistogramAggregation
- func (a *HistogramAggregation) Field(field string) *HistogramAggregation
- func (a *HistogramAggregation) Interval(interval float64) *HistogramAggregation
- func (a *HistogramAggregation) MaxBounds(max float64) *HistogramAggregation
- func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation
- func (a *HistogramAggregation) MinBounds(min float64) *HistogramAggregation
- func (a *HistogramAggregation) MinDocCount(minDocCount int64) *HistogramAggregation
- func (a *HistogramAggregation) Missing(missing interface{}) *HistogramAggregation
- func (a *HistogramAggregation) Offset(offset float64) *HistogramAggregation
- func (a *HistogramAggregation) Order(order string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByAggregation(aggName string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByCount(asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByCountAsc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByCountDesc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByKey(asc bool) *HistogramAggregation
- func (a *HistogramAggregation) OrderByKeyAsc() *HistogramAggregation
- func (a *HistogramAggregation) OrderByKeyDesc() *HistogramAggregation
- func (a *HistogramAggregation) Script(script *Script) *HistogramAggregation
- func (a *HistogramAggregation) Source() (interface{}, error)
- func (a *HistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *HistogramAggregation
- type HoltLinearMovAvgModel
- type HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Alpha(alpha float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Beta(beta float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Gamma(gamma float64) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Name() string
- func (m *HoltWintersMovAvgModel) Pad(pad bool) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Period(period int) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) SeasonalityType(typ string) *HoltWintersMovAvgModel
- func (m *HoltWintersMovAvgModel) Settings() map[string]interface{}
- type IPRangeAggregation
- func (a *IPRangeAggregation) AddMaskRange(mask string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddMaskRangeWithKey(key, mask string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddRange(from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddRangeWithKey(key, from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedFrom(to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedFromWithKey(key, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedTo(from string) *IPRangeAggregation
- func (a *IPRangeAggregation) AddUnboundedToWithKey(key, from string) *IPRangeAggregation
- func (a *IPRangeAggregation) Between(from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) BetweenWithKey(key, from, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) Field(field string) *IPRangeAggregation
- func (a *IPRangeAggregation) Gt(from string) *IPRangeAggregation
- func (a *IPRangeAggregation) GtWithKey(key, from string) *IPRangeAggregation
- func (a *IPRangeAggregation) Keyed(keyed bool) *IPRangeAggregation
- func (a *IPRangeAggregation) Lt(to string) *IPRangeAggregation
- func (a *IPRangeAggregation) LtWithKey(key, to string) *IPRangeAggregation
- func (a *IPRangeAggregation) Meta(metaData map[string]interface{}) *IPRangeAggregation
- func (a *IPRangeAggregation) Source() (interface{}, error)
- func (a *IPRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *IPRangeAggregation
- type IPRangeAggregationEntry
- type IdsQuery
- type IndexResponse
- type IndexSegments
- type IndexSegmentsDetails
- type IndexSegmentsRamTree
- type IndexSegmentsRouting
- type IndexSegmentsShards
- type IndexSegmentsSort
- type IndexService
- func (s *IndexService) BodyJson(body interface{}) *IndexService
- func (s *IndexService) BodyString(body string) *IndexService
- func (s *IndexService) Do(ctx context.Context) (*IndexResponse, error)
- func (s *IndexService) ErrorTrace(errorTrace bool) *IndexService
- func (s *IndexService) FilterPath(filterPath ...string) *IndexService
- func (s *IndexService) Header(name string, value string) *IndexService
- func (s *IndexService) Headers(headers http.Header) *IndexService
- func (s *IndexService) Human(human bool) *IndexService
- func (s *IndexService) Id(id string) *IndexService
- func (s *IndexService) IfPrimaryTerm(primaryTerm int64) *IndexService
- func (s *IndexService) IfSeqNo(seqNo int64) *IndexService
- func (s *IndexService) Index(index string) *IndexService
- func (s *IndexService) OpType(opType string) *IndexService
- func (s *IndexService) Parent(parent string) *IndexService
- func (s *IndexService) Pipeline(pipeline string) *IndexService
- func (s *IndexService) Pretty(pretty bool) *IndexService
- func (s *IndexService) Refresh(refresh string) *IndexService
- func (s *IndexService) Routing(routing string) *IndexService
- func (s *IndexService) TTL(ttl string) *IndexService
- func (s *IndexService) Timeout(timeout string) *IndexService
- func (s *IndexService) Timestamp(timestamp string) *IndexService
- func (s *IndexService) Ttl(ttl string) *IndexService
- func (s *IndexService) Type(typ string) *IndexService
- func (s *IndexService) Validate() error
- func (s *IndexService) Version(version interface{}) *IndexService
- func (s *IndexService) VersionType(versionType string) *IndexService
- func (s *IndexService) WaitForActiveShards(waitForActiveShards string) *IndexService
- type IndexStats
- type IndexStatsCommit
- type IndexStatsCompletion
- type IndexStatsDetails
- type IndexStatsDocs
- type IndexStatsFielddata
- type IndexStatsFilterCache
- type IndexStatsFlush
- type IndexStatsGet
- type IndexStatsIdCache
- type IndexStatsIndexing
- type IndexStatsMerges
- type IndexStatsPercolate
- type IndexStatsQueryCache
- type IndexStatsRecovery
- type IndexStatsRefresh
- type IndexStatsRequestCache
- type IndexStatsRetentionLease
- type IndexStatsRetentionLeases
- type IndexStatsRouting
- type IndexStatsSearch
- type IndexStatsSegments
- type IndexStatsSeqNo
- type IndexStatsShardPath
- type IndexStatsStore
- type IndexStatsSuggest
- type IndexStatsTranslog
- type IndexStatsWarmer
- type IndicesAnalyzeRequest
- type IndicesAnalyzeResponse
- type IndicesAnalyzeResponseDetail
- type IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Analyzer(analyzer string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Attributes(attributes ...string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) BodyJson(body interface{}) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) BodyString(body string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) CharFilter(charFilter ...string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Do(ctx context.Context) (*IndicesAnalyzeResponse, error)
- func (s *IndicesAnalyzeService) ErrorTrace(errorTrace bool) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Explain(explain bool) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Field(field string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Filter(filter ...string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) FilterPath(filterPath ...string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Format(format string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Header(name string, value string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Headers(headers http.Header) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Human(human bool) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Index(index string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) PreferLocal(preferLocal bool) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Pretty(pretty bool) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Request(request *IndicesAnalyzeRequest) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Text(text ...string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Tokenizer(tokenizer string) *IndicesAnalyzeService
- func (s *IndicesAnalyzeService) Validate() error
- type IndicesClearCacheResponse
- type IndicesClearCacheService
- func (s *IndicesClearCacheService) AllowNoIndices(allowNoIndices bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Do(ctx context.Context) (*IndicesClearCacheResponse, error)
- func (s *IndicesClearCacheService) ErrorTrace(errorTrace bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) ExpandWildcards(expandWildcards string) *IndicesClearCacheService
- func (s *IndicesClearCacheService) FieldData(fieldData bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Fields(fields string) *IndicesClearCacheService
- func (s *IndicesClearCacheService) FilterPath(filterPath ...string) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Header(name string, value string) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Headers(headers http.Header) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Human(human bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Index(indices ...string) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Pretty(pretty bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Query(queryCache bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Request(requestCache bool) *IndicesClearCacheService
- func (s *IndicesClearCacheService) Validate() error
- type IndicesCloseResponse
- type IndicesCloseService
- func (s *IndicesCloseService) AllowNoIndices(allowNoIndices bool) *IndicesCloseService
- func (s *IndicesCloseService) Do(ctx context.Context) (*IndicesCloseResponse, error)
- func (s *IndicesCloseService) ErrorTrace(errorTrace bool) *IndicesCloseService
- func (s *IndicesCloseService) ExpandWildcards(expandWildcards string) *IndicesCloseService
- func (s *IndicesCloseService) FilterPath(filterPath ...string) *IndicesCloseService
- func (s *IndicesCloseService) Header(name string, value string) *IndicesCloseService
- func (s *IndicesCloseService) Headers(headers http.Header) *IndicesCloseService
- func (s *IndicesCloseService) Human(human bool) *IndicesCloseService
- func (s *IndicesCloseService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesCloseService
- func (s *IndicesCloseService) Index(index string) *IndicesCloseService
- func (s *IndicesCloseService) MasterTimeout(masterTimeout string) *IndicesCloseService
- func (s *IndicesCloseService) Pretty(pretty bool) *IndicesCloseService
- func (s *IndicesCloseService) Timeout(timeout string) *IndicesCloseService
- func (s *IndicesCloseService) Validate() error
- type IndicesCreateResult
- type IndicesCreateService
- func (s *IndicesCreateService) Body(body string) *IndicesCreateService
- func (s *IndicesCreateService) BodyJson(body interface{}) *IndicesCreateService
- func (s *IndicesCreateService) BodyString(body string) *IndicesCreateService
- func (s *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, error)
- func (s *IndicesCreateService) ErrorTrace(errorTrace bool) *IndicesCreateService
- func (s *IndicesCreateService) FilterPath(filterPath ...string) *IndicesCreateService
- func (s *IndicesCreateService) Header(name string, value string) *IndicesCreateService
- func (s *IndicesCreateService) Headers(headers http.Header) *IndicesCreateService
- func (s *IndicesCreateService) Human(human bool) *IndicesCreateService
- func (s *IndicesCreateService) IncludeTypeName(include bool) *IndicesCreateService
- func (s *IndicesCreateService) Index(index string) *IndicesCreateService
- func (s *IndicesCreateService) MasterTimeout(masterTimeout string) *IndicesCreateService
- func (s *IndicesCreateService) Pretty(pretty bool) *IndicesCreateService
- func (s *IndicesCreateService) Timeout(timeout string) *IndicesCreateService
- func (s *IndicesCreateService) UpdateAllTypes(update bool) *IndicesCreateService
- type IndicesDeleteResponse
- type IndicesDeleteService
- func (s *IndicesDeleteService) Do(ctx context.Context) (*IndicesDeleteResponse, error)
- func (s *IndicesDeleteService) ErrorTrace(errorTrace bool) *IndicesDeleteService
- func (s *IndicesDeleteService) FilterPath(filterPath ...string) *IndicesDeleteService
- func (s *IndicesDeleteService) Header(name string, value string) *IndicesDeleteService
- func (s *IndicesDeleteService) Headers(headers http.Header) *IndicesDeleteService
- func (s *IndicesDeleteService) Human(human bool) *IndicesDeleteService
- func (s *IndicesDeleteService) Index(index []string) *IndicesDeleteService
- func (s *IndicesDeleteService) MasterTimeout(masterTimeout string) *IndicesDeleteService
- func (s *IndicesDeleteService) Pretty(pretty bool) *IndicesDeleteService
- func (s *IndicesDeleteService) Timeout(timeout string) *IndicesDeleteService
- func (s *IndicesDeleteService) Validate() error
- type IndicesDeleteTemplateResponse
- type IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Do(ctx context.Context) (*IndicesDeleteTemplateResponse, error)
- func (s *IndicesDeleteTemplateService) ErrorTrace(errorTrace bool) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) FilterPath(filterPath ...string) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Header(name string, value string) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Headers(headers http.Header) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Human(human bool) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) MasterTimeout(masterTimeout string) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Name(name string) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Pretty(pretty bool) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Timeout(timeout string) *IndicesDeleteTemplateService
- func (s *IndicesDeleteTemplateService) Validate() error
- type IndicesExistsService
- func (s *IndicesExistsService) AllowNoIndices(allowNoIndices bool) *IndicesExistsService
- func (s *IndicesExistsService) Do(ctx context.Context) (bool, error)
- func (s *IndicesExistsService) ErrorTrace(errorTrace bool) *IndicesExistsService
- func (s *IndicesExistsService) ExpandWildcards(expandWildcards string) *IndicesExistsService
- func (s *IndicesExistsService) FilterPath(filterPath ...string) *IndicesExistsService
- func (s *IndicesExistsService) Header(name string, value string) *IndicesExistsService
- func (s *IndicesExistsService) Headers(headers http.Header) *IndicesExistsService
- func (s *IndicesExistsService) Human(human bool) *IndicesExistsService
- func (s *IndicesExistsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsService
- func (s *IndicesExistsService) Index(index []string) *IndicesExistsService
- func (s *IndicesExistsService) Local(local bool) *IndicesExistsService
- func (s *IndicesExistsService) Pretty(pretty bool) *IndicesExistsService
- func (s *IndicesExistsService) Validate() error
- type IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Do(ctx context.Context) (bool, error)
- func (s *IndicesExistsTemplateService) ErrorTrace(errorTrace bool) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) FilterPath(filterPath ...string) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Header(name string, value string) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Headers(headers http.Header) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Human(human bool) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) IncludeTypeName(include bool) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Local(local bool) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Name(name string) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Pretty(pretty bool) *IndicesExistsTemplateService
- func (s *IndicesExistsTemplateService) Validate() error
- type IndicesExistsTypeService
- func (s *IndicesExistsTypeService) AllowNoIndices(allowNoIndices bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Do(ctx context.Context) (bool, error)
- func (s *IndicesExistsTypeService) ErrorTrace(errorTrace bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) ExpandWildcards(expandWildcards string) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) FilterPath(filterPath ...string) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Header(name string, value string) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Headers(headers http.Header) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Human(human bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) IncludeTypeName(include bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Index(indices ...string) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Local(local bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Pretty(pretty bool) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Type(types ...string) *IndicesExistsTypeService
- func (s *IndicesExistsTypeService) Validate() error
- type IndicesFlushResponse
- type IndicesFlushService
- func (s *IndicesFlushService) AllowNoIndices(allowNoIndices bool) *IndicesFlushService
- func (s *IndicesFlushService) Do(ctx context.Context) (*IndicesFlushResponse, error)
- func (s *IndicesFlushService) ErrorTrace(errorTrace bool) *IndicesFlushService
- func (s *IndicesFlushService) ExpandWildcards(expandWildcards string) *IndicesFlushService
- func (s *IndicesFlushService) FilterPath(filterPath ...string) *IndicesFlushService
- func (s *IndicesFlushService) Force(force bool) *IndicesFlushService
- func (s *IndicesFlushService) Header(name string, value string) *IndicesFlushService
- func (s *IndicesFlushService) Headers(headers http.Header) *IndicesFlushService
- func (s *IndicesFlushService) Human(human bool) *IndicesFlushService
- func (s *IndicesFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesFlushService
- func (s *IndicesFlushService) Index(indices ...string) *IndicesFlushService
- func (s *IndicesFlushService) Pretty(pretty bool) *IndicesFlushService
- func (s *IndicesFlushService) Validate() error
- func (s *IndicesFlushService) WaitIfOngoing(waitIfOngoing bool) *IndicesFlushService
- type IndicesForcemergeResponse
- type IndicesForcemergeService
- func (s *IndicesForcemergeService) AllowNoIndices(allowNoIndices bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Do(ctx context.Context) (*IndicesForcemergeResponse, error)
- func (s *IndicesForcemergeService) ErrorTrace(errorTrace bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) ExpandWildcards(expandWildcards string) *IndicesForcemergeService
- func (s *IndicesForcemergeService) FilterPath(filterPath ...string) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Flush(flush bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Header(name string, value string) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Headers(headers http.Header) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Human(human bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Index(index ...string) *IndicesForcemergeService
- func (s *IndicesForcemergeService) MaxNumSegments(maxNumSegments interface{}) *IndicesForcemergeService
- func (s *IndicesForcemergeService) OnlyExpungeDeletes(onlyExpungeDeletes bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Pretty(pretty bool) *IndicesForcemergeService
- func (s *IndicesForcemergeService) Validate() error
- type IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Do(ctx context.Context) (map[string]interface{}, error)
- func (s *IndicesGetFieldMappingService) ErrorTrace(errorTrace bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) ExpandWildcards(expandWildcards string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Field(fields ...string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) FilterPath(filterPath ...string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Header(name string, value string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Headers(headers http.Header) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Human(human bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Index(indices ...string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Local(local bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Pretty(pretty bool) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Type(types ...string) *IndicesGetFieldMappingService
- func (s *IndicesGetFieldMappingService) Validate() error
- type IndicesGetMappingService
- func (s *IndicesGetMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Do(ctx context.Context) (map[string]interface{}, error)
- func (s *IndicesGetMappingService) ErrorTrace(errorTrace bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) ExpandWildcards(expandWildcards string) *IndicesGetMappingService
- func (s *IndicesGetMappingService) FilterPath(filterPath ...string) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Header(name string, value string) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Headers(headers http.Header) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Human(human bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) IncludeTypeName(include bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Index(indices ...string) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Local(local bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Pretty(pretty bool) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Type(types ...string) *IndicesGetMappingService
- func (s *IndicesGetMappingService) Validate() error
- type IndicesGetResponse
- type IndicesGetService
- func (s *IndicesGetService) AllowNoIndices(allowNoIndices bool) *IndicesGetService
- func (s *IndicesGetService) Do(ctx context.Context) (map[string]*IndicesGetResponse, error)
- func (s *IndicesGetService) ErrorTrace(errorTrace bool) *IndicesGetService
- func (s *IndicesGetService) ExpandWildcards(expandWildcards string) *IndicesGetService
- func (s *IndicesGetService) Feature(features ...string) *IndicesGetService
- func (s *IndicesGetService) FilterPath(filterPath ...string) *IndicesGetService
- func (s *IndicesGetService) Header(name string, value string) *IndicesGetService
- func (s *IndicesGetService) Headers(headers http.Header) *IndicesGetService
- func (s *IndicesGetService) Human(human bool) *IndicesGetService
- func (s *IndicesGetService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetService
- func (s *IndicesGetService) IncludeTypeName(include bool) *IndicesGetService
- func (s *IndicesGetService) Index(indices ...string) *IndicesGetService
- func (s *IndicesGetService) Local(local bool) *IndicesGetService
- func (s *IndicesGetService) Pretty(pretty bool) *IndicesGetService
- func (s *IndicesGetService) Validate() error
- type IndicesGetSettingsResponse
- type IndicesGetSettingsService
- func (s *IndicesGetSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Do(ctx context.Context) (map[string]*IndicesGetSettingsResponse, error)
- func (s *IndicesGetSettingsService) ErrorTrace(errorTrace bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) ExpandWildcards(expandWildcards string) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) FilterPath(filterPath ...string) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) FlatSettings(flatSettings bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Header(name string, value string) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Headers(headers http.Header) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Human(human bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Index(indices ...string) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Local(local bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Name(name ...string) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Pretty(pretty bool) *IndicesGetSettingsService
- func (s *IndicesGetSettingsService) Validate() error
- type IndicesGetTemplateResponse
- type IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Do(ctx context.Context) (map[string]*IndicesGetTemplateResponse, error)
- func (s *IndicesGetTemplateService) ErrorTrace(errorTrace bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) FilterPath(filterPath ...string) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) FlatSettings(flatSettings bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Header(name string, value string) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Headers(headers http.Header) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Human(human bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) IncludeTypeName(include bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Local(local bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Name(name ...string) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Pretty(pretty bool) *IndicesGetTemplateService
- func (s *IndicesGetTemplateService) Validate() error
- type IndicesOpenResponse
- type IndicesOpenService
- func (s *IndicesOpenService) AllowNoIndices(allowNoIndices bool) *IndicesOpenService
- func (s *IndicesOpenService) Do(ctx context.Context) (*IndicesOpenResponse, error)
- func (s *IndicesOpenService) ErrorTrace(errorTrace bool) *IndicesOpenService
- func (s *IndicesOpenService) ExpandWildcards(expandWildcards string) *IndicesOpenService
- func (s *IndicesOpenService) FilterPath(filterPath ...string) *IndicesOpenService
- func (s *IndicesOpenService) Header(name string, value string) *IndicesOpenService
- func (s *IndicesOpenService) Headers(headers http.Header) *IndicesOpenService
- func (s *IndicesOpenService) Human(human bool) *IndicesOpenService
- func (s *IndicesOpenService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesOpenService
- func (s *IndicesOpenService) Index(index string) *IndicesOpenService
- func (s *IndicesOpenService) MasterTimeout(masterTimeout string) *IndicesOpenService
- func (s *IndicesOpenService) Pretty(pretty bool) *IndicesOpenService
- func (s *IndicesOpenService) Timeout(timeout string) *IndicesOpenService
- func (s *IndicesOpenService) Validate() error
- func (s *IndicesOpenService) WaitForActiveShards(waitForActiveShards string) *IndicesOpenService
- type IndicesPutMappingService
- func (s *IndicesPutMappingService) AllowNoIndices(allowNoIndices bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) BodyJson(mapping map[string]interface{}) *IndicesPutMappingService
- func (s *IndicesPutMappingService) BodyString(mapping string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Do(ctx context.Context) (*PutMappingResponse, error)
- func (s *IndicesPutMappingService) ErrorTrace(errorTrace bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) ExpandWildcards(expandWildcards string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) FilterPath(filterPath ...string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Header(name string, value string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Headers(headers http.Header) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Human(human bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) IncludeTypeName(include bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Index(indices ...string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) MasterTimeout(masterTimeout string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Pretty(pretty bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Timeout(timeout string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Type(typ string) *IndicesPutMappingService
- func (s *IndicesPutMappingService) UpdateAllTypes(update bool) *IndicesPutMappingService
- func (s *IndicesPutMappingService) Validate() error
- type IndicesPutSettingsResponse
- type IndicesPutSettingsService
- func (s *IndicesPutSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) BodyJson(body interface{}) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) BodyString(body string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Do(ctx context.Context) (*IndicesPutSettingsResponse, error)
- func (s *IndicesPutSettingsService) ErrorTrace(errorTrace bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) ExpandWildcards(expandWildcards string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) FilterPath(filterPath ...string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) FlatSettings(flatSettings bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Header(name string, value string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Headers(headers http.Header) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Human(human bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Index(indices ...string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) MasterTimeout(masterTimeout string) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Pretty(pretty bool) *IndicesPutSettingsService
- func (s *IndicesPutSettingsService) Validate() error
- type IndicesPutTemplateResponse
- type IndicesPutTemplateService
- func (s *IndicesPutTemplateService) BodyJson(body interface{}) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) BodyString(body string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Cause(cause string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Create(create bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Do(ctx context.Context) (*IndicesPutTemplateResponse, error)
- func (s *IndicesPutTemplateService) ErrorTrace(errorTrace bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) FilterPath(filterPath ...string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) FlatSettings(flatSettings bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Header(name string, value string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Headers(headers http.Header) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Human(human bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) IncludeTypeName(include bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) MasterTimeout(masterTimeout string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Name(name string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Order(order interface{}) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Pretty(pretty bool) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Timeout(timeout string) *IndicesPutTemplateService
- func (s *IndicesPutTemplateService) Validate() error
- func (s *IndicesPutTemplateService) Version(version int) *IndicesPutTemplateService
- type IndicesRolloverResponse
- type IndicesRolloverService
- func (s *IndicesRolloverService) AddCondition(name string, value interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) AddMapping(typ string, mapping interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) AddMaxIndexAgeCondition(time string) *IndicesRolloverService
- func (s *IndicesRolloverService) AddMaxIndexDocsCondition(docs int64) *IndicesRolloverService
- func (s *IndicesRolloverService) AddSetting(name string, value interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) Alias(alias string) *IndicesRolloverService
- func (s *IndicesRolloverService) BodyJson(body interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) BodyString(body string) *IndicesRolloverService
- func (s *IndicesRolloverService) Conditions(conditions map[string]interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) Do(ctx context.Context) (*IndicesRolloverResponse, error)
- func (s *IndicesRolloverService) DryRun(dryRun bool) *IndicesRolloverService
- func (s *IndicesRolloverService) ErrorTrace(errorTrace bool) *IndicesRolloverService
- func (s *IndicesRolloverService) FilterPath(filterPath ...string) *IndicesRolloverService
- func (s *IndicesRolloverService) Header(name string, value string) *IndicesRolloverService
- func (s *IndicesRolloverService) Headers(headers http.Header) *IndicesRolloverService
- func (s *IndicesRolloverService) Human(human bool) *IndicesRolloverService
- func (s *IndicesRolloverService) Mappings(mappings map[string]interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) MasterTimeout(masterTimeout string) *IndicesRolloverService
- func (s *IndicesRolloverService) NewIndex(newIndex string) *IndicesRolloverService
- func (s *IndicesRolloverService) Pretty(pretty bool) *IndicesRolloverService
- func (s *IndicesRolloverService) Settings(settings map[string]interface{}) *IndicesRolloverService
- func (s *IndicesRolloverService) Timeout(timeout string) *IndicesRolloverService
- func (s *IndicesRolloverService) Validate() error
- func (s *IndicesRolloverService) WaitForActiveShards(waitForActiveShards string) *IndicesRolloverService
- type IndicesSegmentsResponse
- type IndicesSegmentsService
- func (s *IndicesSegmentsService) AllowNoIndices(allowNoIndices bool) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Do(ctx context.Context) (*IndicesSegmentsResponse, error)
- func (s *IndicesSegmentsService) ErrorTrace(errorTrace bool) *IndicesSegmentsService
- func (s *IndicesSegmentsService) ExpandWildcards(expandWildcards string) *IndicesSegmentsService
- func (s *IndicesSegmentsService) FilterPath(filterPath ...string) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Header(name string, value string) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Headers(headers http.Header) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Human(human bool) *IndicesSegmentsService
- func (s *IndicesSegmentsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Index(indices ...string) *IndicesSegmentsService
- func (s *IndicesSegmentsService) OperationThreading(operationThreading interface{}) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Pretty(pretty bool) *IndicesSegmentsService
- func (s *IndicesSegmentsService) Validate() error
- func (s *IndicesSegmentsService) Verbose(verbose bool) *IndicesSegmentsService
- type IndicesShardsSyncedFlushResult
- type IndicesShardsSyncedFlushResultFailure
- type IndicesShrinkResponse
- type IndicesShrinkService
- func (s *IndicesShrinkService) BodyJson(body interface{}) *IndicesShrinkService
- func (s *IndicesShrinkService) BodyString(body string) *IndicesShrinkService
- func (s *IndicesShrinkService) Do(ctx context.Context) (*IndicesShrinkResponse, error)
- func (s *IndicesShrinkService) ErrorTrace(errorTrace bool) *IndicesShrinkService
- func (s *IndicesShrinkService) FilterPath(filterPath ...string) *IndicesShrinkService
- func (s *IndicesShrinkService) Header(name string, value string) *IndicesShrinkService
- func (s *IndicesShrinkService) Headers(headers http.Header) *IndicesShrinkService
- func (s *IndicesShrinkService) Human(human bool) *IndicesShrinkService
- func (s *IndicesShrinkService) MasterTimeout(masterTimeout string) *IndicesShrinkService
- func (s *IndicesShrinkService) Pretty(pretty bool) *IndicesShrinkService
- func (s *IndicesShrinkService) Source(source string) *IndicesShrinkService
- func (s *IndicesShrinkService) Target(target string) *IndicesShrinkService
- func (s *IndicesShrinkService) Timeout(timeout string) *IndicesShrinkService
- func (s *IndicesShrinkService) Validate() error
- func (s *IndicesShrinkService) WaitForActiveShards(waitForActiveShards string) *IndicesShrinkService
- type IndicesStatsResponse
- type IndicesStatsService
- func (s *IndicesStatsService) CompletionFields(completionFields ...string) *IndicesStatsService
- func (s *IndicesStatsService) Do(ctx context.Context) (*IndicesStatsResponse, error)
- func (s *IndicesStatsService) ErrorTrace(errorTrace bool) *IndicesStatsService
- func (s *IndicesStatsService) FielddataFields(fielddataFields ...string) *IndicesStatsService
- func (s *IndicesStatsService) Fields(fields ...string) *IndicesStatsService
- func (s *IndicesStatsService) FilterPath(filterPath ...string) *IndicesStatsService
- func (s *IndicesStatsService) Groups(groups ...string) *IndicesStatsService
- func (s *IndicesStatsService) Header(name string, value string) *IndicesStatsService
- func (s *IndicesStatsService) Headers(headers http.Header) *IndicesStatsService
- func (s *IndicesStatsService) Human(human bool) *IndicesStatsService
- func (s *IndicesStatsService) Index(indices ...string) *IndicesStatsService
- func (s *IndicesStatsService) Level(level string) *IndicesStatsService
- func (s *IndicesStatsService) Metric(metric ...string) *IndicesStatsService
- func (s *IndicesStatsService) Pretty(pretty bool) *IndicesStatsService
- func (s *IndicesStatsService) Type(types ...string) *IndicesStatsService
- func (s *IndicesStatsService) Validate() error
- type IndicesSyncedFlushResponse
- type IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) AllowNoIndices(allowNoIndices bool) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Do(ctx context.Context) (*IndicesSyncedFlushResponse, error)
- func (s *IndicesSyncedFlushService) ErrorTrace(errorTrace bool) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) ExpandWildcards(expandWildcards string) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) FilterPath(filterPath ...string) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Header(name string, value string) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Headers(headers http.Header) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Human(human bool) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Index(indices ...string) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Pretty(pretty bool) *IndicesSyncedFlushService
- func (s *IndicesSyncedFlushService) Validate() error
- type IngestDeletePipelineResponse
- type IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Do(ctx context.Context) (*IngestDeletePipelineResponse, error)
- func (s *IngestDeletePipelineService) ErrorTrace(errorTrace bool) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) FilterPath(filterPath ...string) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Header(name string, value string) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Headers(headers http.Header) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Human(human bool) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Id(id string) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) MasterTimeout(masterTimeout string) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Pretty(pretty bool) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Timeout(timeout string) *IngestDeletePipelineService
- func (s *IngestDeletePipelineService) Validate() error
- type IngestGetPipeline
- type IngestGetPipelineResponse
- type IngestGetPipelineService
- func (s *IngestGetPipelineService) Do(ctx context.Context) (IngestGetPipelineResponse, error)
- func (s *IngestGetPipelineService) ErrorTrace(errorTrace bool) *IngestGetPipelineService
- func (s *IngestGetPipelineService) FilterPath(filterPath ...string) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Header(name string, value string) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Headers(headers http.Header) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Human(human bool) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Id(id ...string) *IngestGetPipelineService
- func (s *IngestGetPipelineService) MasterTimeout(masterTimeout string) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Pretty(pretty bool) *IngestGetPipelineService
- func (s *IngestGetPipelineService) Validate() error
- type IngestPutPipelineResponse
- type IngestPutPipelineService
- func (s *IngestPutPipelineService) BodyJson(body interface{}) *IngestPutPipelineService
- func (s *IngestPutPipelineService) BodyString(body string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Do(ctx context.Context) (*IngestPutPipelineResponse, error)
- func (s *IngestPutPipelineService) ErrorTrace(errorTrace bool) *IngestPutPipelineService
- func (s *IngestPutPipelineService) FilterPath(filterPath ...string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Header(name string, value string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Headers(headers http.Header) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Human(human bool) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Id(id string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) MasterTimeout(masterTimeout string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Pretty(pretty bool) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Timeout(timeout string) *IngestPutPipelineService
- func (s *IngestPutPipelineService) Validate() error
- type IngestSimulateDocumentResult
- type IngestSimulatePipelineResponse
- type IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) BodyJson(body interface{}) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) BodyString(body string) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Do(ctx context.Context) (*IngestSimulatePipelineResponse, error)
- func (s *IngestSimulatePipelineService) ErrorTrace(errorTrace bool) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) FilterPath(filterPath ...string) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Header(name string, value string) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Headers(headers http.Header) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Human(human bool) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Id(id string) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Pretty(pretty bool) *IngestSimulatePipelineService
- func (s *IngestSimulatePipelineService) Validate() error
- func (s *IngestSimulatePipelineService) Verbose(verbose bool) *IngestSimulatePipelineService
- type IngestSimulateProcessorResult
- type InnerHit
- func (hit *InnerHit) DocvalueField(docvalueField string) *InnerHit
- func (hit *InnerHit) DocvalueFieldWithFormat(docvalueField DocvalueField) *InnerHit
- func (hit *InnerHit) DocvalueFields(docvalueFields ...string) *InnerHit
- func (hit *InnerHit) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *InnerHit
- func (hit *InnerHit) Explain(explain bool) *InnerHit
- func (hit *InnerHit) FetchSource(fetchSource bool) *InnerHit
- func (hit *InnerHit) FetchSourceContext(fetchSourceContext *FetchSourceContext) *InnerHit
- func (hit *InnerHit) From(from int) *InnerHit
- func (hit *InnerHit) Highlight(highlight *Highlight) *InnerHit
- func (hit *InnerHit) Highlighter() *Highlight
- func (hit *InnerHit) Name(name string) *InnerHit
- func (hit *InnerHit) NoStoredFields() *InnerHit
- func (hit *InnerHit) Path(path string) *InnerHit
- func (hit *InnerHit) Query(query Query) *InnerHit
- func (hit *InnerHit) ScriptField(scriptField *ScriptField) *InnerHit
- func (hit *InnerHit) ScriptFields(scriptFields ...*ScriptField) *InnerHit
- func (hit *InnerHit) Size(size int) *InnerHit
- func (hit *InnerHit) Sort(field string, ascending bool) *InnerHit
- func (hit *InnerHit) SortBy(sorter ...Sorter) *InnerHit
- func (hit *InnerHit) SortWithInfo(info SortInfo) *InnerHit
- func (hit *InnerHit) Source() (interface{}, error)
- func (hit *InnerHit) StoredField(storedFieldName string) *InnerHit
- func (hit *InnerHit) StoredFields(storedFieldNames ...string) *InnerHit
- func (hit *InnerHit) TrackScores(trackScores bool) *InnerHit
- func (hit *InnerHit) Type(typ string) *InnerHit
- func (hit *InnerHit) Version(version bool) *InnerHit
- type JLHScoreSignificanceHeuristic
- type LaplaceSmoothingModel
- type LinearDecayFunction
- func (fn *LinearDecayFunction) Decay(decay float64) *LinearDecayFunction
- func (fn *LinearDecayFunction) FieldName(fieldName string) *LinearDecayFunction
- func (fn *LinearDecayFunction) GetMultiValueMode() string
- func (fn *LinearDecayFunction) GetWeight() *float64
- func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction
- func (fn *LinearDecayFunction) Name() string
- func (fn *LinearDecayFunction) Offset(offset interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Origin(origin interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Scale(scale interface{}) *LinearDecayFunction
- func (fn *LinearDecayFunction) Source() (interface{}, error)
- func (fn *LinearDecayFunction) Weight(weight float64) *LinearDecayFunction
- type LinearInterpolationSmoothingModel
- type LinearMovAvgModel
- type Logger
- type LoggerWithContext
- type MatchAllQuery
- type MatchNoneQuery
- type MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Analyzer(analyzer string) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Boost(boost float64) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) MaxExpansions(n int) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) QueryName(queryName string) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Slop(slop int) *MatchPhrasePrefixQuery
- func (q *MatchPhrasePrefixQuery) Source() (interface{}, error)
- type MatchPhraseQuery
- func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Boost(boost float64) *MatchPhraseQuery
- func (q *MatchPhraseQuery) QueryName(queryName string) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Slop(slop int) *MatchPhraseQuery
- func (q *MatchPhraseQuery) Source() (interface{}, error)
- type MatchQuery
- func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery
- func (q *MatchQuery) Boost(boost float64) *MatchQuery
- func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery
- func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery
- func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery
- func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery
- func (q *MatchQuery) Lenient(lenient bool) *MatchQuery
- func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery
- func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery
- func (q *MatchQuery) Operator(operator string) *MatchQuery
- func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery
- func (q *MatchQuery) QueryName(queryName string) *MatchQuery
- func (q *MatchQuery) Source() (interface{}, error)
- func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery
- type MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Fields(fields ...string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Format(format string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Missing(missing interface{}) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) Source() (interface{}, error)
- func (a *MatrixStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *MatrixStatsAggregation
- func (a *MatrixStatsAggregation) ValueType(valueType interface{}) *MatrixStatsAggregation
- type MaxAggregation
- func (a *MaxAggregation) Field(field string) *MaxAggregation
- func (a *MaxAggregation) Format(format string) *MaxAggregation
- func (a *MaxAggregation) Meta(metaData map[string]interface{}) *MaxAggregation
- func (a *MaxAggregation) Missing(missing interface{}) *MaxAggregation
- func (a *MaxAggregation) Script(script *Script) *MaxAggregation
- func (a *MaxAggregation) Source() (interface{}, error)
- func (a *MaxAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxAggregation
- type MaxBucketAggregation
- func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapInsertZeros() *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapPolicy(gapPolicy string) *MaxBucketAggregation
- func (a *MaxBucketAggregation) GapSkip() *MaxBucketAggregation
- func (a *MaxBucketAggregation) Meta(metaData map[string]interface{}) *MaxBucketAggregation
- func (a *MaxBucketAggregation) Source() (interface{}, error)
- type MgetResponse
- type MgetService
- func (s *MgetService) Add(items ...*MultiGetItem) *MgetService
- func (s *MgetService) Do(ctx context.Context) (*MgetResponse, error)
- func (s *MgetService) ErrorTrace(errorTrace bool) *MgetService
- func (s *MgetService) FilterPath(filterPath ...string) *MgetService
- func (s *MgetService) Header(name string, value string) *MgetService
- func (s *MgetService) Headers(headers http.Header) *MgetService
- func (s *MgetService) Human(human bool) *MgetService
- func (s *MgetService) Preference(preference string) *MgetService
- func (s *MgetService) Pretty(pretty bool) *MgetService
- func (s *MgetService) Realtime(realtime bool) *MgetService
- func (s *MgetService) Refresh(refresh string) *MgetService
- func (s *MgetService) Routing(routing string) *MgetService
- func (s *MgetService) Source() (interface{}, error)
- func (s *MgetService) StoredFields(storedFields ...string) *MgetService
- type MinAggregation
- func (a *MinAggregation) Field(field string) *MinAggregation
- func (a *MinAggregation) Format(format string) *MinAggregation
- func (a *MinAggregation) Meta(metaData map[string]interface{}) *MinAggregation
- func (a *MinAggregation) Missing(missing interface{}) *MinAggregation
- func (a *MinAggregation) Script(script *Script) *MinAggregation
- func (a *MinAggregation) Source() (interface{}, error)
- func (a *MinAggregation) SubAggregation(name string, subAggregation Aggregation) *MinAggregation
- type MinBucketAggregation
- func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAggregation
- func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation
- func (a *MinBucketAggregation) GapInsertZeros() *MinBucketAggregation
- func (a *MinBucketAggregation) GapPolicy(gapPolicy string) *MinBucketAggregation
- func (a *MinBucketAggregation) GapSkip() *MinBucketAggregation
- func (a *MinBucketAggregation) Meta(metaData map[string]interface{}) *MinBucketAggregation
- func (a *MinBucketAggregation) Source() (interface{}, error)
- type MissingAggregation
- func (a *MissingAggregation) Field(field string) *MissingAggregation
- func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation
- func (a *MissingAggregation) Source() (interface{}, error)
- func (a *MissingAggregation) SubAggregation(name string, subAggregation Aggregation) *MissingAggregation
- type MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Analyzer(analyzer string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Boost(boost float64) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) BoostTerms(boostTerms float64) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Field(fields ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Ids(ids ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) IgnoreLikeItems(ignoreDocs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) IgnoreLikeText(ignoreLikeText ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Include(include bool) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) LikeItems(docs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) LikeText(likeTexts ...string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxQueryTerms(maxQueryTerms int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinDocFreq(minDocFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinTermFreq(minTermFreq int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) QueryName(queryName string) *MoreLikeThisQuery
- func (q *MoreLikeThisQuery) Source() (interface{}, error)
- func (q *MoreLikeThisQuery) StopWord(stopWords ...string) *MoreLikeThisQuery
- type MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Doc(doc interface{}) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Fields(fields ...string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Index(index string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) LikeText(likeText string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Routing(routing string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Source() (interface{}, error)
- func (item *MoreLikeThisQueryItem) Type(typ string) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) Version(version int64) *MoreLikeThisQueryItem
- func (item *MoreLikeThisQueryItem) VersionType(versionType string) *MoreLikeThisQueryItem
- type MovAvgAggregationdeprecated
- func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregation
- func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation
- func (a *MovAvgAggregation) GapInsertZeros() *MovAvgAggregation
- func (a *MovAvgAggregation) GapPolicy(gapPolicy string) *MovAvgAggregation
- func (a *MovAvgAggregation) GapSkip() *MovAvgAggregation
- func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation
- func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation
- func (a *MovAvgAggregation) Model(model MovAvgModel) *MovAvgAggregation
- func (a *MovAvgAggregation) Predict(numPredictions int) *MovAvgAggregation
- func (a *MovAvgAggregation) Source() (interface{}, error)
- func (a *MovAvgAggregation) Window(window int) *MovAvgAggregation
- type MovAvgModel
- type MovFnAggregation
- func (a *MovFnAggregation) BucketsPath(bucketsPaths ...string) *MovFnAggregation
- func (a *MovFnAggregation) Format(format string) *MovFnAggregation
- func (a *MovFnAggregation) GapInsertZeros() *MovFnAggregation
- func (a *MovFnAggregation) GapPolicy(gapPolicy string) *MovFnAggregation
- func (a *MovFnAggregation) GapSkip() *MovFnAggregation
- func (a *MovFnAggregation) Meta(metaData map[string]interface{}) *MovFnAggregation
- func (a *MovFnAggregation) Script(script *Script) *MovFnAggregation
- func (a *MovFnAggregation) Source() (interface{}, error)
- func (a *MovFnAggregation) Window(window int) *MovFnAggregation
- type MoveAllocationCommand
- type MultiGetItem
- func (item *MultiGetItem) FetchSource(fetchSourceContext *FetchSourceContext) *MultiGetItem
- func (item *MultiGetItem) Id(id string) *MultiGetItem
- func (item *MultiGetItem) Index(index string) *MultiGetItem
- func (item *MultiGetItem) Routing(routing string) *MultiGetItem
- func (item *MultiGetItem) Source() (interface{}, error)
- func (item *MultiGetItem) StoredFields(storedFields ...string) *MultiGetItem
- func (item *MultiGetItem) Type(typ string) *MultiGetItem
- func (item *MultiGetItem) Version(version int64) *MultiGetItem
- func (item *MultiGetItem) VersionType(versionType string) *MultiGetItem
- type MultiMatchQuery
- func (q *MultiMatchQuery) Analyzer(analyzer string) *MultiMatchQuery
- func (q *MultiMatchQuery) Boost(boost float64) *MultiMatchQuery
- func (q *MultiMatchQuery) CutoffFrequency(cutoff float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Field(field string) *MultiMatchQuery
- func (q *MultiMatchQuery) FieldWithBoost(field string, boost float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Fuzziness(fuzziness string) *MultiMatchQuery
- func (q *MultiMatchQuery) FuzzyRewrite(fuzzyRewrite string) *MultiMatchQuery
- func (q *MultiMatchQuery) Lenient(lenient bool) *MultiMatchQuery
- func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery
- func (q *MultiMatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MultiMatchQuery
- func (q *MultiMatchQuery) Operator(operator string) *MultiMatchQuery
- func (q *MultiMatchQuery) PrefixLength(prefixLength int) *MultiMatchQuery
- func (q *MultiMatchQuery) QueryName(queryName string) *MultiMatchQuery
- func (q *MultiMatchQuery) Rewrite(rewrite string) *MultiMatchQuery
- func (q *MultiMatchQuery) Slop(slop int) *MultiMatchQuery
- func (q *MultiMatchQuery) Source() (interface{}, error)
- func (q *MultiMatchQuery) TieBreaker(tieBreaker float64) *MultiMatchQuery
- func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery
- func (q *MultiMatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MultiMatchQuery
- type MultiSearchResult
- type MultiSearchService
- func (s *MultiSearchService) Add(requests ...*SearchRequest) *MultiSearchService
- func (s *MultiSearchService) Do(ctx context.Context) (*MultiSearchResult, error)
- func (s *MultiSearchService) ErrorTrace(errorTrace bool) *MultiSearchService
- func (s *MultiSearchService) FilterPath(filterPath ...string) *MultiSearchService
- func (s *MultiSearchService) Header(name string, value string) *MultiSearchService
- func (s *MultiSearchService) Headers(headers http.Header) *MultiSearchService
- func (s *MultiSearchService) Human(human bool) *MultiSearchService
- func (s *MultiSearchService) Index(indices ...string) *MultiSearchService
- func (s *MultiSearchService) MaxConcurrentSearches(max int) *MultiSearchService
- func (s *MultiSearchService) PreFilterShardSize(size int) *MultiSearchService
- func (s *MultiSearchService) Pretty(pretty bool) *MultiSearchService
- func (s *MultiSearchService) RestTotalHitsAsInt(v bool) *MultiSearchService
- type MultiTermvectorItem
- func (s *MultiTermvectorItem) Doc(doc interface{}) *MultiTermvectorItem
- func (s *MultiTermvectorItem) FieldStatistics(fieldStatistics bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Fields(fields ...string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Id(id string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Index(index string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Offsets(offsets bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Parent(parent string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Payloads(payloads bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Preference(preference string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Realtime(realtime bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Routing(routing string) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Source() interface{}
- func (s *MultiTermvectorItem) TermStatistics(termStatistics bool) *MultiTermvectorItem
- func (s *MultiTermvectorItem) Type(typ string) *MultiTermvectorItem
- type MultiTermvectorResponse
- type MultiTermvectorService
- func (s *MultiTermvectorService) Add(docs ...*MultiTermvectorItem) *MultiTermvectorService
- func (s *MultiTermvectorService) BodyJson(body interface{}) *MultiTermvectorService
- func (s *MultiTermvectorService) BodyString(body string) *MultiTermvectorService
- func (s *MultiTermvectorService) Do(ctx context.Context) (*MultiTermvectorResponse, error)
- func (s *MultiTermvectorService) ErrorTrace(errorTrace bool) *MultiTermvectorService
- func (s *MultiTermvectorService) FieldStatistics(fieldStatistics bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Fields(fields []string) *MultiTermvectorService
- func (s *MultiTermvectorService) FilterPath(filterPath ...string) *MultiTermvectorService
- func (s *MultiTermvectorService) Header(name string, value string) *MultiTermvectorService
- func (s *MultiTermvectorService) Headers(headers http.Header) *MultiTermvectorService
- func (s *MultiTermvectorService) Human(human bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Ids(ids []string) *MultiTermvectorService
- func (s *MultiTermvectorService) Index(index string) *MultiTermvectorService
- func (s *MultiTermvectorService) Offsets(offsets bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Parent(parent string) *MultiTermvectorService
- func (s *MultiTermvectorService) Payloads(payloads bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Positions(positions bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Preference(preference string) *MultiTermvectorService
- func (s *MultiTermvectorService) Pretty(pretty bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Realtime(realtime bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Routing(routing string) *MultiTermvectorService
- func (s *MultiTermvectorService) Source() interface{}
- func (s *MultiTermvectorService) TermStatistics(termStatistics bool) *MultiTermvectorService
- func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService
- func (s *MultiTermvectorService) Validate() error
- func (s *MultiTermvectorService) Version(version interface{}) *MultiTermvectorService
- func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService
- type MultiValuesSourceFieldConfig
- type MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *MutualInformationSignificanceHeuristic
- func (sh *MutualInformationSignificanceHeuristic) Name() string
- func (sh *MutualInformationSignificanceHeuristic) Source() (interface{}, error)
- type NestedAggregation
- func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation
- func (a *NestedAggregation) Path(path string) *NestedAggregation
- func (a *NestedAggregation) Source() (interface{}, error)
- func (a *NestedAggregation) SubAggregation(name string, subAggregation Aggregation) *NestedAggregation
- type NestedHit
- type NestedQuery
- func (q *NestedQuery) Boost(boost float64) *NestedQuery
- func (q *NestedQuery) IgnoreUnmapped(value bool) *NestedQuery
- func (q *NestedQuery) InnerHit(innerHit *InnerHit) *NestedQuery
- func (q *NestedQuery) QueryName(queryName string) *NestedQuery
- func (q *NestedQuery) ScoreMode(scoreMode string) *NestedQuery
- func (q *NestedQuery) Source() (interface{}, error)
- type NestedSort
- type NodesInfoNode
- type NodesInfoNodeHTTP
- type NodesInfoNodeIngest
- type NodesInfoNodeIngestProcessorInfo
- type NodesInfoNodeJVM
- type NodesInfoNodeModule
- type NodesInfoNodeOS
- type NodesInfoNodePlugin
- type NodesInfoNodeProcess
- type NodesInfoNodeThreadPool
- type NodesInfoNodeThreadPoolSection
- type NodesInfoNodeTransport
- type NodesInfoNodeTransportProfile
- type NodesInfoResponse
- type NodesInfoService
- func (s *NodesInfoService) Do(ctx context.Context) (*NodesInfoResponse, error)
- func (s *NodesInfoService) ErrorTrace(errorTrace bool) *NodesInfoService
- func (s *NodesInfoService) FilterPath(filterPath ...string) *NodesInfoService
- func (s *NodesInfoService) FlatSettings(flatSettings bool) *NodesInfoService
- func (s *NodesInfoService) Header(name string, value string) *NodesInfoService
- func (s *NodesInfoService) Headers(headers http.Header) *NodesInfoService
- func (s *NodesInfoService) Human(human bool) *NodesInfoService
- func (s *NodesInfoService) Metric(metric ...string) *NodesInfoService
- func (s *NodesInfoService) NodeId(nodeId ...string) *NodesInfoService
- func (s *NodesInfoService) Pretty(pretty bool) *NodesInfoService
- func (s *NodesInfoService) Validate() error
- type NodesStatsBreaker
- type NodesStatsCompletionStats
- type NodesStatsDiscovery
- type NodesStatsDiscoveryStats
- type NodesStatsDocsStats
- type NodesStatsFielddataStats
- type NodesStatsFlushStats
- type NodesStatsGetStats
- type NodesStatsIndex
- type NodesStatsIndexingStats
- type NodesStatsIngest
- type NodesStatsIngestStats
- type NodesStatsMergeStats
- type NodesStatsNode
- type NodesStatsNodeFS
- type NodesStatsNodeFSEntry
- type NodesStatsNodeFSIOStats
- type NodesStatsNodeFSIOStatsEntry
- type NodesStatsNodeHTTP
- type NodesStatsNodeJVM
- type NodesStatsNodeJVMBufferPool
- type NodesStatsNodeJVMClasses
- type NodesStatsNodeJVMGC
- type NodesStatsNodeJVMGCCollector
- type NodesStatsNodeJVMMem
- type NodesStatsNodeJVMThreads
- type NodesStatsNodeOS
- type NodesStatsNodeOSCPU
- type NodesStatsNodeOSMem
- type NodesStatsNodeOSSwap
- type NodesStatsNodeProcess
- type NodesStatsNodeThreadPool
- type NodesStatsNodeTransport
- type NodesStatsPercolateStats
- type NodesStatsQueryCacheStats
- type NodesStatsRecoveryStats
- type NodesStatsRefreshStats
- type NodesStatsRequestCacheStats
- type NodesStatsResponse
- type NodesStatsScriptStats
- type NodesStatsSearchStats
- type NodesStatsSegmentsStats
- type NodesStatsService
- func (s *NodesStatsService) CompletionFields(completionFields ...string) *NodesStatsService
- func (s *NodesStatsService) Do(ctx context.Context) (*NodesStatsResponse, error)
- func (s *NodesStatsService) ErrorTrace(errorTrace bool) *NodesStatsService
- func (s *NodesStatsService) FielddataFields(fielddataFields ...string) *NodesStatsService
- func (s *NodesStatsService) Fields(fields ...string) *NodesStatsService
- func (s *NodesStatsService) FilterPath(filterPath ...string) *NodesStatsService
- func (s *NodesStatsService) Groups(groups bool) *NodesStatsService
- func (s *NodesStatsService) Header(name string, value string) *NodesStatsService
- func (s *NodesStatsService) Headers(headers http.Header) *NodesStatsService
- func (s *NodesStatsService) Human(human bool) *NodesStatsService
- func (s *NodesStatsService) IndexMetric(indexMetric ...string) *NodesStatsService
- func (s *NodesStatsService) Level(level string) *NodesStatsService
- func (s *NodesStatsService) Metric(metric ...string) *NodesStatsService
- func (s *NodesStatsService) NodeId(nodeId ...string) *NodesStatsService
- func (s *NodesStatsService) Pretty(pretty bool) *NodesStatsService
- func (s *NodesStatsService) Timeout(timeout string) *NodesStatsService
- func (s *NodesStatsService) Types(types ...string) *NodesStatsService
- func (s *NodesStatsService) Validate() error
- type NodesStatsStoreStats
- type NodesStatsSuggestStats
- type NodesStatsTranslogStats
- type NodesStatsWarmerStats
- type Notify
- type NumberDecoder
- type Operation
- type ParentIdQuery
- func (q *ParentIdQuery) Boost(boost float64) *ParentIdQuery
- func (q *ParentIdQuery) Id(id string) *ParentIdQuery
- func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery
- func (q *ParentIdQuery) InnerHit(innerHit *InnerHit) *ParentIdQuery
- func (q *ParentIdQuery) QueryName(queryName string) *ParentIdQuery
- func (q *ParentIdQuery) Source() (interface{}, error)
- func (q *ParentIdQuery) Type(typ string) *ParentIdQuery
- type PercentageScoreSignificanceHeuristic
- type PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Compression(compression float64) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Estimator(estimator string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Field(field string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Format(format string) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Meta(metaData map[string]interface{}) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Missing(missing interface{}) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Script(script *Script) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Source() (interface{}, error)
- func (a *PercentileRanksAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentileRanksAggregation
- func (a *PercentileRanksAggregation) Values(values ...float64) *PercentileRanksAggregation
- type PercentilesAggregation
- func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation
- func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation
- func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation
- func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation
- func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation
- func (a *PercentilesAggregation) Method(method string) *PercentilesAggregation
- func (a *PercentilesAggregation) Missing(missing interface{}) *PercentilesAggregation
- func (a *PercentilesAggregation) NumberOfSignificantValueDigits(digits int) *PercentilesAggregation
- func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation
- func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation
- func (a *PercentilesAggregation) Source() (interface{}, error)
- func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation
- type PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Format(format string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapInsertZeros() *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapPolicy(gapPolicy string) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) GapSkip() *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Percents(percents ...float64) *PercentilesBucketAggregation
- func (p *PercentilesBucketAggregation) Source() (interface{}, error)
- type PercolatorQuery
- func (q *PercolatorQuery) Document(docs ...interface{}) *PercolatorQuery
- func (q *PercolatorQuery) DocumentType(typ string) *PercolatorQuerydeprecated
- func (q *PercolatorQuery) Field(field string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentId(id string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentIndex(index string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentPreference(preference string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentRouting(routing string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentType(typ string) *PercolatorQuery
- func (q *PercolatorQuery) IndexedDocumentVersion(version int64) *PercolatorQuery
- func (q *PercolatorQuery) Name(name string) *PercolatorQuery
- func (q *PercolatorQuery) Source() (interface{}, error)
- type PerformRequestOptions
- type PhraseSuggester
- func (q *PhraseSuggester) Analyzer(analyzer string) *PhraseSuggester
- func (q *PhraseSuggester) CandidateGenerator(generator CandidateGenerator) *PhraseSuggester
- func (q *PhraseSuggester) CandidateGenerators(generators ...CandidateGenerator) *PhraseSuggester
- func (q *PhraseSuggester) ClearCandidateGenerator() *PhraseSuggester
- func (q *PhraseSuggester) CollateParams(collateParams map[string]interface{}) *PhraseSuggester
- func (q *PhraseSuggester) CollatePreference(collatePreference string) *PhraseSuggester
- func (q *PhraseSuggester) CollatePrune(collatePrune bool) *PhraseSuggester
- func (q *PhraseSuggester) CollateQuery(collateQuery *Script) *PhraseSuggester
- func (q *PhraseSuggester) Confidence(confidence float64) *PhraseSuggester
- func (q *PhraseSuggester) ContextQueries(queries ...SuggesterContextQuery) *PhraseSuggester
- func (q *PhraseSuggester) ContextQuery(query SuggesterContextQuery) *PhraseSuggester
- func (q *PhraseSuggester) Field(field string) *PhraseSuggester
- func (q *PhraseSuggester) ForceUnigrams(forceUnigrams bool) *PhraseSuggester
- func (q *PhraseSuggester) GramSize(gramSize int) *PhraseSuggester
- func (q *PhraseSuggester) Highlight(preTag, postTag string) *PhraseSuggester
- func (q *PhraseSuggester) MaxErrors(maxErrors float64) *PhraseSuggester
- func (q *PhraseSuggester) Name() string
- func (q *PhraseSuggester) RealWordErrorLikelihood(realWordErrorLikelihood float64) *PhraseSuggester
- func (q *PhraseSuggester) Separator(separator string) *PhraseSuggester
- func (q *PhraseSuggester) ShardSize(shardSize int) *PhraseSuggester
- func (q *PhraseSuggester) Size(size int) *PhraseSuggester
- func (q *PhraseSuggester) SmoothingModel(smoothingModel SmoothingModel) *PhraseSuggester
- func (q *PhraseSuggester) Source(includeName bool) (interface{}, error)
- func (q *PhraseSuggester) Text(text string) *PhraseSuggester
- func (q *PhraseSuggester) TokenLimit(tokenLimit int) *PhraseSuggester
- type PingResult
- type PingService
- func (s *PingService) Do(ctx context.Context) (*PingResult, int, error)
- func (s *PingService) ErrorTrace(errorTrace bool) *PingService
- func (s *PingService) FilterPath(filterPath ...string) *PingService
- func (s *PingService) Header(name string, value string) *PingService
- func (s *PingService) Headers(headers http.Header) *PingService
- func (s *PingService) HttpHeadOnly(httpHeadOnly bool) *PingService
- func (s *PingService) Human(human bool) *PingService
- func (s *PingService) Pretty(pretty bool) *PingService
- func (s *PingService) Timeout(timeout string) *PingService
- func (s *PingService) URL(url string) *PingService
- type PrefixQuery
- type ProfileResult
- type PutMappingResponse
- type PutScriptResponse
- type PutScriptService
- func (s *PutScriptService) BodyJson(body interface{}) *PutScriptService
- func (s *PutScriptService) BodyString(body string) *PutScriptService
- func (s *PutScriptService) Context(context string) *PutScriptService
- func (s *PutScriptService) Do(ctx context.Context) (*PutScriptResponse, error)
- func (s *PutScriptService) ErrorTrace(errorTrace bool) *PutScriptService
- func (s *PutScriptService) FilterPath(filterPath ...string) *PutScriptService
- func (s *PutScriptService) Header(name string, value string) *PutScriptService
- func (s *PutScriptService) Headers(headers http.Header) *PutScriptService
- func (s *PutScriptService) Human(human bool) *PutScriptService
- func (s *PutScriptService) Id(id string) *PutScriptService
- func (s *PutScriptService) MasterTimeout(masterTimeout string) *PutScriptService
- func (s *PutScriptService) Pretty(pretty bool) *PutScriptService
- func (s *PutScriptService) Timeout(timeout string) *PutScriptService
- func (s *PutScriptService) Validate() error
- type Query
- type QueryProfileShardResult
- type QueryRescorer
- func (r *QueryRescorer) Name() string
- func (r *QueryRescorer) QueryWeight(queryWeight float64) *QueryRescorer
- func (r *QueryRescorer) RescoreQueryWeight(rescoreQueryWeight float64) *QueryRescorer
- func (r *QueryRescorer) ScoreMode(scoreMode string) *QueryRescorer
- func (r *QueryRescorer) Source() (interface{}, error)
- type QueryStringQuery
- func (q *QueryStringQuery) AllowLeadingWildcard(allowLeadingWildcard bool) *QueryStringQuery
- func (q *QueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *QueryStringQuery
- func (q *QueryStringQuery) Analyzer(analyzer string) *QueryStringQuery
- func (q *QueryStringQuery) Boost(boost float64) *QueryStringQuery
- func (q *QueryStringQuery) DefaultField(defaultField string) *QueryStringQuery
- func (q *QueryStringQuery) DefaultOperator(operator string) *QueryStringQuery
- func (q *QueryStringQuery) EnablePositionIncrements(enablePositionIncrements bool) *QueryStringQuery
- func (q *QueryStringQuery) Escape(escape bool) *QueryStringQuery
- func (q *QueryStringQuery) Field(field string) *QueryStringQuery
- func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery
- func (q *QueryStringQuery) Fuzziness(fuzziness string) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *QueryStringQuery
- func (q *QueryStringQuery) FuzzyRewrite(fuzzyRewrite string) *QueryStringQuery
- func (q *QueryStringQuery) Lenient(lenient bool) *QueryStringQuery
- func (q *QueryStringQuery) Locale(locale string) *QueryStringQuerydeprecated
- func (q *QueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *QueryStringQuerydeprecated
- func (q *QueryStringQuery) MaxDeterminizedState(maxDeterminizedStates int) *QueryStringQuery
- func (q *QueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *QueryStringQuery
- func (q *QueryStringQuery) PhraseSlop(phraseSlop int) *QueryStringQuery
- func (q *QueryStringQuery) QueryName(queryName string) *QueryStringQuery
- func (q *QueryStringQuery) QuoteAnalyzer(quoteAnalyzer string) *QueryStringQuery
- func (q *QueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *QueryStringQuery
- func (q *QueryStringQuery) Rewrite(rewrite string) *QueryStringQuery
- func (q *QueryStringQuery) Source() (interface{}, error)
- func (q *QueryStringQuery) TieBreaker(tieBreaker float64) *QueryStringQuery
- func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery
- func (q *QueryStringQuery) Type(typ string) *QueryStringQuery
- type RandomFunction
- func (fn *RandomFunction) Field(field string) *RandomFunction
- func (fn *RandomFunction) GetWeight() *float64
- func (fn *RandomFunction) Name() string
- func (fn *RandomFunction) Seed(seed interface{}) *RandomFunction
- func (fn *RandomFunction) Source() (interface{}, error)
- func (fn *RandomFunction) Weight(weight float64) *RandomFunction
- type RangeAggregation
- func (a *RangeAggregation) AddRange(from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddRangeWithKey(key string, from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedFrom(to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedTo(from interface{}) *RangeAggregation
- func (a *RangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *RangeAggregation
- func (a *RangeAggregation) Between(from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) BetweenWithKey(key string, from, to interface{}) *RangeAggregation
- func (a *RangeAggregation) Field(field string) *RangeAggregation
- func (a *RangeAggregation) Gt(from interface{}) *RangeAggregation
- func (a *RangeAggregation) GtWithKey(key string, from interface{}) *RangeAggregation
- func (a *RangeAggregation) Keyed(keyed bool) *RangeAggregation
- func (a *RangeAggregation) Lt(to interface{}) *RangeAggregation
- func (a *RangeAggregation) LtWithKey(key string, to interface{}) *RangeAggregation
- func (a *RangeAggregation) Meta(metaData map[string]interface{}) *RangeAggregation
- func (a *RangeAggregation) Missing(missing interface{}) *RangeAggregation
- func (a *RangeAggregation) Script(script *Script) *RangeAggregation
- func (a *RangeAggregation) Source() (interface{}, error)
- func (a *RangeAggregation) SubAggregation(name string, subAggregation Aggregation) *RangeAggregation
- func (a *RangeAggregation) Unmapped(unmapped bool) *RangeAggregation
- type RangeQuery
- func (q *RangeQuery) Boost(boost float64) *RangeQuery
- func (q *RangeQuery) Format(format string) *RangeQuery
- func (q *RangeQuery) From(from interface{}) *RangeQuery
- func (q *RangeQuery) Gt(from interface{}) *RangeQuery
- func (q *RangeQuery) Gte(from interface{}) *RangeQuery
- func (q *RangeQuery) IncludeLower(includeLower bool) *RangeQuery
- func (q *RangeQuery) IncludeUpper(includeUpper bool) *RangeQuery
- func (q *RangeQuery) Lt(to interface{}) *RangeQuery
- func (q *RangeQuery) Lte(to interface{}) *RangeQuery
- func (q *RangeQuery) QueryName(queryName string) *RangeQuery
- func (q *RangeQuery) Relation(relation string) *RangeQuery
- func (q *RangeQuery) Source() (interface{}, error)
- func (q *RangeQuery) TimeZone(timeZone string) *RangeQuery
- func (q *RangeQuery) To(to interface{}) *RangeQuery
- type RawStringQuery
- type RecoverySource
- type RefreshResult
- type RefreshService
- func (s *RefreshService) Do(ctx context.Context) (*RefreshResult, error)
- func (s *RefreshService) ErrorTrace(errorTrace bool) *RefreshService
- func (s *RefreshService) FilterPath(filterPath ...string) *RefreshService
- func (s *RefreshService) Header(name string, value string) *RefreshService
- func (s *RefreshService) Headers(headers http.Header) *RefreshService
- func (s *RefreshService) Human(human bool) *RefreshService
- func (s *RefreshService) Index(index ...string) *RefreshService
- func (s *RefreshService) Pretty(pretty bool) *RefreshService
- type RegexCompletionSuggesterOptions
- type RegexpQuery
- func (q *RegexpQuery) Boost(boost float64) *RegexpQuery
- func (q *RegexpQuery) Flags(flags string) *RegexpQuery
- func (q *RegexpQuery) MaxDeterminizedStates(maxDeterminizedStates int) *RegexpQuery
- func (q *RegexpQuery) QueryName(queryName string) *RegexpQuery
- func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery
- func (q *RegexpQuery) Source() (interface{}, error)
- type ReindexDestination
- func (r *ReindexDestination) Discard() *ReindexDestination
- func (r *ReindexDestination) Index(index string) *ReindexDestination
- func (r *ReindexDestination) Keep() *ReindexDestination
- func (r *ReindexDestination) OpType(opType string) *ReindexDestination
- func (r *ReindexDestination) Parent(parent string) *ReindexDestination
- func (r *ReindexDestination) Pipeline(pipeline string) *ReindexDestination
- func (r *ReindexDestination) Routing(routing string) *ReindexDestination
- func (r *ReindexDestination) Source() (interface{}, error)
- func (r *ReindexDestination) Type(typ string) *ReindexDestination
- func (r *ReindexDestination) Version(version int64) *ReindexDestination
- func (r *ReindexDestination) VersionType(versionType string) *ReindexDestination
- type ReindexRemoteInfo
- func (ri *ReindexRemoteInfo) ConnectTimeout(timeout string) *ReindexRemoteInfo
- func (ri *ReindexRemoteInfo) Host(host string) *ReindexRemoteInfo
- func (ri *ReindexRemoteInfo) Password(password string) *ReindexRemoteInfo
- func (ri *ReindexRemoteInfo) SocketTimeout(timeout string) *ReindexRemoteInfo
- func (ri *ReindexRemoteInfo) Source() (interface{}, error)
- func (ri *ReindexRemoteInfo) Username(username string) *ReindexRemoteInfo
- type ReindexService
- func (s *ReindexService) AbortOnVersionConflict() *ReindexService
- func (s *ReindexService) Body(body interface{}) *ReindexService
- func (s *ReindexService) Conflicts(conflicts string) *ReindexService
- func (s *ReindexService) Destination(destination *ReindexDestination) *ReindexService
- func (s *ReindexService) DestinationIndex(index string) *ReindexService
- func (s *ReindexService) DestinationIndexAndType(index, typ string) *ReindexService
- func (s *ReindexService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
- func (s *ReindexService) DoAsync(ctx context.Context) (*StartTaskResult, error)
- func (s *ReindexService) ErrorTrace(errorTrace bool) *ReindexService
- func (s *ReindexService) FilterPath(filterPath ...string) *ReindexService
- func (s *ReindexService) Header(name string, value string) *ReindexService
- func (s *ReindexService) Headers(headers http.Header) *ReindexService
- func (s *ReindexService) Human(human bool) *ReindexService
- func (s *ReindexService) Pretty(pretty bool) *ReindexService
- func (s *ReindexService) ProceedOnVersionConflict() *ReindexService
- func (s *ReindexService) Refresh(refresh string) *ReindexService
- func (s *ReindexService) RequestsPerSecond(requestsPerSecond int) *ReindexService
- func (s *ReindexService) Script(script *Script) *ReindexService
- func (s *ReindexService) Size(size int) *ReindexService
- func (s *ReindexService) Slices(slices interface{}) *ReindexService
- func (s *ReindexService) Source(source *ReindexSource) *ReindexService
- func (s *ReindexService) SourceIndex(index string) *ReindexService
- func (s *ReindexService) Timeout(timeout string) *ReindexService
- func (s *ReindexService) Validate() error
- func (s *ReindexService) WaitForActiveShards(waitForActiveShards string) *ReindexService
- func (s *ReindexService) WaitForCompletion(waitForCompletion bool) *ReindexService
- type ReindexSource
- func (r *ReindexSource) FetchSource(fetchSource bool) *ReindexSource
- func (r *ReindexSource) FetchSourceContext(fsc *FetchSourceContext) *ReindexSource
- func (r *ReindexSource) FetchSourceIncludeExclude(include, exclude []string) *ReindexSource
- func (r *ReindexSource) Index(indices ...string) *ReindexSource
- func (r *ReindexSource) Preference(preference string) *ReindexSource
- func (r *ReindexSource) Query(query Query) *ReindexSource
- func (r *ReindexSource) RemoteInfo(ri *ReindexRemoteInfo) *ReindexSource
- func (r *ReindexSource) Request(request *SearchRequest) *ReindexSource
- func (r *ReindexSource) RequestCache(requestCache bool) *ReindexSource
- func (r *ReindexSource) Scroll(scroll string) *ReindexSource
- func (r *ReindexSource) SearchType(searchType string) *ReindexSource
- func (r *ReindexSource) SearchTypeDfsQueryThenFetch() *ReindexSource
- func (r *ReindexSource) SearchTypeQueryThenFetch() *ReindexSource
- func (r *ReindexSource) Sort(field string, ascending bool) *ReindexSource
- func (r *ReindexSource) SortBy(sorter ...Sorter) *ReindexSource
- func (r *ReindexSource) SortWithInfo(info SortInfo) *ReindexSource
- func (r *ReindexSource) Source() (interface{}, error)
- func (r *ReindexSource) Type(types ...string) *ReindexSource
- type Request
- type RerouteDecision
- type RerouteExplanation
- type Rescore
- type Rescorer
- type Response
- type RestoreInfo
- type RestoreSource
- type Retrier
- type RetrierFunc
- type ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Meta(metaData map[string]interface{}) *ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Path(path string) *ReverseNestedAggregation
- func (a *ReverseNestedAggregation) Source() (interface{}, error)
- func (a *ReverseNestedAggregation) SubAggregation(name string, subAggregation Aggregation) *ReverseNestedAggregation
- type SamplerAggregation
- func (a *SamplerAggregation) ExecutionHint(hint string) *SamplerAggregation
- func (a *SamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *SamplerAggregation
- func (a *SamplerAggregation) Meta(metaData map[string]interface{}) *SamplerAggregation
- func (a *SamplerAggregation) ShardSize(shardSize int) *SamplerAggregation
- func (a *SamplerAggregation) Source() (interface{}, error)
- func (a *SamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *SamplerAggregation
- type ScoreFunction
- type ScoreSort
- type Script
- func (s *Script) Lang(lang string) *Script
- func (s *Script) Param(name string, value interface{}) *Script
- func (s *Script) Params(params map[string]interface{}) *Script
- func (s *Script) Script(script string) *Script
- func (s *Script) Source() (interface{}, error)
- func (s *Script) Type(typ string) *Script
- type ScriptField
- type ScriptFunction
- type ScriptQuery
- type ScriptSignificanceHeuristic
- type ScriptSort
- func (s *ScriptSort) Asc() *ScriptSort
- func (s *ScriptSort) Desc() *ScriptSort
- func (s *ScriptSort) NestedFilter(nestedFilter Query) *ScriptSort
- func (s *ScriptSort) NestedPath(nestedPath string) *ScriptSort
- func (s *ScriptSort) NestedSort(nestedSort *NestedSort) *ScriptSort
- func (s *ScriptSort) Order(ascending bool) *ScriptSort
- func (s *ScriptSort) SortMode(sortMode string) *ScriptSort
- func (s *ScriptSort) Source() (interface{}, error)
- func (s *ScriptSort) Type(typ string) *ScriptSort
- type ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) CombineScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) InitScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) MapScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Meta(metaData map[string]interface{}) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Params(params map[string]interface{}) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) ReduceScript(script *Script) *ScriptedMetricAggregation
- func (a *ScriptedMetricAggregation) Source() (interface{}, error)
- type ScrollService
- func (s *ScrollService) AllowNoIndices(allowNoIndices bool) *ScrollService
- func (s *ScrollService) Body(body interface{}) *ScrollService
- func (s *ScrollService) Clear(ctx context.Context) error
- func (s *ScrollService) Do(ctx context.Context) (*SearchResult, error)
- func (s *ScrollService) ErrorTrace(errorTrace bool) *ScrollService
- func (s *ScrollService) ExpandWildcards(expandWildcards string) *ScrollService
- func (s *ScrollService) FetchSource(fetchSource bool) *ScrollService
- func (s *ScrollService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *ScrollService
- func (s *ScrollService) FilterPath(filterPath ...string) *ScrollService
- func (s *ScrollService) Header(name string, value string) *ScrollService
- func (s *ScrollService) Headers(headers http.Header) *ScrollService
- func (s *ScrollService) Highlight(highlight *Highlight) *ScrollService
- func (s *ScrollService) Human(human bool) *ScrollService
- func (s *ScrollService) IgnoreUnavailable(ignoreUnavailable bool) *ScrollService
- func (s *ScrollService) Index(indices ...string) *ScrollService
- func (s *ScrollService) KeepAlive(keepAlive string) *ScrollService
- func (s *ScrollService) MaxResponseSize(maxResponseSize int64) *ScrollService
- func (s *ScrollService) PostFilter(postFilter Query) *ScrollService
- func (s *ScrollService) Preference(preference string) *ScrollService
- func (s *ScrollService) Pretty(pretty bool) *ScrollService
- func (s *ScrollService) Query(query Query) *ScrollService
- func (s *ScrollService) RestTotalHitsAsInt(enabled bool) *ScrollService
- func (s *ScrollService) Retrier(retrier Retrier) *ScrollService
- func (s *ScrollService) Routing(routings ...string) *ScrollService
- func (s *ScrollService) Scroll(keepAlive string) *ScrollService
- func (s *ScrollService) ScrollId(scrollId string) *ScrollService
- func (s *ScrollService) SearchSource(searchSource *SearchSource) *ScrollService
- func (s *ScrollService) Size(size int) *ScrollService
- func (s *ScrollService) Slice(sliceQuery Query) *ScrollService
- func (s *ScrollService) Sort(field string, ascending bool) *ScrollService
- func (s *ScrollService) SortBy(sorter ...Sorter) *ScrollService
- func (s *ScrollService) SortWithInfo(info SortInfo) *ScrollService
- func (s *ScrollService) Type(types ...string) *ScrollService
- func (s *ScrollService) Version(version bool) *ScrollService
- type SearchExplanation
- type SearchHit
- type SearchHitHighlight
- type SearchHitInnerHits
- type SearchHits
- type SearchProfile
- type SearchProfileShardResult
- type SearchRequest
- func (r *SearchRequest) Aggregation(name string, aggregation Aggregation) *SearchRequest
- func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest
- func (r *SearchRequest) AllowPartialSearchResults(allow bool) *SearchRequest
- func (r *SearchRequest) BatchedReduceSize(size int) *SearchRequest
- func (r *SearchRequest) Body() (string, error)
- func (r *SearchRequest) ClearRescorers() *SearchRequest
- func (r *SearchRequest) Collapse(collapse *CollapseBuilder) *SearchRequest
- func (r *SearchRequest) DocValueField(field string) *SearchRequest
- func (r *SearchRequest) DocValueFieldWithFormat(field DocvalueField) *SearchRequest
- func (r *SearchRequest) DocValueFields(fields ...string) *SearchRequest
- func (r *SearchRequest) DocValueFieldsWithFormat(fields ...DocvalueField) *SearchRequest
- func (s *SearchRequest) ExpandWildcards(expandWildcards string) *SearchRequest
- func (r *SearchRequest) Explain(explain bool) *SearchRequest
- func (r *SearchRequest) FetchSource(fetchSource bool) *SearchRequest
- func (r *SearchRequest) FetchSourceContext(fsc *FetchSourceContext) *SearchRequest
- func (r *SearchRequest) FetchSourceIncludeExclude(include, exclude []string) *SearchRequest
- func (r *SearchRequest) From(from int) *SearchRequest
- func (r *SearchRequest) HasIndices() bool
- func (r *SearchRequest) Highlight(highlight *Highlight) *SearchRequest
- func (s *SearchRequest) IgnoreUnavailable(ignoreUnavailable bool) *SearchRequest
- func (r *SearchRequest) Index(indices ...string) *SearchRequest
- func (r *SearchRequest) IndexBoost(index string, boost float64) *SearchRequest
- func (r *SearchRequest) MaxConcurrentShardRequests(size int) *SearchRequest
- func (r *SearchRequest) MinScore(minScore float64) *SearchRequest
- func (r *SearchRequest) NoStoredFields() *SearchRequest
- func (r *SearchRequest) PostFilter(filter Query) *SearchRequest
- func (r *SearchRequest) PreFilterShardSize(size int) *SearchRequest
- func (r *SearchRequest) Preference(preference string) *SearchRequest
- func (r *SearchRequest) Profile(profile bool) *SearchRequest
- func (r *SearchRequest) Query(query Query) *SearchRequest
- func (r *SearchRequest) RequestCache(requestCache bool) *SearchRequest
- func (r *SearchRequest) Rescorer(rescore *Rescore) *SearchRequest
- func (r *SearchRequest) Routing(routing string) *SearchRequest
- func (r *SearchRequest) Routings(routings ...string) *SearchRequest
- func (r *SearchRequest) ScriptField(field *ScriptField) *SearchRequest
- func (r *SearchRequest) ScriptFields(fields ...*ScriptField) *SearchRequest
- func (r *SearchRequest) Scroll(scroll string) *SearchRequest
- func (r *SearchRequest) SearchAfter(sortValues ...interface{}) *SearchRequest
- func (r *SearchRequest) SearchSource(searchSource *SearchSource) *SearchRequest
- func (r *SearchRequest) SearchType(searchType string) *SearchRequest
- func (r *SearchRequest) SearchTypeDfsQueryThenFetch() *SearchRequest
- func (r *SearchRequest) SearchTypeQueryThenFetch() *SearchRequest
- func (r *SearchRequest) Size(size int) *SearchRequest
- func (r *SearchRequest) Slice(sliceQuery Query) *SearchRequest
- func (r *SearchRequest) Sort(field string, ascending bool) *SearchRequest
- func (r *SearchRequest) SortBy(sorter ...Sorter) *SearchRequest
- func (r *SearchRequest) SortWithInfo(info SortInfo) *SearchRequest
- func (r *SearchRequest) Source(source interface{}) *SearchRequest
- func (r *SearchRequest) Stats(statsGroup ...string) *SearchRequest
- func (r *SearchRequest) StoredField(field string) *SearchRequest
- func (r *SearchRequest) StoredFields(fields ...string) *SearchRequest
- func (r *SearchRequest) Suggester(suggester Suggester) *SearchRequest
- func (r *SearchRequest) TerminateAfter(docs int) *SearchRequest
- func (r *SearchRequest) Timeout(timeout string) *SearchRequest
- func (r *SearchRequest) TrackScores(trackScores bool) *SearchRequest
- func (r *SearchRequest) TrackTotalHits(trackTotalHits bool) *SearchRequest
- func (r *SearchRequest) Type(types ...string) *SearchRequest
- func (r *SearchRequest) Version(version bool) *SearchRequest
- type SearchResult
- type SearchResultCluster
- type SearchService
- func (s *SearchService) Aggregation(name string, aggregation Aggregation) *SearchService
- func (s *SearchService) AllowNoIndices(allowNoIndices bool) *SearchService
- func (s *SearchService) AllowPartialSearchResults(enabled bool) *SearchService
- func (s *SearchService) BatchedReduceSize(size int) *SearchService
- func (s *SearchService) Collapse(collapse *CollapseBuilder) *SearchService
- func (s *SearchService) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchService
- func (s *SearchService) Do(ctx context.Context) (*SearchResult, error)
- func (s *SearchService) DocvalueField(docvalueField string) *SearchService
- func (s *SearchService) DocvalueFieldWithFormat(docvalueField DocvalueField) *SearchService
- func (s *SearchService) DocvalueFields(docvalueFields ...string) *SearchService
- func (s *SearchService) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchService
- func (s *SearchService) ErrorTrace(errorTrace bool) *SearchService
- func (s *SearchService) ExpandWildcards(expandWildcards string) *SearchService
- func (s *SearchService) Explain(explain bool) *SearchService
- func (s *SearchService) FetchSource(fetchSource bool) *SearchService
- func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService
- func (s *SearchService) FilterPath(filterPath ...string) *SearchService
- func (s *SearchService) From(from int) *SearchService
- func (s *SearchService) GlobalSuggestText(globalText string) *SearchService
- func (s *SearchService) Header(name string, value string) *SearchService
- func (s *SearchService) Headers(headers http.Header) *SearchService
- func (s *SearchService) Highlight(highlight *Highlight) *SearchService
- func (s *SearchService) Human(human bool) *SearchService
- func (s *SearchService) IgnoreThrottled(ignoreThrottled bool) *SearchService
- func (s *SearchService) IgnoreUnavailable(ignoreUnavailable bool) *SearchService
- func (s *SearchService) Index(index ...string) *SearchService
- func (s *SearchService) Lenient(lenient bool) *SearchService
- func (s *SearchService) MaxConcurrentShardRequests(max int) *SearchService
- func (s *SearchService) MaxResponseSize(maxResponseSize int64) *SearchService
- func (s *SearchService) MinScore(minScore float64) *SearchService
- func (s *SearchService) NoStoredFields() *SearchService
- func (s *SearchService) PostFilter(postFilter Query) *SearchService
- func (s *SearchService) PreFilterShardSize(threshold int) *SearchService
- func (s *SearchService) Preference(preference string) *SearchService
- func (s *SearchService) Pretty(pretty bool) *SearchService
- func (s *SearchService) Profile(profile bool) *SearchService
- func (s *SearchService) Query(query Query) *SearchService
- func (s *SearchService) RequestCache(requestCache bool) *SearchService
- func (s *SearchService) Rescorer(rescore *Rescore) *SearchService
- func (s *SearchService) RestTotalHitsAsInt(enabled bool) *SearchService
- func (s *SearchService) Routing(routings ...string) *SearchService
- func (s *SearchService) SearchAfter(sortValues ...interface{}) *SearchService
- func (s *SearchService) SearchSource(searchSource *SearchSource) *SearchService
- func (s *SearchService) SearchType(searchType string) *SearchService
- func (s *SearchService) SeqNoPrimaryTerm(enabled bool) *SearchService
- func (s *SearchService) SetDumpConfig(config DumpConfig) *SearchService
- func (s *SearchService) Size(size int) *SearchService
- func (s *SearchService) Sort(field string, ascending bool) *SearchService
- func (s *SearchService) SortBy(sorter ...Sorter) *SearchService
- func (s *SearchService) SortWithInfo(info SortInfo) *SearchService
- func (s *SearchService) Source(source interface{}) *SearchService
- func (s *SearchService) StoredField(fieldName string) *SearchService
- func (s *SearchService) StoredFields(fields ...string) *SearchService
- func (s *SearchService) Suggester(suggester Suggester) *SearchService
- func (s *SearchService) TerminateAfter(terminateAfter int) *SearchService
- func (s *SearchService) Timeout(timeout string) *SearchService
- func (s *SearchService) TimeoutInMillis(timeoutInMillis int) *SearchService
- func (s *SearchService) TrackScores(trackScores bool) *SearchService
- func (s *SearchService) TrackTotalHits(trackTotalHits bool) *SearchService
- func (s *SearchService) Type(typ ...string) *SearchService
- func (s *SearchService) TypedKeys(enabled bool) *SearchService
- func (s *SearchService) Validate() error
- func (s *SearchService) Version(version bool) *SearchService
- type SearchShardsResponse
- type SearchShardsResponseShardsInfo
- type SearchShardsService
- func (s *SearchShardsService) AllowNoIndices(allowNoIndices bool) *SearchShardsService
- func (s *SearchShardsService) Do(ctx context.Context) (*SearchShardsResponse, error)
- func (s *SearchShardsService) ErrorTrace(errorTrace bool) *SearchShardsService
- func (s *SearchShardsService) ExpandWildcards(expandWildcards string) *SearchShardsService
- func (s *SearchShardsService) FilterPath(filterPath ...string) *SearchShardsService
- func (s *SearchShardsService) Header(name string, value string) *SearchShardsService
- func (s *SearchShardsService) Headers(headers http.Header) *SearchShardsService
- func (s *SearchShardsService) Human(human bool) *SearchShardsService
- func (s *SearchShardsService) IgnoreUnavailable(ignoreUnavailable bool) *SearchShardsService
- func (s *SearchShardsService) Index(index ...string) *SearchShardsService
- func (s *SearchShardsService) Local(local bool) *SearchShardsService
- func (s *SearchShardsService) Preference(preference string) *SearchShardsService
- func (s *SearchShardsService) Pretty(pretty bool) *SearchShardsService
- func (s *SearchShardsService) Routing(routing string) *SearchShardsService
- func (s *SearchShardsService) Validate() error
- type SearchSource
- func (s *SearchSource) Aggregation(name string, aggregation Aggregation) *SearchSource
- func (s *SearchSource) ClearRescorers() *SearchSource
- func (s *SearchSource) Collapse(collapse *CollapseBuilder) *SearchSource
- func (s *SearchSource) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchSource
- func (s *SearchSource) DocvalueField(fieldDataField string) *SearchSource
- func (s *SearchSource) DocvalueFieldWithFormat(fieldDataFieldWithFormat DocvalueField) *SearchSource
- func (s *SearchSource) DocvalueFields(docvalueFields ...string) *SearchSource
- func (s *SearchSource) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchSource
- func (s *SearchSource) Explain(explain bool) *SearchSource
- func (s *SearchSource) FetchSource(fetchSource bool) *SearchSource
- func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource
- func (s *SearchSource) FetchSourceIncludeExclude(include, exclude []string) *SearchSource
- func (s *SearchSource) From(from int) *SearchSource
- func (s *SearchSource) GlobalSuggestText(text string) *SearchSource
- func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource
- func (s *SearchSource) Highlighter() *Highlight
- func (s *SearchSource) IndexBoost(index string, boost float64) *SearchSource
- func (s *SearchSource) InnerHit(name string, innerHit *InnerHit) *SearchSource
- func (s *SearchSource) MinScore(minScore float64) *SearchSource
- func (s *SearchSource) NoStoredFields() *SearchSource
- func (s *SearchSource) PostFilter(postFilter Query) *SearchSource
- func (s *SearchSource) Profile(profile bool) *SearchSource
- func (s *SearchSource) Query(query Query) *SearchSource
- func (s *SearchSource) Rescorer(rescore *Rescore) *SearchSource
- func (s *SearchSource) ScriptField(scriptField *ScriptField) *SearchSource
- func (s *SearchSource) ScriptFields(scriptFields ...*ScriptField) *SearchSource
- func (s *SearchSource) SearchAfter(sortValues ...interface{}) *SearchSource
- func (s *SearchSource) SeqNoAndPrimaryTerm(enabled bool) *SearchSource
- func (s *SearchSource) Size(size int) *SearchSource
- func (s *SearchSource) Slice(sliceQuery Query) *SearchSource
- func (s *SearchSource) Sort(field string, ascending bool) *SearchSource
- func (s *SearchSource) SortBy(sorter ...Sorter) *SearchSource
- func (s *SearchSource) SortWithInfo(info SortInfo) *SearchSource
- func (s *SearchSource) Source() (interface{}, error)
- func (s *SearchSource) Stats(statsGroup ...string) *SearchSource
- func (s *SearchSource) StoredField(storedFieldName string) *SearchSource
- func (s *SearchSource) StoredFields(storedFieldNames ...string) *SearchSource
- func (s *SearchSource) Suggester(suggester Suggester) *SearchSource
- func (s *SearchSource) TerminateAfter(terminateAfter int) *SearchSource
- func (s *SearchSource) Timeout(timeout string) *SearchSource
- func (s *SearchSource) TimeoutInMillis(timeoutInMillis int) *SearchSource
- func (s *SearchSource) TrackScores(trackScores bool) *SearchSource
- func (s *SearchSource) TrackTotalHits(trackTotalHits bool) *SearchSource
- func (s *SearchSource) Version(version bool) *SearchSource
- type SearchSuggest
- type SearchSuggestion
- type SearchSuggestionOption
- type SerialDiffAggregation
- func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapInsertZeros() *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapPolicy(gapPolicy string) *SerialDiffAggregation
- func (a *SerialDiffAggregation) GapSkip() *SerialDiffAggregation
- func (a *SerialDiffAggregation) Lag(lag int) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Meta(metaData map[string]interface{}) *SerialDiffAggregation
- func (a *SerialDiffAggregation) Source() (interface{}, error)
- type ShardFailure
- type ShardsInfo
- type SignificanceHeuristic
- type SignificantTermsAggregation
- func (a *SignificantTermsAggregation) BackgroundFilter(filter Query) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Exclude(regexp string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ExcludeValues(values ...interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ExecutionHint(hint string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Field(field string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Include(regexp string) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) IncludeValues(values ...interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Meta(metaData map[string]interface{}) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) MinDocCount(minDocCount int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) NumPartitions(n int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Partition(p int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) RequiredSize(requiredSize int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ShardMinDocCount(shardMinDocCount int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) ShardSize(shardSize int) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTermsAggregation
- func (a *SignificantTermsAggregation) Source() (interface{}, error)
- func (a *SignificantTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTermsAggregation
- type SignificantTextAggregation
- func (a *SignificantTextAggregation) BackgroundFilter(filter Query) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Exclude(regexp string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ExcludeValues(values ...interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Field(field string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) FilterDuplicateText(filter bool) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Include(regexp string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTextAggregation
- func (a *SignificantTextAggregation) IncludeValues(values ...interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation
- func (a *SignificantTextAggregation) MinDocCount(minDocCount int64) *SignificantTextAggregation
- func (a *SignificantTextAggregation) NumPartitions(n int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Partition(p int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ShardMinDocCount(shardMinDocCount int64) *SignificantTextAggregation
- func (a *SignificantTextAggregation) ShardSize(shardSize int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Size(size int) *SignificantTextAggregation
- func (a *SignificantTextAggregation) Source() (interface{}, error)
- func (a *SignificantTextAggregation) SourceFieldNames(names ...string) *SignificantTextAggregation
- func (a *SignificantTextAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTextAggregation
- type SimpleBackoff
- type SimpleMovAvgModel
- type SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Analyzer(analyzer string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Boost(boost float64) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) DefaultOperator(defaultOperator string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Field(field string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FieldWithBoost(field string, boost float64) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) FuzzyTranspositions(fuzzyTranspositions bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Lenient(lenient bool) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Locale(locale string) *SimpleQueryStringQuerydeprecated
- func (q *SimpleQueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *SimpleQueryStringQuerydeprecated
- func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *SimpleQueryStringQuery
- func (q *SimpleQueryStringQuery) Source() (interface{}, error)
- type SliceQuery
- type SmoothingModel
- type Snapshot
- type SnapshotCreateRepositoryResponse
- type SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) BodyJson(body interface{}) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) BodyString(body string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Do(ctx context.Context) (*SnapshotCreateRepositoryResponse, error)
- func (s *SnapshotCreateRepositoryService) ErrorTrace(errorTrace bool) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) FilterPath(filterPath ...string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Header(name string, value string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Headers(headers http.Header) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Human(human bool) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) MasterTimeout(masterTimeout string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Pretty(pretty bool) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Repository(repository string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Setting(name string, value interface{}) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Settings(settings map[string]interface{}) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Timeout(timeout string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Type(typ string) *SnapshotCreateRepositoryService
- func (s *SnapshotCreateRepositoryService) Validate() error
- func (s *SnapshotCreateRepositoryService) Verify(verify bool) *SnapshotCreateRepositoryService
- type SnapshotCreateResponse
- type SnapshotCreateService
- func (s *SnapshotCreateService) BodyJson(body interface{}) *SnapshotCreateService
- func (s *SnapshotCreateService) BodyString(body string) *SnapshotCreateService
- func (s *SnapshotCreateService) Do(ctx context.Context) (*SnapshotCreateResponse, error)
- func (s *SnapshotCreateService) ErrorTrace(errorTrace bool) *SnapshotCreateService
- func (s *SnapshotCreateService) FilterPath(filterPath ...string) *SnapshotCreateService
- func (s *SnapshotCreateService) Header(name string, value string) *SnapshotCreateService
- func (s *SnapshotCreateService) Headers(headers http.Header) *SnapshotCreateService
- func (s *SnapshotCreateService) Human(human bool) *SnapshotCreateService
- func (s *SnapshotCreateService) MasterTimeout(masterTimeout string) *SnapshotCreateService
- func (s *SnapshotCreateService) Pretty(pretty bool) *SnapshotCreateService
- func (s *SnapshotCreateService) Repository(repository string) *SnapshotCreateService
- func (s *SnapshotCreateService) Snapshot(snapshot string) *SnapshotCreateService
- func (s *SnapshotCreateService) Validate() error
- func (s *SnapshotCreateService) WaitForCompletion(waitForCompletion bool) *SnapshotCreateService
- type SnapshotDeleteRepositoryResponse
- type SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Do(ctx context.Context) (*SnapshotDeleteRepositoryResponse, error)
- func (s *SnapshotDeleteRepositoryService) ErrorTrace(errorTrace bool) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) FilterPath(filterPath ...string) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Header(name string, value string) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Headers(headers http.Header) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Human(human bool) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) MasterTimeout(masterTimeout string) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Pretty(pretty bool) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Repository(repositories ...string) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Timeout(timeout string) *SnapshotDeleteRepositoryService
- func (s *SnapshotDeleteRepositoryService) Validate() error
- type SnapshotDeleteResponse
- type SnapshotDeleteService
- func (s *SnapshotDeleteService) Do(ctx context.Context) (*SnapshotDeleteResponse, error)
- func (s *SnapshotDeleteService) ErrorTrace(errorTrace bool) *SnapshotDeleteService
- func (s *SnapshotDeleteService) FilterPath(filterPath ...string) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Header(name string, value string) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Headers(headers http.Header) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Human(human bool) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Pretty(pretty bool) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Repository(repository string) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Snapshot(snapshot string) *SnapshotDeleteService
- func (s *SnapshotDeleteService) Validate() error
- type SnapshotGetRepositoryResponse
- type SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Do(ctx context.Context) (SnapshotGetRepositoryResponse, error)
- func (s *SnapshotGetRepositoryService) ErrorTrace(errorTrace bool) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) FilterPath(filterPath ...string) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Header(name string, value string) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Headers(headers http.Header) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Human(human bool) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Local(local bool) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) MasterTimeout(masterTimeout string) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Pretty(pretty bool) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Repository(repositories ...string) *SnapshotGetRepositoryService
- func (s *SnapshotGetRepositoryService) Validate() error
- type SnapshotGetResponse
- type SnapshotGetService
- func (s *SnapshotGetService) Do(ctx context.Context) (*SnapshotGetResponse, error)
- func (s *SnapshotGetService) ErrorTrace(errorTrace bool) *SnapshotGetService
- func (s *SnapshotGetService) FilterPath(filterPath ...string) *SnapshotGetService
- func (s *SnapshotGetService) Header(name string, value string) *SnapshotGetService
- func (s *SnapshotGetService) Headers(headers http.Header) *SnapshotGetService
- func (s *SnapshotGetService) Human(human bool) *SnapshotGetService
- func (s *SnapshotGetService) IgnoreUnavailable(ignoreUnavailable bool) *SnapshotGetService
- func (s *SnapshotGetService) MasterTimeout(masterTimeout string) *SnapshotGetService
- func (s *SnapshotGetService) Pretty(pretty bool) *SnapshotGetService
- func (s *SnapshotGetService) Repository(repository string) *SnapshotGetService
- func (s *SnapshotGetService) Snapshot(snapshots ...string) *SnapshotGetService
- func (s *SnapshotGetService) Validate() error
- func (s *SnapshotGetService) Verbose(verbose bool) *SnapshotGetService
- type SnapshotIndexShardStatus
- type SnapshotIndexStatus
- type SnapshotRepositoryMetaData
- type SnapshotRestoreResponse
- type SnapshotRestoreService
- func (s *SnapshotRestoreService) BodyString(body string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Do(ctx context.Context) (*SnapshotRestoreResponse, error)
- func (s *SnapshotRestoreService) ErrorTrace(errorTrace bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) FilterPath(filterPath ...string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Header(name string, value string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Headers(headers http.Header) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Human(human bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) IgnoreUnavailable(ignoreUnavailable bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) IncludeAliases(includeAliases bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) IncludeGlobalState(includeGlobalState bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) IndexSettings(indexSettings map[string]interface{}) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Indices(indices ...string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) MasterTimeout(masterTimeout string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Partial(partial bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Pretty(pretty bool) *SnapshotRestoreService
- func (s *SnapshotRestoreService) RenamePattern(renamePattern string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) RenameReplacement(renameReplacement string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Repository(repository string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Snapshot(snapshot string) *SnapshotRestoreService
- func (s *SnapshotRestoreService) Validate() error
- func (s *SnapshotRestoreService) WaitForCompletion(waitForCompletion bool) *SnapshotRestoreService
- type SnapshotShardFailure
- type SnapshotShardsStats
- type SnapshotStats
- type SnapshotStatus
- type SnapshotStatusResponse
- type SnapshotStatusService
- func (s *SnapshotStatusService) Do(ctx context.Context) (*SnapshotStatusResponse, error)
- func (s *SnapshotStatusService) ErrorTrace(errorTrace bool) *SnapshotStatusService
- func (s *SnapshotStatusService) FilterPath(filterPath ...string) *SnapshotStatusService
- func (s *SnapshotStatusService) Header(name string, value string) *SnapshotStatusService
- func (s *SnapshotStatusService) Headers(headers http.Header) *SnapshotStatusService
- func (s *SnapshotStatusService) Human(human bool) *SnapshotStatusService
- func (s *SnapshotStatusService) MasterTimeout(masterTimeout string) *SnapshotStatusService
- func (s *SnapshotStatusService) Pretty(pretty bool) *SnapshotStatusService
- func (s *SnapshotStatusService) Repository(repository string) *SnapshotStatusService
- func (s *SnapshotStatusService) Snapshot(snapshots ...string) *SnapshotStatusService
- func (s *SnapshotStatusService) Validate() error
- type SnapshotVerifyRepositoryNode
- type SnapshotVerifyRepositoryResponse
- type SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Do(ctx context.Context) (*SnapshotVerifyRepositoryResponse, error)
- func (s *SnapshotVerifyRepositoryService) ErrorTrace(errorTrace bool) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) FilterPath(filterPath ...string) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Header(name string, value string) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Headers(headers http.Header) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Human(human bool) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) MasterTimeout(masterTimeout string) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Pretty(pretty bool) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Repository(repository string) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Timeout(timeout string) *SnapshotVerifyRepositoryService
- func (s *SnapshotVerifyRepositoryService) Validate() error
- type SnifferCallback
- type SortByDoc
- type SortInfo
- type Sorter
- type SpanFirstQuery
- type SpanNearQuery
- func (q *SpanNearQuery) Add(clauses ...Query) *SpanNearQuery
- func (q *SpanNearQuery) Boost(boost float64) *SpanNearQuery
- func (q *SpanNearQuery) Clauses(clauses ...Query) *SpanNearQuery
- func (q *SpanNearQuery) InOrder(inOrder bool) *SpanNearQuery
- func (q *SpanNearQuery) QueryName(queryName string) *SpanNearQuery
- func (q *SpanNearQuery) Slop(slop int) *SpanNearQuery
- func (q *SpanNearQuery) Source() (interface{}, error)
- type SpanTermQuery
- func (q *SpanTermQuery) Boost(boost float64) *SpanTermQuery
- func (q *SpanTermQuery) Field(field string) *SpanTermQuery
- func (q *SpanTermQuery) QueryName(queryName string) *SpanTermQuery
- func (q *SpanTermQuery) Source() (interface{}, error)
- func (q *SpanTermQuery) Value(value interface{}) *SpanTermQuery
- type StartTaskResult
- type StatsAggregation
- func (a *StatsAggregation) Field(field string) *StatsAggregation
- func (a *StatsAggregation) Format(format string) *StatsAggregation
- func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation
- func (a *StatsAggregation) Missing(missing interface{}) *StatsAggregation
- func (a *StatsAggregation) Script(script *Script) *StatsAggregation
- func (a *StatsAggregation) Source() (interface{}, error)
- func (a *StatsAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsAggregation
- type StatsBucketAggregation
- func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapInsertZeros() *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapPolicy(gapPolicy string) *StatsBucketAggregation
- func (s *StatsBucketAggregation) GapSkip() *StatsBucketAggregation
- func (s *StatsBucketAggregation) Meta(metaData map[string]interface{}) *StatsBucketAggregation
- func (s *StatsBucketAggregation) Source() (interface{}, error)
- type StopBackoff
- type StopRetrier
- type StupidBackoffSmoothingModel
- type SuggestField
- type Suggester
- type SuggesterCategoryIndex
- type SuggesterCategoryMapping
- type SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) Source() (interface{}, error)
- func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery
- func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery
- type SuggesterContextQuery
- type SuggesterGeoIndex
- type SuggesterGeoMapping
- func (q *SuggesterGeoMapping) DefaultLocations(locations ...*GeoPoint) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) FieldName(fieldName string) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Neighbors(neighbors bool) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Precision(precision ...string) *SuggesterGeoMapping
- func (q *SuggesterGeoMapping) Source() (interface{}, error)
- type SuggesterGeoQuery
- type SumAggregation
- func (a *SumAggregation) Field(field string) *SumAggregation
- func (a *SumAggregation) Format(format string) *SumAggregation
- func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation
- func (a *SumAggregation) Missing(missing interface{}) *SumAggregation
- func (a *SumAggregation) Script(script *Script) *SumAggregation
- func (a *SumAggregation) Source() (interface{}, error)
- func (a *SumAggregation) SubAggregation(name string, subAggregation Aggregation) *SumAggregation
- type SumBucketAggregation
- func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAggregation
- func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation
- func (a *SumBucketAggregation) GapInsertZeros() *SumBucketAggregation
- func (a *SumBucketAggregation) GapPolicy(gapPolicy string) *SumBucketAggregation
- func (a *SumBucketAggregation) GapSkip() *SumBucketAggregation
- func (a *SumBucketAggregation) Meta(metaData map[string]interface{}) *SumBucketAggregation
- func (a *SumBucketAggregation) Source() (interface{}, error)
- type TaskInfo
- type TaskOperationFailure
- type TasksCancelService
- func (s *TasksCancelService) Actions(actions ...string) *TasksCancelService
- func (s *TasksCancelService) Do(ctx context.Context) (*TasksListResponse, error)
- func (s *TasksCancelService) ErrorTrace(errorTrace bool) *TasksCancelService
- func (s *TasksCancelService) FilterPath(filterPath ...string) *TasksCancelService
- func (s *TasksCancelService) Header(name string, value string) *TasksCancelService
- func (s *TasksCancelService) Headers(headers http.Header) *TasksCancelService
- func (s *TasksCancelService) Human(human bool) *TasksCancelService
- func (s *TasksCancelService) NodeId(nodeId ...string) *TasksCancelService
- func (s *TasksCancelService) ParentTaskId(parentTaskId string) *TasksCancelService
- func (s *TasksCancelService) ParentTaskIdFromNodeAndId(nodeId string, id int64) *TasksCancelService
- func (s *TasksCancelService) Pretty(pretty bool) *TasksCancelService
- func (s *TasksCancelService) TaskId(taskId string) *TasksCancelService
- func (s *TasksCancelService) TaskIdFromNodeAndId(nodeId string, id int64) *TasksCancelService
- func (s *TasksCancelService) Validate() error
- type TasksGetTaskResponse
- type TasksGetTaskService
- func (s *TasksGetTaskService) Do(ctx context.Context) (*TasksGetTaskResponse, error)
- func (s *TasksGetTaskService) ErrorTrace(errorTrace bool) *TasksGetTaskService
- func (s *TasksGetTaskService) FilterPath(filterPath ...string) *TasksGetTaskService
- func (s *TasksGetTaskService) Header(name string, value string) *TasksGetTaskService
- func (s *TasksGetTaskService) Headers(headers http.Header) *TasksGetTaskService
- func (s *TasksGetTaskService) Human(human bool) *TasksGetTaskService
- func (s *TasksGetTaskService) Pretty(pretty bool) *TasksGetTaskService
- func (s *TasksGetTaskService) TaskId(taskId string) *TasksGetTaskService
- func (s *TasksGetTaskService) TaskIdFromNodeAndId(nodeId string, id int64) *TasksGetTaskService
- func (s *TasksGetTaskService) Validate() error
- func (s *TasksGetTaskService) WaitForCompletion(waitForCompletion bool) *TasksGetTaskService
- type TasksListResponse
- type TasksListService
- func (s *TasksListService) Actions(actions ...string) *TasksListService
- func (s *TasksListService) Detailed(detailed bool) *TasksListService
- func (s *TasksListService) Do(ctx context.Context) (*TasksListResponse, error)
- func (s *TasksListService) ErrorTrace(errorTrace bool) *TasksListService
- func (s *TasksListService) FilterPath(filterPath ...string) *TasksListService
- func (s *TasksListService) GroupBy(groupBy string) *TasksListService
- func (s *TasksListService) Header(name string, value string) *TasksListService
- func (s *TasksListService) Headers(headers http.Header) *TasksListService
- func (s *TasksListService) Human(human bool) *TasksListService
- func (s *TasksListService) NodeId(nodeId ...string) *TasksListService
- func (s *TasksListService) ParentTaskId(parentTaskId string) *TasksListService
- func (s *TasksListService) Pretty(pretty bool) *TasksListService
- func (s *TasksListService) TaskId(taskId ...string) *TasksListService
- func (s *TasksListService) Validate() error
- func (s *TasksListService) WaitForCompletion(waitForCompletion bool) *TasksListService
- type TermQuery
- type TermSuggester
- func (q *TermSuggester) Accuracy(accuracy float64) *TermSuggester
- func (q *TermSuggester) Analyzer(analyzer string) *TermSuggester
- func (q *TermSuggester) ContextQueries(queries ...SuggesterContextQuery) *TermSuggester
- func (q *TermSuggester) ContextQuery(query SuggesterContextQuery) *TermSuggester
- func (q *TermSuggester) Field(field string) *TermSuggester
- func (q *TermSuggester) MaxEdits(maxEdits int) *TermSuggester
- func (q *TermSuggester) MaxInspections(maxInspections int) *TermSuggester
- func (q *TermSuggester) MaxTermFreq(maxTermFreq float64) *TermSuggester
- func (q *TermSuggester) MinDocFreq(minDocFreq float64) *TermSuggester
- func (q *TermSuggester) MinWordLength(minWordLength int) *TermSuggester
- func (q *TermSuggester) Name() string
- func (q *TermSuggester) PrefixLength(prefixLength int) *TermSuggester
- func (q *TermSuggester) ShardSize(shardSize int) *TermSuggester
- func (q *TermSuggester) Size(size int) *TermSuggester
- func (q *TermSuggester) Sort(sort string) *TermSuggester
- func (q *TermSuggester) Source(includeName bool) (interface{}, error)
- func (q *TermSuggester) StringDistance(stringDistance string) *TermSuggester
- func (q *TermSuggester) SuggestMode(suggestMode string) *TermSuggester
- func (q *TermSuggester) Text(text string) *TermSuggester
- type TermVectorsFieldInfo
- type TermsAggregation
- func (a *TermsAggregation) CollectionMode(collectionMode string) *TermsAggregation
- func (a *TermsAggregation) Exclude(regexp string) *TermsAggregation
- func (a *TermsAggregation) ExcludeValues(values ...interface{}) *TermsAggregation
- func (a *TermsAggregation) ExecutionHint(hint string) *TermsAggregation
- func (a *TermsAggregation) Field(field string) *TermsAggregation
- func (a *TermsAggregation) Include(regexp string) *TermsAggregation
- func (a *TermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *TermsAggregation
- func (a *TermsAggregation) IncludeValues(values ...interface{}) *TermsAggregation
- func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation
- func (a *TermsAggregation) MinDocCount(minDocCount int) *TermsAggregation
- func (a *TermsAggregation) Missing(missing interface{}) *TermsAggregation
- func (a *TermsAggregation) NumPartitions(n int) *TermsAggregation
- func (a *TermsAggregation) Order(order string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByAggregation(aggName string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByCount(asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByCountAsc() *TermsAggregation
- func (a *TermsAggregation) OrderByCountDesc() *TermsAggregation
- func (a *TermsAggregation) OrderByKey(asc bool) *TermsAggregation
- func (a *TermsAggregation) OrderByKeyAsc() *TermsAggregation
- func (a *TermsAggregation) OrderByKeyDesc() *TermsAggregation
- func (a *TermsAggregation) OrderByTerm(asc bool) *TermsAggregationdeprecated
- func (a *TermsAggregation) OrderByTermAsc() *TermsAggregationdeprecated
- func (a *TermsAggregation) OrderByTermDesc() *TermsAggregationdeprecated
- func (a *TermsAggregation) Partition(p int) *TermsAggregation
- func (a *TermsAggregation) RequiredSize(requiredSize int) *TermsAggregation
- func (a *TermsAggregation) Script(script *Script) *TermsAggregation
- func (a *TermsAggregation) ShardMinDocCount(shardMinDocCount int) *TermsAggregation
- func (a *TermsAggregation) ShardSize(shardSize int) *TermsAggregation
- func (a *TermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *TermsAggregation
- func (a *TermsAggregation) Size(size int) *TermsAggregation
- func (a *TermsAggregation) Source() (interface{}, error)
- func (a *TermsAggregation) SubAggregation(name string, subAggregation Aggregation) *TermsAggregation
- func (a *TermsAggregation) ValueType(valueType string) *TermsAggregation
- type TermsAggregationIncludeExclude
- type TermsInfo
- type TermsLookup
- func (t *TermsLookup) Id(id string) *TermsLookup
- func (t *TermsLookup) Index(index string) *TermsLookup
- func (t *TermsLookup) Path(path string) *TermsLookup
- func (t *TermsLookup) Routing(routing string) *TermsLookup
- func (t *TermsLookup) Source() (interface{}, error)
- func (t *TermsLookup) Type(typ string) *TermsLookup
- type TermsOrder
- type TermsQuery
- type TermsSetQuery
- func (q *TermsSetQuery) Boost(boost float64) *TermsSetQuery
- func (q *TermsSetQuery) MinimumShouldMatchField(minimumShouldMatchField string) *TermsSetQuery
- func (q *TermsSetQuery) MinimumShouldMatchScript(minimumShouldMatchScript *Script) *TermsSetQuery
- func (q *TermsSetQuery) QueryName(queryName string) *TermsSetQuery
- func (q *TermsSetQuery) Source() (interface{}, error)
- type TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxDocFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxNumTerms(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxTermFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MaxWordLength(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinDocFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinTermFreq(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) MinWordLength(value int64) *TermvectorsFilterSettings
- func (fs *TermvectorsFilterSettings) Source() (interface{}, error)
- type TermvectorsResponse
- type TermvectorsService
- func (s *TermvectorsService) BodyJson(body interface{}) *TermvectorsService
- func (s *TermvectorsService) BodyString(body string) *TermvectorsService
- func (s *TermvectorsService) Dfs(dfs bool) *TermvectorsService
- func (s *TermvectorsService) Do(ctx context.Context) (*TermvectorsResponse, error)
- func (s *TermvectorsService) Doc(doc interface{}) *TermvectorsService
- func (s *TermvectorsService) ErrorTrace(errorTrace bool) *TermvectorsService
- func (s *TermvectorsService) FieldStatistics(fieldStatistics bool) *TermvectorsService
- func (s *TermvectorsService) Fields(fields ...string) *TermvectorsService
- func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService
- func (s *TermvectorsService) FilterPath(filterPath ...string) *TermvectorsService
- func (s *TermvectorsService) Header(name string, value string) *TermvectorsService
- func (s *TermvectorsService) Headers(headers http.Header) *TermvectorsService
- func (s *TermvectorsService) Human(human bool) *TermvectorsService
- func (s *TermvectorsService) Id(id string) *TermvectorsService
- func (s *TermvectorsService) Index(index string) *TermvectorsService
- func (s *TermvectorsService) Offsets(offsets bool) *TermvectorsService
- func (s *TermvectorsService) Parent(parent string) *TermvectorsService
- func (s *TermvectorsService) Payloads(payloads bool) *TermvectorsService
- func (s *TermvectorsService) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *TermvectorsService
- func (s *TermvectorsService) Positions(positions bool) *TermvectorsService
- func (s *TermvectorsService) Preference(preference string) *TermvectorsService
- func (s *TermvectorsService) Pretty(pretty bool) *TermvectorsService
- func (s *TermvectorsService) Realtime(realtime bool) *TermvectorsService
- func (s *TermvectorsService) Routing(routing string) *TermvectorsService
- func (s *TermvectorsService) TermStatistics(termStatistics bool) *TermvectorsService
- func (s *TermvectorsService) Type(typ string) *TermvectorsService
- func (s *TermvectorsService) Validate() error
- func (s *TermvectorsService) Version(version interface{}) *TermvectorsService
- func (s *TermvectorsService) VersionType(versionType string) *TermvectorsService
- type TokenInfo
- type TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFieldWithFormat(docvalueField DocvalueField) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation
- func (a *TopHitsAggregation) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *TopHitsAggregation
- func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation
- func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation
- func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation
- func (a *TopHitsAggregation) From(from int) *TopHitsAggregation
- func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation
- func (a *TopHitsAggregation) Highlighter() *Highlight
- func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation
- func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation
- func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation
- func (a *TopHitsAggregation) SearchSource(searchSource *SearchSource) *TopHitsAggregation
- func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation
- func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation
- func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation
- func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation
- func (a *TopHitsAggregation) Source() (interface{}, error)
- func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation
- func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation
- type TypeQuery
- type UnassignedInfo
- type UpdateByQueryService
- func (s *UpdateByQueryService) AbortOnVersionConflict() *UpdateByQueryService
- func (s *UpdateByQueryService) AllowNoIndices(allowNoIndices bool) *UpdateByQueryService
- func (s *UpdateByQueryService) AnalyzeWildcard(analyzeWildcard bool) *UpdateByQueryService
- func (s *UpdateByQueryService) Analyzer(analyzer string) *UpdateByQueryService
- func (s *UpdateByQueryService) Body(body string) *UpdateByQueryService
- func (s *UpdateByQueryService) Conflicts(conflicts string) *UpdateByQueryService
- func (s *UpdateByQueryService) DF(df string) *UpdateByQueryService
- func (s *UpdateByQueryService) DefaultOperator(defaultOperator string) *UpdateByQueryService
- func (s *UpdateByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
- func (s *UpdateByQueryService) DoAsync(ctx context.Context) (*StartTaskResult, error)
- func (s *UpdateByQueryService) DocvalueFields(docvalueFields ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) ErrorTrace(errorTrace bool) *UpdateByQueryService
- func (s *UpdateByQueryService) ExpandWildcards(expandWildcards string) *UpdateByQueryService
- func (s *UpdateByQueryService) Explain(explain bool) *UpdateByQueryService
- func (s *UpdateByQueryService) FielddataFields(fielddataFields ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) FilterPath(filterPath ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) From(from int) *UpdateByQueryService
- func (s *UpdateByQueryService) Header(name string, value string) *UpdateByQueryService
- func (s *UpdateByQueryService) Headers(headers http.Header) *UpdateByQueryService
- func (s *UpdateByQueryService) Human(human bool) *UpdateByQueryService
- func (s *UpdateByQueryService) IgnoreUnavailable(ignoreUnavailable bool) *UpdateByQueryService
- func (s *UpdateByQueryService) Index(index ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) Lenient(lenient bool) *UpdateByQueryService
- func (s *UpdateByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *UpdateByQueryService
- func (s *UpdateByQueryService) Pipeline(pipeline string) *UpdateByQueryService
- func (s *UpdateByQueryService) Preference(preference string) *UpdateByQueryService
- func (s *UpdateByQueryService) Pretty(pretty bool) *UpdateByQueryService
- func (s *UpdateByQueryService) ProceedOnVersionConflict() *UpdateByQueryService
- func (s *UpdateByQueryService) Q(q string) *UpdateByQueryService
- func (s *UpdateByQueryService) Query(query Query) *UpdateByQueryService
- func (s *UpdateByQueryService) Refresh(refresh string) *UpdateByQueryService
- func (s *UpdateByQueryService) RequestCache(requestCache bool) *UpdateByQueryService
- func (s *UpdateByQueryService) RequestsPerSecond(requestsPerSecond int) *UpdateByQueryService
- func (s *UpdateByQueryService) Routing(routing ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) Script(script *Script) *UpdateByQueryService
- func (s *UpdateByQueryService) Scroll(scroll string) *UpdateByQueryService
- func (s *UpdateByQueryService) ScrollSize(scrollSize int) *UpdateByQueryService
- func (s *UpdateByQueryService) SearchTimeout(searchTimeout string) *UpdateByQueryService
- func (s *UpdateByQueryService) SearchType(searchType string) *UpdateByQueryService
- func (s *UpdateByQueryService) Size(size int) *UpdateByQueryService
- func (s *UpdateByQueryService) Slices(slices interface{}) *UpdateByQueryService
- func (s *UpdateByQueryService) Sort(sort ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) SortByField(field string, ascending bool) *UpdateByQueryService
- func (s *UpdateByQueryService) Stats(stats ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) StoredFields(storedFields ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) SuggestField(suggestField string) *UpdateByQueryService
- func (s *UpdateByQueryService) SuggestMode(suggestMode string) *UpdateByQueryService
- func (s *UpdateByQueryService) SuggestSize(suggestSize int) *UpdateByQueryService
- func (s *UpdateByQueryService) SuggestText(suggestText string) *UpdateByQueryService
- func (s *UpdateByQueryService) TerminateAfter(terminateAfter int) *UpdateByQueryService
- func (s *UpdateByQueryService) Timeout(timeout string) *UpdateByQueryService
- func (s *UpdateByQueryService) TimeoutInMillis(timeoutInMillis int) *UpdateByQueryService
- func (s *UpdateByQueryService) TrackScores(trackScores bool) *UpdateByQueryService
- func (s *UpdateByQueryService) Type(typ ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) Validate() error
- func (s *UpdateByQueryService) Version(version bool) *UpdateByQueryService
- func (s *UpdateByQueryService) VersionType(versionType bool) *UpdateByQueryService
- func (s *UpdateByQueryService) WaitForActiveShards(waitForActiveShards string) *UpdateByQueryService
- func (s *UpdateByQueryService) WaitForCompletion(waitForCompletion bool) *UpdateByQueryService
- func (s *UpdateByQueryService) XSource(xSource ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) XSourceExclude(xSourceExclude ...string) *UpdateByQueryService
- func (s *UpdateByQueryService) XSourceInclude(xSourceInclude ...string) *UpdateByQueryService
- type UpdateResponse
- type UpdateService
- func (s *UpdateService) DetectNoop(detectNoop bool) *UpdateService
- func (s *UpdateService) Do(ctx context.Context) (*UpdateResponse, error)
- func (s *UpdateService) Doc(doc interface{}) *UpdateService
- func (s *UpdateService) DocAsUpsert(docAsUpsert bool) *UpdateService
- func (s *UpdateService) ErrorTrace(errorTrace bool) *UpdateService
- func (s *UpdateService) FetchSource(fetchSource bool) *UpdateService
- func (s *UpdateService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *UpdateService
- func (s *UpdateService) Fields(fields ...string) *UpdateService
- func (s *UpdateService) FilterPath(filterPath ...string) *UpdateService
- func (s *UpdateService) Header(name string, value string) *UpdateService
- func (s *UpdateService) Headers(headers http.Header) *UpdateService
- func (s *UpdateService) Human(human bool) *UpdateService
- func (s *UpdateService) Id(id string) *UpdateService
- func (s *UpdateService) IfPrimaryTerm(primaryTerm int64) *UpdateService
- func (s *UpdateService) IfSeqNo(seqNo int64) *UpdateService
- func (s *UpdateService) Index(name string) *UpdateService
- func (s *UpdateService) Parent(parent string) *UpdateService
- func (s *UpdateService) Pretty(pretty bool) *UpdateService
- func (s *UpdateService) Refresh(refresh string) *UpdateService
- func (s *UpdateService) RetryOnConflict(retryOnConflict int) *UpdateService
- func (s *UpdateService) Routing(routing string) *UpdateService
- func (s *UpdateService) Script(script *Script) *UpdateService
- func (s *UpdateService) ScriptedUpsert(scriptedUpsert bool) *UpdateService
- func (s *UpdateService) Timeout(timeout string) *UpdateService
- func (s *UpdateService) Type(typ string) *UpdateService
- func (s *UpdateService) Upsert(doc interface{}) *UpdateService
- func (s *UpdateService) Version(version int64) *UpdateService
- func (s *UpdateService) VersionType(versionType string) *UpdateService
- func (s *UpdateService) WaitForActiveShards(waitForActiveShards string) *UpdateService
- type ValidateResponse
- type ValidateService
- func (s *ValidateService) AllShards(allShards *bool) *ValidateService
- func (s *ValidateService) AllowNoIndices(allowNoIndices bool) *ValidateService
- func (s *ValidateService) AnalyzeWildcard(analyzeWildcard bool) *ValidateService
- func (s *ValidateService) Analyzer(analyzer string) *ValidateService
- func (s *ValidateService) BodyJson(body interface{}) *ValidateService
- func (s *ValidateService) BodyString(body string) *ValidateService
- func (s *ValidateService) DefaultOperator(defaultOperator string) *ValidateService
- func (s *ValidateService) Df(df string) *ValidateService
- func (s *ValidateService) Do(ctx context.Context) (*ValidateResponse, error)
- func (s *ValidateService) ErrorTrace(errorTrace bool) *ValidateService
- func (s *ValidateService) ExpandWildcards(expandWildcards string) *ValidateService
- func (s *ValidateService) Explain(explain *bool) *ValidateService
- func (s *ValidateService) FilterPath(filterPath ...string) *ValidateService
- func (s *ValidateService) Header(name string, value string) *ValidateService
- func (s *ValidateService) Headers(headers http.Header) *ValidateService
- func (s *ValidateService) Human(human bool) *ValidateService
- func (s *ValidateService) IgnoreUnavailable(ignoreUnavailable bool) *ValidateService
- func (s *ValidateService) Index(index ...string) *ValidateService
- func (s *ValidateService) Lenient(lenient bool) *ValidateService
- func (s *ValidateService) Pretty(pretty bool) *ValidateService
- func (s *ValidateService) Q(q string) *ValidateService
- func (s *ValidateService) Query(query Query) *ValidateService
- func (s *ValidateService) Rewrite(rewrite *bool) *ValidateService
- func (s *ValidateService) Type(typ ...string) *ValidateService
- func (s *ValidateService) Validate() error
- type ValueCountAggregation
- func (a *ValueCountAggregation) Field(field string) *ValueCountAggregation
- func (a *ValueCountAggregation) Format(format string) *ValueCountAggregation
- func (a *ValueCountAggregation) Meta(metaData map[string]interface{}) *ValueCountAggregation
- func (a *ValueCountAggregation) Script(script *Script) *ValueCountAggregation
- func (a *ValueCountAggregation) Source() (interface{}, error)
- func (a *ValueCountAggregation) SubAggregation(name string, subAggregation Aggregation) *ValueCountAggregation
- type WeightFactorFunction
- type WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Field(field string, config *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Format(format string) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Meta(metaData map[string]interface{}) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Source() (interface{}, error)
- func (a *WeightedAvgAggregation) SubAggregation(name string, subAggregation Aggregation) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Value(value *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) ValueType(valueType string) *WeightedAvgAggregation
- func (a *WeightedAvgAggregation) Weight(weight *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
- type WildcardQuery
- type WrapperQuery
- type XPackIlmDeleteLifecycleResponse
- type XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Do(ctx context.Context) (*XPackIlmDeleteLifecycleResponse, error)
- func (s *XPackIlmDeleteLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) FilterPath(filterPath ...string) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) FlatSettings(flatSettings bool) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Header(name string, value string) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Headers(headers http.Header) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Human(human bool) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Policy(policy string) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Pretty(pretty bool) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Timeout(timeout string) *XPackIlmDeleteLifecycleService
- func (s *XPackIlmDeleteLifecycleService) Validate() error
- type XPackIlmGetLifecycleResponse
- type XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Do(ctx context.Context) (map[string]*XPackIlmGetLifecycleResponse, error)
- func (s *XPackIlmGetLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) FilterPath(filterPath ...string) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) FlatSettings(flatSettings bool) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Header(name string, value string) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Headers(headers http.Header) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Human(human bool) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Policy(policies ...string) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Pretty(pretty bool) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Timeout(timeout string) *XPackIlmGetLifecycleService
- func (s *XPackIlmGetLifecycleService) Validate() error
- type XPackIlmPutLifecycleResponse
- type XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) BodyJson(body interface{}) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) BodyString(body string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Do(ctx context.Context) (*XPackIlmPutLifecycleResponse, error)
- func (s *XPackIlmPutLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) FilterPath(filterPath ...string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) FlatSettings(flatSettings bool) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Header(name string, value string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Headers(headers http.Header) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Human(human bool) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Policy(policy string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Pretty(pretty bool) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Timeout(timeout string) *XPackIlmPutLifecycleService
- func (s *XPackIlmPutLifecycleService) Validate() error
- type XPackInfoBuild
- type XPackInfoFeatures
- type XPackInfoGraph
- type XPackInfoLicense
- type XPackInfoLogstash
- type XPackInfoML
- type XPackInfoMonitoring
- type XPackInfoRollup
- type XPackInfoSecurity
- type XPackInfoService
- func (s *XPackInfoService) Do(ctx context.Context) (*XPackInfoServiceResponse, error)
- func (s *XPackInfoService) ErrorTrace(errorTrace bool) *XPackInfoService
- func (s *XPackInfoService) FilterPath(filterPath ...string) *XPackInfoService
- func (s *XPackInfoService) Header(name string, value string) *XPackInfoService
- func (s *XPackInfoService) Headers(headers http.Header) *XPackInfoService
- func (s *XPackInfoService) Human(human bool) *XPackInfoService
- func (s *XPackInfoService) Pretty(pretty bool) *XPackInfoService
- func (s *XPackInfoService) Validate() error
- type XPackInfoServiceResponse
- type XPackInfoWatcher
- type XPackSecurityApplicationPrivileges
- type XPackSecurityDeleteRoleMappingResponse
- type XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Do(ctx context.Context) (*XPackSecurityDeleteRoleMappingResponse, error)
- func (s *XPackSecurityDeleteRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Header(name string, value string) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Headers(headers http.Header) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Human(human bool) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Name(name string) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Pretty(pretty bool) *XPackSecurityDeleteRoleMappingService
- func (s *XPackSecurityDeleteRoleMappingService) Validate() error
- type XPackSecurityDeleteRoleResponse
- type XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Do(ctx context.Context) (*XPackSecurityDeleteRoleResponse, error)
- func (s *XPackSecurityDeleteRoleService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) FilterPath(filterPath ...string) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Header(name string, value string) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Headers(headers http.Header) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Human(human bool) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Name(name string) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Pretty(pretty bool) *XPackSecurityDeleteRoleService
- func (s *XPackSecurityDeleteRoleService) Validate() error
- type XPackSecurityDeleteUserResponse
- type XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Do(ctx context.Context) (*XPackSecurityDeleteUserResponse, error)
- func (s *XPackSecurityDeleteUserService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) FilterPath(filterPath ...string) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Header(name string, value string) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Headers(headers http.Header) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Human(human bool) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Pretty(pretty bool) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Refresh(refresh string) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Username(username string) *XPackSecurityDeleteUserService
- func (s *XPackSecurityDeleteUserService) Validate() error
- type XPackSecurityGetRoleMappingResponse
- type XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Do(ctx context.Context) (*XPackSecurityGetRoleMappingResponse, error)
- func (s *XPackSecurityGetRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Header(name string, value string) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Headers(headers http.Header) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Human(human bool) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Name(name string) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Pretty(pretty bool) *XPackSecurityGetRoleMappingService
- func (s *XPackSecurityGetRoleMappingService) Validate() error
- type XPackSecurityGetRoleResponse
- type XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Do(ctx context.Context) (*XPackSecurityGetRoleResponse, error)
- func (s *XPackSecurityGetRoleService) ErrorTrace(errorTrace bool) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) FilterPath(filterPath ...string) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Header(name string, value string) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Headers(headers http.Header) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Human(human bool) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Name(name string) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Pretty(pretty bool) *XPackSecurityGetRoleService
- func (s *XPackSecurityGetRoleService) Validate() error
- type XPackSecurityGetUserResponse
- type XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Do(ctx context.Context) (*XPackSecurityGetUserResponse, error)
- func (s *XPackSecurityGetUserService) ErrorTrace(errorTrace bool) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) FilterPath(filterPath ...string) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Header(name string, value string) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Headers(headers http.Header) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Human(human bool) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Pretty(pretty bool) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Usernames(usernames ...string) *XPackSecurityGetUserService
- func (s *XPackSecurityGetUserService) Validate() error
- type XPackSecurityIndicesPermissions
- type XPackSecurityPutRole
- type XPackSecurityPutRoleMapping
- type XPackSecurityPutRoleMappingResponse
- type XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Body(body interface{}) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Do(ctx context.Context) (*XPackSecurityPutRoleMappingResponse, error)
- func (s *XPackSecurityPutRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Header(name string, value string) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Headers(headers http.Header) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Human(human bool) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Name(name string) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Pretty(pretty bool) *XPackSecurityPutRoleMappingService
- func (s *XPackSecurityPutRoleMappingService) Validate() error
- type XPackSecurityPutRoleResponse
- type XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Body(body interface{}) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Do(ctx context.Context) (*XPackSecurityPutRoleResponse, error)
- func (s *XPackSecurityPutRoleService) ErrorTrace(errorTrace bool) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) FilterPath(filterPath ...string) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Header(name string, value string) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Headers(headers http.Header) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Human(human bool) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Name(name string) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Pretty(pretty bool) *XPackSecurityPutRoleService
- func (s *XPackSecurityPutRoleService) Validate() error
- type XPackSecurityPutUserRequest
- type XPackSecurityPutUserResponse
- type XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Body(body interface{}) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Do(ctx context.Context) (*XPackSecurityPutUserResponse, error)
- func (s *XPackSecurityPutUserService) ErrorTrace(errorTrace bool) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) FilterPath(filterPath ...string) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Header(name string, value string) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Headers(headers http.Header) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Human(human bool) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Pretty(pretty bool) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Refresh(refresh string) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) User(user *XPackSecurityPutUserRequest) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Username(username string) *XPackSecurityPutUserService
- func (s *XPackSecurityPutUserService) Validate() error
- type XPackSecurityRole
- type XPackSecurityRoleMapping
- type XPackSecurityUser
- type XPackWatch
- type XPackWatchActionAckStatus
- type XPackWatchActionExecutionState
- type XPackWatchActionStatus
- type XPackWatchActionThrottle
- type XPackWatchExecutionState
- type XPackWatchRecord
- type XPackWatchRecordStatus
- type XPackWatchStatus
- type XPackWatcherAckWatchResponse
- type XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) ActionId(actionId ...string) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Do(ctx context.Context) (*XPackWatcherAckWatchResponse, error)
- func (s *XPackWatcherAckWatchService) ErrorTrace(errorTrace bool) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) FilterPath(filterPath ...string) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Header(name string, value string) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Headers(headers http.Header) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Human(human bool) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) MasterTimeout(masterTimeout string) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Pretty(pretty bool) *XPackWatcherAckWatchService
- func (s *XPackWatcherAckWatchService) Validate() error
- func (s *XPackWatcherAckWatchService) WatchId(watchId string) *XPackWatcherAckWatchService
- type XPackWatcherAckWatchStatus
- type XPackWatcherActivateWatchResponse
- type XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Do(ctx context.Context) (*XPackWatcherActivateWatchResponse, error)
- func (s *XPackWatcherActivateWatchService) ErrorTrace(errorTrace bool) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) FilterPath(filterPath ...string) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Header(name string, value string) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Headers(headers http.Header) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Human(human bool) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) MasterTimeout(masterTimeout string) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Pretty(pretty bool) *XPackWatcherActivateWatchService
- func (s *XPackWatcherActivateWatchService) Validate() error
- func (s *XPackWatcherActivateWatchService) WatchId(watchId string) *XPackWatcherActivateWatchService
- type XPackWatcherDeactivateWatchResponse
- type XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Do(ctx context.Context) (*XPackWatcherDeactivateWatchResponse, error)
- func (s *XPackWatcherDeactivateWatchService) ErrorTrace(errorTrace bool) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) FilterPath(filterPath ...string) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Header(name string, value string) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Headers(headers http.Header) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Human(human bool) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) MasterTimeout(masterTimeout string) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Pretty(pretty bool) *XPackWatcherDeactivateWatchService
- func (s *XPackWatcherDeactivateWatchService) Validate() error
- func (s *XPackWatcherDeactivateWatchService) WatchId(watchId string) *XPackWatcherDeactivateWatchService
- type XPackWatcherDeleteWatchResponse
- type XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Do(ctx context.Context) (*XPackWatcherDeleteWatchResponse, error)
- func (s *XPackWatcherDeleteWatchService) ErrorTrace(errorTrace bool) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) FilterPath(filterPath ...string) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Header(name string, value string) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Headers(headers http.Header) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Human(human bool) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Id(id string) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) MasterTimeout(masterTimeout string) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Pretty(pretty bool) *XPackWatcherDeleteWatchService
- func (s *XPackWatcherDeleteWatchService) Validate() error
- type XPackWatcherExecuteWatchResponse
- type XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) BodyJson(body interface{}) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) BodyString(body string) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Debug(debug bool) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Do(ctx context.Context) (*XPackWatcherExecuteWatchResponse, error)
- func (s *XPackWatcherExecuteWatchService) ErrorTrace(errorTrace bool) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) FilterPath(filterPath ...string) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Header(name string, value string) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Headers(headers http.Header) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Human(human bool) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Id(id string) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Pretty(pretty bool) *XPackWatcherExecuteWatchService
- func (s *XPackWatcherExecuteWatchService) Validate() error
- type XPackWatcherGetWatchResponse
- type XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Do(ctx context.Context) (*XPackWatcherGetWatchResponse, error)
- func (s *XPackWatcherGetWatchService) ErrorTrace(errorTrace bool) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) FilterPath(filterPath ...string) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Header(name string, value string) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Headers(headers http.Header) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Human(human bool) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Id(id string) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Pretty(pretty bool) *XPackWatcherGetWatchService
- func (s *XPackWatcherGetWatchService) Validate() error
- type XPackWatcherPutWatchResponse
- type XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Active(active bool) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Body(body interface{}) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Do(ctx context.Context) (*XPackWatcherPutWatchResponse, error)
- func (s *XPackWatcherPutWatchService) ErrorTrace(errorTrace bool) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) FilterPath(filterPath ...string) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Header(name string, value string) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Headers(headers http.Header) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Human(human bool) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Id(id string) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) IfPrimaryTerm(primaryTerm int64) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) IfSeqNo(seqNo int64) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) MasterTimeout(masterTimeout string) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Pretty(pretty bool) *XPackWatcherPutWatchService
- func (s *XPackWatcherPutWatchService) Validate() error
- type XPackWatcherRestartResponse
- type XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Do(ctx context.Context) (*XPackWatcherRestartResponse, error)
- func (s *XPackWatcherRestartService) ErrorTrace(errorTrace bool) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) FilterPath(filterPath ...string) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Header(name string, value string) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Headers(headers http.Header) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Human(human bool) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Pretty(pretty bool) *XPackWatcherRestartService
- func (s *XPackWatcherRestartService) Validate() error
- type XPackWatcherStartResponse
- type XPackWatcherStartService
- func (s *XPackWatcherStartService) Do(ctx context.Context) (*XPackWatcherStartResponse, error)
- func (s *XPackWatcherStartService) ErrorTrace(errorTrace bool) *XPackWatcherStartService
- func (s *XPackWatcherStartService) FilterPath(filterPath ...string) *XPackWatcherStartService
- func (s *XPackWatcherStartService) Header(name string, value string) *XPackWatcherStartService
- func (s *XPackWatcherStartService) Headers(headers http.Header) *XPackWatcherStartService
- func (s *XPackWatcherStartService) Human(human bool) *XPackWatcherStartService
- func (s *XPackWatcherStartService) Pretty(pretty bool) *XPackWatcherStartService
- func (s *XPackWatcherStartService) Validate() error
- type XPackWatcherStats
- type XPackWatcherStatsResponse
- type XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Do(ctx context.Context) (*XPackWatcherStatsResponse, error)
- func (s *XPackWatcherStatsService) EmitStacktraces(emitStacktraces bool) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) ErrorTrace(errorTrace bool) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) FilterPath(filterPath ...string) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Header(name string, value string) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Headers(headers http.Header) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Human(human bool) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Metric(metric string) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Pretty(pretty bool) *XPackWatcherStatsService
- func (s *XPackWatcherStatsService) Validate() error
- type XPackWatcherStopResponse
- type XPackWatcherStopService
- func (s *XPackWatcherStopService) Do(ctx context.Context) (*XPackWatcherStopResponse, error)
- func (s *XPackWatcherStopService) ErrorTrace(errorTrace bool) *XPackWatcherStopService
- func (s *XPackWatcherStopService) FilterPath(filterPath ...string) *XPackWatcherStopService
- func (s *XPackWatcherStopService) Header(name string, value string) *XPackWatcherStopService
- func (s *XPackWatcherStopService) Headers(headers http.Header) *XPackWatcherStopService
- func (s *XPackWatcherStopService) Human(human bool) *XPackWatcherStopService
- func (s *XPackWatcherStopService) Pretty(pretty bool) *XPackWatcherStopService
- func (s *XPackWatcherStopService) Validate() error
- type ZeroBackoff
Examples ¶
Constants ¶
const ( // Version is the current version of Elastic. Version = "6.2.37" // DefaultURL is the default endpoint of Elasticsearch on the local machine. // It is used e.g. when initializing a new Client without a specific URL. DefaultURL = "http://127.0.0.1:9200" // DefaultScheme is the default protocol scheme to use when sniffing // the Elasticsearch cluster. DefaultScheme = "http" // DefaultHealthcheckEnabled specifies if healthchecks are enabled by default. DefaultHealthcheckEnabled = true // DefaultHealthcheckTimeoutStartup is the time the healthcheck waits // for a response from Elasticsearch on startup, i.e. when creating a // client. After the client is started, a shorter timeout is commonly used // (its default is specified in DefaultHealthcheckTimeout). DefaultHealthcheckTimeoutStartup = 5 * time.Second // DefaultHealthcheckTimeout specifies the time a running client waits for // a response from Elasticsearch. Notice that the healthcheck timeout // when a client is created is larger by default (see DefaultHealthcheckTimeoutStartup). DefaultHealthcheckTimeout = 1 * time.Second // DefaultHealthcheckInterval is the default interval between // two health checks of the nodes in the cluster. DefaultHealthcheckInterval = 60 * time.Second // DefaultSnifferEnabled specifies if the sniffer is enabled by default. DefaultSnifferEnabled = true // DefaultSnifferInterval is the interval between two sniffing procedures, // i.e. the lookup of all nodes in the cluster and their addition/removal // from the list of actual connections. DefaultSnifferInterval = 15 * time.Minute // DefaultSnifferTimeoutStartup is the default timeout for the sniffing // process that is initiated while creating a new client. For subsequent // sniffing processes, DefaultSnifferTimeout is used (by default). DefaultSnifferTimeoutStartup = 5 * time.Second // DefaultSnifferTimeout is the default timeout after which the // sniffing process times out. Notice that for the initial sniffing // process, DefaultSnifferTimeoutStartup is used. DefaultSnifferTimeout = 2 * time.Second // DefaultSendGetBodyAs is the HTTP method to use when elastic is sending // a GET request with a body. DefaultSendGetBodyAs = "GET" // DefaultGzipEnabled specifies if gzip compression is enabled by default. DefaultGzipEnabled = false )
const (
// DefaultScrollKeepAlive is the default time a scroll cursor will be kept alive.
DefaultScrollKeepAlive = "5m"
)
Variables ¶
var ( // ErrNoClient is raised when no Elasticsearch node is available. ErrNoClient = errors.New("no Elasticsearch node available") // ErrRetry is raised when a request cannot be executed after the configured // number of retries. ErrRetry = errors.New("cannot connect after several retries") // ErrTimeout is raised when a request timed out, e.g. when WaitForStatus // didn't return in time. ErrTimeout = errors.New("timeout") )
var ( // ErrBulkItemRetry is returned in BulkProcessor from a worker when // a response item needs to be retried. ErrBulkItemRetry = errors.New("elastic: uncommitted bulk response items") )
var ( // ErrResponseSize is raised if a response body exceeds the given max body size. ErrResponseSize = errors.New("elastic: response size too large") )
Functions ¶
func IsConflict ¶
func IsConflict(err interface{}) bool
IsConflict returns true if the given error indicates that the Elasticsearch operation resulted in a version conflict. This can occur in operations like `update` or `index` with `op_type=create`. The err parameter can be of type *elastic.Error, elastic.Error, *http.Response or int (indicating the HTTP status code).
func IsConnErr ¶
IsConnErr returns true if the error indicates that Elastic could not find an Elasticsearch host to connect to.
func IsContextErr ¶
IsContextErr returns true if the error is from a context that was canceled or deadline exceeded
func IsForbidden ¶
func IsForbidden(err interface{}) bool
IsForbidden returns true if the given error indicates that Elasticsearch returned HTTP status 403. This happens e.g. due to a missing license. The err parameter can be of type *elastic.Error, elastic.Error, *http.Response or int (indicating the HTTP status code).
func IsNotFound ¶
func IsNotFound(err interface{}) bool
IsNotFound returns true if the given error indicates that Elasticsearch returned HTTP status 404. The err parameter can be of type *elastic.Error, elastic.Error, *http.Response or int (indicating the HTTP status code).
func IsStatusCode ¶
IsStatusCode returns true if the given error indicates that the Elasticsearch operation returned the specified HTTP status code. The err parameter can be of type *http.Response, *Error, Error, or int (indicating the HTTP status code).
func IsTimeout ¶
func IsTimeout(err interface{}) bool
IsTimeout returns true if the given error indicates that Elasticsearch returned HTTP status 408. The err parameter can be of type *elastic.Error, elastic.Error, *http.Response or int (indicating the HTTP status code).
Types ¶
type AcknowledgedResponse ¶
type AcknowledgedResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
AcknowledgedResponse is returned from various APIs. It simply indicates whether the operation is ack'd or not.
type AdjacencyMatrixAggregation ¶
type AdjacencyMatrixAggregation struct {
// contains filtered or unexported fields
}
AdjacencyMatrixAggregation returning a form of adjacency matrix. The request provides a collection of named filter expressions, similar to the filters aggregation request. Each bucket in the response represents a non-empty cell in the matrix of intersecting filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-adjacency-matrix-aggregation.html
func NewAdjacencyMatrixAggregation ¶
func NewAdjacencyMatrixAggregation() *AdjacencyMatrixAggregation
NewAdjacencyMatrixAggregation initializes a new AdjacencyMatrixAggregation.
func (*AdjacencyMatrixAggregation) Filters ¶
func (a *AdjacencyMatrixAggregation) Filters(name string, filter Query) *AdjacencyMatrixAggregation
Filters adds the filter
func (*AdjacencyMatrixAggregation) Meta ¶
func (a *AdjacencyMatrixAggregation) Meta(metaData map[string]interface{}) *AdjacencyMatrixAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AdjacencyMatrixAggregation) Source ¶
func (a *AdjacencyMatrixAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*AdjacencyMatrixAggregation) SubAggregation ¶
func (a *AdjacencyMatrixAggregation) SubAggregation(name string, subAggregation Aggregation) *AdjacencyMatrixAggregation
SubAggregation adds a sub-aggregation to this aggregation.
type Aggregation ¶
type Aggregation interface { // Source returns a JSON-serializable aggregation that is a fragment // of the request sent to Elasticsearch. Source() (interface{}, error) }
Aggregations can be seen as a unit-of-work that build analytic information over a set of documents. It is (in many senses) the follow-up of facets in Elasticsearch. For more details about aggregations, visit: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations.html
type AggregationBucketAdjacencyMatrix ¶
type AggregationBucketAdjacencyMatrix struct { Aggregations Buckets []*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketAdjacencyMatrix is a multi-bucket aggregation that is returned with a AdjacencyMatrix aggregation.
func (*AggregationBucketAdjacencyMatrix) UnmarshalJSON ¶
func (a *AggregationBucketAdjacencyMatrix) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketAdjacencyMatrix structure.
type AggregationBucketCompositeItem ¶
type AggregationBucketCompositeItem struct { Aggregations Key map[string]interface{} //`json:"key"` DocCount int64 //`json:"doc_count"` }
AggregationBucketCompositeItem is a single bucket of an AggregationBucketCompositeItems structure.
func (*AggregationBucketCompositeItem) UnmarshalJSON ¶
func (a *AggregationBucketCompositeItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItem structure.
type AggregationBucketCompositeItems ¶
type AggregationBucketCompositeItems struct { Aggregations Buckets []*AggregationBucketCompositeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` AfterKey map[string]interface{} // `json:"after_key,omitempty"` }
AggregationBucketCompositeItems implements the response structure for a bucket aggregation of type composite.
func (*AggregationBucketCompositeItems) UnmarshalJSON ¶
func (a *AggregationBucketCompositeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketCompositeItems structure.
type AggregationBucketFilters ¶
type AggregationBucketFilters struct { Aggregations Buckets []*AggregationBucketKeyItem //`json:"buckets"` NamedBuckets map[string]*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketFilters is a multi-bucket aggregation that is returned with a filters aggregation.
func (*AggregationBucketFilters) UnmarshalJSON ¶
func (a *AggregationBucketFilters) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketFilters structure.
type AggregationBucketHistogramItem ¶
type AggregationBucketHistogramItem struct { Aggregations Key float64 //`json:"key"` KeyAsString *string //`json:"key_as_string"` DocCount int64 //`json:"doc_count"` }
AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.
func (*AggregationBucketHistogramItem) UnmarshalJSON ¶
func (a *AggregationBucketHistogramItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItem structure.
type AggregationBucketHistogramItems ¶
type AggregationBucketHistogramItems struct { Aggregations Buckets []*AggregationBucketHistogramItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketHistogramItems is a bucket aggregation that is returned with a date histogram aggregation.
func (*AggregationBucketHistogramItems) UnmarshalJSON ¶
func (a *AggregationBucketHistogramItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItems structure.
type AggregationBucketKeyItem ¶
type AggregationBucketKeyItem struct { Aggregations Key interface{} //`json:"key"` KeyAsString *string //`json:"key_as_string"` KeyNumber json.Number DocCount int64 //`json:"doc_count"` }
AggregationBucketKeyItem is a single bucket of an AggregationBucketKeyItems structure.
func (*AggregationBucketKeyItem) UnmarshalJSON ¶
func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItem structure.
type AggregationBucketKeyItems ¶
type AggregationBucketKeyItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets []*AggregationBucketKeyItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyItems is a bucket aggregation that is e.g. returned with a terms aggregation.
func (*AggregationBucketKeyItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItems structure.
type AggregationBucketKeyedHistogramItems ¶
type AggregationBucketKeyedHistogramItems struct { Aggregations Buckets map[string]*AggregationBucketHistogramItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyedHistogramItems is a bucket aggregation that is returned with a (keyed) date histogram aggregation.
func (*AggregationBucketKeyedHistogramItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyedHistogramItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyedHistogramItems structure.
type AggregationBucketKeyedRangeItems ¶
type AggregationBucketKeyedRangeItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets map[string]*AggregationBucketRangeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketKeyedRangeItems is a bucket aggregation that is e.g. returned with a keyed range aggregation.
func (*AggregationBucketKeyedRangeItems) UnmarshalJSON ¶
func (a *AggregationBucketKeyedRangeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
type AggregationBucketRangeItem ¶
type AggregationBucketRangeItem struct { Aggregations Key string //`json:"key"` DocCount int64 //`json:"doc_count"` From *float64 //`json:"from"` FromAsString string //`json:"from_as_string"` To *float64 //`json:"to"` ToAsString string //`json:"to_as_string"` }
AggregationBucketRangeItem is a single bucket of an AggregationBucketRangeItems structure.
func (*AggregationBucketRangeItem) UnmarshalJSON ¶
func (a *AggregationBucketRangeItem) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItem structure.
type AggregationBucketRangeItems ¶
type AggregationBucketRangeItems struct { Aggregations DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` Buckets []*AggregationBucketRangeItem //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketRangeItems is a bucket aggregation that is e.g. returned with a range aggregation.
func (*AggregationBucketRangeItems) UnmarshalJSON ¶
func (a *AggregationBucketRangeItems) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.
type AggregationBucketSignificantTerm ¶
type AggregationBucketSignificantTerm struct { Aggregations Key string //`json:"key"` DocCount int64 //`json:"doc_count"` BgCount int64 //`json:"bg_count"` Score float64 //`json:"score"` }
AggregationBucketSignificantTerm is a single bucket of an AggregationBucketSignificantTerms structure.
func (*AggregationBucketSignificantTerm) UnmarshalJSON ¶
func (a *AggregationBucketSignificantTerm) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerm structure.
type AggregationBucketSignificantTerms ¶
type AggregationBucketSignificantTerms struct { Aggregations DocCount int64 //`json:"doc_count"` Buckets []*AggregationBucketSignificantTerm //`json:"buckets"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationBucketSignificantTerms is a bucket aggregation returned with a significant terms aggregation.
func (*AggregationBucketSignificantTerms) UnmarshalJSON ¶
func (a *AggregationBucketSignificantTerms) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerms structure.
type AggregationExtendedStatsMetric ¶
type AggregationExtendedStatsMetric struct { Aggregations Count int64 // `json:"count"` Min *float64 //`json:"min,omitempty"` Max *float64 //`json:"max,omitempty"` Avg *float64 //`json:"avg,omitempty"` Sum *float64 //`json:"sum,omitempty"` SumOfSquares *float64 //`json:"sum_of_squares,omitempty"` Variance *float64 //`json:"variance,omitempty"` StdDeviation *float64 //`json:"std_deviation,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationExtendedStatsMetric is a multi-value metric, returned by an ExtendedStats aggregation.
func (*AggregationExtendedStatsMetric) UnmarshalJSON ¶
func (a *AggregationExtendedStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationExtendedStatsMetric structure.
type AggregationGeoBoundsMetric ¶
type AggregationGeoBoundsMetric struct { Aggregations Bounds struct { TopLeft struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"top_left"` BottomRight struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"bottom_right"` } `json:"bounds"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationGeoBoundsMetric is a metric as returned by a GeoBounds aggregation.
func (*AggregationGeoBoundsMetric) UnmarshalJSON ¶
func (a *AggregationGeoBoundsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationGeoBoundsMetric structure.
type AggregationGeoCentroidMetric ¶
type AggregationGeoCentroidMetric struct { Aggregations Location struct { Latitude float64 `json:"lat"` Longitude float64 `json:"lon"` } `json:"location"` Count int // `json:"count,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationGeoCentroidMetric is a metric as returned by a GeoCentroid aggregation.
func (*AggregationGeoCentroidMetric) UnmarshalJSON ¶
func (a *AggregationGeoCentroidMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationGeoCentroidMetric structure.
type AggregationMatrixStats ¶
type AggregationMatrixStats struct { Aggregations Fields []*AggregationMatrixStatsField // `json:"field,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationMatrixStats is returned by a MatrixStats aggregation.
func (*AggregationMatrixStats) UnmarshalJSON ¶
func (a *AggregationMatrixStats) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationMatrixStats structure.
type AggregationMatrixStatsField ¶
type AggregationMatrixStatsField struct { Name string `json:"name"` Count int64 `json:"count"` Mean float64 `json:"mean,omitempty"` Variance float64 `json:"variance,omitempty"` Skewness float64 `json:"skewness,omitempty"` Kurtosis float64 `json:"kurtosis,omitempty"` Covariance map[string]float64 `json:"covariance,omitempty"` Correlation map[string]float64 `json:"correlation,omitempty"` }
AggregationMatrixStatsField represents running stats of a single field returned from MatrixStats aggregation.
type AggregationPercentilesMetric ¶
type AggregationPercentilesMetric struct { Aggregations Values map[string]float64 // `json:"values"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPercentilesMetric is a multi-value metric, returned by a Percentiles aggregation.
func (*AggregationPercentilesMetric) UnmarshalJSON ¶
func (a *AggregationPercentilesMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPercentilesMetric structure.
type AggregationPipelineBucketMetricValue ¶
type AggregationPipelineBucketMetricValue struct { Aggregations Keys []interface{} // `json:"keys"` Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineBucketMetricValue is a value returned e.g. by a MaxBucket aggregation.
func (*AggregationPipelineBucketMetricValue) UnmarshalJSON ¶
func (a *AggregationPipelineBucketMetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineBucketMetricValue structure.
type AggregationPipelineDerivative ¶
type AggregationPipelineDerivative struct { Aggregations Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` NormalizedValue *float64 // `json:"normalized_value"` NormalizedValueAsString string // `json:"normalized_value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineDerivative is the value returned by a Derivative aggregation.
func (*AggregationPipelineDerivative) UnmarshalJSON ¶
func (a *AggregationPipelineDerivative) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineDerivative structure.
type AggregationPipelinePercentilesMetric ¶
type AggregationPipelinePercentilesMetric struct { Aggregations Values map[string]float64 // `json:"values"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelinePercentilesMetric is the value returned by a pipeline percentiles Metric aggregation
func (*AggregationPipelinePercentilesMetric) UnmarshalJSON ¶
func (a *AggregationPipelinePercentilesMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelinePercentilesMetric structure.
type AggregationPipelineSimpleValue ¶
type AggregationPipelineSimpleValue struct { Aggregations Value *float64 // `json:"value"` ValueAsString string // `json:"value_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineSimpleValue is a simple value, returned e.g. by a MovAvg aggregation.
func (*AggregationPipelineSimpleValue) UnmarshalJSON ¶
func (a *AggregationPipelineSimpleValue) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineSimpleValue structure.
type AggregationPipelineStatsMetric ¶
type AggregationPipelineStatsMetric struct { Aggregations Count int64 // `json:"count"` CountAsString string // `json:"count_as_string"` Min *float64 // `json:"min"` MinAsString string // `json:"min_as_string"` Max *float64 // `json:"max"` MaxAsString string // `json:"max_as_string"` Avg *float64 // `json:"avg"` AvgAsString string // `json:"avg_as_string"` Sum *float64 // `json:"sum"` SumAsString string // `json:"sum_as_string"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationPipelineStatsMetric is a simple value, returned e.g. by a MovAvg aggregation.
func (*AggregationPipelineStatsMetric) UnmarshalJSON ¶
func (a *AggregationPipelineStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationPipelineStatsMetric structure.
type AggregationScriptedMetric ¶
type AggregationScriptedMetric struct { Aggregations Value interface{} //`json:"value"` Meta map[string]interface{} //`json:"meta,omitempty"` }
AggregationScriptedMetric is the value return by a scripted metric aggregation. Value maybe one of map[string]interface{}/[]interface{}/string/bool/json.Number
func (*AggregationScriptedMetric) UnmarshalJSON ¶
func (a *AggregationScriptedMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationScriptedMetric structure.
type AggregationSingleBucket ¶
type AggregationSingleBucket struct { Aggregations DocCount int64 // `json:"doc_count"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationSingleBucket is a single bucket, returned e.g. via an aggregation of type Global.
func (*AggregationSingleBucket) UnmarshalJSON ¶
func (a *AggregationSingleBucket) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationSingleBucket structure.
type AggregationStatsMetric ¶
type AggregationStatsMetric struct { Aggregations Count int64 // `json:"count"` Min *float64 //`json:"min,omitempty"` Max *float64 //`json:"max,omitempty"` Avg *float64 //`json:"avg,omitempty"` Sum *float64 //`json:"sum,omitempty"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationStatsMetric is a multi-value metric, returned by a Stats aggregation.
func (*AggregationStatsMetric) UnmarshalJSON ¶
func (a *AggregationStatsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationStatsMetric structure.
type AggregationTopHitsMetric ¶
type AggregationTopHitsMetric struct { Aggregations Hits *SearchHits //`json:"hits"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationTopHitsMetric is a metric returned by a TopHits aggregation.
func (*AggregationTopHitsMetric) UnmarshalJSON ¶
func (a *AggregationTopHitsMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationTopHitsMetric structure.
type AggregationValueMetric ¶
type AggregationValueMetric struct { Aggregations Value *float64 //`json:"value"` Meta map[string]interface{} // `json:"meta,omitempty"` }
AggregationValueMetric is a single-value metric, returned e.g. by a Min or Max aggregation.
func (*AggregationValueMetric) UnmarshalJSON ¶
func (a *AggregationValueMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes JSON data and initializes an AggregationValueMetric structure.
type Aggregations ¶
type Aggregations map[string]*json.RawMessage
Aggregations is a list of aggregations that are part of a search result.
Example ¶
package main import ( "context" "fmt" "log" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Create an aggregation for users and a sub-aggregation for a date histogram of tweets (per year). timeline := elastic.NewTermsAggregation().Field("user").Size(10).OrderByCountDesc() histogram := elastic.NewDateHistogramAggregation().Field("created").Interval("year") timeline = timeline.SubAggregation("history", histogram) // Search with a term query searchResult, err := client.Search(). Index("twitter"). // search in index "twitter" Query(elastic.NewMatchAllQuery()). // return all results, but ... SearchType("count"). // ... do not return hits, just the count Aggregation("timeline", timeline). // add our aggregation to the query Pretty(true). // pretty print request and response JSON Do(context.Background()) // execute if err != nil { // Handle error panic(err) } // Access "timeline" aggregate in search result. agg, found := searchResult.Aggregations.Terms("timeline") if !found { log.Fatalf("we should have a terms aggregation called %q", "timeline") } for _, userBucket := range agg.Buckets { // Every bucket should have the user field as key. user := userBucket.Key // The sub-aggregation history should have the number of tweets per year. histogram, found := userBucket.DateHistogram("history") if found { for _, year := range histogram.Buckets { var key string if s := year.KeyAsString; s != nil { key = *s } fmt.Printf("user %q has %d tweets in %q\n", user, year.DocCount, key) } } } }
Output:
func (Aggregations) AdjacencyMatrix ¶
func (a Aggregations) AdjacencyMatrix(name string) (*AggregationBucketAdjacencyMatrix, bool)
AdjacencyMatrix returning a form of adjacency matrix. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-adjacency-matrix-aggregation.html
func (Aggregations) Avg ¶
func (a Aggregations) Avg(name string) (*AggregationValueMetric, bool)
Avg returns average aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-avg-aggregation.html
func (Aggregations) AvgBucket ¶
func (a Aggregations) AvgBucket(name string) (*AggregationPipelineSimpleValue, bool)
AvgBucket returns average bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-avg-bucket-aggregation.html
func (Aggregations) BucketScript ¶
func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool)
BucketScript returns bucket script pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-bucket-script-aggregation.html
func (Aggregations) Cardinality ¶
func (a Aggregations) Cardinality(name string) (*AggregationValueMetric, bool)
Cardinality returns cardinality aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-cardinality-aggregation.html
func (Aggregations) Children ¶
func (a Aggregations) Children(name string) (*AggregationSingleBucket, bool)
Children returns children results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-children-aggregation.html
func (Aggregations) Composite ¶
func (a Aggregations) Composite(name string) (*AggregationBucketCompositeItems, bool)
Composite returns composite bucket aggregation results.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html for details.
func (Aggregations) CumulativeSum ¶
func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool)
CumulativeSum returns a cumulative sum pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-cumulative-sum-aggregation.html
func (Aggregations) DateHistogram ¶
func (a Aggregations) DateHistogram(name string) (*AggregationBucketHistogramItems, bool)
DateHistogram returns date histogram aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-datehistogram-aggregation.html
func (Aggregations) DateRange ¶
func (a Aggregations) DateRange(name string) (*AggregationBucketRangeItems, bool)
DateRange returns date range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-daterange-aggregation.html
func (Aggregations) Derivative ¶
func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool)
Derivative returns derivative pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-derivative-aggregation.html
func (Aggregations) DiversifiedSampler ¶
func (a Aggregations) DiversifiedSampler(name string) (*AggregationSingleBucket, bool)
DiversifiedSampler returns diversified_sampler aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-diversified-sampler-aggregation.html
func (Aggregations) ExtendedStats ¶
func (a Aggregations) ExtendedStats(name string) (*AggregationExtendedStatsMetric, bool)
ExtendedStats returns extended stats aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-extendedstats-aggregation.html
func (Aggregations) Filter ¶
func (a Aggregations) Filter(name string) (*AggregationSingleBucket, bool)
Filter returns filter results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-filter-aggregation.html
func (Aggregations) Filters ¶
func (a Aggregations) Filters(name string) (*AggregationBucketFilters, bool)
Filters returns filters results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-filters-aggregation.html
func (Aggregations) GeoBounds ¶
func (a Aggregations) GeoBounds(name string) (*AggregationGeoBoundsMetric, bool)
GeoBounds returns geo-bounds aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-geobounds-aggregation.html
func (Aggregations) GeoCentroid ¶
func (a Aggregations) GeoCentroid(name string) (*AggregationGeoCentroidMetric, bool)
GeoCentroid returns geo-centroid aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-geocentroid-aggregation.html
func (Aggregations) GeoDistance ¶
func (a Aggregations) GeoDistance(name string) (*AggregationBucketRangeItems, bool)
GeoDistance returns geo distance aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-geodistance-aggregation.html
func (Aggregations) GeoHash ¶
func (a Aggregations) GeoHash(name string) (*AggregationBucketKeyItems, bool)
GeoHash returns geo-hash aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-geohashgrid-aggregation.html
func (Aggregations) Global ¶
func (a Aggregations) Global(name string) (*AggregationSingleBucket, bool)
Global returns global results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-global-aggregation.html
func (Aggregations) Histogram ¶
func (a Aggregations) Histogram(name string) (*AggregationBucketHistogramItems, bool)
Histogram returns histogram aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-histogram-aggregation.html
func (Aggregations) IPRange ¶
func (a Aggregations) IPRange(name string) (*AggregationBucketRangeItems, bool)
IPRange returns IP range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-iprange-aggregation.html
func (Aggregations) KeyedDateHistogram ¶
func (a Aggregations) KeyedDateHistogram(name string) (*AggregationBucketKeyedHistogramItems, bool)
KeyedDateHistogram returns date histogram aggregation results for keyed responses.
func (Aggregations) KeyedRange ¶
func (a Aggregations) KeyedRange(name string) (*AggregationBucketKeyedRangeItems, bool)
KeyedRange returns keyed range aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-range-aggregation.html.
func (Aggregations) MatrixStats ¶
func (a Aggregations) MatrixStats(name string) (*AggregationMatrixStats, bool)
MatrixStats returns matrix stats aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-matrix-stats-aggregation.html
func (Aggregations) Max ¶
func (a Aggregations) Max(name string) (*AggregationValueMetric, bool)
Max returns max aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-max-aggregation.html
func (Aggregations) MaxBucket ¶
func (a Aggregations) MaxBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
MaxBucket returns maximum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-max-bucket-aggregation.html
func (Aggregations) Min ¶
func (a Aggregations) Min(name string) (*AggregationValueMetric, bool)
Min returns min aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-min-aggregation.html
func (Aggregations) MinBucket ¶
func (a Aggregations) MinBucket(name string) (*AggregationPipelineBucketMetricValue, bool)
MinBucket returns minimum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-min-bucket-aggregation.html
func (Aggregations) Missing ¶
func (a Aggregations) Missing(name string) (*AggregationSingleBucket, bool)
Missing returns missing results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-missing-aggregation.html
func (Aggregations) MovAvg
deprecated
func (a Aggregations) MovAvg(name string) (*AggregationPipelineSimpleValue, bool)
MovAvg returns moving average pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (Aggregations) MovFn ¶
func (a Aggregations) MovFn(name string) (*AggregationPipelineSimpleValue, bool)
MovFn returns moving function pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movfn-aggregation.html
func (Aggregations) Nested ¶
func (a Aggregations) Nested(name string) (*AggregationSingleBucket, bool)
Nested returns nested results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-nested-aggregation.html
func (Aggregations) PercentileRanks ¶
func (a Aggregations) PercentileRanks(name string) (*AggregationPercentilesMetric, bool)
PercentileRanks returns percentile ranks results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-percentile-rank-aggregation.html
func (Aggregations) Percentiles ¶
func (a Aggregations) Percentiles(name string) (*AggregationPercentilesMetric, bool)
Percentiles returns percentiles results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-percentile-aggregation.html
func (Aggregations) PercentilesBucket ¶
func (a Aggregations) PercentilesBucket(name string) (*AggregationPipelinePercentilesMetric, bool)
PercentilesBucket returns stats bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-percentiles-bucket-aggregation.html
func (Aggregations) Range ¶
func (a Aggregations) Range(name string) (*AggregationBucketRangeItems, bool)
Range returns range aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-range-aggregation.html
func (Aggregations) ReverseNested ¶
func (a Aggregations) ReverseNested(name string) (*AggregationSingleBucket, bool)
ReverseNested returns reverse-nested results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-reverse-nested-aggregation.html
func (Aggregations) Sampler ¶
func (a Aggregations) Sampler(name string) (*AggregationSingleBucket, bool)
Sampler returns sampler aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-sampler-aggregation.html
func (Aggregations) ScriptedMetric ¶
func (a Aggregations) ScriptedMetric(name string) (*AggregationScriptedMetric, bool)
ScriptedMetric returns scripted metric aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-scripted-metric-aggregation.html for details.
func (Aggregations) SerialDiff ¶
func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool)
SerialDiff returns serial differencing pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-serialdiff-aggregation.html
func (Aggregations) SignificantTerms ¶
func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool)
SignificantTerms returns significant terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html
func (Aggregations) Stats ¶
func (a Aggregations) Stats(name string) (*AggregationStatsMetric, bool)
Stats returns stats aggregation results. https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-stats-aggregation.html
func (Aggregations) StatsBucket ¶
func (a Aggregations) StatsBucket(name string) (*AggregationPipelineStatsMetric, bool)
StatsBucket returns stats bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-stats-bucket-aggregation.html
func (Aggregations) Sum ¶
func (a Aggregations) Sum(name string) (*AggregationValueMetric, bool)
Sum returns sum aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-sum-aggregation.html
func (Aggregations) SumBucket ¶
func (a Aggregations) SumBucket(name string) (*AggregationPipelineSimpleValue, bool)
SumBucket returns sum bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-sum-bucket-aggregation.html
func (Aggregations) Terms ¶
func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool)
Terms returns terms aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-terms-aggregation.html
func (Aggregations) TopHits ¶
func (a Aggregations) TopHits(name string) (*AggregationTopHitsMetric, bool)
TopHits returns top-hits aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-top-hits-aggregation.html
func (Aggregations) ValueCount ¶
func (a Aggregations) ValueCount(name string) (*AggregationValueMetric, bool)
ValueCount returns value-count aggregation results. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-valuecount-aggregation.html
func (Aggregations) WeightedAvg ¶
func (a Aggregations) WeightedAvg(name string) (*AggregationValueMetric, bool)
WeightedAvg computes the weighted average of numeric values that are extracted from the aggregated documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-weight-avg-aggregation.html
type AliasAction ¶
type AliasAction interface {
Source() (interface{}, error)
}
AliasAction is an action to apply to an alias, e.g. "add" or "remove".
type AliasAddAction ¶
type AliasAddAction struct {
// contains filtered or unexported fields
}
AliasAddAction is an action to add to an alias.
func NewAliasAddAction ¶
func NewAliasAddAction(alias string) *AliasAddAction
NewAliasAddAction returns an action to add an alias.
func (*AliasAddAction) Filter ¶
func (a *AliasAddAction) Filter(filter Query) *AliasAddAction
Filter associates a filter to the alias.
func (*AliasAddAction) Index ¶
func (a *AliasAddAction) Index(index ...string) *AliasAddAction
Index associates one or more indices to the alias.
func (*AliasAddAction) IndexRouting ¶
func (a *AliasAddAction) IndexRouting(routing string) *AliasAddAction
IndexRouting associates an index routing value to the alias.
func (*AliasAddAction) IsWriteIndex ¶
func (a *AliasAddAction) IsWriteIndex(flag bool) *AliasAddAction
IsWriteIndex associates an is_write_index flag to the alias.
func (*AliasAddAction) Routing ¶
func (a *AliasAddAction) Routing(routing string) *AliasAddAction
Routing associates a routing value to the alias. This basically sets index and search routing to the same value.
func (*AliasAddAction) SearchRouting ¶
func (a *AliasAddAction) SearchRouting(routing ...string) *AliasAddAction
SearchRouting associates a search routing value to the alias.
func (*AliasAddAction) Source ¶
func (a *AliasAddAction) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*AliasAddAction) Validate ¶
func (a *AliasAddAction) Validate() error
Validate checks if the operation is valid.
type AliasRemoveAction ¶
type AliasRemoveAction struct {
// contains filtered or unexported fields
}
AliasRemoveAction is an action to remove an alias.
func NewAliasRemoveAction ¶
func NewAliasRemoveAction(alias string) *AliasRemoveAction
NewAliasRemoveAction returns an action to remove an alias.
func (*AliasRemoveAction) Index ¶
func (a *AliasRemoveAction) Index(index ...string) *AliasRemoveAction
Index associates one or more indices to the alias.
func (*AliasRemoveAction) Source ¶
func (a *AliasRemoveAction) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*AliasRemoveAction) Validate ¶
func (a *AliasRemoveAction) Validate() error
Validate checks if the operation is valid.
type AliasRemoveIndexAction ¶
type AliasRemoveIndexAction struct {
// contains filtered or unexported fields
}
AliasRemoveIndexAction is an action to remove an index during an alias operation.
func NewAliasRemoveIndexAction ¶
func NewAliasRemoveIndexAction(index string) *AliasRemoveIndexAction
NewAliasRemoveIndexAction returns an action to remove an index.
func (*AliasRemoveIndexAction) Source ¶
func (a *AliasRemoveIndexAction) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*AliasRemoveIndexAction) Validate ¶
func (a *AliasRemoveIndexAction) Validate() error
Validate checks if the operation is valid.
type AliasResult ¶
type AliasResult struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
AliasResult is the outcome of calling Do on AliasService.
type AliasService ¶
type AliasService struct {
// contains filtered or unexported fields
}
AliasService enables users to add or remove an alias. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-aliases.html for details.
func NewAliasService ¶
func NewAliasService(client *Client) *AliasService
NewAliasService implements a service to manage aliases.
func (*AliasService) Action ¶
func (s *AliasService) Action(action ...AliasAction) *AliasService
Action accepts one or more AliasAction instances which can be of type AliasAddAction or AliasRemoveAction.
func (*AliasService) Add ¶
func (s *AliasService) Add(indexName string, aliasName string) *AliasService
Add adds an alias to an index.
func (*AliasService) AddWithFilter ¶
func (s *AliasService) AddWithFilter(indexName string, aliasName string, filter Query) *AliasService
Add adds an alias to an index and associates a filter to the alias.
func (*AliasService) Do ¶
func (s *AliasService) Do(ctx context.Context) (*AliasResult, error)
Do executes the command.
func (*AliasService) ErrorTrace ¶
func (s *AliasService) ErrorTrace(errorTrace bool) *AliasService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*AliasService) FilterPath ¶
func (s *AliasService) FilterPath(filterPath ...string) *AliasService
FilterPath specifies a list of filters used to reduce the response.
func (*AliasService) Header ¶
func (s *AliasService) Header(name string, value string) *AliasService
Header adds a header to the request.
func (*AliasService) Headers ¶
func (s *AliasService) Headers(headers http.Header) *AliasService
Headers specifies the headers of the request.
func (*AliasService) Human ¶
func (s *AliasService) Human(human bool) *AliasService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*AliasService) Pretty ¶
func (s *AliasService) Pretty(pretty bool) *AliasService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*AliasService) Remove ¶
func (s *AliasService) Remove(indexName string, aliasName string) *AliasService
Remove removes an alias.
type AliasesResult ¶
type AliasesResult struct {
Indices map[string]indexResult
}
AliasesResult is the outcome of calling AliasesService.Do.
func (AliasesResult) IndicesByAlias ¶
func (ar AliasesResult) IndicesByAlias(aliasName string) []string
IndicesByAlias returns all indices given a specific alias name.
type AliasesService ¶
type AliasesService struct {
// contains filtered or unexported fields
}
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. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-aliases.html.
func NewAliasesService ¶
func NewAliasesService(client *Client) *AliasesService
NewAliasesService instantiates a new AliasesService.
func (*AliasesService) Alias ¶
func (s *AliasesService) Alias(alias ...string) *AliasesService
Alias adds one or more aliases.
func (*AliasesService) Do ¶
func (s *AliasesService) Do(ctx context.Context) (*AliasesResult, error)
func (*AliasesService) ErrorTrace ¶
func (s *AliasesService) ErrorTrace(errorTrace bool) *AliasesService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*AliasesService) FilterPath ¶
func (s *AliasesService) FilterPath(filterPath ...string) *AliasesService
FilterPath specifies a list of filters used to reduce the response.
func (*AliasesService) Header ¶
func (s *AliasesService) Header(name string, value string) *AliasesService
Header adds a header to the request.
func (*AliasesService) Headers ¶
func (s *AliasesService) Headers(headers http.Header) *AliasesService
Headers specifies the headers of the request.
func (*AliasesService) Human ¶
func (s *AliasesService) Human(human bool) *AliasesService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*AliasesService) Index ¶
func (s *AliasesService) Index(index ...string) *AliasesService
Index adds one or more indices.
func (*AliasesService) Pretty ¶
func (s *AliasesService) Pretty(pretty bool) *AliasesService
Pretty tells Elasticsearch whether to return a formatted JSON response.
type AllocateEmptyPrimaryAllocationCommand ¶
type AllocateEmptyPrimaryAllocationCommand struct {
// contains filtered or unexported fields
}
AllocateEmptyPrimaryAllocationCommand allocates an unassigned empty primary shard to a specific node. Use with extreme care as this will result in data loss. Allocation deciders are ignored.
func NewAllocateEmptyPrimaryAllocationCommand ¶
func NewAllocateEmptyPrimaryAllocationCommand(index string, shardId int, node string, acceptDataLoss bool) *AllocateEmptyPrimaryAllocationCommand
NewAllocateEmptyPrimaryAllocationCommand creates a new AllocateEmptyPrimaryAllocationCommand.
func (*AllocateEmptyPrimaryAllocationCommand) Name ¶
func (cmd *AllocateEmptyPrimaryAllocationCommand) Name() string
Name of the command in a request to the Cluster Reroute API.
func (*AllocateEmptyPrimaryAllocationCommand) Source ¶
func (cmd *AllocateEmptyPrimaryAllocationCommand) Source() (interface{}, error)
Source generates the (inner) JSON to be used when serializing the command.
type AllocateReplicaAllocationCommand ¶
type AllocateReplicaAllocationCommand struct {
// contains filtered or unexported fields
}
AllocateReplicaAllocationCommand allocates an unassigned replica shard to a specific node. Checks if allocation deciders allow allocation.
func NewAllocateReplicaAllocationCommand ¶
func NewAllocateReplicaAllocationCommand(index string, shardId int, node string) *AllocateReplicaAllocationCommand
NewAllocateReplicaAllocationCommand creates a new AllocateReplicaAllocationCommand.
func (*AllocateReplicaAllocationCommand) Name ¶
func (cmd *AllocateReplicaAllocationCommand) Name() string
Name of the command in a request to the Cluster Reroute API.
func (*AllocateReplicaAllocationCommand) Source ¶
func (cmd *AllocateReplicaAllocationCommand) Source() (interface{}, error)
Source generates the (inner) JSON to be used when serializing the command.
type AllocateStalePrimaryAllocationCommand ¶
type AllocateStalePrimaryAllocationCommand struct {
// contains filtered or unexported fields
}
AllocateStalePrimaryAllocationCommand allocates an unassigned stale primary shard to a specific node. Use with extreme care as this will result in data loss. Allocation deciders are ignored.
func NewAllocateStalePrimaryAllocationCommand ¶
func NewAllocateStalePrimaryAllocationCommand(index string, shardId int, node string, acceptDataLoss bool) *AllocateStalePrimaryAllocationCommand
NewAllocateStalePrimaryAllocationCommand creates a new AllocateStalePrimaryAllocationCommand.
func (*AllocateStalePrimaryAllocationCommand) Name ¶
func (cmd *AllocateStalePrimaryAllocationCommand) Name() string
Name of the command in a request to the Cluster Reroute API.
func (*AllocateStalePrimaryAllocationCommand) Source ¶
func (cmd *AllocateStalePrimaryAllocationCommand) Source() (interface{}, error)
Source generates the (inner) JSON to be used when serializing the command.
type AllocationCommand ¶
AllocationCommand is a command to be executed in a call to Cluster Reroute API.
type AllocationId ¶
type AnalyzeToken ¶
type AnalyzeToken struct { Token string `json:"token"` Type string `json:"type"` // e.g. "<ALPHANUM>" StartOffset int `json:"start_offset"` EndOffset int `json:"end_offset"` Bytes string `json:"bytes"` // e.g. "[67 75 79]" Position int `json:"position"` PositionLength int `json:"positionLength"` // seems to be wrong in 7.2+ (no snake_case), see https://github.com/elastic/elasticsearch/blob/7.2/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeResponse.java TermFrequency int `json:"termFrequency"` Keyword bool `json:"keyword"` }
type AnalyzeTokenList ¶
type AnalyzeTokenList struct { Name string `json:"name"` Tokens []AnalyzeToken `json:"tokens,omitempty"` }
type AvgAggregation ¶
type AvgAggregation struct {
// contains filtered or unexported fields
}
AvgAggregation is a single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
func NewAvgAggregation ¶
func NewAvgAggregation() *AvgAggregation
func (*AvgAggregation) Field ¶
func (a *AvgAggregation) Field(field string) *AvgAggregation
func (*AvgAggregation) Format ¶
func (a *AvgAggregation) Format(format string) *AvgAggregation
func (*AvgAggregation) Meta ¶
func (a *AvgAggregation) Meta(metaData map[string]interface{}) *AvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AvgAggregation) Missing ¶
func (a *AvgAggregation) Missing(missing interface{}) *AvgAggregation
func (*AvgAggregation) Script ¶
func (a *AvgAggregation) Script(script *Script) *AvgAggregation
func (*AvgAggregation) Source ¶
func (a *AvgAggregation) Source() (interface{}, error)
func (*AvgAggregation) SubAggregation ¶
func (a *AvgAggregation) SubAggregation(name string, subAggregation Aggregation) *AvgAggregation
type AvgBucketAggregation ¶
type AvgBucketAggregation struct {
// contains filtered or unexported fields
}
AvgBucketAggregation is a sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-avg-bucket-aggregation.html
func NewAvgBucketAggregation ¶
func NewAvgBucketAggregation() *AvgBucketAggregation
NewAvgBucketAggregation creates and initializes a new AvgBucketAggregation.
func (*AvgBucketAggregation) BucketsPath ¶
func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*AvgBucketAggregation) Format ¶
func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation
Format to use on the output of this aggregation.
func (*AvgBucketAggregation) GapInsertZeros ¶
func (a *AvgBucketAggregation) GapInsertZeros() *AvgBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*AvgBucketAggregation) GapPolicy ¶
func (a *AvgBucketAggregation) GapPolicy(gapPolicy string) *AvgBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*AvgBucketAggregation) GapSkip ¶
func (a *AvgBucketAggregation) GapSkip() *AvgBucketAggregation
GapSkip skips gaps in the series.
func (*AvgBucketAggregation) Meta ¶
func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*AvgBucketAggregation) Source ¶
func (a *AvgBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BackoffFunc ¶
BackoffFunc specifies the signature of a function that returns the time to wait before the next call to a resource. To stop retrying return false in the 2nd return value.
type BackoffRetrier ¶
type BackoffRetrier struct {
// contains filtered or unexported fields
}
BackoffRetrier is an implementation that does nothing but return nil on Retry.
func NewBackoffRetrier ¶
func NewBackoffRetrier(backoff Backoff) *BackoffRetrier
NewBackoffRetrier returns a retrier that uses the given backoff strategy.
type BoolQuery ¶
type BoolQuery struct { Query // contains filtered or unexported fields }
A bool query matches documents matching boolean combinations of other queries. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-bool-query.html
func (*BoolQuery) AdjustPureNegative ¶
func (*BoolQuery) MinimumNumberShouldMatch ¶
func (*BoolQuery) MinimumShouldMatch ¶
type BoostingQuery ¶
type BoostingQuery struct { Query // contains filtered or unexported fields }
A boosting query can be used to effectively demote results that match a given query. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-boosting-query.html
func (*BoostingQuery) Boost ¶
func (q *BoostingQuery) Boost(boost float64) *BoostingQuery
func (*BoostingQuery) Negative ¶
func (q *BoostingQuery) Negative(negative Query) *BoostingQuery
func (*BoostingQuery) NegativeBoost ¶
func (q *BoostingQuery) NegativeBoost(negativeBoost float64) *BoostingQuery
func (*BoostingQuery) Positive ¶
func (q *BoostingQuery) Positive(positive Query) *BoostingQuery
func (*BoostingQuery) Source ¶
func (q *BoostingQuery) Source() (interface{}, error)
Creates the query source for the boosting query.
type BucketCountThresholds ¶
type BucketCountThresholds struct { MinDocCount *int64 ShardMinDocCount *int64 RequiredSize *int ShardSize *int }
BucketCountThresholds is used in e.g. terms and significant text aggregations.
type BucketScriptAggregation ¶
type BucketScriptAggregation struct {
// contains filtered or unexported fields
}
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. The specified metric must be numeric and the script must return a numeric value.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-bucket-script-aggregation.html
func NewBucketScriptAggregation ¶
func NewBucketScriptAggregation() *BucketScriptAggregation
NewBucketScriptAggregation creates and initializes a new BucketScriptAggregation.
func (*BucketScriptAggregation) AddBucketsPath ¶
func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScriptAggregation
AddBucketsPath adds a bucket path to use for this pipeline aggregator.
func (*BucketScriptAggregation) BucketsPathsMap ¶
func (a *BucketScriptAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketScriptAggregation
BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
func (*BucketScriptAggregation) Format ¶
func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation
Format to use on the output of this aggregation.
func (*BucketScriptAggregation) GapInsertZeros ¶
func (a *BucketScriptAggregation) GapInsertZeros() *BucketScriptAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketScriptAggregation) GapPolicy ¶
func (a *BucketScriptAggregation) GapPolicy(gapPolicy string) *BucketScriptAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*BucketScriptAggregation) GapSkip ¶
func (a *BucketScriptAggregation) GapSkip() *BucketScriptAggregation
GapSkip skips gaps in the series.
func (*BucketScriptAggregation) Meta ¶
func (a *BucketScriptAggregation) Meta(metaData map[string]interface{}) *BucketScriptAggregation
Meta sets the meta data to be included in the aggregation response.
func (*BucketScriptAggregation) Script ¶
func (a *BucketScriptAggregation) Script(script *Script) *BucketScriptAggregation
Script is the script to run.
func (*BucketScriptAggregation) Source ¶
func (a *BucketScriptAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BucketSelectorAggregation ¶
type BucketSelectorAggregation struct {
// contains filtered or unexported fields
}
BucketSelectorAggregation is a parent pipeline aggregation which determines whether the current bucket will be retained in the parent multi-bucket aggregation. The specific metric must be numeric and the script must return a boolean value. If the script language is expression then a numeric return value is permitted. In this case 0.0 will be evaluated as false and all other values will evaluate to true.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-bucket-selector-aggregation.html
func NewBucketSelectorAggregation ¶
func NewBucketSelectorAggregation() *BucketSelectorAggregation
NewBucketSelectorAggregation creates and initializes a new BucketSelectorAggregation.
func (*BucketSelectorAggregation) AddBucketsPath ¶
func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSelectorAggregation
AddBucketsPath adds a bucket path to use for this pipeline aggregator.
func (*BucketSelectorAggregation) BucketsPathsMap ¶
func (a *BucketSelectorAggregation) BucketsPathsMap(bucketsPathsMap map[string]string) *BucketSelectorAggregation
BucketsPathsMap sets the paths to the buckets to use for this pipeline aggregator.
func (*BucketSelectorAggregation) Format ¶
func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation
Format to use on the output of this aggregation.
func (*BucketSelectorAggregation) GapInsertZeros ¶
func (a *BucketSelectorAggregation) GapInsertZeros() *BucketSelectorAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketSelectorAggregation) GapPolicy ¶
func (a *BucketSelectorAggregation) GapPolicy(gapPolicy string) *BucketSelectorAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*BucketSelectorAggregation) GapSkip ¶
func (a *BucketSelectorAggregation) GapSkip() *BucketSelectorAggregation
GapSkip skips gaps in the series.
func (*BucketSelectorAggregation) Meta ¶
func (a *BucketSelectorAggregation) Meta(metaData map[string]interface{}) *BucketSelectorAggregation
Meta sets the meta data to be included in the aggregation response.
func (*BucketSelectorAggregation) Script ¶
func (a *BucketSelectorAggregation) Script(script *Script) *BucketSelectorAggregation
Script is the script to run.
func (*BucketSelectorAggregation) Source ¶
func (a *BucketSelectorAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BucketSortAggregation ¶
type BucketSortAggregation struct {
// contains filtered or unexported fields
}
BucketSortAggregation parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. Zero or more sort fields may be specified together with the corresponding sort order. Each bucket may be sorted based on its _key, _count or its sub-aggregations. In addition, parameters from and size may be set in order to truncate the result buckets.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-bucket-sort-aggregation.html
func NewBucketSortAggregation ¶
func NewBucketSortAggregation() *BucketSortAggregation
NewBucketSortAggregation creates and initializes a new BucketSortAggregation.
func (*BucketSortAggregation) From ¶
func (a *BucketSortAggregation) From(from int) *BucketSortAggregation
From adds the "from" parameter to the aggregation.
func (*BucketSortAggregation) GapInsertZeros ¶
func (a *BucketSortAggregation) GapInsertZeros() *BucketSortAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*BucketSortAggregation) GapPolicy ¶
func (a *BucketSortAggregation) GapPolicy(gapPolicy string) *BucketSortAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "skip".
func (*BucketSortAggregation) GapSkip ¶
func (a *BucketSortAggregation) GapSkip() *BucketSortAggregation
GapSkip skips gaps in the series.
func (*BucketSortAggregation) Meta ¶
func (a *BucketSortAggregation) Meta(meta map[string]interface{}) *BucketSortAggregation
Meta sets the meta data in the aggregation. Although metadata is supported for this aggregation by Elasticsearch, it's important to note that there's no use to it because this aggregation does not include new data in the response. It merely reorders parent buckets.
func (*BucketSortAggregation) Size ¶
func (a *BucketSortAggregation) Size(size int) *BucketSortAggregation
Size adds the "size" parameter to the aggregation.
func (*BucketSortAggregation) Sort ¶
func (a *BucketSortAggregation) Sort(field string, ascending bool) *BucketSortAggregation
Sort adds a sort order to the list of sorters.
func (*BucketSortAggregation) SortWithInfo ¶
func (a *BucketSortAggregation) SortWithInfo(info SortInfo) *BucketSortAggregation
SortWithInfo adds a SortInfo to the list of sorters.
func (*BucketSortAggregation) Source ¶
func (a *BucketSortAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type BulkAfterFunc ¶
type BulkAfterFunc func(executionId int64, requests []BulkableRequest, response *BulkResponse, err error)
BulkAfterFunc defines the signature of callbacks that are executed after a commit to Elasticsearch. The err parameter signals an error.
type BulkBeforeFunc ¶
type BulkBeforeFunc func(executionId int64, requests []BulkableRequest)
BulkBeforeFunc defines the signature of callbacks that are executed before a commit to Elasticsearch.
type BulkDeleteRequest ¶
type BulkDeleteRequest struct { BulkableRequest // contains filtered or unexported fields }
BulkDeleteRequest is a request to remove a document from Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func NewBulkDeleteRequest ¶
func NewBulkDeleteRequest() *BulkDeleteRequest
NewBulkDeleteRequest returns a new BulkDeleteRequest.
func (*BulkDeleteRequest) Id ¶
func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest
Id specifies the identifier of the document to delete.
func (*BulkDeleteRequest) IfPrimaryTerm ¶
func (r *BulkDeleteRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkDeleteRequest
IfPrimaryTerm indicates to only perform the delete operation if the last operation that has changed the document has the specified primary term.
func (*BulkDeleteRequest) IfSeqNo ¶
func (r *BulkDeleteRequest) IfSeqNo(ifSeqNo int64) *BulkDeleteRequest
IfSeqNo indicates to only perform the delete operation if the last operation that has changed the document has the specified sequence number.
func (*BulkDeleteRequest) Index ¶
func (r *BulkDeleteRequest) Index(index string) *BulkDeleteRequest
Index specifies the Elasticsearch index to use for this delete request. If unspecified, the index set on the BulkService will be used.
func (*BulkDeleteRequest) Parent ¶
func (r *BulkDeleteRequest) Parent(parent string) *BulkDeleteRequest
Parent specifies the parent of the request, which is used in parent/child mappings.
func (*BulkDeleteRequest) Routing ¶
func (r *BulkDeleteRequest) Routing(routing string) *BulkDeleteRequest
Routing specifies a routing value for the request.
func (*BulkDeleteRequest) Source ¶
func (r *BulkDeleteRequest) Source() ([]string, error)
Source returns the on-wire representation of the delete request, split into an action-and-meta-data line and an (optional) source line. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func (*BulkDeleteRequest) String ¶
func (r *BulkDeleteRequest) String() string
String returns the on-wire representation of the delete request, concatenated as a single string.
func (*BulkDeleteRequest) Type ¶
func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest
Type specifies the Elasticsearch type to use for this delete request. If unspecified, the type set on the BulkService will be used.
func (*BulkDeleteRequest) UseEasyJSON ¶
func (r *BulkDeleteRequest) UseEasyJSON(enable bool) *BulkDeleteRequest
UseEasyJSON is an experimental setting that enables serialization with github.com/mailru/easyjson, which should in faster serialization time and less allocations, but removed compatibility with encoding/json, usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations for details. This setting is disabled by default.
func (*BulkDeleteRequest) Version ¶
func (r *BulkDeleteRequest) Version(version int64) *BulkDeleteRequest
Version indicates the version to be deleted as part of an optimistic concurrency model.
func (*BulkDeleteRequest) VersionType ¶
func (r *BulkDeleteRequest) VersionType(versionType string) *BulkDeleteRequest
VersionType can be "internal" (default), "external", "external_gte", or "external_gt".
type BulkIndexByScrollResponse ¶
type BulkIndexByScrollResponse struct { Header http.Header `json:"-"` Took int64 `json:"took"` SliceId *int64 `json:"slice_id,omitempty"` TimedOut bool `json:"timed_out"` Total int64 `json:"total"` Updated int64 `json:"updated,omitempty"` Created int64 `json:"created,omitempty"` Deleted int64 `json:"deleted"` Batches int64 `json:"batches"` VersionConflicts int64 `json:"version_conflicts"` Noops int64 `json:"noops"` Retries struct { Bulk int64 `json:"bulk"` Search int64 `json:"search"` } `json:"retries,omitempty"` Throttled string `json:"throttled"` ThrottledMillis int64 `json:"throttled_millis"` RequestsPerSecond float64 `json:"requests_per_second"` Canceled string `json:"canceled,omitempty"` ThrottledUntil string `json:"throttled_until"` ThrottledUntilMillis int64 `json:"throttled_until_millis"` Failures []bulkIndexByScrollResponseFailure `json:"failures"` }
BulkIndexByScrollResponse is the outcome of executing Do with DeleteByQueryService and UpdateByQueryService.
type BulkIndexRequest ¶
type BulkIndexRequest struct { BulkableRequest // contains filtered or unexported fields }
BulkIndexRequest is a request to add a document to Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func NewBulkIndexRequest ¶
func NewBulkIndexRequest() *BulkIndexRequest
NewBulkIndexRequest returns a new BulkIndexRequest. The operation type is "index" by default.
func (*BulkIndexRequest) Doc ¶
func (r *BulkIndexRequest) Doc(doc interface{}) *BulkIndexRequest
Doc specifies the document to index.
func (*BulkIndexRequest) Id ¶
func (r *BulkIndexRequest) Id(id string) *BulkIndexRequest
Id specifies the identifier of the document to index.
func (*BulkIndexRequest) IfPrimaryTerm ¶
func (r *BulkIndexRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkIndexRequest
IfPrimaryTerm indicates to only perform the index operation if the last operation that has changed the document has the specified primary term.
func (*BulkIndexRequest) IfSeqNo ¶
func (r *BulkIndexRequest) IfSeqNo(ifSeqNo int64) *BulkIndexRequest
IfSeqNo indicates to only perform the index operation if the last operation that has changed the document has the specified sequence number.
func (*BulkIndexRequest) Index ¶
func (r *BulkIndexRequest) Index(index string) *BulkIndexRequest
Index specifies the Elasticsearch index to use for this index request. If unspecified, the index set on the BulkService will be used.
func (*BulkIndexRequest) OpType ¶
func (r *BulkIndexRequest) OpType(opType string) *BulkIndexRequest
OpType specifies if this request should follow create-only or upsert behavior. This follows the OpType of the standard document index API. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-index_.html#operation-type for details.
func (*BulkIndexRequest) Parent ¶
func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest
Parent specifies the identifier of the parent document (if available).
func (*BulkIndexRequest) Pipeline ¶
func (r *BulkIndexRequest) Pipeline(pipeline string) *BulkIndexRequest
Pipeline to use while processing the request.
func (*BulkIndexRequest) RetryOnConflict ¶
func (r *BulkIndexRequest) RetryOnConflict(retryOnConflict int) *BulkIndexRequest
RetryOnConflict specifies how often to retry in case of a version conflict.
func (*BulkIndexRequest) Routing ¶
func (r *BulkIndexRequest) Routing(routing string) *BulkIndexRequest
Routing specifies a routing value for the request.
func (*BulkIndexRequest) Source ¶
func (r *BulkIndexRequest) Source() ([]string, error)
Source returns the on-wire representation of the index request, split into an action-and-meta-data line and an (optional) source line. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func (*BulkIndexRequest) String ¶
func (r *BulkIndexRequest) String() string
String returns the on-wire representation of the index request, concatenated as a single string.
func (*BulkIndexRequest) Type ¶
func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest
Type specifies the Elasticsearch type to use for this index request. If unspecified, the type set on the BulkService will be used.
func (*BulkIndexRequest) UseEasyJSON ¶
func (r *BulkIndexRequest) UseEasyJSON(enable bool) *BulkIndexRequest
UseEasyJSON is an experimental setting that enables serialization with github.com/mailru/easyjson, which should in faster serialization time and less allocations, but removed compatibility with encoding/json, usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations for details. This setting is disabled by default.
func (*BulkIndexRequest) Version ¶
func (r *BulkIndexRequest) Version(version int64) *BulkIndexRequest
Version indicates the version of the document as part of an optimistic concurrency model.
func (*BulkIndexRequest) VersionType ¶
func (r *BulkIndexRequest) VersionType(versionType string) *BulkIndexRequest
VersionType specifies how versions are created. It can be e.g. internal, external, external_gte, or force.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-index_.html#index-versioning for details.
type BulkProcessor ¶
type BulkProcessor struct {
// contains filtered or unexported fields
}
BulkProcessor encapsulates a task that accepts bulk requests and orchestrates committing them to Elasticsearch via one or more workers.
BulkProcessor is returned by setting up a BulkProcessorService and calling the Do method.
func (*BulkProcessor) Add ¶
func (p *BulkProcessor) Add(request BulkableRequest)
Add adds a single request to commit by the BulkProcessorService.
The caller is responsible for setting the index and type on the request.
func (*BulkProcessor) Close ¶
func (p *BulkProcessor) Close() error
Close stops the bulk processor previously started with Do. If it is already stopped, this is a no-op and nil is returned.
By implementing Close, BulkProcessor implements the io.Closer interface.
func (*BulkProcessor) Flush ¶
func (p *BulkProcessor) Flush() error
Flush manually asks all workers to commit their outstanding requests. It returns only when all workers acknowledge completion.
func (*BulkProcessor) Start ¶
func (p *BulkProcessor) Start(ctx context.Context) error
Start starts the bulk processor. If the processor is already started, nil is returned.
func (*BulkProcessor) Stats ¶
func (p *BulkProcessor) Stats() BulkProcessorStats
Stats returns the latest bulk processor statistics. Collecting stats must be enabled first by calling Stats(true) on the service that created this processor.
type BulkProcessorService ¶
type BulkProcessorService struct {
// contains filtered or unexported fields
}
BulkProcessorService allows to easily process bulk requests. It allows setting policies when to flush new bulk requests, e.g. based on a number of actions, on the size of the actions, and/or to flush periodically. It also allows to control the number of concurrent bulk requests allowed to be executed in parallel.
BulkProcessorService, by default, commits either every 1000 requests or when the (estimated) size of the bulk requests exceeds 5 MB. However, it does not commit periodically. BulkProcessorService also does retry by default, using an exponential backoff algorithm. It also will automatically re-enqueue items returned with a status of 408, 429, 503 or 507. You can change this behavior with RetryItemStatusCodes.
The caller is responsible for setting the index and type on every bulk request added to BulkProcessorService.
BulkProcessorService takes ideas from the BulkProcessor of the Elasticsearch Java API as documented in https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-bulk-processor.html.
func NewBulkProcessorService ¶
func NewBulkProcessorService(client *Client) *BulkProcessorService
NewBulkProcessorService creates a new BulkProcessorService.
func (*BulkProcessorService) After ¶
func (s *BulkProcessorService) After(fn BulkAfterFunc) *BulkProcessorService
After specifies a function to be executed when bulk requests have been committed to Elasticsearch. The After callback executes both when the commit was successful as well as on failures.
func (*BulkProcessorService) Backoff ¶
func (s *BulkProcessorService) Backoff(backoff Backoff) *BulkProcessorService
Backoff sets the backoff strategy to use for errors.
func (*BulkProcessorService) Before ¶
func (s *BulkProcessorService) Before(fn BulkBeforeFunc) *BulkProcessorService
Before specifies a function to be executed before bulk requests get committed to Elasticsearch.
func (*BulkProcessorService) BulkActions ¶
func (s *BulkProcessorService) BulkActions(bulkActions int) *BulkProcessorService
BulkActions specifies when to flush based on the number of actions currently added. Defaults to 1000 and can be set to -1 to be disabled.
func (*BulkProcessorService) BulkSize ¶
func (s *BulkProcessorService) BulkSize(bulkSize int) *BulkProcessorService
BulkSize specifies when to flush based on the size (in bytes) of the actions currently added. Defaults to 5 MB and can be set to -1 to be disabled.
func (*BulkProcessorService) Do ¶
func (s *BulkProcessorService) Do(ctx context.Context) (*BulkProcessor, error)
Do creates a new BulkProcessor and starts it. Consider the BulkProcessor as a running instance that accepts bulk requests and commits them to Elasticsearch, spreading the work across one or more workers.
You can interoperate with the BulkProcessor returned by Do, e.g. Start and Stop (or Close) it.
Context is an optional context that is passed into the bulk request service calls. In contrast to other operations, this context is used in a long running process. You could use it to pass e.g. loggers, but you shouldn't use it for cancellation.
Calling Do several times returns new BulkProcessors. You probably don't want to do this. BulkProcessorService implements just a builder pattern.
func (*BulkProcessorService) FlushInterval ¶
func (s *BulkProcessorService) FlushInterval(interval time.Duration) *BulkProcessorService
FlushInterval specifies when to flush at the end of the given interval. This is disabled by default. If you want the bulk processor to operate completely asynchronously, set both BulkActions and BulkSize to -1 and set the FlushInterval to a meaningful interval.
func (*BulkProcessorService) Name ¶
func (s *BulkProcessorService) Name(name string) *BulkProcessorService
Name is an optional name to identify this bulk processor.
func (*BulkProcessorService) RetryItemStatusCodes ¶
func (s *BulkProcessorService) RetryItemStatusCodes(retryItemStatusCodes ...int) *BulkProcessorService
RetryItemStatusCodes sets an array of status codes that indicate that a bulk response line item should be retried.
func (*BulkProcessorService) Stats ¶
func (s *BulkProcessorService) Stats(wantStats bool) *BulkProcessorService
Stats tells bulk processor to gather stats while running. Use Stats to return the stats. This is disabled by default.
func (*BulkProcessorService) Workers ¶
func (s *BulkProcessorService) Workers(num int) *BulkProcessorService
Workers is the number of concurrent workers allowed to be executed. Defaults to 1 and must be greater or equal to 1.
type BulkProcessorStats ¶
type BulkProcessorStats struct { Flushed int64 // number of times the flush interval has been invoked Committed int64 // # of times workers committed bulk requests Indexed int64 // # of requests indexed Created int64 // # of requests that ES reported as creates (201) Updated int64 // # of requests that ES reported as updates Deleted int64 // # of requests that ES reported as deletes Succeeded int64 // # of requests that ES reported as successful Failed int64 // # of requests that ES reported as failed Workers []*BulkProcessorWorkerStats // stats for each worker }
BulkProcessorStats contains various statistics of a bulk processor while it is running. Use the Stats func to return it while running.
type BulkProcessorWorkerStats ¶
type BulkProcessorWorkerStats struct { Queued int64 // # of requests queued in this worker LastDuration time.Duration // duration of last commit }
BulkProcessorWorkerStats represents per-worker statistics.
type BulkResponse ¶
type BulkResponse struct { Took int `json:"took,omitempty"` Errors bool `json:"errors,omitempty"` Items []map[string]*BulkResponseItem `json:"items,omitempty"` }
BulkResponse is a response to a bulk execution.
Example:
{ "took":3, "errors":false, "items":[{ "index":{ "_index":"index1", "_type":"tweet", "_id":"1", "_version":3, "status":201 } },{ "index":{ "_index":"index2", "_type":"tweet", "_id":"2", "_version":3, "status":200 } },{ "delete":{ "_index":"index1", "_type":"tweet", "_id":"1", "_version":4, "status":200, "found":true } },{ "update":{ "_index":"index2", "_type":"tweet", "_id":"2", "_version":4, "status":200 } }] }
func (*BulkResponse) ByAction ¶
func (r *BulkResponse) ByAction(action string) []*BulkResponseItem
ByAction returns all bulk request results of a certain action, e.g. "index" or "delete".
func (*BulkResponse) ById ¶
func (r *BulkResponse) ById(id string) []*BulkResponseItem
ById returns all bulk request results of a given document id, regardless of the action ("index", "delete" etc.).
func (*BulkResponse) Created ¶
func (r *BulkResponse) Created() []*BulkResponseItem
Created returns all bulk request results of "create" actions.
func (*BulkResponse) Deleted ¶
func (r *BulkResponse) Deleted() []*BulkResponseItem
Deleted returns all bulk request results of "delete" actions.
func (*BulkResponse) Failed ¶
func (r *BulkResponse) Failed() []*BulkResponseItem
Failed returns those items of a bulk response that have errors, i.e. those that don't have a status code between 200 and 299.
func (*BulkResponse) Indexed ¶
func (r *BulkResponse) Indexed() []*BulkResponseItem
Indexed returns all bulk request results of "index" actions.
func (*BulkResponse) Succeeded ¶
func (r *BulkResponse) Succeeded() []*BulkResponseItem
Succeeded returns those items of a bulk response that have no errors, i.e. those have a status code between 200 and 299.
func (*BulkResponse) Updated ¶
func (r *BulkResponse) Updated() []*BulkResponseItem
Updated returns all bulk request results of "update" actions.
type BulkResponseItem ¶
type BulkResponseItem struct { Index string `json:"_index,omitempty"` Type string `json:"_type,omitempty"` Id string `json:"_id,omitempty"` Version int64 `json:"_version,omitempty"` Result string `json:"result,omitempty"` Shards *ShardsInfo `json:"_shards,omitempty"` SeqNo int64 `json:"_seq_no,omitempty"` PrimaryTerm int64 `json:"_primary_term,omitempty"` Status int `json:"status,omitempty"` ForcedRefresh bool `json:"forced_refresh,omitempty"` Error *ErrorDetails `json:"error,omitempty"` GetResult *GetResult `json:"get,omitempty"` }
BulkResponseItem is the result of a single bulk request.
type BulkService ¶
type BulkService struct {
// contains filtered or unexported fields
}
BulkService allows for batching bulk requests and sending them to Elasticsearch in one roundtrip. Use the Add method with BulkIndexRequest, BulkUpdateRequest, and BulkDeleteRequest to add bulk requests to a batch, then use Do to send them to Elasticsearch.
BulkService will be reset after each Do call. In other words, you can reuse BulkService to send many batches. You do not have to create a new BulkService for each batch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for more details.
func NewBulkService ¶
func NewBulkService(client *Client) *BulkService
NewBulkService initializes a new BulkService.
func (*BulkService) Add ¶
func (s *BulkService) Add(requests ...BulkableRequest) *BulkService
Add adds bulkable requests, i.e. BulkIndexRequest, BulkUpdateRequest, and/or BulkDeleteRequest.
func (*BulkService) Do ¶
func (s *BulkService) Do(ctx context.Context) (*BulkResponse, error)
Do sends the batched requests to Elasticsearch. Note that, when successful, you can reuse the BulkService for the next batch as the list of bulk requests is cleared on success.
func (*BulkService) ErrorTrace ¶
func (s *BulkService) ErrorTrace(errorTrace bool) *BulkService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*BulkService) EstimatedSizeInBytes ¶
func (s *BulkService) EstimatedSizeInBytes() int64
EstimatedSizeInBytes returns the estimated size of all bulkable requests added via Add.
func (*BulkService) FilterPath ¶
func (s *BulkService) FilterPath(filterPath ...string) *BulkService
FilterPath specifies a list of filters used to reduce the response.
func (*BulkService) Header ¶
func (s *BulkService) Header(name string, value string) *BulkService
Header adds a header to the request.
func (*BulkService) Headers ¶
func (s *BulkService) Headers(headers http.Header) *BulkService
Headers specifies the headers of the request.
func (*BulkService) Human ¶
func (s *BulkService) Human(human bool) *BulkService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*BulkService) Index ¶
func (s *BulkService) Index(index string) *BulkService
Index specifies the index to use for all batches. You may also leave this blank and specify the index in the individual bulk requests.
func (*BulkService) NumberOfActions ¶
func (s *BulkService) NumberOfActions() int
NumberOfActions returns the number of bulkable requests that need to be sent to Elasticsearch on the next batch.
func (*BulkService) Pipeline ¶
func (s *BulkService) Pipeline(pipeline string) *BulkService
Pipeline specifies the pipeline id to preprocess incoming documents with.
func (*BulkService) Pretty ¶
func (s *BulkService) Pretty(pretty bool) *BulkService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*BulkService) Refresh ¶
func (s *BulkService) Refresh(refresh string) *BulkService
Refresh controls when changes made by this request are made visible to search. The allowed values are: "true" (refresh the relevant primary and replica shards immediately), "wait_for" (wait for the changes to be made visible by a refresh before reying), or "false" (no refresh related actions). The default value is "false".
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*BulkService) Retrier ¶
func (s *BulkService) Retrier(retrier Retrier) *BulkService
Retrier allows to set specific retry logic for this BulkService. If not specified, it will use the client's default retrier.
func (*BulkService) Routing ¶
func (s *BulkService) Routing(routing string) *BulkService
Routing specifies the routing value.
func (*BulkService) SetDumpConfig ¶
func (s *BulkService) SetDumpConfig(config DumpConfig) *BulkService
func (*BulkService) Timeout ¶
func (s *BulkService) Timeout(timeout string) *BulkService
Timeout is a global timeout for processing bulk requests. This is a server-side timeout, i.e. it tells Elasticsearch the time after which it should stop processing.
func (*BulkService) Type ¶
func (s *BulkService) Type(typ string) *BulkService
Type specifies the type to use for all batches. You may also leave this blank and specify the type in the individual bulk requests.
func (*BulkService) WaitForActiveShards ¶
func (s *BulkService) WaitForActiveShards(waitForActiveShards string) *BulkService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
type BulkUpdateRequest ¶
type BulkUpdateRequest struct { BulkableRequest // contains filtered or unexported fields }
BulkUpdateRequest is a request to update a document in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func NewBulkUpdateRequest ¶
func NewBulkUpdateRequest() *BulkUpdateRequest
NewBulkUpdateRequest returns a new BulkUpdateRequest.
func (*BulkUpdateRequest) DetectNoop ¶
func (r *BulkUpdateRequest) DetectNoop(detectNoop bool) *BulkUpdateRequest
DetectNoop specifies whether changes that don't affect the document should be ignored (true) or unignored (false). This is enabled by default in Elasticsearch.
func (*BulkUpdateRequest) Doc ¶
func (r *BulkUpdateRequest) Doc(doc interface{}) *BulkUpdateRequest
Doc specifies the updated document.
func (*BulkUpdateRequest) DocAsUpsert ¶
func (r *BulkUpdateRequest) DocAsUpsert(docAsUpsert bool) *BulkUpdateRequest
DocAsUpsert indicates whether the contents of Doc should be used as the Upsert value.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-update.html#_literal_doc_as_upsert_literal for details.
func (*BulkUpdateRequest) Id ¶
func (r *BulkUpdateRequest) Id(id string) *BulkUpdateRequest
Id specifies the identifier of the document to update.
func (*BulkUpdateRequest) IfPrimaryTerm ¶
func (r *BulkUpdateRequest) IfPrimaryTerm(ifPrimaryTerm int64) *BulkUpdateRequest
IfPrimaryTerm indicates to only perform the index operation if the last operation that has changed the document has the specified primary term.
func (*BulkUpdateRequest) IfSeqNo ¶
func (r *BulkUpdateRequest) IfSeqNo(ifSeqNo int64) *BulkUpdateRequest
IfSeqNo indicates to only perform the index operation if the last operation that has changed the document has the specified sequence number.
func (*BulkUpdateRequest) Index ¶
func (r *BulkUpdateRequest) Index(index string) *BulkUpdateRequest
Index specifies the Elasticsearch index to use for this update request. If unspecified, the index set on the BulkService will be used.
func (*BulkUpdateRequest) Parent ¶
func (r *BulkUpdateRequest) Parent(parent string) *BulkUpdateRequest
Parent specifies the identifier of the parent document (if available).
func (*BulkUpdateRequest) RetryOnConflict ¶
func (r *BulkUpdateRequest) RetryOnConflict(retryOnConflict int) *BulkUpdateRequest
RetryOnConflict specifies how often to retry in case of a version conflict.
func (*BulkUpdateRequest) ReturnSource ¶
func (r *BulkUpdateRequest) ReturnSource(source bool) *BulkUpdateRequest
ReturnSource specifies whether Elasticsearch should return the source after the update. In the request, this responds to the `_source` field. It is false by default.
func (*BulkUpdateRequest) Routing ¶
func (r *BulkUpdateRequest) Routing(routing string) *BulkUpdateRequest
Routing specifies a routing value for the request.
func (*BulkUpdateRequest) Script ¶
func (r *BulkUpdateRequest) Script(script *Script) *BulkUpdateRequest
Script specifies an update script. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html#bulk-update and https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details.
func (*BulkUpdateRequest) ScriptedUpsert ¶
func (r *BulkUpdateRequest) ScriptedUpsert(upsert bool) *BulkUpdateRequest
ScripedUpsert specifies if your script will run regardless of whether the document exists or not.
func (*BulkUpdateRequest) Source ¶
func (r *BulkUpdateRequest) Source() ([]string, error)
Source returns the on-wire representation of the update request, split into an action-and-meta-data line and an (optional) source line. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-bulk.html for details.
func (*BulkUpdateRequest) String ¶
func (r *BulkUpdateRequest) String() string
String returns the on-wire representation of the update request, concatenated as a single string.
func (*BulkUpdateRequest) Type ¶
func (r *BulkUpdateRequest) Type(typ string) *BulkUpdateRequest
Type specifies the Elasticsearch type to use for this update request. If unspecified, the type set on the BulkService will be used.
func (*BulkUpdateRequest) Upsert ¶
func (r *BulkUpdateRequest) Upsert(doc interface{}) *BulkUpdateRequest
Upsert specifies the document to use for upserts. It will be used for create if the original document does not exist.
func (*BulkUpdateRequest) UseEasyJSON ¶
func (r *BulkUpdateRequest) UseEasyJSON(enable bool) *BulkUpdateRequest
UseEasyJSON is an experimental setting that enables serialization with github.com/mailru/easyjson, which should in faster serialization time and less allocations, but removed compatibility with encoding/json, usage of unsafe etc. See https://github.com/mailru/easyjson#issues-notes-and-limitations for details. This setting is disabled by default.
func (*BulkUpdateRequest) Version ¶
func (r *BulkUpdateRequest) Version(version int64) *BulkUpdateRequest
Version indicates the version of the document as part of an optimistic concurrency model.
func (*BulkUpdateRequest) VersionType ¶
func (r *BulkUpdateRequest) VersionType(versionType string) *BulkUpdateRequest
VersionType can be "internal" (default), "external", "external_gte", or "external_gt".
type BulkableRequest ¶
BulkableRequest is a generic interface to bulkable requests.
type CancelAllocationCommand ¶
type CancelAllocationCommand struct {
// contains filtered or unexported fields
}
CancelAllocationCommand cancels relocation, or recovery of a given shard on a node.
func NewCancelAllocationCommand ¶
func NewCancelAllocationCommand(index string, shardId int, node string, allowPrimary bool) *CancelAllocationCommand
NewCancelAllocationCommand creates a new CancelAllocationCommand.
func (*CancelAllocationCommand) Name ¶
func (cmd *CancelAllocationCommand) Name() string
Name of the command in a request to the Cluster Reroute API.
func (*CancelAllocationCommand) Source ¶
func (cmd *CancelAllocationCommand) Source() (interface{}, error)
Source generates the (inner) JSON to be used when serializing the command.
type CandidateGenerator ¶
type CardinalityAggregation ¶
type CardinalityAggregation struct {
// contains filtered or unexported fields
}
CardinalityAggregation is a single-value metrics aggregation that calculates an approximate count of distinct values. Values can be extracted either from specific fields in the document or generated by a script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-cardinality-aggregation.html
func NewCardinalityAggregation ¶
func NewCardinalityAggregation() *CardinalityAggregation
func (*CardinalityAggregation) Field ¶
func (a *CardinalityAggregation) Field(field string) *CardinalityAggregation
func (*CardinalityAggregation) Format ¶
func (a *CardinalityAggregation) Format(format string) *CardinalityAggregation
func (*CardinalityAggregation) Meta ¶
func (a *CardinalityAggregation) Meta(metaData map[string]interface{}) *CardinalityAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CardinalityAggregation) Missing ¶
func (a *CardinalityAggregation) Missing(missing interface{}) *CardinalityAggregation
func (*CardinalityAggregation) PrecisionThreshold ¶
func (a *CardinalityAggregation) PrecisionThreshold(threshold int64) *CardinalityAggregation
func (*CardinalityAggregation) Rehash ¶
func (a *CardinalityAggregation) Rehash(rehash bool) *CardinalityAggregation
func (*CardinalityAggregation) Script ¶
func (a *CardinalityAggregation) Script(script *Script) *CardinalityAggregation
func (*CardinalityAggregation) Source ¶
func (a *CardinalityAggregation) Source() (interface{}, error)
func (*CardinalityAggregation) SubAggregation ¶
func (a *CardinalityAggregation) SubAggregation(name string, subAggregation Aggregation) *CardinalityAggregation
type CatAliasesResponse ¶
type CatAliasesResponse []CatAliasesResponseRow
CatAliasesResponse is the outcome of CatAliasesService.Do.
type CatAliasesResponseRow ¶
type CatAliasesResponseRow struct { // Alias name. Alias string `json:"alias"` // Index the alias points to. Index string `json:"index"` // Filter, e.g. "*" or "-". Filter string `json:"filter"` // RoutingIndex specifies the index routing (or "-"). RoutingIndex string `json:"routing.index"` // RoutingSearch specifies the search routing (or "-"). RoutingSearch string `json:"routing.search"` // IsWriteIndex indicates whether the index can be written to (or "-"). IsWriteIndex string `json:"is_write_index"` }
CatAliasesResponseRow is a single row in a CatAliasesResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatAliasesService.Columns).
type CatAliasesService ¶
type CatAliasesService struct {
// contains filtered or unexported fields
}
CatAliasesService shows information about currently configured aliases to indices including filter and routing infos.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cat-aliases.html for details.
func NewCatAliasesService ¶
func NewCatAliasesService(client *Client) *CatAliasesService
NewCatAliasesService creates a new CatAliasesService.
func (*CatAliasesService) Alias ¶
func (s *CatAliasesService) Alias(alias ...string) *CatAliasesService
Alias specifies one or more aliases to which information should be returned.
func (*CatAliasesService) Columns ¶
func (s *CatAliasesService) Columns(columns ...string) *CatAliasesService
Columns to return in the response. To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/aliases?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatAliasesService) Do ¶
func (s *CatAliasesService) Do(ctx context.Context) (CatAliasesResponse, error)
Do executes the operation.
func (*CatAliasesService) ErrorTrace ¶
func (s *CatAliasesService) ErrorTrace(errorTrace bool) *CatAliasesService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatAliasesService) FilterPath ¶
func (s *CatAliasesService) FilterPath(filterPath ...string) *CatAliasesService
FilterPath specifies a list of filters used to reduce the response.
func (*CatAliasesService) Header ¶
func (s *CatAliasesService) Header(name string, value string) *CatAliasesService
Header adds a header to the request.
func (*CatAliasesService) Headers ¶
func (s *CatAliasesService) Headers(headers http.Header) *CatAliasesService
Headers specifies the headers of the request.
func (*CatAliasesService) Human ¶
func (s *CatAliasesService) Human(human bool) *CatAliasesService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatAliasesService) Local ¶
func (s *CatAliasesService) Local(local bool) *CatAliasesService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatAliasesService) MasterTimeout ¶
func (s *CatAliasesService) MasterTimeout(masterTimeout string) *CatAliasesService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatAliasesService) Pretty ¶
func (s *CatAliasesService) Pretty(pretty bool) *CatAliasesService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatAliasesService) Sort ¶
func (s *CatAliasesService) Sort(fields ...string) *CatAliasesService
Sort is a list of fields to sort by.
type CatAllocationResponse ¶
type CatAllocationResponse []CatAllocationResponseRow
CatAllocationResponse is the outcome of CatAllocationService.Do.
type CatAllocationResponseRow ¶
type CatAllocationResponseRow struct { // Shards represents the number of shards on a node. Shards int `json:"shards,string"` // DiskIndices represents the disk used by ES indices, e.g. "46.1kb". DiskIndices string `json:"disk.indices"` // DiskUsed represents the disk used (total, not just ES), e.g. "34.5gb" DiskUsed string `json:"disk.used"` // DiskAvail represents the disk available, e.g. "53.2gb". DiskAvail string `json:"disk.avail"` // DiskTotal represents the total capacity of all volumes, e.g. "87.7gb". DiskTotal string `json:"disk.total"` // DiskPercent represents the percent of disk used, e.g. 39. DiskPercent int `json:"disk.percent,string"` // Host represents the hostname of the node. Host string `json:"host"` // IP represents the IP address of the node. IP string `json:"ip"` // Node represents the node ID. Node string `json:"node"` }
CatAllocationResponseRow is a single row in a CatAllocationResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatAllocationService.Columns).
type CatAllocationService ¶
type CatAllocationService struct {
// contains filtered or unexported fields
}
CatAllocationService provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cat-allocation.html for details.
func NewCatAllocationService ¶
func NewCatAllocationService(client *Client) *CatAllocationService
NewCatAllocationService creates a new CatAllocationService.
func (*CatAllocationService) Bytes ¶
func (s *CatAllocationService) Bytes(bytes string) *CatAllocationService
Bytes represents the unit in which to display byte values. Valid values are: "b", "k", "m", or "g".
func (*CatAllocationService) Columns ¶
func (s *CatAllocationService) Columns(columns ...string) *CatAllocationService
Columns to return in the response. To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/aliases?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatAllocationService) Do ¶
func (s *CatAllocationService) Do(ctx context.Context) (CatAllocationResponse, error)
Do executes the operation.
func (*CatAllocationService) ErrorTrace ¶
func (s *CatAllocationService) ErrorTrace(errorTrace bool) *CatAllocationService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatAllocationService) FilterPath ¶
func (s *CatAllocationService) FilterPath(filterPath ...string) *CatAllocationService
FilterPath specifies a list of filters used to reduce the response.
func (*CatAllocationService) Header ¶
func (s *CatAllocationService) Header(name string, value string) *CatAllocationService
Header adds a header to the request.
func (*CatAllocationService) Headers ¶
func (s *CatAllocationService) Headers(headers http.Header) *CatAllocationService
Headers specifies the headers of the request.
func (*CatAllocationService) Human ¶
func (s *CatAllocationService) Human(human bool) *CatAllocationService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatAllocationService) Local ¶
func (s *CatAllocationService) Local(local bool) *CatAllocationService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatAllocationService) MasterTimeout ¶
func (s *CatAllocationService) MasterTimeout(masterTimeout string) *CatAllocationService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatAllocationService) NodeID ¶
func (s *CatAllocationService) NodeID(nodes ...string) *CatAllocationService
NodeID specifies one or more node IDs to for information should be returned.
func (*CatAllocationService) Pretty ¶
func (s *CatAllocationService) Pretty(pretty bool) *CatAllocationService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatAllocationService) Sort ¶
func (s *CatAllocationService) Sort(fields ...string) *CatAllocationService
Sort is a list of fields to sort by.
type CatCountResponse ¶
type CatCountResponse []CatCountResponseRow
CatCountResponse is the outcome of CatCountService.Do.
type CatCountResponseRow ¶
type CatCountResponseRow struct { Epoch int64 `json:"epoch,string"` // e.g. 1527077996 Timestamp string `json:"timestamp"` // e.g. "12:19:56" Count int `json:"count,string"` // number of documents }
CatCountResponseRow specifies the data returned for one index of a CatCountResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatCountService.Columns).
type CatCountService ¶
type CatCountService struct {
// contains filtered or unexported fields
}
CatCountService provides quick access to the document count of the entire cluster, or individual indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cat-count.html for details.
func NewCatCountService ¶
func NewCatCountService(client *Client) *CatCountService
NewCatCountService creates a new CatCountService.
func (*CatCountService) Columns ¶
func (s *CatCountService) Columns(columns ...string) *CatCountService
Columns to return in the response. To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/count?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatCountService) Do ¶
func (s *CatCountService) Do(ctx context.Context) (CatCountResponse, error)
Do executes the operation.
func (*CatCountService) ErrorTrace ¶
func (s *CatCountService) ErrorTrace(errorTrace bool) *CatCountService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatCountService) FilterPath ¶
func (s *CatCountService) FilterPath(filterPath ...string) *CatCountService
FilterPath specifies a list of filters used to reduce the response.
func (*CatCountService) Header ¶
func (s *CatCountService) Header(name string, value string) *CatCountService
Header adds a header to the request.
func (*CatCountService) Headers ¶
func (s *CatCountService) Headers(headers http.Header) *CatCountService
Headers specifies the headers of the request.
func (*CatCountService) Human ¶
func (s *CatCountService) Human(human bool) *CatCountService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatCountService) Index ¶
func (s *CatCountService) Index(index ...string) *CatCountService
Index specifies zero or more indices for which to return counts (by default counts for all indices are returned).
func (*CatCountService) Local ¶
func (s *CatCountService) Local(local bool) *CatCountService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatCountService) MasterTimeout ¶
func (s *CatCountService) MasterTimeout(masterTimeout string) *CatCountService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatCountService) Pretty ¶
func (s *CatCountService) Pretty(pretty bool) *CatCountService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatCountService) Sort ¶
func (s *CatCountService) Sort(fields ...string) *CatCountService
Sort is a list of fields to sort by.
type CatHealthResponse ¶
type CatHealthResponse []CatHealthResponseRow
CatHealthResponse is the outcome of CatHealthService.Do.
type CatHealthResponseRow ¶
type CatHealthResponseRow struct { Epoch int64 `json:"epoch,string"` // e.g. 1527077996 Timestamp string `json:"timestamp"` // e.g. "12:19:56" Cluster string `json:"cluster"` // cluster name, e.g. "elasticsearch" Status string `json:"status"` // health status, e.g. "green", "yellow", or "red" NodeTotal int `json:"node.total,string"` // total number of nodes NodeData int `json:"node.data,string"` // number of nodes that can store data Shards int `json:"shards,string"` // total number of shards Pri int `json:"pri,string"` // number of primary shards Relo int `json:"relo,string"` // number of relocating nodes Init int `json:"init,string"` // number of initializing nodes Unassign int `json:"unassign,string"` // number of unassigned shards PendingTasks int `json:"pending_tasks,string"` // number of pending tasks MaxTaskWaitTime string `json:"max_task_wait_time"` // wait time of longest task pending, e.g. "-" or time in millis ActiveShardsPercent string `json:"active_shards_percent"` // active number of shards in percent, e.g. "100%" }
CatHealthResponseRow is a single row in a CatHealthResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatHealthService.Columns).
type CatHealthService ¶
type CatHealthService struct {
// contains filtered or unexported fields
}
CatHealthService returns a terse representation of the same information as /_cluster/health.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cat-health.html for details.
func NewCatHealthService ¶
func NewCatHealthService(client *Client) *CatHealthService
NewCatHealthService creates a new CatHealthService.
func (*CatHealthService) Columns ¶
func (s *CatHealthService) Columns(columns ...string) *CatHealthService
Columns to return in the response. To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/indices?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatHealthService) DisableTimestamping ¶
func (s *CatHealthService) DisableTimestamping(disable bool) *CatHealthService
DisableTimestamping disables timestamping (default: true).
func (*CatHealthService) Do ¶
func (s *CatHealthService) Do(ctx context.Context) (CatHealthResponse, error)
Do executes the operation.
func (*CatHealthService) ErrorTrace ¶
func (s *CatHealthService) ErrorTrace(errorTrace bool) *CatHealthService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatHealthService) FilterPath ¶
func (s *CatHealthService) FilterPath(filterPath ...string) *CatHealthService
FilterPath specifies a list of filters used to reduce the response.
func (*CatHealthService) Header ¶
func (s *CatHealthService) Header(name string, value string) *CatHealthService
Header adds a header to the request.
func (*CatHealthService) Headers ¶
func (s *CatHealthService) Headers(headers http.Header) *CatHealthService
Headers specifies the headers of the request.
func (*CatHealthService) Human ¶
func (s *CatHealthService) Human(human bool) *CatHealthService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatHealthService) Local ¶
func (s *CatHealthService) Local(local bool) *CatHealthService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatHealthService) MasterTimeout ¶
func (s *CatHealthService) MasterTimeout(masterTimeout string) *CatHealthService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatHealthService) Pretty ¶
func (s *CatHealthService) Pretty(pretty bool) *CatHealthService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatHealthService) Sort ¶
func (s *CatHealthService) Sort(fields ...string) *CatHealthService
Sort is a list of fields to sort by.
type CatIndicesResponse ¶
type CatIndicesResponse []CatIndicesResponseRow
CatIndicesResponse is the outcome of CatIndicesService.Do.
type CatIndicesResponseRow ¶
type CatIndicesResponseRow struct { Health string `json:"health"` // "green", "yellow", or "red" Status string `json:"status"` // "open" or "closed" Index string `json:"index"` // index name UUID string `json:"uuid"` // index uuid Pri int `json:"pri,string"` // number of primary shards Rep int `json:"rep,string"` // number of replica shards DocsCount int `json:"docs.count,string"` // number of available documents DocsDeleted int `json:"docs.deleted,string"` // number of deleted documents CreationDate int64 `json:"creation.date,string"` // index creation date (millisecond value), e.g. 1527077221644 CreationDateString string `json:"creation.date.string"` // index creation date (as string), e.g. "2018-05-23T12:07:01.644Z" StoreSize string `json:"store.size"` // store size of primaries & replicas, e.g. "4.6kb" PriStoreSize string `json:"pri.store.size"` // store size of primaries, e.g. "230b" CompletionSize string `json:"completion.size"` // size of completion on primaries & replicas PriCompletionSize string `json:"pri.completion.size"` // size of completion on primaries FielddataMemorySize string `json:"fielddata.memory_size"` // used fielddata cache on primaries & replicas PriFielddataMemorySize string `json:"pri.fielddata.memory_size"` // used fielddata cache on primaries FielddataEvictions int `json:"fielddata.evictions,string"` // fielddata evictions on primaries & replicas PriFielddataEvictions int `json:"pri.fielddata.evictions,string"` // fielddata evictions on primaries QueryCacheMemorySize string `json:"query_cache.memory_size"` // used query cache on primaries & replicas PriQueryCacheMemorySize string `json:"pri.query_cache.memory_size"` // used query cache on primaries QueryCacheEvictions int `json:"query_cache.evictions,string"` // query cache evictions on primaries & replicas PriQueryCacheEvictions int `json:"pri.query_cache.evictions,string"` // query cache evictions on primaries RequestCacheMemorySize string `json:"request_cache.memory_size"` // used request cache on primaries & replicas PriRequestCacheMemorySize string `json:"pri.request_cache.memory_size"` // used request cache on primaries RequestCacheEvictions int `json:"request_cache.evictions,string"` // request cache evictions on primaries & replicas PriRequestCacheEvictions int `json:"pri.request_cache.evictions,string"` // request cache evictions on primaries RequestCacheHitCount int `json:"request_cache.hit_count,string"` // request cache hit count on primaries & replicas PriRequestCacheHitCount int `json:"pri.request_cache.hit_count,string"` // request cache hit count on primaries RequestCacheMissCount int `json:"request_cache.miss_count,string"` // request cache miss count on primaries & replicas PriRequestCacheMissCount int `json:"pri.request_cache.miss_count,string"` // request cache miss count on primaries FlushTotal int `json:"flush.total"` // number of flushes on primaries & replicas PriFlushTotal int `json:"pri.flush.total"` // number of flushes on primaries FlushTotalTime string `json:"flush.total_time"` // time spent in flush on primaries & replicas PriFlushTotalTime string `json:"pri.flush.total_time"` // time spent in flush on primaries GetCurrent int `json:"get.current,string"` // number of current get ops on primaries & replicas PriGetCurrent int `json:"pri.get.current,string"` // number of current get ops on primaries GetTime string `json:"get.time"` // time spent in get on primaries & replicas PriGetTime string `json:"pri.get.time"` // time spent in get on primaries GetTotal int `json:"get.total,string"` // number of get ops on primaries & replicas PriGetTotal int `json:"pri.get.total,string"` // number of get ops on primaries GetExistsTime string `json:"get.exists_time"` // time spent in successful gets on primaries & replicas PriGetExistsTime string `json:"pri.get.exists_time"` // time spent in successful gets on primaries GetExistsTotal int `json:"get.exists_total,string"` // number of successful gets on primaries & replicas PriGetExistsTotal int `json:"pri.get.exists_total,string"` // number of successful gets on primaries GetMissingTime string `json:"get.missing_time"` // time spent in failed gets on primaries & replicas PriGetMissingTime string `json:"pri.get.missing_time"` // time spent in failed gets on primaries GetMissingTotal int `json:"get.missing_total,string"` // number of failed gets on primaries & replicas PriGetMissingTotal int `json:"pri.get.missing_total,string"` // number of failed gets on primaries IndexingDeleteCurrent int `json:"indexing.delete_current,string"` // number of current deletions on primaries & replicas PriIndexingDeleteCurrent int `json:"pri.indexing.delete_current,string"` // number of current deletions on primaries IndexingDeleteTime string `json:"indexing.delete_time"` // time spent in deletions on primaries & replicas PriIndexingDeleteTime string `json:"pri.indexing.delete_time"` // time spent in deletions on primaries IndexingDeleteTotal int `json:"indexing.delete_total,string"` // number of delete ops on primaries & replicas PriIndexingDeleteTotal int `json:"pri.indexing.delete_total,string"` // number of delete ops on primaries IndexingIndexCurrent int `json:"indexing.index_current,string"` // number of current indexing on primaries & replicas PriIndexingIndexCurrent int `json:"pri.indexing.index_current,string"` // number of current indexing on primaries IndexingIndexTime string `json:"indexing.index_time"` // time spent in indexing on primaries & replicas PriIndexingIndexTime string `json:"pri.indexing.index_time"` // time spent in indexing on primaries IndexingIndexTotal int `json:"indexing.index_total,string"` // number of index ops on primaries & replicas PriIndexingIndexTotal int `json:"pri.indexing.index_total,string"` // number of index ops on primaries IndexingIndexFailed int `json:"indexing.index_failed,string"` // number of failed indexing ops on primaries & replicas PriIndexingIndexFailed int `json:"pri.indexing.index_failed,string"` // number of failed indexing ops on primaries MergesCurrent int `json:"merges.current,string"` // number of current merges on primaries & replicas PriMergesCurrent int `json:"pri.merges.current,string"` // number of current merges on primaries MergesCurrentDocs int `json:"merges.current_docs,string"` // number of current merging docs on primaries & replicas PriMergesCurrentDocs int `json:"pri.merges.current_docs,string"` // number of current merging docs on primaries MergesCurrentSize string `json:"merges.current_size"` // size of current merges on primaries & replicas PriMergesCurrentSize string `json:"pri.merges.current_size"` // size of current merges on primaries MergesTotal int `json:"merges.total,string"` // number of completed merge ops on primaries & replicas PriMergesTotal int `json:"pri.merges.total,string"` // number of completed merge ops on primaries MergesTotalDocs int `json:"merges.total_docs,string"` // docs merged on primaries & replicas PriMergesTotalDocs int `json:"pri.merges.total_docs,string"` // docs merged on primaries MergesTotalSize string `json:"merges.total_size"` // size merged on primaries & replicas PriMergesTotalSize string `json:"pri.merges.total_size"` // size merged on primaries MergesTotalTime string `json:"merges.total_time"` // time spent in merges on primaries & replicas PriMergesTotalTime string `json:"pri.merges.total_time"` // time spent in merges on primaries RefreshTotal int `json:"refresh.total,string"` // total refreshes on primaries & replicas PriRefreshTotal int `json:"pri.refresh.total,string"` // total refreshes on primaries RefreshTime string `json:"refresh.time"` // time spent in refreshes on primaries & replicas PriRefreshTime string `json:"pri.refresh.time"` // time spent in refreshes on primaries RefreshListeners int `json:"refresh.listeners,string"` // number of pending refresh listeners on primaries & replicas PriRefreshListeners int `json:"pri.refresh.listeners,string"` // number of pending refresh listeners on primaries SearchFetchCurrent int `json:"search.fetch_current,string"` // current fetch phase ops on primaries & replicas PriSearchFetchCurrent int `json:"pri.search.fetch_current,string"` // current fetch phase ops on primaries SearchFetchTime string `json:"search.fetch_time"` // time spent in fetch phase on primaries & replicas PriSearchFetchTime string `json:"pri.search.fetch_time"` // time spent in fetch phase on primaries SearchFetchTotal int `json:"search.fetch_total,string"` // total fetch ops on primaries & replicas PriSearchFetchTotal int `json:"pri.search.fetch_total,string"` // total fetch ops on primaries SearchOpenContexts int `json:"search.open_contexts,string"` // open search contexts on primaries & replicas PriSearchOpenContexts int `json:"pri.search.open_contexts,string"` // open search contexts on primaries SearchQueryCurrent int `json:"search.query_current,string"` // current query phase ops on primaries & replicas PriSearchQueryCurrent int `json:"pri.search.query_current,string"` // current query phase ops on primaries SearchQueryTime string `json:"search.query_time"` // time spent in query phase on primaries & replicas, e.g. "0s" PriSearchQueryTime string `json:"pri.search.query_time"` // time spent in query phase on primaries, e.g. "0s" SearchQueryTotal int `json:"search.query_total,string"` // total query phase ops on primaries & replicas PriSearchQueryTotal int `json:"pri.search.query_total,string"` // total query phase ops on primaries SearchScrollCurrent int `json:"search.scroll_current,string"` // open scroll contexts on primaries & replicas PriSearchScrollCurrent int `json:"pri.search.scroll_current,string"` // open scroll contexts on primaries SearchScrollTime string `json:"search.scroll_time"` // time scroll contexts held open on primaries & replicas, e.g. "0s" PriSearchScrollTime string `json:"pri.search.scroll_time"` // time scroll contexts held open on primaries, e.g. "0s" SearchScrollTotal int `json:"search.scroll_total,string"` // completed scroll contexts on primaries & replicas PriSearchScrollTotal int `json:"pri.search.scroll_total,string"` // completed scroll contexts on primaries SegmentsCount int `json:"segments.count,string"` // number of segments on primaries & replicas PriSegmentsCount int `json:"pri.segments.count,string"` // number of segments on primaries SegmentsMemory string `json:"segments.memory"` // memory used by segments on primaries & replicas, e.g. "1.3kb" PriSegmentsMemory string `json:"pri.segments.memory"` // memory used by segments on primaries, e.g. "1.3kb" SegmentsIndexWriterMemory string `json:"segments.index_writer_memory"` // memory used by index writer on primaries & replicas, e.g. "0b" PriSegmentsIndexWriterMemory string `json:"pri.segments.index_writer_memory"` // memory used by index writer on primaries, e.g. "0b" SegmentsVersionMapMemory string `json:"segments.version_map_memory"` // memory used by version map on primaries & replicas, e.g. "0b" PriSegmentsVersionMapMemory string `json:"pri.segments.version_map_memory"` // memory used by version map on primaries, e.g. "0b" SegmentsFixedBitsetMemory string `json:"segments.fixed_bitset_memory"` // memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields on primaries & replicas, e.g. "0b" PriSegmentsFixedBitsetMemory string `json:"pri.segments.fixed_bitset_memory"` // memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields on primaries, e.g. "0b" WarmerCurrent int `json:"warmer.count,string"` // current warmer ops on primaries & replicas PriWarmerCurrent int `json:"pri.warmer.count,string"` // current warmer ops on primaries WarmerTotal int `json:"warmer.total,string"` // total warmer ops on primaries & replicas PriWarmerTotal int `json:"pri.warmer.total,string"` // total warmer ops on primaries WarmerTotalTime string `json:"warmer.total_time"` // time spent in warmers on primaries & replicas, e.g. "47s" PriWarmerTotalTime string `json:"pri.warmer.total_time"` // time spent in warmers on primaries, e.g. "47s" SuggestCurrent int `json:"suggest.current,string"` // number of current suggest ops on primaries & replicas PriSuggestCurrent int `json:"pri.suggest.current,string"` // number of current suggest ops on primaries SuggestTime string `json:"suggest.time"` // time spend in suggest on primaries & replicas, "31s" PriSuggestTime string `json:"pri.suggest.time"` // time spend in suggest on primaries, e.g. "31s" SuggestTotal int `json:"suggest.total,string"` // number of suggest ops on primaries & replicas PriSuggestTotal int `json:"pri.suggest.total,string"` // number of suggest ops on primaries MemoryTotal string `json:"memory.total"` // total user memory on primaries & replicas, e.g. "1.5kb" PriMemoryTotal string `json:"pri.memory.total"` // total user memory on primaries, e.g. "1.5kb" }
CatIndicesResponseRow specifies the data returned for one index of a CatIndicesResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatIndicesService.Columns).
type CatIndicesService ¶
type CatIndicesService struct {
// contains filtered or unexported fields
}
CatIndicesService returns the list of indices plus some additional information about them.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cat-indices.html for details.
func NewCatIndicesService ¶
func NewCatIndicesService(client *Client) *CatIndicesService
NewCatIndicesService creates a new CatIndicesService.
func (*CatIndicesService) Bytes ¶
func (s *CatIndicesService) Bytes(bytes string) *CatIndicesService
Bytes represents the unit in which to display byte values. Valid values are: "b", "k", "m", or "g".
func (*CatIndicesService) Columns ¶
func (s *CatIndicesService) Columns(columns ...string) *CatIndicesService
Columns to return in the response. To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/indices?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatIndicesService) Do ¶
func (s *CatIndicesService) Do(ctx context.Context) (CatIndicesResponse, error)
Do executes the operation.
func (*CatIndicesService) ErrorTrace ¶
func (s *CatIndicesService) ErrorTrace(errorTrace bool) *CatIndicesService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatIndicesService) FilterPath ¶
func (s *CatIndicesService) FilterPath(filterPath ...string) *CatIndicesService
FilterPath specifies a list of filters used to reduce the response.
func (*CatIndicesService) Header ¶
func (s *CatIndicesService) Header(name string, value string) *CatIndicesService
Header adds a header to the request.
func (*CatIndicesService) Headers ¶
func (s *CatIndicesService) Headers(headers http.Header) *CatIndicesService
Headers specifies the headers of the request.
func (*CatIndicesService) Health ¶
func (s *CatIndicesService) Health(healthState string) *CatIndicesService
Health filters indices by their health status. Valid values are: "green", "yellow", or "red".
func (*CatIndicesService) Human ¶
func (s *CatIndicesService) Human(human bool) *CatIndicesService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatIndicesService) Index ¶
func (s *CatIndicesService) Index(index string) *CatIndicesService
Index is the name of the index to list (by default all indices are returned).
func (*CatIndicesService) Local ¶
func (s *CatIndicesService) Local(local bool) *CatIndicesService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatIndicesService) MasterTimeout ¶
func (s *CatIndicesService) MasterTimeout(masterTimeout string) *CatIndicesService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatIndicesService) Pretty ¶
func (s *CatIndicesService) Pretty(pretty bool) *CatIndicesService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatIndicesService) PrimaryOnly ¶
func (s *CatIndicesService) PrimaryOnly(primaryOnly bool) *CatIndicesService
PrimaryOnly when set to true returns stats only for primary shards (default: false).
func (*CatIndicesService) Sort ¶
func (s *CatIndicesService) Sort(fields ...string) *CatIndicesService
Sort is a list of fields to sort by.
type CatShardsResponse ¶
type CatShardsResponse []CatShardsResponseRow
CatShardsResponse is the outcome of CatShardsService.Do.
type CatShardsResponseRow ¶
type CatShardsResponseRow struct { Index string `json:"index"` // index name UUID string `json:"uuid"` // index uuid Shard int `json:"shard,string"` // shard number, e.g. 1 Prirep string `json:"prirep"` // "r" for replica, "p" for primary State string `json:"state"` // STARTED, INITIALIZING, RELOCATING, or UNASSIGNED Docs int64 `json:"docs,string"` // number of documents, e.g. 142847 Store string `json:"store"` // size, e.g. "40mb" IP string `json:"ip"` // IP address ID string `json:"id"` Node string `json:"node"` // Node name SyncID string `json:"sync_id"` UnassignedReason string `json:"unassigned.reason"` UnassignedAt string `json:"unassigned.at"` UnassignedFor string `json:"unassigned.for"` UnassignedDetails string `json:"unassigned.details"` RecoverysourceType string `json:"recoverysource.type"` CompletionSize string `json:"completion.size"` // size of completion on primaries & replicas FielddataMemorySize string `json:"fielddata.memory_size"` // used fielddata cache on primaries & replicas FielddataEvictions int `json:"fielddata.evictions,string"` // fielddata evictions on primaries & replicas QueryCacheMemorySize string `json:"query_cache.memory_size"` // used query cache on primaries & replicas QueryCacheEvictions int `json:"query_cache.evictions,string"` // query cache evictions on primaries & replicas FlushTotal int `json:"flush.total,string"` // number of flushes on primaries & replicas FlushTotalTime string `json:"flush.total_time"` // time spent in flush on primaries & replicas GetCurrent int `json:"get.current,string"` // number of current get ops on primaries & replicas GetTime string `json:"get.time"` // time spent in get on primaries & replicas GetTotal int `json:"get.total,string"` // number of get ops on primaries & replicas GetExistsTime string `json:"get.exists_time"` // time spent in successful gets on primaries & replicas GetExistsTotal int `json:"get.exists_total,string"` // number of successful gets on primaries & replicas GetMissingTime string `json:"get.missing_time"` // time spent in failed gets on primaries & replicas GetMissingTotal int `json:"get.missing_total,string"` // number of failed gets on primaries & replicas IndexingDeleteCurrent int `json:"indexing.delete_current,string"` // number of current deletions on primaries & replicas IndexingDeleteTime string `json:"indexing.delete_time"` // time spent in deletions on primaries & replicas IndexingDeleteTotal int `json:"indexing.delete_total,string"` // number of delete ops on primaries & replicas IndexingIndexCurrent int `json:"indexing.index_current,string"` // number of current indexing on primaries & replicas IndexingIndexTime string `json:"indexing.index_time"` // time spent in indexing on primaries & replicas IndexingIndexTotal int `json:"indexing.index_total,string"` // number of index ops on primaries & replicas IndexingIndexFailed int `json:"indexing.index_failed,string"` // number of failed indexing ops on primaries & replicas MergesCurrent int `json:"merges.current,string"` // number of current merges on primaries & replicas MergesCurrentDocs int `json:"merges.current_docs,string"` // number of current merging docs on primaries & replicas MergesCurrentSize string `json:"merges.current_size"` // size of current merges on primaries & replicas MergesTotal int `json:"merges.total,string"` // number of completed merge ops on primaries & replicas MergesTotalDocs int `json:"merges.total_docs,string"` // docs merged on primaries & replicas MergesTotalSize string `json:"merges.total_size"` // size merged on primaries & replicas MergesTotalTime string `json:"merges.total_time"` // time spent in merges on primaries & replicas RefreshTotal int `json:"refresh.total,string"` // total refreshes on primaries & replicas RefreshExternalTotal int `json:"refresh.external_total,string"` // total external refreshes on primaries & replicas RefreshTime string `json:"refresh.time"` // time spent in refreshes on primaries & replicas RefreshExternalTime string `json:"refresh.external_time"` // external time spent in refreshes on primaries & replicas RefreshListeners int `json:"refresh.listeners,string"` // number of pending refresh listeners on primaries & replicas SearchFetchCurrent int `json:"search.fetch_current,string"` // current fetch phase ops on primaries & replicas SearchFetchTime string `json:"search.fetch_time"` // time spent in fetch phase on primaries & replicas SearchFetchTotal int `json:"search.fetch_total,string"` // total fetch ops on primaries & replicas SearchOpenContexts int `json:"search.open_contexts,string"` // open search contexts on primaries & replicas SearchQueryCurrent int `json:"search.query_current,string"` // current query phase ops on primaries & replicas SearchQueryTime string `json:"search.query_time"` // time spent in query phase on primaries & replicas, e.g. "0s" SearchQueryTotal int `json:"search.query_total,string"` // total query phase ops on primaries & replicas SearchScrollCurrent int `json:"search.scroll_current,string"` // open scroll contexts on primaries & replicas SearchScrollTime string `json:"search.scroll_time"` // time scroll contexts held open on primaries & replicas, e.g. "0s" SearchScrollTotal int `json:"search.scroll_total,string"` // completed scroll contexts on primaries & replicas SearchThrottled bool `json:"search.throttled,string"` // indicates if the index is search throttled SegmentsCount int `json:"segments.count,string"` // number of segments on primaries & replicas SegmentsMemory string `json:"segments.memory"` // memory used by segments on primaries & replicas, e.g. "1.3kb" SegmentsIndexWriterMemory string `json:"segments.index_writer_memory"` // memory used by index writer on primaries & replicas, e.g. "0b" SegmentsVersionMapMemory string `json:"segments.version_map_memory"` // memory used by version map on primaries & replicas, e.g. "0b" SegmentsFixedBitsetMemory string `json:"segments.fixed_bitset_memory"` // memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields on primaries & replicas, e.g. "0b" SeqNoMax int `json:"seq_no.max,string"` SeqNoLocalCheckpoint int `json:"seq_no.local_checkpoint,string"` SeqNoGlobalCheckpoint int `json:"seq_no.global_checkpoint,string"` WarmerCurrent int `json:"warmer.current,string"` // current warmer ops on primaries & replicas WarmerTotal int `json:"warmer.total,string"` // total warmer ops on primaries & replicas WarmerTotalTime string `json:"warmer.total_time"` // time spent in warmers on primaries & replicas, e.g. "47s" }
CatShardsResponseRow specifies the data returned for one index of a CatShardsResponse. Notice that not all of these fields might be filled; that depends on the number of columns chose in the request (see CatShardsService.Columns).
type CatShardsService ¶
type CatShardsService struct {
// contains filtered or unexported fields
}
CatShardsService returns the list of shards plus some additional information about them.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.6/cat-shards.html for details.
func NewCatShardsService ¶
func NewCatShardsService(client *Client) *CatShardsService
NewCatShardsService creates a new CatShardsService.
func (*CatShardsService) Bytes ¶
func (s *CatShardsService) Bytes(bytes string) *CatShardsService
Bytes represents the unit in which to display byte values. Valid values are: "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p" or "pb".
func (*CatShardsService) Columns ¶
func (s *CatShardsService) Columns(columns ...string) *CatShardsService
Columns to return in the response.
To get a list of all possible columns to return, run the following command in your terminal:
Example:
curl 'http://localhost:9200/_cat/shards?help'
You can use Columns("*") to return all possible columns. That might take a little longer than the default set of columns.
func (*CatShardsService) Do ¶
func (s *CatShardsService) Do(ctx context.Context) (CatShardsResponse, error)
Do executes the operation.
func (*CatShardsService) ErrorTrace ¶
func (s *CatShardsService) ErrorTrace(errorTrace bool) *CatShardsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CatShardsService) FilterPath ¶
func (s *CatShardsService) FilterPath(filterPath ...string) *CatShardsService
FilterPath specifies a list of filters used to reduce the response.
func (*CatShardsService) Header ¶
func (s *CatShardsService) Header(name string, value string) *CatShardsService
Header adds a header to the request.
func (*CatShardsService) Headers ¶
func (s *CatShardsService) Headers(headers http.Header) *CatShardsService
Headers specifies the headers of the request.
func (*CatShardsService) Human ¶
func (s *CatShardsService) Human(human bool) *CatShardsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CatShardsService) Index ¶
func (s *CatShardsService) Index(index ...string) *CatShardsService
Index is the name of the index to list (by default all indices are returned).
func (*CatShardsService) Local ¶
func (s *CatShardsService) Local(local bool) *CatShardsService
Local indicates to return local information, i.e. do not retrieve the state from master node (default: false).
func (*CatShardsService) MasterTimeout ¶
func (s *CatShardsService) MasterTimeout(masterTimeout string) *CatShardsService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*CatShardsService) Pretty ¶
func (s *CatShardsService) Pretty(pretty bool) *CatShardsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CatShardsService) Sort ¶
func (s *CatShardsService) Sort(fields ...string) *CatShardsService
Sort is a list of fields to sort by.
func (*CatShardsService) Time ¶
func (s *CatShardsService) Time(time string) *CatShardsService
Time specifies how time-based values should be represented.
type CharFilteredText ¶
type ChiSquareSignificanceHeuristic ¶
type ChiSquareSignificanceHeuristic struct {
// contains filtered or unexported fields
}
ChiSquareSignificanceHeuristic implements Chi square as described in "Information Retrieval", Manning et al., Chapter 13.5.2.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_chi_square for details.
func NewChiSquareSignificanceHeuristic ¶
func NewChiSquareSignificanceHeuristic() *ChiSquareSignificanceHeuristic
NewChiSquareSignificanceHeuristic initializes a new ChiSquareSignificanceHeuristic.
func (*ChiSquareSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *ChiSquareSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *ChiSquareSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*ChiSquareSignificanceHeuristic) IncludeNegatives ¶
func (sh *ChiSquareSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *ChiSquareSignificanceHeuristic
IncludeNegatives indicates whether to filter out the terms that appear much less in the subset than in the background without the subset.
func (*ChiSquareSignificanceHeuristic) Name ¶
func (sh *ChiSquareSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*ChiSquareSignificanceHeuristic) Source ¶
func (sh *ChiSquareSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type ChildrenAggregation ¶
type ChildrenAggregation struct {
// contains filtered or unexported fields
}
ChildrenAggregation is a special single bucket aggregation that enables aggregating from buckets on parent document types to buckets on child documents. It is available from 1.4.0.Beta1 upwards. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-children-aggregation.html
func NewChildrenAggregation ¶
func NewChildrenAggregation() *ChildrenAggregation
func (*ChildrenAggregation) Meta ¶
func (a *ChildrenAggregation) Meta(metaData map[string]interface{}) *ChildrenAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ChildrenAggregation) Source ¶
func (a *ChildrenAggregation) Source() (interface{}, error)
func (*ChildrenAggregation) SubAggregation ¶
func (a *ChildrenAggregation) SubAggregation(name string, subAggregation Aggregation) *ChildrenAggregation
func (*ChildrenAggregation) Type ¶
func (a *ChildrenAggregation) Type(typ string) *ChildrenAggregation
type ClearScrollResponse ¶
type ClearScrollResponse struct { Succeeded bool `json:"succeeded,omitempty"` NumFreed int `json:"num_freed,omitempty"` }
ClearScrollResponse is the response of ClearScrollService.Do.
type ClearScrollService ¶
type ClearScrollService struct {
// contains filtered or unexported fields
}
ClearScrollService clears one or more scroll contexts by their ids.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html#_clear_scroll_api for details.
func NewClearScrollService ¶
func NewClearScrollService(client *Client) *ClearScrollService
NewClearScrollService creates a new ClearScrollService.
func (*ClearScrollService) Do ¶
func (s *ClearScrollService) Do(ctx context.Context) (*ClearScrollResponse, error)
Do executes the operation.
func (*ClearScrollService) ErrorTrace ¶
func (s *ClearScrollService) ErrorTrace(errorTrace bool) *ClearScrollService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClearScrollService) FilterPath ¶
func (s *ClearScrollService) FilterPath(filterPath ...string) *ClearScrollService
FilterPath specifies a list of filters used to reduce the response.
func (*ClearScrollService) Header ¶
func (s *ClearScrollService) Header(name string, value string) *ClearScrollService
Header adds a header to the request.
func (*ClearScrollService) Headers ¶
func (s *ClearScrollService) Headers(headers http.Header) *ClearScrollService
Headers specifies the headers of the request.
func (*ClearScrollService) Human ¶
func (s *ClearScrollService) Human(human bool) *ClearScrollService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClearScrollService) Pretty ¶
func (s *ClearScrollService) Pretty(pretty bool) *ClearScrollService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClearScrollService) ScrollId ¶
func (s *ClearScrollService) ScrollId(scrollIds ...string) *ClearScrollService
ScrollId is a list of scroll IDs to clear. Use _all to clear all search contexts.
func (*ClearScrollService) Validate ¶
func (s *ClearScrollService) Validate() error
Validate checks if the operation is valid.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an Elasticsearch client. Create one by calling NewClient.
func Dial ¶
func Dial(options ...ClientOptionFunc) (*Client, error)
Dial will call DialContext with a background context.
func DialContext ¶
func DialContext(ctx context.Context, options ...ClientOptionFunc) (*Client, error)
DialContext will connect to Elasticsearch, just like NewClient does.
The context is honoured in terms of e.g. cancellation.
func DialWithConfig ¶
DialWithConfig will use the configuration settings parsed from config package to connect to Elasticsearch.
The context is honoured in terms of e.g. cancellation.
func NewClient ¶
func NewClient(options ...ClientOptionFunc) (*Client, error)
NewClient creates a new client to work with Elasticsearch.
NewClient, by default, is meant to be long-lived and shared across your application. If you need a short-lived client, e.g. for request-scope, consider using NewSimpleClient instead.
The caller can configure the new client by passing configuration options to the func.
Example:
client, err := elastic.NewClient( elastic.SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"), elastic.SetBasicAuth("user", "secret"))
If no URL is configured, Elastic uses DefaultURL by default.
If the sniffer is enabled (the default), the new client then sniffes the cluster via the Nodes Info API (see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-nodes-info.html#cluster-nodes-info). It uses the URLs specified by the caller. The caller is responsible to only pass a list of URLs of nodes that belong to the same cluster. This sniffing process is run on startup and periodically. Use SnifferInterval to set the interval between two sniffs (default is 15 minutes). In other words: By default, the client will find new nodes in the cluster and remove those that are no longer available every 15 minutes. Disable the sniffer by passing SetSniff(false) to NewClient.
The list of nodes found in the sniffing process will be used to make connections to the REST API of Elasticsearch. These nodes are also periodically checked in a shorter time frame. This process is called a health check. By default, a health check is done every 60 seconds. You can set a shorter or longer interval by SetHealthcheckInterval. Disabling health checks is not recommended, but can be done by SetHealthcheck(false).
Connections are automatically marked as dead or healthy while making requests to Elasticsearch. When a request fails, Elastic will call into the Retry strategy which can be specified with SetRetry. The Retry strategy is also responsible for handling backoff i.e. the time to wait before starting the next request. There are various standard backoff implementations, e.g. ExponentialBackoff or SimpleBackoff. Retries are disabled by default.
If no HttpClient is configured, then http.DefaultClient is used. You can use your own http.Client with some http.Transport for advanced scenarios.
An error is also returned when some configuration option is invalid or the new client cannot sniff the cluster (if enabled).
Example (Cluster) ¶
package main import ( "github.com/olivere/elastic" ) func main() { // Obtain a client for an Elasticsearch cluster of two nodes, // running on 10.0.1.1 and 10.0.1.2. client, err := elastic.NewClient(elastic.SetURL("http://10.0.1.1:9200", "http://10.0.1.2:9200")) if err != nil { // Handle error panic(err) } _ = client }
Output:
Example (Default) ¶
package main import ( "fmt" "github.com/olivere/elastic" ) func main() { // Obtain a client to the Elasticsearch instance on http://127.0.0.1:9200. client, err := elastic.NewClient() if err != nil { // Handle error fmt.Printf("connection failed: %v\n", err) } else { fmt.Println("connected") } _ = client }
Output: connected
Example (ManyOptions) ¶
package main import ( "log" "os" "time" "github.com/olivere/elastic" ) func main() { // Obtain a client for an Elasticsearch cluster of two nodes, // running on 10.0.1.1 and 10.0.1.2. Do not run the sniffer. // Set the healthcheck interval to 10s. When requests fail, // retry 5 times. Print error messages to os.Stderr and informational // messages to os.Stdout. client, err := elastic.NewClient( elastic.SetURL("http://10.0.1.1:9200", "http://10.0.1.2:9200"), elastic.SetSniff(false), elastic.SetHealthcheckInterval(10*time.Second), elastic.SetMaxRetries(5), elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC ", log.LstdFlags)), elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags))) if err != nil { // Handle error panic(err) } _ = client }
Output:
func NewClientFromConfig ¶
NewClientFromConfig initializes a client from a configuration.
func NewSimpleClient ¶
func NewSimpleClient(options ...ClientOptionFunc) (*Client, error)
NewSimpleClient creates a new short-lived Client that can be used in use cases where you need e.g. one client per request.
While NewClient by default sets up e.g. periodic health checks and sniffing for new nodes in separate goroutines, NewSimpleClient does not and is meant as a simple replacement where you don't need all the heavy lifting of NewClient.
NewSimpleClient does the following by default: First, all health checks are disabled, including timeouts and periodic checks. Second, sniffing is disabled, including timeouts and periodic checks. The number of retries is set to 1. NewSimpleClient also does not start any goroutines.
Notice that you can still override settings by passing additional options, just like with NewClient.
func (*Client) Alias ¶
func (c *Client) Alias() *AliasService
Alias enables the caller to add and/or remove aliases.
func (*Client) Aliases ¶
func (c *Client) Aliases() *AliasesService
Aliases returns aliases by index name(s).
func (*Client) Bulk ¶
func (c *Client) Bulk() *BulkService
Bulk is the entry point to mass insert/update/delete documents.
func (*Client) BulkProcessor ¶
func (c *Client) BulkProcessor() *BulkProcessorService
BulkProcessor allows setting up a concurrent processor of bulk requests.
func (*Client) CatAliases ¶
func (c *Client) CatAliases() *CatAliasesService
CatAliases returns information about aliases.
func (*Client) CatAllocation ¶
func (c *Client) CatAllocation() *CatAllocationService
CatAllocation returns information about the allocation across nodes.
func (*Client) CatCount ¶
func (c *Client) CatCount() *CatCountService
CatCount returns document counts for indices.
func (*Client) CatHealth ¶
func (c *Client) CatHealth() *CatHealthService
CatHealth returns information about cluster health.
func (*Client) CatIndices ¶
func (c *Client) CatIndices() *CatIndicesService
CatIndices returns information about indices.
func (*Client) CatShards ¶
func (c *Client) CatShards() *CatShardsService
CatShards returns information about shards.
func (*Client) ClearCache ¶
func (c *Client) ClearCache(indices ...string) *IndicesClearCacheService
ClearCache clears caches for one or more indices.
func (*Client) ClearScroll ¶
func (c *Client) ClearScroll(scrollIds ...string) *ClearScrollService
ClearScroll can be used to clear search contexts manually.
func (*Client) CloseIndex ¶
func (c *Client) CloseIndex(name string) *IndicesCloseService
CloseIndex closes an index.
func (*Client) ClusterHealth ¶
func (c *Client) ClusterHealth() *ClusterHealthService
ClusterHealth retrieves the health of the cluster.
func (*Client) ClusterReroute ¶
func (c *Client) ClusterReroute() *ClusterRerouteService
ClusterReroute allows for manual changes to the allocation of individual shards in the cluster.
func (*Client) ClusterState ¶
func (c *Client) ClusterState() *ClusterStateService
ClusterState retrieves the state of the cluster.
func (*Client) ClusterStats ¶
func (c *Client) ClusterStats() *ClusterStatsService
ClusterStats retrieves cluster statistics.
func (*Client) CreateIndex ¶
func (c *Client) CreateIndex(name string) *IndicesCreateService
CreateIndex returns a service to create a new index.
func (*Client) DeleteByQuery ¶
func (c *Client) DeleteByQuery(indices ...string) *DeleteByQueryService
DeleteByQuery deletes documents as found by a query.
func (*Client) DeleteIndex ¶
func (c *Client) DeleteIndex(indices ...string) *IndicesDeleteService
DeleteIndex returns a service to delete an index.
func (*Client) DeleteScript ¶
func (c *Client) DeleteScript() *DeleteScriptService
DeleteScript allows removing a stored script from Elasticsearch.
func (*Client) ElasticsearchVersion ¶
ElasticsearchVersion returns the version number of Elasticsearch running on the given URL.
func (*Client) Exists ¶
func (c *Client) Exists() *ExistsService
Exists checks if a document exists.
func (*Client) Explain ¶
func (c *Client) Explain(index, typ, id string) *ExplainService
Explain computes a score explanation for a query and a specific document.
func (*Client) FieldCaps ¶
func (c *Client) FieldCaps(indices ...string) *FieldCapsService
FieldCaps returns statistical information about fields in indices.
func (*Client) Flush ¶
func (c *Client) Flush(indices ...string) *IndicesFlushService
Flush asks Elasticsearch to free memory from the index and flush data to disk.
func (*Client) Forcemerge ¶
func (c *Client) Forcemerge(indices ...string) *IndicesForcemergeService
Forcemerge optimizes one or more indices. It replaces the deprecated Optimize API.
func (*Client) GetFieldMapping ¶
func (c *Client) GetFieldMapping() *IndicesGetFieldMappingService
GetFieldMapping gets mapping for fields.
func (*Client) GetMapping ¶
func (c *Client) GetMapping() *IndicesGetMappingService
GetMapping gets a mapping.
func (*Client) GetScript ¶
func (c *Client) GetScript() *GetScriptService
GetScript reads a stored script in Elasticsearch. Use PutScript for storing a script.
func (*Client) IndexAnalyze ¶
func (c *Client) IndexAnalyze() *IndicesAnalyzeService
IndexAnalyze performs the analysis process on a text and returns the token breakdown of the text.
func (*Client) IndexDeleteTemplate ¶
func (c *Client) IndexDeleteTemplate(name string) *IndicesDeleteTemplateService
IndexDeleteTemplate deletes an index template. Use XXXTemplate funcs to manage search templates.
func (*Client) IndexExists ¶
func (c *Client) IndexExists(indices ...string) *IndicesExistsService
IndexExists allows to check if an index exists.
func (*Client) IndexGet ¶
func (c *Client) IndexGet(indices ...string) *IndicesGetService
IndexGet retrieves information about one or more indices. IndexGet is only available for Elasticsearch 1.4 or later.
func (*Client) IndexGetSettings ¶
func (c *Client) IndexGetSettings(indices ...string) *IndicesGetSettingsService
IndexGetSettings retrieves settings of all, one or more indices.
func (*Client) IndexGetTemplate ¶
func (c *Client) IndexGetTemplate(names ...string) *IndicesGetTemplateService
IndexGetTemplate gets an index template. Use XXXTemplate funcs to manage search templates.
func (*Client) IndexNames ¶
IndexNames returns the names of all indices in the cluster.
func (*Client) IndexPutSettings ¶
func (c *Client) IndexPutSettings(indices ...string) *IndicesPutSettingsService
IndexPutSettings sets settings for all, one or more indices.
func (*Client) IndexPutTemplate ¶
func (c *Client) IndexPutTemplate(name string) *IndicesPutTemplateService
IndexPutTemplate creates or updates an index template. Use XXXTemplate funcs to manage search templates.
func (*Client) IndexSegments ¶
func (c *Client) IndexSegments(indices ...string) *IndicesSegmentsService
IndexSegments retrieves low level segment information for all, one or more indices.
func (*Client) IndexStats ¶
func (c *Client) IndexStats(indices ...string) *IndicesStatsService
IndexStats provides statistics on different operations happining in one or more indices.
func (*Client) IndexTemplateExists ¶
func (c *Client) IndexTemplateExists(name string) *IndicesExistsTemplateService
IndexTemplateExists gets check if an index template exists. Use XXXTemplate funcs to manage search templates.
func (*Client) IngestDeletePipeline ¶
func (c *Client) IngestDeletePipeline(id string) *IngestDeletePipelineService
IngestDeletePipeline deletes a pipeline by ID.
func (*Client) IngestGetPipeline ¶
func (c *Client) IngestGetPipeline(ids ...string) *IngestGetPipelineService
IngestGetPipeline returns pipelines based on ID.
func (*Client) IngestPutPipeline ¶
func (c *Client) IngestPutPipeline(id string) *IngestPutPipelineService
IngestPutPipeline adds pipelines and updates existing pipelines in the cluster.
func (*Client) IngestSimulatePipeline ¶
func (c *Client) IngestSimulatePipeline() *IngestSimulatePipelineService
IngestSimulatePipeline executes a specific pipeline against the set of documents provided in the body of the request.
func (*Client) IsRunning ¶
IsRunning returns true if the background processes of the client are running, false otherwise.
func (*Client) Mget ¶
func (c *Client) Mget() *MgetService
Mget retrieves multiple documents in one roundtrip.
func (*Client) MultiGet ¶
func (c *Client) MultiGet() *MgetService
MultiGet retrieves multiple documents in one roundtrip.
func (*Client) MultiSearch ¶
func (c *Client) MultiSearch() *MultiSearchService
MultiSearch is the entry point for multi searches.
func (*Client) MultiTermVectors ¶
func (c *Client) MultiTermVectors() *MultiTermvectorService
MultiTermVectors returns information and statistics on terms in the fields of multiple documents.
func (*Client) NodesInfo ¶
func (c *Client) NodesInfo() *NodesInfoService
NodesInfo retrieves one or more or all of the cluster nodes information.
func (*Client) NodesStats ¶
func (c *Client) NodesStats() *NodesStatsService
NodesStats retrieves one or more or all of the cluster nodes statistics.
func (*Client) OpenIndex ¶
func (c *Client) OpenIndex(name string) *IndicesOpenService
OpenIndex opens an index.
func (*Client) PerformRequest ¶
PerformRequest does a HTTP request to Elasticsearch. It returns a response (which might be nil) and an error on failure.
Optionally, a list of HTTP error codes to ignore can be passed. This is necessary for services that expect e.g. HTTP status 404 as a valid outcome (Exists, IndicesExists, IndicesTypeExists).
func (*Client) Ping ¶
func (c *Client) Ping(url string) *PingService
Ping checks if a given node in a cluster exists and (optionally) returns some basic information about the Elasticsearch server, e.g. the Elasticsearch version number.
Notice that you need to specify a URL here explicitly.
func (*Client) PutMapping ¶
func (c *Client) PutMapping() *IndicesPutMappingService
PutMapping registers a mapping.
func (*Client) PutScript ¶
func (c *Client) PutScript() *PutScriptService
PutScript allows saving a stored script in Elasticsearch.
func (*Client) Refresh ¶
func (c *Client) Refresh(indices ...string) *RefreshService
Refresh asks Elasticsearch to refresh one or more indices.
func (*Client) Reindex ¶
func (c *Client) Reindex() *ReindexService
Reindex copies data from a source index into a destination index.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html for details on the Reindex API.
func (*Client) RolloverIndex ¶
func (c *Client) RolloverIndex(alias string) *IndicesRolloverService
RolloverIndex rolls an alias over to a new index when the existing index is considered to be too large or too old.
func (*Client) Scroll ¶
func (c *Client) Scroll(indices ...string) *ScrollService
Scroll through documents. Use this to efficiently scroll through results while returning the results to a client.
func (*Client) Search ¶
func (c *Client) Search(indices ...string) *SearchService
Search is the entry point for searches.
func (*Client) SearchShards ¶
func (c *Client) SearchShards(indices ...string) *SearchShardsService
SearchShards returns statistical information about nodes and shards.
func (*Client) ShrinkIndex ¶
func (c *Client) ShrinkIndex(source, target string) *IndicesShrinkService
ShrinkIndex returns a service to shrink one index into another.
func (*Client) SnapshotCreate ¶
func (c *Client) SnapshotCreate(repository, snapshot string) *SnapshotCreateService
SnapshotCreate creates a snapshot.
func (*Client) SnapshotCreateRepository ¶
func (c *Client) SnapshotCreateRepository(repository string) *SnapshotCreateRepositoryService
SnapshotCreateRepository creates or updates a snapshot repository.
func (*Client) SnapshotDelete ¶
func (c *Client) SnapshotDelete(repository, snapshot string) *SnapshotDeleteService
SnapshotDelete deletes a snapshot in a snapshot repository.
func (*Client) SnapshotDeleteRepository ¶
func (c *Client) SnapshotDeleteRepository(repositories ...string) *SnapshotDeleteRepositoryService
SnapshotDeleteRepository deletes a snapshot repository.
func (*Client) SnapshotGet ¶
func (c *Client) SnapshotGet(repository string) *SnapshotGetService
SnapshotGet lists snapshot for a repository.
func (*Client) SnapshotGetRepository ¶
func (c *Client) SnapshotGetRepository(repositories ...string) *SnapshotGetRepositoryService
SnapshotGetRepository gets a snapshot repository.
func (*Client) SnapshotRestore ¶
func (c *Client) SnapshotRestore(repository, snapshot string) *SnapshotRestoreService
SnapshotRestore restores the specified indices from a given snapshot
func (*Client) SnapshotStatus ¶
func (c *Client) SnapshotStatus() *SnapshotStatusService
SnapshotStatus returns information about the status of a snapshot.
func (*Client) SnapshotVerifyRepository ¶
func (c *Client) SnapshotVerifyRepository(repository string) *SnapshotVerifyRepositoryService
SnapshotVerifyRepository verifies a snapshot repository.
func (*Client) Start ¶
func (c *Client) Start()
Start starts the background processes like sniffing the cluster and periodic health checks. You don't need to run Start when creating a client with NewClient; the background processes are run by default.
If the background processes are already running, this is a no-op.
func (*Client) Stop ¶
func (c *Client) Stop()
Stop stops the background processes that the client is running, i.e. sniffing the cluster periodically and running health checks on the nodes.
If the background processes are not running, this is a no-op.
func (*Client) SyncedFlush ¶
func (c *Client) SyncedFlush(indices ...string) *IndicesSyncedFlushService
SyncedFlush performs a synced flush.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-synced-flush.html for more details on synched flushes and how they differ from a normal Flush.
func (*Client) TasksCancel ¶
func (c *Client) TasksCancel() *TasksCancelService
TasksCancel cancels tasks running on the specified nodes.
func (*Client) TasksGetTask ¶
func (c *Client) TasksGetTask() *TasksGetTaskService
TasksGetTask retrieves a task running on the cluster.
func (*Client) TasksList ¶
func (c *Client) TasksList() *TasksListService
TasksList retrieves the list of tasks running on the specified nodes.
func (*Client) TermVectors ¶
func (c *Client) TermVectors(index, typ string) *TermvectorsService
TermVectors returns information and statistics on terms in the fields of a particular document.
func (*Client) TypeExists ¶
func (c *Client) TypeExists() *IndicesExistsTypeService
TypeExists allows to check if one or more types exist in one or more indices.
func (*Client) UpdateByQuery ¶
func (c *Client) UpdateByQuery(indices ...string) *UpdateByQueryService
UpdateByQuery performs an update on a set of documents.
func (*Client) Validate ¶
func (c *Client) Validate(indices ...string) *ValidateService
Validate allows a user to validate a potentially expensive query without executing it.
func (*Client) WaitForGreenStatus ¶
WaitForGreenStatus waits for the cluster to have the "green" status. See WaitForStatus for more details.
func (*Client) WaitForStatus ¶
WaitForStatus waits for the cluster to have the given status. This is a shortcut method for the ClusterHealth service.
WaitForStatus waits for the specified timeout, e.g. "10s". If the cluster will have the given state within the timeout, nil is returned. If the request timed out, ErrTimeout is returned.
func (*Client) WaitForYellowStatus ¶
WaitForYellowStatus waits for the cluster to have the "yellow" status. See WaitForStatus for more details.
func (*Client) XPackIlmDeleteLifecycle ¶
func (c *Client) XPackIlmDeleteLifecycle() *XPackIlmDeleteLifecycleService
XPackIlmDeleteLifecycle deletes an ilm policy.
func (*Client) XPackIlmGetLifecycle ¶
func (c *Client) XPackIlmGetLifecycle() *XPackIlmGetLifecycleService
XPackIlmGettLifecycle gets an ilm policy.
func (*Client) XPackIlmPutLifecycle ¶
func (c *Client) XPackIlmPutLifecycle() *XPackIlmPutLifecycleService
XPackIlmPutLifecycle adds or modifies an ilm policy.
func (*Client) XPackInfo ¶
func (c *Client) XPackInfo() *XPackInfoService
func (*Client) XPackSecurityDeleteRole ¶
func (c *Client) XPackSecurityDeleteRole(roleName string) *XPackSecurityDeleteRoleService
XPackSecurityDeleteRole deletes a role.
func (*Client) XPackSecurityDeleteRoleMapping ¶
func (c *Client) XPackSecurityDeleteRoleMapping(roleMappingName string) *XPackSecurityDeleteRoleMappingService
XPackSecurityDeleteRoleMapping deletes a role mapping.
func (*Client) XPackSecurityDeleteUser ¶
func (c *Client) XPackSecurityDeleteUser(username string) *XPackSecurityDeleteUserService
XPackSecurityDeleteUser deletes a user.
func (*Client) XPackSecurityGetRole ¶
func (c *Client) XPackSecurityGetRole(roleName string) *XPackSecurityGetRoleService
XPackSecurityGetRole gets a role.
func (*Client) XPackSecurityGetRoleMapping ¶
func (c *Client) XPackSecurityGetRoleMapping(roleMappingName string) *XPackSecurityGetRoleMappingService
XPackSecurityGetRoleMapping gets a role mapping.
func (*Client) XPackSecurityGetUser ¶
func (c *Client) XPackSecurityGetUser(usernames ...string) *XPackSecurityGetUserService
XPackSecurityGetUser gets details about one or more users.
func (*Client) XPackSecurityPutRole ¶
func (c *Client) XPackSecurityPutRole(roleName string) *XPackSecurityPutRoleService
XPackSecurityPutRole adds a role.
func (*Client) XPackSecurityPutRoleMapping ¶
func (c *Client) XPackSecurityPutRoleMapping(roleMappingName string) *XPackSecurityPutRoleMappingService
XPackSecurityPutRoleMapping adds a role mapping.
func (*Client) XPackSecurityPutUser ¶
func (c *Client) XPackSecurityPutUser(username string) *XPackSecurityPutUserService
XPackSecurityPutUser adds or updates a user.
func (*Client) XPackWatchAck ¶
func (c *Client) XPackWatchAck(watchId string) *XPackWatcherAckWatchService
XPackWatchAck acknowledging a watch.
func (*Client) XPackWatchActivate ¶
func (c *Client) XPackWatchActivate(watchId string) *XPackWatcherActivateWatchService
XPackWatchActivate activates a watch.
func (*Client) XPackWatchDeactivate ¶
func (c *Client) XPackWatchDeactivate(watchId string) *XPackWatcherDeactivateWatchService
XPackWatchDeactivate deactivates a watch.
func (*Client) XPackWatchDelete ¶
func (c *Client) XPackWatchDelete(watchId string) *XPackWatcherDeleteWatchService
XPackWatchDelete deletes a watch.
func (*Client) XPackWatchExecute ¶
func (c *Client) XPackWatchExecute() *XPackWatcherExecuteWatchService
XPackWatchExecute executes a watch.
func (*Client) XPackWatchGet ¶
func (c *Client) XPackWatchGet(watchId string) *XPackWatcherGetWatchService
XPackWatchGet gets a watch.
func (*Client) XPackWatchPut ¶
func (c *Client) XPackWatchPut(watchId string) *XPackWatcherPutWatchService
XPackWatchPut adds a watch.
func (*Client) XPackWatchRestart ¶
func (c *Client) XPackWatchRestart() *XPackWatcherRestartService
XPackWatchRestart restarts a watch.
func (*Client) XPackWatchStart ¶
func (c *Client) XPackWatchStart() *XPackWatcherStartService
XPackWatchStart starts a watch.
func (*Client) XPackWatchStats ¶
func (c *Client) XPackWatchStats() *XPackWatcherStatsService
XPackWatchStats returns the current Watcher metrics.
func (*Client) XPackWatchStop ¶
func (c *Client) XPackWatchStop() *XPackWatcherStopService
XPackWatchStop stops a watch.
type ClientOptionFunc ¶
ClientOptionFunc is a function that configures a Client. It is used in NewClient.
func SetBasicAuth ¶
func SetBasicAuth(username, password string) ClientOptionFunc
SetBasicAuth can be used to specify the HTTP Basic Auth credentials to use when making HTTP requests to Elasticsearch.
func SetDecoder ¶
func SetDecoder(decoder Decoder) ClientOptionFunc
SetDecoder sets the Decoder to use when decoding data from Elasticsearch. DefaultDecoder is used by default.
func SetErrorLog ¶
func SetErrorLog(logger Logger) ClientOptionFunc
SetErrorLog sets the logger for critical messages like nodes joining or leaving the cluster or failing requests. It is nil by default.
func SetGzip ¶
func SetGzip(enabled bool) ClientOptionFunc
SetGzip enables or disables gzip compression (disabled by default).
func SetHeaders ¶
func SetHeaders(headers http.Header) ClientOptionFunc
SetHeaders adds a list of default HTTP headers that will be added to each requests executed by PerformRequest.
func SetHealthcheck ¶
func SetHealthcheck(enabled bool) ClientOptionFunc
SetHealthcheck enables or disables healthchecks (enabled by default).
func SetHealthcheckInterval ¶
func SetHealthcheckInterval(interval time.Duration) ClientOptionFunc
SetHealthcheckInterval sets the interval between two health checks. The default interval is 60 seconds.
func SetHealthcheckTimeout ¶
func SetHealthcheckTimeout(timeout time.Duration) ClientOptionFunc
SetHealthcheckTimeout sets the timeout for periodic health checks. The default timeout is 1 second (see DefaultHealthcheckTimeout). Notice that a different (usually larger) timeout is used for the initial healthcheck, which is initiated while creating a new client. The startup timeout can be modified with SetHealthcheckTimeoutStartup.
func SetHealthcheckTimeoutStartup ¶
func SetHealthcheckTimeoutStartup(timeout time.Duration) ClientOptionFunc
SetHealthcheckTimeoutStartup sets the timeout for the initial health check. The default timeout is 5 seconds (see DefaultHealthcheckTimeoutStartup). Notice that timeouts for subsequent health checks can be modified with SetHealthcheckTimeout.
func SetHttpClient ¶
func SetHttpClient(httpClient *http.Client) ClientOptionFunc
SetHttpClient can be used to specify the http.Client to use when making HTTP requests to Elasticsearch.
func SetInfoLog ¶
func SetInfoLog(logger Logger) ClientOptionFunc
SetInfoLog sets the logger for informational messages, e.g. requests and their response times. It is nil by default.
func SetMaxRetries
deprecated
func SetMaxRetries(maxRetries int) ClientOptionFunc
SetMaxRetries sets the maximum number of retries before giving up when performing a HTTP request to Elasticsearch.
Deprecated: Replace with a Retry implementation.
func SetRequiredPlugins ¶
func SetRequiredPlugins(plugins ...string) ClientOptionFunc
SetRequiredPlugins can be used to indicate that some plugins are required before a Client will be created.
func SetRetrier ¶
func SetRetrier(retrier Retrier) ClientOptionFunc
SetRetrier specifies the retry strategy that handles errors during HTTP request/response with Elasticsearch.
func SetScheme ¶
func SetScheme(scheme string) ClientOptionFunc
SetScheme sets the HTTP scheme to look for when sniffing (http or https). This is http by default.
func SetSendGetBodyAs ¶
func SetSendGetBodyAs(httpMethod string) ClientOptionFunc
SetSendGetBodyAs specifies the HTTP method to use when sending a GET request with a body. It is GET by default.
func SetSniff ¶
func SetSniff(enabled bool) ClientOptionFunc
SetSniff enables or disables the sniffer (enabled by default).
func SetSnifferCallback ¶
func SetSnifferCallback(f SnifferCallback) ClientOptionFunc
SetSnifferCallback allows the caller to modify sniffer decisions. When setting the callback, the given SnifferCallback is called for each (healthy) node found during the sniffing process. If the callback returns false, the node is ignored: No requests are routed to it.
func SetSnifferInterval ¶
func SetSnifferInterval(interval time.Duration) ClientOptionFunc
SetSnifferInterval sets the interval between two sniffing processes. The default interval is 15 minutes.
func SetSnifferTimeout ¶
func SetSnifferTimeout(timeout time.Duration) ClientOptionFunc
SetSnifferTimeout sets the timeout for the sniffer that finds the nodes in a cluster. The default is 2 seconds. Notice that the timeout used when creating a new client on startup is usually greater and can be set with SetSnifferTimeoutStartup.
func SetSnifferTimeoutStartup ¶
func SetSnifferTimeoutStartup(timeout time.Duration) ClientOptionFunc
SetSnifferTimeoutStartup sets the timeout for the sniffer that is used when creating a new client. The default is 5 seconds. Notice that the timeout being used for subsequent sniffing processes is set with SetSnifferTimeout.
func SetTraceLog ¶
func SetTraceLog(logger Logger) ClientOptionFunc
SetTraceLog specifies the log.Logger to use for output of HTTP requests and responses which is helpful during debugging. It is nil by default.
func SetURL ¶
func SetURL(urls ...string) ClientOptionFunc
SetURL defines the URL endpoints of the Elasticsearch nodes. Notice that when sniffing is enabled, these URLs are used to initially sniff the cluster on startup.
type ClusterHealthResponse ¶
type ClusterHealthResponse struct { ClusterName string `json:"cluster_name"` Status string `json:"status"` TimedOut bool `json:"timed_out"` NumberOfNodes int `json:"number_of_nodes"` NumberOfDataNodes int `json:"number_of_data_nodes"` ActivePrimaryShards int `json:"active_primary_shards"` ActiveShards int `json:"active_shards"` RelocatingShards int `json:"relocating_shards"` InitializingShards int `json:"initializing_shards"` UnassignedShards int `json:"unassigned_shards"` DelayedUnassignedShards int `json:"delayed_unassigned_shards"` NumberOfPendingTasks int `json:"number_of_pending_tasks"` NumberOfInFlightFetch int `json:"number_of_in_flight_fetch"` TaskMaxWaitTimeInQueue string `json:"task_max_waiting_in_queue"` // "0s" TaskMaxWaitTimeInQueueInMillis int `json:"task_max_waiting_in_queue_millis"` // 0 ActiveShardsPercent string `json:"active_shards_percent"` // "100.0%" ActiveShardsPercentAsNumber float64 `json:"active_shards_percent_as_number"` // 100.0 // Index name -> index health Indices map[string]*ClusterIndexHealth `json:"indices"` }
ClusterHealthResponse is the response of ClusterHealthService.Do.
type ClusterHealthService ¶
type ClusterHealthService struct {
// contains filtered or unexported fields
}
ClusterHealthService allows to get a very simple status on the health of the cluster.
See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-health.html for details.
Example ¶
package main import ( "context" "fmt" "github.com/olivere/elastic" ) func main() { client, err := elastic.NewClient() if err != nil { panic(err) } // Get cluster health res, err := client.ClusterHealth().Index("twitter").Do(context.Background()) if err != nil { panic(err) } if res == nil { panic(err) } fmt.Printf("Cluster status is %q\n", res.Status) }
Output:
func NewClusterHealthService ¶
func NewClusterHealthService(client *Client) *ClusterHealthService
NewClusterHealthService creates a new ClusterHealthService.
func (*ClusterHealthService) Do ¶
func (s *ClusterHealthService) Do(ctx context.Context) (*ClusterHealthResponse, error)
Do executes the operation.
func (*ClusterHealthService) ErrorTrace ¶
func (s *ClusterHealthService) ErrorTrace(errorTrace bool) *ClusterHealthService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClusterHealthService) FilterPath ¶
func (s *ClusterHealthService) FilterPath(filterPath ...string) *ClusterHealthService
FilterPath specifies a list of filters used to reduce the response.
func (*ClusterHealthService) Header ¶
func (s *ClusterHealthService) Header(name string, value string) *ClusterHealthService
Header adds a header to the request.
func (*ClusterHealthService) Headers ¶
func (s *ClusterHealthService) Headers(headers http.Header) *ClusterHealthService
Headers specifies the headers of the request.
func (*ClusterHealthService) Human ¶
func (s *ClusterHealthService) Human(human bool) *ClusterHealthService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClusterHealthService) Index ¶
func (s *ClusterHealthService) Index(indices ...string) *ClusterHealthService
Index limits the information returned to specific indices.
func (*ClusterHealthService) Level ¶
func (s *ClusterHealthService) Level(level string) *ClusterHealthService
Level specifies the level of detail for returned information.
func (*ClusterHealthService) Local ¶
func (s *ClusterHealthService) Local(local bool) *ClusterHealthService
Local indicates whether to return local information. If it is true, we do not retrieve the state from master node (default: false).
func (*ClusterHealthService) MasterTimeout ¶
func (s *ClusterHealthService) MasterTimeout(masterTimeout string) *ClusterHealthService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*ClusterHealthService) Pretty ¶
func (s *ClusterHealthService) Pretty(pretty bool) *ClusterHealthService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClusterHealthService) Timeout ¶
func (s *ClusterHealthService) Timeout(timeout string) *ClusterHealthService
Timeout specifies an explicit operation timeout.
func (*ClusterHealthService) Validate ¶
func (s *ClusterHealthService) Validate() error
Validate checks if the operation is valid.
func (*ClusterHealthService) WaitForActiveShards ¶
func (s *ClusterHealthService) WaitForActiveShards(waitForActiveShards int) *ClusterHealthService
WaitForActiveShards can be used to wait until the specified number of shards are active.
func (*ClusterHealthService) WaitForGreenStatus ¶
func (s *ClusterHealthService) WaitForGreenStatus() *ClusterHealthService
WaitForGreenStatus will wait for the "green" state.
func (*ClusterHealthService) WaitForNoRelocatingShards ¶
func (s *ClusterHealthService) WaitForNoRelocatingShards(waitForNoRelocatingShards bool) *ClusterHealthService
WaitForNoRelocatingShards can be used to wait until all shard relocations are finished.
func (*ClusterHealthService) WaitForNodes ¶
func (s *ClusterHealthService) WaitForNodes(waitForNodes string) *ClusterHealthService
WaitForNodes can be used to wait until the specified number of nodes are available. Example: "12" to wait for exact values, ">12" and "<12" for ranges.
func (*ClusterHealthService) WaitForStatus ¶
func (s *ClusterHealthService) WaitForStatus(waitForStatus string) *ClusterHealthService
WaitForStatus can be used to wait until the cluster is in a specific state. Valid values are: green, yellow, or red.
Example ¶
package main import ( "context" "fmt" "github.com/olivere/elastic" ) func main() { client, err := elastic.NewClient() if err != nil { panic(err) } // Wait for status green res, err := client.ClusterHealth().WaitForStatus("green").Timeout("15s").Do(context.Background()) if err != nil { panic(err) } if res.TimedOut { fmt.Printf("time out waiting for cluster status %q\n", "green") } else { fmt.Printf("cluster status is %q\n", res.Status) } }
Output:
func (*ClusterHealthService) WaitForYellowStatus ¶
func (s *ClusterHealthService) WaitForYellowStatus() *ClusterHealthService
WaitForYellowStatus will wait for the "yellow" state.
type ClusterIndexHealth ¶
type ClusterIndexHealth struct { Status string `json:"status"` NumberOfShards int `json:"number_of_shards"` NumberOfReplicas int `json:"number_of_replicas"` ActivePrimaryShards int `json:"active_primary_shards"` ActiveShards int `json:"active_shards"` RelocatingShards int `json:"relocating_shards"` InitializingShards int `json:"initializing_shards"` UnassignedShards int `json:"unassigned_shards"` // Shards by id, e.g. "0" or "1" Shards map[string]*ClusterShardHealth `json:"shards"` }
ClusterIndexHealth will be returned as part of ClusterHealthResponse.
type ClusterRerouteResponse ¶
type ClusterRerouteResponse struct { State *ClusterStateResponse `json:"state"` Explanations []RerouteExplanation `json:"explanations,omitempty"` }
ClusterRerouteResponse is the response of ClusterRerouteService.Do.
type ClusterRerouteService ¶
type ClusterRerouteService struct {
// contains filtered or unexported fields
}
ClusterRerouteService allows for manual changes to the allocation of individual shards in the cluster. For example, a shard can be moved from one node to another explicitly, an allocation can be cancelled, and an unassigned shard can be explicitly allocated to a specific node.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-reroute.html for details.
func NewClusterRerouteService ¶
func NewClusterRerouteService(client *Client) *ClusterRerouteService
NewClusterRerouteService creates a new ClusterRerouteService.
func (*ClusterRerouteService) Add ¶
func (s *ClusterRerouteService) Add(commands ...AllocationCommand) *ClusterRerouteService
Add adds one or more commands to be executed.
func (*ClusterRerouteService) Body ¶
func (s *ClusterRerouteService) Body(body interface{}) *ClusterRerouteService
Body specifies the body to be sent. If you specify Body, the commands passed via Add are ignored. In other words: Body takes precedence over Add.
func (*ClusterRerouteService) Do ¶
func (s *ClusterRerouteService) Do(ctx context.Context) (*ClusterRerouteResponse, error)
Do executes the operation.
func (*ClusterRerouteService) DryRun ¶
func (s *ClusterRerouteService) DryRun(dryRun bool) *ClusterRerouteService
DryRun indicates whether to simulate the operation only and return the resulting state.
func (*ClusterRerouteService) ErrorTrace ¶
func (s *ClusterRerouteService) ErrorTrace(errorTrace bool) *ClusterRerouteService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClusterRerouteService) Explain ¶
func (s *ClusterRerouteService) Explain(explain bool) *ClusterRerouteService
Explain, when set to true, returns an explanation of why the commands can or cannot be executed.
func (*ClusterRerouteService) FilterPath ¶
func (s *ClusterRerouteService) FilterPath(filterPath ...string) *ClusterRerouteService
FilterPath specifies a list of filters used to reduce the response.
func (*ClusterRerouteService) Header ¶
func (s *ClusterRerouteService) Header(name string, value string) *ClusterRerouteService
Header adds a header to the request.
func (*ClusterRerouteService) Headers ¶
func (s *ClusterRerouteService) Headers(headers http.Header) *ClusterRerouteService
Headers specifies the headers of the request.
func (*ClusterRerouteService) Human ¶
func (s *ClusterRerouteService) Human(human bool) *ClusterRerouteService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClusterRerouteService) MasterTimeout ¶
func (s *ClusterRerouteService) MasterTimeout(masterTimeout string) *ClusterRerouteService
MasterTimeout specifies an explicit timeout for connection to master.
func (*ClusterRerouteService) Metric ¶
func (s *ClusterRerouteService) Metric(metrics ...string) *ClusterRerouteService
Metric limits the information returned to the specified metric. It can be one of: "_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version". Defaults to all but metadata.
func (*ClusterRerouteService) Pretty ¶
func (s *ClusterRerouteService) Pretty(pretty bool) *ClusterRerouteService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClusterRerouteService) RetryFailed ¶
func (s *ClusterRerouteService) RetryFailed(retryFailed bool) *ClusterRerouteService
RetryFailed indicates whether to retry allocation of shards that are blocked due to too many subsequent allocation failures.
func (*ClusterRerouteService) Timeout ¶
func (s *ClusterRerouteService) Timeout(timeout string) *ClusterRerouteService
Timeout specifies an explicit operationtimeout.
func (*ClusterRerouteService) Validate ¶
func (s *ClusterRerouteService) Validate() error
Validate checks if the operation is valid.
type ClusterShardHealth ¶
type ClusterShardHealth struct { Status string `json:"status"` PrimaryActive bool `json:"primary_active"` ActiveShards int `json:"active_shards"` RelocatingShards int `json:"relocating_shards"` InitializingShards int `json:"initializing_shards"` UnassignedShards int `json:"unassigned_shards"` }
ClusterShardHealth will be returned as part of ClusterHealthResponse.
type ClusterStateResponse ¶
type ClusterStateResponse struct { ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` Version int64 `json:"version"` StateUUID string `json:"state_uuid"` MasterNode string `json:"master_node"` Blocks map[string]*clusterBlocks `json:"blocks"` Nodes map[string]*discoveryNode `json:"nodes"` Metadata *clusterStateMetadata `json:"metadata"` RoutingTable *clusterStateRoutingTable `json:"routing_table"` RoutingNodes *clusterStateRoutingNode `json:"routing_nodes"` Customs map[string]interface{} `json:"customs"` }
ClusterStateResponse is the response of ClusterStateService.Do.
type ClusterStateService ¶
type ClusterStateService struct {
// contains filtered or unexported fields
}
ClusterStateService allows to get a comprehensive state information of the whole cluster.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-state.html for details.
Example ¶
package main import ( "context" "fmt" "github.com/olivere/elastic" ) func main() { client, err := elastic.NewClient() if err != nil { panic(err) } // Get cluster state res, err := client.ClusterState().Metric("version").Do(context.Background()) if err != nil { panic(err) } fmt.Printf("Cluster %q has version %d", res.ClusterName, res.Version) }
Output:
func NewClusterStateService ¶
func NewClusterStateService(client *Client) *ClusterStateService
NewClusterStateService creates a new ClusterStateService.
func (*ClusterStateService) AllowNoIndices ¶
func (s *ClusterStateService) AllowNoIndices(allowNoIndices bool) *ClusterStateService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*ClusterStateService) Do ¶
func (s *ClusterStateService) Do(ctx context.Context) (*ClusterStateResponse, error)
Do executes the operation.
func (*ClusterStateService) ErrorTrace ¶
func (s *ClusterStateService) ErrorTrace(errorTrace bool) *ClusterStateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClusterStateService) ExpandWildcards ¶
func (s *ClusterStateService) ExpandWildcards(expandWildcards string) *ClusterStateService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*ClusterStateService) FilterPath ¶
func (s *ClusterStateService) FilterPath(filterPath ...string) *ClusterStateService
FilterPath specifies a list of filters used to reduce the response.
func (*ClusterStateService) FlatSettings ¶
func (s *ClusterStateService) FlatSettings(flatSettings bool) *ClusterStateService
FlatSettings, when set, returns settings in flat format (default: false).
func (*ClusterStateService) Header ¶
func (s *ClusterStateService) Header(name string, value string) *ClusterStateService
Header adds a header to the request.
func (*ClusterStateService) Headers ¶
func (s *ClusterStateService) Headers(headers http.Header) *ClusterStateService
Headers specifies the headers of the request.
func (*ClusterStateService) Human ¶
func (s *ClusterStateService) Human(human bool) *ClusterStateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClusterStateService) IgnoreUnavailable ¶
func (s *ClusterStateService) IgnoreUnavailable(ignoreUnavailable bool) *ClusterStateService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*ClusterStateService) Index ¶
func (s *ClusterStateService) Index(indices ...string) *ClusterStateService
Index is a list of index names. Use _all or an empty string to perform the operation on all indices.
func (*ClusterStateService) Local ¶
func (s *ClusterStateService) Local(local bool) *ClusterStateService
Local indicates whether to return local information. When set, it does not retrieve the state from master node (default: false).
func (*ClusterStateService) MasterTimeout ¶
func (s *ClusterStateService) MasterTimeout(masterTimeout string) *ClusterStateService
MasterTimeout specifies timeout for connection to master.
func (*ClusterStateService) Metric ¶
func (s *ClusterStateService) Metric(metrics ...string) *ClusterStateService
Metric limits the information returned to the specified metric. It can be one of: version, master_node, nodes, routing_table, metadata, blocks, or customs.
func (*ClusterStateService) Pretty ¶
func (s *ClusterStateService) Pretty(pretty bool) *ClusterStateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClusterStateService) Validate ¶
func (s *ClusterStateService) Validate() error
Validate checks if the operation is valid.
type ClusterStatsIndices ¶
type ClusterStatsIndices struct { Count int `json:"count"` // number of indices Shards *ClusterStatsIndicesShards `json:"shards"` Docs *ClusterStatsIndicesDocs `json:"docs"` Store *ClusterStatsIndicesStore `json:"store"` FieldData *ClusterStatsIndicesFieldData `json:"fielddata"` QueryCache *ClusterStatsIndicesQueryCache `json:"query_cache"` Completion *ClusterStatsIndicesCompletion `json:"completion"` Segments *ClusterStatsIndicesSegments `json:"segments"` }
type ClusterStatsIndicesDocs ¶
type ClusterStatsIndicesFieldData ¶
type ClusterStatsIndicesFieldData struct { MemorySize string `json:"memory_size"` // e.g. "61.3kb" MemorySizeInBytes int64 `json:"memory_size_in_bytes"` Evictions int64 `json:"evictions"` Fields map[string]struct { MemorySize string `json:"memory_size"` // e.g. "61.3kb" MemorySizeInBytes int64 `json:"memory_size_in_bytes"` } `json:"fields,omitempty"` }
type ClusterStatsIndicesQueryCache ¶
type ClusterStatsIndicesQueryCache struct { MemorySize string `json:"memory_size"` // e.g. "61.3kb" MemorySizeInBytes int64 `json:"memory_size_in_bytes"` TotalCount int64 `json:"total_count"` HitCount int64 `json:"hit_count"` MissCount int64 `json:"miss_count"` CacheSize int64 `json:"cache_size"` CacheCount int64 `json:"cache_count"` Evictions int64 `json:"evictions"` }
type ClusterStatsIndicesSegments ¶
type ClusterStatsIndicesSegments struct { Count int64 `json:"count"` Memory string `json:"memory"` // e.g. "61.3kb" MemoryInBytes int64 `json:"memory_in_bytes"` TermsMemory string `json:"terms_memory"` // e.g. "61.3kb" TermsMemoryInBytes int64 `json:"terms_memory_in_bytes"` StoredFieldsMemory string `json:"stored_fields_memory"` // e.g. "61.3kb" StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"` NormsMemory string `json:"norms_memory"` // e.g. "61.3kb" NormsMemoryInBytes int64 `json:"norms_memory_in_bytes"` PointsMemory string `json:"points_memory"` // e.g. "61.3kb" PointsMemoryInBytes int64 `json:"points_memory_in_bytes"` DocValuesMemory string `json:"doc_values_memory"` // e.g. "61.3kb" DocValuesMemoryInBytes int64 `json:"doc_values_memory_in_bytes"` IndexWriterMemory string `json:"index_writer_memory"` // e.g. "61.3kb" IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"` VersionMapMemory string `json:"version_map_memory"` // e.g. "61.3kb" VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"` FixedBitSet string `json:"fixed_bit_set"` // e.g. "61.3kb" FixedBitSetInBytes int64 `json:"fixed_bit_set_memory_in_bytes"` FileSizes map[string]*ClusterStatsIndicesSegmentsFile `json:"file_sizes"` }
type ClusterStatsIndicesShards ¶
type ClusterStatsIndicesShards struct { Total int `json:"total"` Primaries int `json:"primaries"` Replication float64 `json:"replication"` Index *ClusterStatsIndicesShardsIndex `json:"index"` }
type ClusterStatsIndicesShardsIndex ¶
type ClusterStatsIndicesShardsIndex struct { Shards *ClusterStatsIndicesShardsIndexIntMinMax `json:"shards"` Primaries *ClusterStatsIndicesShardsIndexIntMinMax `json:"primaries"` Replication *ClusterStatsIndicesShardsIndexFloat64MinMax `json:"replication"` }
type ClusterStatsNodes ¶
type ClusterStatsNodes struct { Count *ClusterStatsNodesCount `json:"count"` Versions []string `json:"versions"` OS *ClusterStatsNodesOsStats `json:"os"` Process *ClusterStatsNodesProcessStats `json:"process"` JVM *ClusterStatsNodesJvmStats `json:"jvm"` FS *ClusterStatsNodesFsStats `json:"fs"` Plugins []*ClusterStatsNodesPlugin `json:"plugins"` }
type ClusterStatsNodesCount ¶
type ClusterStatsNodesFsStats ¶
type ClusterStatsNodesFsStats struct { Path string `json:"path"` Mount string `json:"mount"` Dev string `json:"dev"` Total string `json:"total"` // e.g. "930.7gb"` TotalInBytes int64 `json:"total_in_bytes"` Free string `json:"free"` // e.g. "930.7gb"` FreeInBytes int64 `json:"free_in_bytes"` Available string `json:"available"` // e.g. "930.7gb"` AvailableInBytes int64 `json:"available_in_bytes"` DiskReads int64 `json:"disk_reads"` DiskWrites int64 `json:"disk_writes"` DiskIOOp int64 `json:"disk_io_op"` DiskReadSize string `json:"disk_read_size"` // e.g. "0b"` DiskReadSizeInBytes int64 `json:"disk_read_size_in_bytes"` DiskWriteSize string `json:"disk_write_size"` // e.g. "0b"` DiskWriteSizeInBytes int64 `json:"disk_write_size_in_bytes"` DiskIOSize string `json:"disk_io_size"` // e.g. "0b"` DiskIOSizeInBytes int64 `json:"disk_io_size_in_bytes"` DiskQueue string `json:"disk_queue"` DiskServiceTime string `json:"disk_service_time"` }
type ClusterStatsNodesJvmStats ¶
type ClusterStatsNodesJvmStats struct { MaxUptime string `json:"max_uptime"` // e.g. "5h" MaxUptimeInMillis int64 `json:"max_uptime_in_millis"` Versions []*ClusterStatsNodesJvmStatsVersion `json:"versions"` Mem *ClusterStatsNodesJvmStatsMem `json:"mem"` Threads int64 `json:"threads"` }
type ClusterStatsNodesJvmStatsVersion ¶
type ClusterStatsNodesJvmStatsVersion struct { Version string `json:"version"` // e.g. "1.8.0_45" VMName string `json:"vm_name"` // e.g. "Java HotSpot(TM) 64-Bit Server VM" VMVersion string `json:"vm_version"` // e.g. "25.45-b02" VMVendor string `json:"vm_vendor"` // e.g. "Oracle Corporation" Count int `json:"count"` }
type ClusterStatsNodesOsStats ¶
type ClusterStatsNodesOsStats struct { AvailableProcessors int `json:"available_processors"` Mem *ClusterStatsNodesOsStatsMem `json:"mem"` CPU []*ClusterStatsNodesOsStatsCPU `json:"cpu"` }
type ClusterStatsNodesOsStatsCPU ¶
type ClusterStatsNodesOsStatsCPU struct { Vendor string `json:"vendor"` Model string `json:"model"` MHz int `json:"mhz"` TotalCores int `json:"total_cores"` TotalSockets int `json:"total_sockets"` CoresPerSocket int `json:"cores_per_socket"` CacheSize string `json:"cache_size"` // e.g. "256b" CacheSizeInBytes int64 `json:"cache_size_in_bytes"` Count int `json:"count"` }
type ClusterStatsNodesPlugin ¶
type ClusterStatsNodesProcessStats ¶
type ClusterStatsNodesProcessStats struct { CPU *ClusterStatsNodesProcessStatsCPU `json:"cpu"` OpenFileDescriptors *ClusterStatsNodesProcessStatsOpenFileDescriptors `json:"open_file_descriptors"` }
type ClusterStatsNodesProcessStatsCPU ¶
type ClusterStatsNodesProcessStatsCPU struct {
Percent float64 `json:"percent"`
}
type ClusterStatsResponse ¶
type ClusterStatsResponse struct { Timestamp int64 `json:"timestamp"` ClusterName string `json:"cluster_name"` ClusterUUID string `json:"cluster_uuid"` Status string `json:"status,omitempty"` // e.g. green Indices *ClusterStatsIndices `json:"indices"` Nodes *ClusterStatsNodes `json:"nodes"` }
ClusterStatsResponse is the response of ClusterStatsService.Do.
type ClusterStatsService ¶
type ClusterStatsService struct {
// contains filtered or unexported fields
}
ClusterStatsService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-stats.html.
func NewClusterStatsService ¶
func NewClusterStatsService(client *Client) *ClusterStatsService
NewClusterStatsService creates a new ClusterStatsService.
func (*ClusterStatsService) Do ¶
func (s *ClusterStatsService) Do(ctx context.Context) (*ClusterStatsResponse, error)
Do executes the operation.
func (*ClusterStatsService) ErrorTrace ¶
func (s *ClusterStatsService) ErrorTrace(errorTrace bool) *ClusterStatsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ClusterStatsService) FilterPath ¶
func (s *ClusterStatsService) FilterPath(filterPath ...string) *ClusterStatsService
FilterPath specifies a list of filters used to reduce the response.
func (*ClusterStatsService) FlatSettings ¶
func (s *ClusterStatsService) FlatSettings(flatSettings bool) *ClusterStatsService
FlatSettings is documented as: Return settings in flat format (default: false).
func (*ClusterStatsService) Header ¶
func (s *ClusterStatsService) Header(name string, value string) *ClusterStatsService
Header adds a header to the request.
func (*ClusterStatsService) Headers ¶
func (s *ClusterStatsService) Headers(headers http.Header) *ClusterStatsService
Headers specifies the headers of the request.
func (*ClusterStatsService) Human ¶
func (s *ClusterStatsService) Human(human bool) *ClusterStatsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ClusterStatsService) NodeId ¶
func (s *ClusterStatsService) NodeId(nodeId []string) *ClusterStatsService
NodeId is documented as: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
func (*ClusterStatsService) Pretty ¶
func (s *ClusterStatsService) Pretty(pretty bool) *ClusterStatsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ClusterStatsService) Validate ¶
func (s *ClusterStatsService) Validate() error
Validate checks if the operation is valid.
type CollapseBuilder ¶
type CollapseBuilder struct {
// contains filtered or unexported fields
}
CollapseBuilder enables field collapsing on a search request. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-collapse.html for details.
func NewCollapseBuilder ¶
func NewCollapseBuilder(field string) *CollapseBuilder
NewCollapseBuilder creates a new CollapseBuilder.
func (*CollapseBuilder) Field ¶
func (b *CollapseBuilder) Field(field string) *CollapseBuilder
Field to collapse.
func (*CollapseBuilder) InnerHit ¶
func (b *CollapseBuilder) InnerHit(innerHit *InnerHit) *CollapseBuilder
InnerHit option to expand the collapsed results.
func (*CollapseBuilder) MaxConcurrentGroupRequests ¶
func (b *CollapseBuilder) MaxConcurrentGroupRequests(max int) *CollapseBuilder
MaxConcurrentGroupRequests is the maximum number of group requests that are allowed to be ran concurrently in the inner_hits phase.
func (*CollapseBuilder) Source ¶
func (b *CollapseBuilder) Source() (interface{}, error)
Source generates the JSON serializable fragment for the CollapseBuilder.
type CollectorResult ¶
type CollectorResult struct { Name string `json:"name,omitempty"` Reason string `json:"reason,omitempty"` Time string `json:"time,omitempty"` TimeNanos int64 `json:"time_in_nanos,omitempty"` Children []CollectorResult `json:"children,omitempty"` }
CollectorResult holds the profile timings of the collectors used in the search. Children's CollectorResults may be embedded inside of a parent CollectorResult.
type CommonTermsQuery ¶
type CommonTermsQuery struct { Query // contains filtered or unexported fields }
CommonTermsQuery is a modern alternative to stopwords which improves the precision and recall of search results (by taking stopwords into account), without sacrificing performance. For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-common-terms-query.html
func NewCommonTermsQuery ¶
func NewCommonTermsQuery(name string, text interface{}) *CommonTermsQuery
NewCommonTermsQuery creates and initializes a new common terms query.
func (*CommonTermsQuery) Analyzer ¶
func (q *CommonTermsQuery) Analyzer(analyzer string) *CommonTermsQuery
func (*CommonTermsQuery) Boost ¶
func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery
func (*CommonTermsQuery) CutoffFrequency ¶
func (q *CommonTermsQuery) CutoffFrequency(f float64) *CommonTermsQuery
func (*CommonTermsQuery) HighFreq ¶
func (q *CommonTermsQuery) HighFreq(f float64) *CommonTermsQuery
func (*CommonTermsQuery) HighFreqMinimumShouldMatch ¶
func (q *CommonTermsQuery) HighFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
func (*CommonTermsQuery) HighFreqOperator ¶
func (q *CommonTermsQuery) HighFreqOperator(op string) *CommonTermsQuery
func (*CommonTermsQuery) LowFreq ¶
func (q *CommonTermsQuery) LowFreq(f float64) *CommonTermsQuery
func (*CommonTermsQuery) LowFreqMinimumShouldMatch ¶
func (q *CommonTermsQuery) LowFreqMinimumShouldMatch(minShouldMatch string) *CommonTermsQuery
func (*CommonTermsQuery) LowFreqOperator ¶
func (q *CommonTermsQuery) LowFreqOperator(op string) *CommonTermsQuery
func (*CommonTermsQuery) QueryName ¶
func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery
func (*CommonTermsQuery) Source ¶
func (q *CommonTermsQuery) Source() (interface{}, error)
Creates the query source for the common query.
type CompletionSuggester ¶
type CompletionSuggester struct { Suggester // contains filtered or unexported fields }
CompletionSuggester is a fast suggester for e.g. type-ahead completion.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-completion.html for more details.
func NewCompletionSuggester ¶
func NewCompletionSuggester(name string) *CompletionSuggester
Creates a new completion suggester.
func (*CompletionSuggester) Analyzer ¶
func (q *CompletionSuggester) Analyzer(analyzer string) *CompletionSuggester
func (*CompletionSuggester) ContextQueries ¶
func (q *CompletionSuggester) ContextQueries(queries ...SuggesterContextQuery) *CompletionSuggester
func (*CompletionSuggester) ContextQuery ¶
func (q *CompletionSuggester) ContextQuery(query SuggesterContextQuery) *CompletionSuggester
func (*CompletionSuggester) Field ¶
func (q *CompletionSuggester) Field(field string) *CompletionSuggester
func (*CompletionSuggester) Fuzziness ¶
func (q *CompletionSuggester) Fuzziness(fuzziness interface{}) *CompletionSuggester
func (*CompletionSuggester) FuzzyOptions ¶
func (q *CompletionSuggester) FuzzyOptions(options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) Name ¶
func (q *CompletionSuggester) Name() string
func (*CompletionSuggester) Prefix ¶
func (q *CompletionSuggester) Prefix(prefix string) *CompletionSuggester
func (*CompletionSuggester) PrefixWithEditDistance ¶
func (q *CompletionSuggester) PrefixWithEditDistance(prefix string, editDistance interface{}) *CompletionSuggester
func (*CompletionSuggester) PrefixWithOptions ¶
func (q *CompletionSuggester) PrefixWithOptions(prefix string, options *FuzzyCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) Regex ¶
func (q *CompletionSuggester) Regex(regex string) *CompletionSuggester
func (*CompletionSuggester) RegexOptions ¶
func (q *CompletionSuggester) RegexOptions(options *RegexCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) RegexWithOptions ¶
func (q *CompletionSuggester) RegexWithOptions(regex string, options *RegexCompletionSuggesterOptions) *CompletionSuggester
func (*CompletionSuggester) ShardSize ¶
func (q *CompletionSuggester) ShardSize(shardSize int) *CompletionSuggester
func (*CompletionSuggester) Size ¶
func (q *CompletionSuggester) Size(size int) *CompletionSuggester
func (*CompletionSuggester) SkipDuplicates ¶
func (q *CompletionSuggester) SkipDuplicates(skipDuplicates bool) *CompletionSuggester
func (*CompletionSuggester) Source ¶
func (q *CompletionSuggester) Source(includeName bool) (interface{}, error)
Source creates the JSON data for the completion suggester.
func (*CompletionSuggester) Text ¶
func (q *CompletionSuggester) Text(text string) *CompletionSuggester
type CompositeAggregation ¶
type CompositeAggregation struct {
// contains filtered or unexported fields
}
CompositeAggregation is a multi-bucket values source based aggregation that can be used to calculate unique composite values from source documents.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html for details.
func NewCompositeAggregation ¶
func NewCompositeAggregation() *CompositeAggregation
NewCompositeAggregation creates a new CompositeAggregation.
func (*CompositeAggregation) AggregateAfter ¶
func (a *CompositeAggregation) AggregateAfter(after map[string]interface{}) *CompositeAggregation
AggregateAfter sets the values that indicate which composite bucket this request should "aggregate after".
func (*CompositeAggregation) Meta ¶
func (a *CompositeAggregation) Meta(metaData map[string]interface{}) *CompositeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CompositeAggregation) Size ¶
func (a *CompositeAggregation) Size(size int) *CompositeAggregation
Size represents the number of composite buckets to return. Defaults to 10 as of Elasticsearch 6.1.
func (*CompositeAggregation) Source ¶
func (a *CompositeAggregation) Source() (interface{}, error)
Source returns the serializable JSON for this aggregation.
func (*CompositeAggregation) Sources ¶
func (a *CompositeAggregation) Sources(sources ...CompositeAggregationValuesSource) *CompositeAggregation
Sources specifies the list of CompositeAggregationValuesSource instances to use in the aggregation.
func (*CompositeAggregation) SubAggregation ¶
func (a *CompositeAggregation) SubAggregation(name string, subAggregation Aggregation) *CompositeAggregation
SubAggregations of this aggregation.
type CompositeAggregationDateHistogramValuesSource ¶
type CompositeAggregationDateHistogramValuesSource struct {
// contains filtered or unexported fields
}
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.
func NewCompositeAggregationDateHistogramValuesSource ¶
func NewCompositeAggregationDateHistogramValuesSource(name string, interval interface{}) *CompositeAggregationDateHistogramValuesSource
NewCompositeAggregationDateHistogramValuesSource creates and initializes a new CompositeAggregationDateHistogramValuesSource.
func (*CompositeAggregationDateHistogramValuesSource) Asc ¶
func (a *CompositeAggregationDateHistogramValuesSource) Asc() *CompositeAggregationDateHistogramValuesSource
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationDateHistogramValuesSource) Desc ¶
func (a *CompositeAggregationDateHistogramValuesSource) Desc() *CompositeAggregationDateHistogramValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationDateHistogramValuesSource) Field ¶
func (a *CompositeAggregationDateHistogramValuesSource) Field(field string) *CompositeAggregationDateHistogramValuesSource
Field to use for this source.
func (*CompositeAggregationDateHistogramValuesSource) Format ¶
func (a *CompositeAggregationDateHistogramValuesSource) Format(format string) *CompositeAggregationDateHistogramValuesSource
Format to use for the date histogram, e.g. "strict_date_optional_time"
func (*CompositeAggregationDateHistogramValuesSource) Interval ¶
func (a *CompositeAggregationDateHistogramValuesSource) Interval(interval interface{}) *CompositeAggregationDateHistogramValuesSource
Interval to use for the date histogram, e.g. "1d" or a numeric value like "60".
func (*CompositeAggregationDateHistogramValuesSource) Missing
deprecated
func (a *CompositeAggregationDateHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationDateHistogramValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationDateHistogramValuesSource) MissingBucket ¶
func (a *CompositeAggregationDateHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationDateHistogramValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationDateHistogramValuesSource) Order ¶
func (a *CompositeAggregationDateHistogramValuesSource) Order(order string) *CompositeAggregationDateHistogramValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationDateHistogramValuesSource) Script ¶
func (a *CompositeAggregationDateHistogramValuesSource) Script(script *Script) *CompositeAggregationDateHistogramValuesSource
Script to use for this source.
func (*CompositeAggregationDateHistogramValuesSource) Source ¶
func (a *CompositeAggregationDateHistogramValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationDateHistogramValuesSource) TimeZone ¶
func (a *CompositeAggregationDateHistogramValuesSource) TimeZone(timeZone string) *CompositeAggregationDateHistogramValuesSource
TimeZone to use for the dates.
func (*CompositeAggregationDateHistogramValuesSource) ValueType ¶
func (a *CompositeAggregationDateHistogramValuesSource) ValueType(valueType string) *CompositeAggregationDateHistogramValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationHistogramValuesSource ¶
type CompositeAggregationHistogramValuesSource struct {
// contains filtered or unexported fields
}
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.
func NewCompositeAggregationHistogramValuesSource ¶
func NewCompositeAggregationHistogramValuesSource(name string, interval float64) *CompositeAggregationHistogramValuesSource
NewCompositeAggregationHistogramValuesSource creates and initializes a new CompositeAggregationHistogramValuesSource.
func (*CompositeAggregationHistogramValuesSource) Asc ¶
func (a *CompositeAggregationHistogramValuesSource) Asc() *CompositeAggregationHistogramValuesSource
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationHistogramValuesSource) Desc ¶
func (a *CompositeAggregationHistogramValuesSource) Desc() *CompositeAggregationHistogramValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationHistogramValuesSource) Field ¶
func (a *CompositeAggregationHistogramValuesSource) Field(field string) *CompositeAggregationHistogramValuesSource
Field to use for this source.
func (*CompositeAggregationHistogramValuesSource) Interval ¶
func (a *CompositeAggregationHistogramValuesSource) Interval(interval float64) *CompositeAggregationHistogramValuesSource
Interval specifies the interval to use.
func (*CompositeAggregationHistogramValuesSource) Missing
deprecated
func (a *CompositeAggregationHistogramValuesSource) Missing(missing interface{}) *CompositeAggregationHistogramValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationHistogramValuesSource) MissingBucket ¶
func (a *CompositeAggregationHistogramValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationHistogramValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationHistogramValuesSource) Order ¶
func (a *CompositeAggregationHistogramValuesSource) Order(order string) *CompositeAggregationHistogramValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationHistogramValuesSource) Script ¶
func (a *CompositeAggregationHistogramValuesSource) Script(script *Script) *CompositeAggregationHistogramValuesSource
Script to use for this source.
func (*CompositeAggregationHistogramValuesSource) Source ¶
func (a *CompositeAggregationHistogramValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationHistogramValuesSource) ValueType ¶
func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationTermsValuesSource ¶
type CompositeAggregationTermsValuesSource struct {
// contains filtered or unexported fields
}
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.
func NewCompositeAggregationTermsValuesSource ¶
func NewCompositeAggregationTermsValuesSource(name string) *CompositeAggregationTermsValuesSource
NewCompositeAggregationTermsValuesSource creates and initializes a new CompositeAggregationTermsValuesSource.
func (*CompositeAggregationTermsValuesSource) Asc ¶
Asc ensures the order of the values produced is ascending.
func (*CompositeAggregationTermsValuesSource) Desc ¶
func (a *CompositeAggregationTermsValuesSource) Desc() *CompositeAggregationTermsValuesSource
Desc ensures the order of the values produced is descending.
func (*CompositeAggregationTermsValuesSource) Field ¶
func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource
Field to use for this source.
func (*CompositeAggregationTermsValuesSource) Missing
deprecated
func (a *CompositeAggregationTermsValuesSource) Missing(missing interface{}) *CompositeAggregationTermsValuesSource
Missing specifies the value to use when the source finds a missing value in a document.
Deprecated: Use MissingBucket instead.
func (*CompositeAggregationTermsValuesSource) MissingBucket ¶
func (a *CompositeAggregationTermsValuesSource) MissingBucket(missingBucket bool) *CompositeAggregationTermsValuesSource
MissingBucket, if true, will create an explicit null bucket which represents documents with missing values.
func (*CompositeAggregationTermsValuesSource) Order ¶
func (a *CompositeAggregationTermsValuesSource) Order(order string) *CompositeAggregationTermsValuesSource
Order specifies the order in the values produced by this source. It can be either "asc" or "desc".
func (*CompositeAggregationTermsValuesSource) Script ¶
func (a *CompositeAggregationTermsValuesSource) Script(script *Script) *CompositeAggregationTermsValuesSource
Script to use for this source.
func (*CompositeAggregationTermsValuesSource) Source ¶
func (a *CompositeAggregationTermsValuesSource) Source() (interface{}, error)
Source returns the serializable JSON for this values source.
func (*CompositeAggregationTermsValuesSource) ValueType ¶
func (a *CompositeAggregationTermsValuesSource) ValueType(valueType string) *CompositeAggregationTermsValuesSource
ValueType specifies the type of values produced by this source, e.g. "string" or "date".
type CompositeAggregationValuesSource ¶
type CompositeAggregationValuesSource interface {
Source() (interface{}, error)
}
CompositeAggregationValuesSource specifies the interface that all implementations for CompositeAggregation's Sources method need to implement.
The different implementations are described in https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html#_values_source_2.
type ConstantBackoff ¶
type ConstantBackoff struct {
// contains filtered or unexported fields
}
ConstantBackoff is a backoff policy that always returns the same delay.
func NewConstantBackoff ¶
func NewConstantBackoff(interval time.Duration) *ConstantBackoff
NewConstantBackoff returns a new ConstantBackoff.
type ConstantScoreQuery ¶
type ConstantScoreQuery struct {
// contains filtered or unexported fields
}
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.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-constant-score-query.html
func NewConstantScoreQuery ¶
func NewConstantScoreQuery(filter Query) *ConstantScoreQuery
ConstantScoreQuery creates and initializes a new constant score query.
func (*ConstantScoreQuery) Boost ¶
func (q *ConstantScoreQuery) Boost(boost float64) *ConstantScoreQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*ConstantScoreQuery) Source ¶
func (q *ConstantScoreQuery) Source() (interface{}, error)
Source returns the query source.
type ContextSuggester ¶
type ContextSuggester struct { Suggester // contains filtered or unexported fields }
ContextSuggester is a fast suggester for e.g. type-ahead completion that supports filtering and boosting based on contexts. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/suggester-context.html for more details.
func NewContextSuggester ¶
func NewContextSuggester(name string) *ContextSuggester
Creates a new context suggester.
func (*ContextSuggester) ContextQueries ¶
func (q *ContextSuggester) ContextQueries(queries ...SuggesterContextQuery) *ContextSuggester
func (*ContextSuggester) ContextQuery ¶
func (q *ContextSuggester) ContextQuery(query SuggesterContextQuery) *ContextSuggester
func (*ContextSuggester) Field ¶
func (q *ContextSuggester) Field(field string) *ContextSuggester
func (*ContextSuggester) Name ¶
func (q *ContextSuggester) Name() string
func (*ContextSuggester) Prefix ¶
func (q *ContextSuggester) Prefix(prefix string) *ContextSuggester
func (*ContextSuggester) Size ¶
func (q *ContextSuggester) Size(size int) *ContextSuggester
func (*ContextSuggester) Source ¶
func (q *ContextSuggester) Source(includeName bool) (interface{}, error)
Creates the source for the context suggester.
type CountResponse ¶
type CountResponse struct { Count int64 `json:"count"` TerminatedEarly bool `json:"terminated_early,omitempty"` Shards *ShardsInfo `json:"_shards,omitempty"` }
CountResponse is the response of using the Count API.
type CountService ¶
type CountService struct {
// contains filtered or unexported fields
}
CountService is a convenient service for determining the number of documents in an index. Use SearchService with a SearchType of count for counting with queries etc.
func NewCountService ¶
func NewCountService(client *Client) *CountService
NewCountService creates a new CountService.
func (*CountService) AllowNoIndices ¶
func (s *CountService) AllowNoIndices(allowNoIndices bool) *CountService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes "_all" string or when no indices have been specified).
func (*CountService) AnalyzeWildcard ¶
func (s *CountService) AnalyzeWildcard(analyzeWildcard bool) *CountService
AnalyzeWildcard specifies whether wildcard and prefix queries should be analyzed (default: false).
func (*CountService) Analyzer ¶
func (s *CountService) Analyzer(analyzer string) *CountService
Analyzer specifies the analyzer to use for the query string.
func (*CountService) BodyJson ¶
func (s *CountService) BodyJson(body interface{}) *CountService
BodyJson specifies the query to restrict the results specified with the Query DSL (optional). The interface{} will be serialized to a JSON document, so use a map[string]interface{}.
func (*CountService) BodyString ¶
func (s *CountService) BodyString(body string) *CountService
Body specifies a query to restrict the results specified with the Query DSL (optional).
func (*CountService) DefaultOperator ¶
func (s *CountService) DefaultOperator(defaultOperator string) *CountService
DefaultOperator specifies the default operator for query string query (AND or OR).
func (*CountService) Df ¶
func (s *CountService) Df(df string) *CountService
Df specifies the field to use as default where no field prefix is given in the query string.
func (*CountService) Do ¶
func (s *CountService) Do(ctx context.Context) (int64, error)
Do executes the operation.
func (*CountService) ErrorTrace ¶
func (s *CountService) ErrorTrace(errorTrace bool) *CountService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*CountService) ExpandWildcards ¶
func (s *CountService) ExpandWildcards(expandWildcards string) *CountService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*CountService) FilterPath ¶
func (s *CountService) FilterPath(filterPath ...string) *CountService
FilterPath specifies a list of filters used to reduce the response.
func (*CountService) Header ¶
func (s *CountService) Header(name string, value string) *CountService
Header adds a header to the request.
func (*CountService) Headers ¶
func (s *CountService) Headers(headers http.Header) *CountService
Headers specifies the headers of the request.
func (*CountService) Human ¶
func (s *CountService) Human(human bool) *CountService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*CountService) IgnoreUnavailable ¶
func (s *CountService) IgnoreUnavailable(ignoreUnavailable bool) *CountService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*CountService) Index ¶
func (s *CountService) Index(index ...string) *CountService
Index sets the names of the indices to restrict the results.
func (*CountService) Lenient ¶
func (s *CountService) Lenient(lenient bool) *CountService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*CountService) LowercaseExpandedTerms ¶
func (s *CountService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *CountService
LowercaseExpandedTerms specifies whether query terms should be lowercased.
func (*CountService) MinScore ¶
func (s *CountService) MinScore(minScore interface{}) *CountService
MinScore indicates to include only documents with a specific `_score` value in the result.
func (*CountService) Preference ¶
func (s *CountService) Preference(preference string) *CountService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*CountService) Pretty ¶
func (s *CountService) Pretty(pretty bool) *CountService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*CountService) Q ¶
func (s *CountService) Q(q string) *CountService
Q in the Lucene query string syntax. You can also use Query to pass a Query struct.
func (*CountService) Query ¶
func (s *CountService) Query(query Query) *CountService
Query specifies the query to pass. You can also pass a query string with Q.
func (*CountService) Routing ¶
func (s *CountService) Routing(routing string) *CountService
Routing specifies the routing value.
func (*CountService) TerminateAfter ¶
func (s *CountService) TerminateAfter(terminateAfter int) *CountService
TerminateAfter indicates the maximum count for each shard, upon reaching which the query execution will terminate early.
func (*CountService) Type ¶
func (s *CountService) Type(typ ...string) *CountService
Type sets the types to use to restrict the results.
func (*CountService) Validate ¶
func (s *CountService) Validate() error
Validate checks if the operation is valid.
type CumulativeSumAggregation ¶
type CumulativeSumAggregation struct {
// contains filtered or unexported fields
}
CumulativeSumAggregation is a parent pipeline aggregation which calculates the cumulative sum of a specified metric in a parent histogram (or date_histogram) aggregation. The specified metric must be numeric and the enclosing histogram must have min_doc_count set to 0 (default for histogram aggregations).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-cumulative-sum-aggregation.html
func NewCumulativeSumAggregation ¶
func NewCumulativeSumAggregation() *CumulativeSumAggregation
NewCumulativeSumAggregation creates and initializes a new CumulativeSumAggregation.
func (*CumulativeSumAggregation) BucketsPath ¶
func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *CumulativeSumAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*CumulativeSumAggregation) Format ¶
func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation
Format to use on the output of this aggregation.
func (*CumulativeSumAggregation) Meta ¶
func (a *CumulativeSumAggregation) Meta(metaData map[string]interface{}) *CumulativeSumAggregation
Meta sets the meta data to be included in the aggregation response.
func (*CumulativeSumAggregation) Source ¶
func (a *CumulativeSumAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type DateHistogramAggregation ¶
type DateHistogramAggregation struct {
// contains filtered or unexported fields
}
DateHistogramAggregation is a multi-bucket aggregation similar to the histogram except it can only be applied on date values. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-datehistogram-aggregation.html
func NewDateHistogramAggregation ¶
func NewDateHistogramAggregation() *DateHistogramAggregation
NewDateHistogramAggregation creates a new DateHistogramAggregation.
func (*DateHistogramAggregation) ExtendedBounds ¶
func (a *DateHistogramAggregation) ExtendedBounds(min, max interface{}) *DateHistogramAggregation
ExtendedBounds accepts int, int64, string, or time.Time values. In case the lower value in the histogram would be greater than min or the upper value would be less than max, empty buckets will be generated.
func (*DateHistogramAggregation) ExtendedBoundsMax ¶
func (a *DateHistogramAggregation) ExtendedBoundsMax(max interface{}) *DateHistogramAggregation
ExtendedBoundsMax accepts int, int64, string, or time.Time values.
func (*DateHistogramAggregation) ExtendedBoundsMin ¶
func (a *DateHistogramAggregation) ExtendedBoundsMin(min interface{}) *DateHistogramAggregation
ExtendedBoundsMin accepts int, int64, string, or time.Time values.
func (*DateHistogramAggregation) Field ¶
func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation
Field on which the aggregation is processed.
func (*DateHistogramAggregation) Format ¶
func (a *DateHistogramAggregation) Format(format string) *DateHistogramAggregation
Format sets the format to use for dates.
func (*DateHistogramAggregation) Interval ¶
func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregation
Interval by which the aggregation gets processed. Allowed values are: "year", "quarter", "month", "week", "day", "hour", "minute". It also supports time settings like "1.5h" (up to "w" for weeks).
func (*DateHistogramAggregation) Keyed ¶
func (a *DateHistogramAggregation) Keyed(keyed bool) *DateHistogramAggregation
Keyed specifies whether to return the results with a keyed response (or not).
func (*DateHistogramAggregation) Meta ¶
func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DateHistogramAggregation) MinDocCount ¶
func (a *DateHistogramAggregation) MinDocCount(minDocCount int64) *DateHistogramAggregation
MinDocCount sets the minimum document count per bucket. Buckets with less documents than this min value will not be returned.
func (*DateHistogramAggregation) Missing ¶
func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation
Missing configures the value to use when documents miss a value.
func (*DateHistogramAggregation) Offset ¶
func (a *DateHistogramAggregation) Offset(offset string) *DateHistogramAggregation
Offset sets the offset of time intervals in the histogram, e.g. "+6h".
func (*DateHistogramAggregation) Order ¶
func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation
Order specifies the sort order. Valid values for order are: "_key", "_count", a sub-aggregation name, or a sub-aggregation name with a metric.
func (*DateHistogramAggregation) OrderByAggregation ¶
func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*DateHistogramAggregation) OrderByAggregationAndMetric ¶
func (a *DateHistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *DateHistogramAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*DateHistogramAggregation) OrderByCount ¶
func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByCountAsc ¶
func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByCountDesc ¶
func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKey ¶
func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKeyAsc ¶
func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation
func (*DateHistogramAggregation) OrderByKeyDesc ¶
func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation
func (*DateHistogramAggregation) Script ¶
func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation
func (*DateHistogramAggregation) Source ¶
func (a *DateHistogramAggregation) Source() (interface{}, error)
func (*DateHistogramAggregation) SubAggregation ¶
func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation
func (*DateHistogramAggregation) TimeZone ¶
func (a *DateHistogramAggregation) TimeZone(timeZone string) *DateHistogramAggregation
TimeZone sets the timezone in which to translate dates before computing buckets.
type DateRangeAggregation ¶
type DateRangeAggregation struct {
// contains filtered or unexported fields
}
DateRangeAggregation is a range aggregation that is dedicated for date values. The main difference between this aggregation and the normal range aggregation is that the from and to values can be expressed in Date Math expressions, and it is also possible to specify a date format by which the from and to response fields will be returned. Note that this aggregration includes the from value and excludes the to value for each range. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-daterange-aggregation.html
func NewDateRangeAggregation ¶
func NewDateRangeAggregation() *DateRangeAggregation
func (*DateRangeAggregation) AddRange ¶
func (a *DateRangeAggregation) AddRange(from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddRangeWithKey ¶
func (a *DateRangeAggregation) AddRangeWithKey(key string, from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedFrom ¶
func (a *DateRangeAggregation) AddUnboundedFrom(to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedFromWithKey ¶
func (a *DateRangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedTo ¶
func (a *DateRangeAggregation) AddUnboundedTo(from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) AddUnboundedToWithKey ¶
func (a *DateRangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Between ¶
func (a *DateRangeAggregation) Between(from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) BetweenWithKey ¶
func (a *DateRangeAggregation) BetweenWithKey(key string, from, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Field ¶
func (a *DateRangeAggregation) Field(field string) *DateRangeAggregation
func (*DateRangeAggregation) Format ¶
func (a *DateRangeAggregation) Format(format string) *DateRangeAggregation
func (*DateRangeAggregation) Gt ¶
func (a *DateRangeAggregation) Gt(from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) GtWithKey ¶
func (a *DateRangeAggregation) GtWithKey(key string, from interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Keyed ¶
func (a *DateRangeAggregation) Keyed(keyed bool) *DateRangeAggregation
func (*DateRangeAggregation) Lt ¶
func (a *DateRangeAggregation) Lt(to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) LtWithKey ¶
func (a *DateRangeAggregation) LtWithKey(key string, to interface{}) *DateRangeAggregation
func (*DateRangeAggregation) Meta ¶
func (a *DateRangeAggregation) Meta(metaData map[string]interface{}) *DateRangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DateRangeAggregation) Script ¶
func (a *DateRangeAggregation) Script(script *Script) *DateRangeAggregation
func (*DateRangeAggregation) Source ¶
func (a *DateRangeAggregation) Source() (interface{}, error)
func (*DateRangeAggregation) SubAggregation ¶
func (a *DateRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *DateRangeAggregation
func (*DateRangeAggregation) TimeZone ¶
func (a *DateRangeAggregation) TimeZone(timeZone string) *DateRangeAggregation
func (*DateRangeAggregation) Unmapped ¶
func (a *DateRangeAggregation) Unmapped(unmapped bool) *DateRangeAggregation
type DateRangeAggregationEntry ¶
type DateRangeAggregationEntry struct { Key string From interface{} To interface{} }
type Decoder ¶
Decoder is used to decode responses from Elasticsearch. Users of elastic can implement their own marshaler for advanced purposes and set them per Client (see SetDecoder). If none is specified, DefaultDecoder is used.
type DefaultDecoder ¶
type DefaultDecoder struct{}
DefaultDecoder uses json.Unmarshal from the Go standard library to decode JSON data.
func (*DefaultDecoder) Decode ¶
func (u *DefaultDecoder) Decode(data []byte, v interface{}) error
Decode decodes with json.Unmarshal from the Go standard library.
type DeleteByQueryService ¶
type DeleteByQueryService struct {
// contains filtered or unexported fields
}
DeleteByQueryService deletes documents that match a query. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-delete-by-query.html.
func NewDeleteByQueryService ¶
func NewDeleteByQueryService(client *Client) *DeleteByQueryService
NewDeleteByQueryService creates a new DeleteByQueryService. You typically use the client's DeleteByQuery to get a reference to the service.
func (*DeleteByQueryService) AbortOnVersionConflict ¶
func (s *DeleteByQueryService) AbortOnVersionConflict() *DeleteByQueryService
AbortOnVersionConflict aborts the request on version conflicts. It is an alias to setting Conflicts("abort").
func (*DeleteByQueryService) AllowNoIndices ¶
func (s *DeleteByQueryService) AllowNoIndices(allow bool) *DeleteByQueryService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices (including the _all string or when no indices have been specified).
func (*DeleteByQueryService) AnalyzeWildcard ¶
func (s *DeleteByQueryService) AnalyzeWildcard(analyzeWildcard bool) *DeleteByQueryService
AnalyzeWildcard specifies whether wildcard and prefix queries should be analyzed (default: false).
func (*DeleteByQueryService) Analyzer ¶
func (s *DeleteByQueryService) Analyzer(analyzer string) *DeleteByQueryService
Analyzer to use for the query string.
func (*DeleteByQueryService) Body ¶
func (s *DeleteByQueryService) Body(body string) *DeleteByQueryService
Body specifies the body of the request. It overrides data being specified via SearchService.
func (*DeleteByQueryService) Conflicts ¶
func (s *DeleteByQueryService) Conflicts(conflicts string) *DeleteByQueryService
Conflicts indicates what to do when the process detects version conflicts. Possible values are "proceed" and "abort".
func (*DeleteByQueryService) DF ¶
func (s *DeleteByQueryService) DF(defaultField string) *DeleteByQueryService
DF is the field to use as default where no field prefix is given in the query string.
func (*DeleteByQueryService) DefaultField ¶
func (s *DeleteByQueryService) DefaultField(defaultField string) *DeleteByQueryService
DefaultField is the field to use as default where no field prefix is given in the query string. It is an alias to the DF func.
func (*DeleteByQueryService) DefaultOperator ¶
func (s *DeleteByQueryService) DefaultOperator(defaultOperator string) *DeleteByQueryService
DefaultOperator for query string query (AND or OR).
func (*DeleteByQueryService) Do ¶
func (s *DeleteByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
Do executes the delete-by-query operation.
func (*DeleteByQueryService) DoAsync ¶
func (s *DeleteByQueryService) DoAsync(ctx context.Context) (*StartTaskResult, error)
DoAsync executes the delete-by-query operation asynchronously by starting a new task. Callers need to use the Task Management API to watch the outcome of the reindexing operation.
func (*DeleteByQueryService) DocvalueFields ¶
func (s *DeleteByQueryService) DocvalueFields(docvalueFields ...string) *DeleteByQueryService
DocvalueFields specifies the list of fields to return as the docvalue representation of a field for each hit.
func (*DeleteByQueryService) ErrorTrace ¶
func (s *DeleteByQueryService) ErrorTrace(errorTrace bool) *DeleteByQueryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*DeleteByQueryService) ExpandWildcards ¶
func (s *DeleteByQueryService) ExpandWildcards(expand string) *DeleteByQueryService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both. It can be "open" or "closed".
func (*DeleteByQueryService) Explain ¶
func (s *DeleteByQueryService) Explain(explain bool) *DeleteByQueryService
Explain specifies whether to return detailed information about score computation as part of a hit.
func (*DeleteByQueryService) FilterPath ¶
func (s *DeleteByQueryService) FilterPath(filterPath ...string) *DeleteByQueryService
FilterPath specifies a list of filters used to reduce the response.
func (*DeleteByQueryService) From ¶
func (s *DeleteByQueryService) From(from int) *DeleteByQueryService
From is the starting offset (default: 0).
func (*DeleteByQueryService) Header ¶
func (s *DeleteByQueryService) Header(name string, value string) *DeleteByQueryService
Header adds a header to the request.
func (*DeleteByQueryService) Headers ¶
func (s *DeleteByQueryService) Headers(headers http.Header) *DeleteByQueryService
Headers specifies the headers of the request.
func (*DeleteByQueryService) Human ¶
func (s *DeleteByQueryService) Human(human bool) *DeleteByQueryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*DeleteByQueryService) IgnoreUnavailable ¶
func (s *DeleteByQueryService) IgnoreUnavailable(ignore bool) *DeleteByQueryService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*DeleteByQueryService) Index ¶
func (s *DeleteByQueryService) Index(index ...string) *DeleteByQueryService
Index sets the indices on which to perform the delete operation.
func (*DeleteByQueryService) Lenient ¶
func (s *DeleteByQueryService) Lenient(lenient bool) *DeleteByQueryService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*DeleteByQueryService) LowercaseExpandedTerms ¶
func (s *DeleteByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *DeleteByQueryService
LowercaseExpandedTerms specifies whether query terms should be lowercased.
func (*DeleteByQueryService) Preference ¶
func (s *DeleteByQueryService) Preference(preference string) *DeleteByQueryService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*DeleteByQueryService) Pretty ¶
func (s *DeleteByQueryService) Pretty(pretty bool) *DeleteByQueryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*DeleteByQueryService) ProceedOnVersionConflict ¶
func (s *DeleteByQueryService) ProceedOnVersionConflict() *DeleteByQueryService
ProceedOnVersionConflict aborts the request on version conflicts. It is an alias to setting Conflicts("proceed").
func (*DeleteByQueryService) Q ¶
func (s *DeleteByQueryService) Q(query string) *DeleteByQueryService
Q specifies the query in Lucene query string syntax. You can also use Query to programmatically specify the query.
func (*DeleteByQueryService) Query ¶
func (s *DeleteByQueryService) Query(query Query) *DeleteByQueryService
Query sets the query programmatically.
func (*DeleteByQueryService) QueryString ¶
func (s *DeleteByQueryService) QueryString(query string) *DeleteByQueryService
QueryString is an alias to Q. Notice that you can also use Query to programmatically set the query.
func (*DeleteByQueryService) Refresh ¶
func (s *DeleteByQueryService) Refresh(refresh string) *DeleteByQueryService
Refresh indicates whether the effected indexes should be refreshed.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*DeleteByQueryService) RequestCache ¶
func (s *DeleteByQueryService) RequestCache(requestCache bool) *DeleteByQueryService
RequestCache specifies if request cache should be used for this request or not, defaults to index level setting.
func (*DeleteByQueryService) RequestsPerSecond ¶
func (s *DeleteByQueryService) RequestsPerSecond(requestsPerSecond int) *DeleteByQueryService
RequestsPerSecond sets the throttle on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
func (*DeleteByQueryService) Routing ¶
func (s *DeleteByQueryService) Routing(routing ...string) *DeleteByQueryService
Routing is a list of specific routing values.
func (*DeleteByQueryService) Scroll ¶
func (s *DeleteByQueryService) Scroll(scroll string) *DeleteByQueryService
Scroll specifies how long a consistent view of the index should be maintained for scrolled search.
func (*DeleteByQueryService) ScrollSize ¶
func (s *DeleteByQueryService) ScrollSize(scrollSize int) *DeleteByQueryService
ScrollSize is the size on the scroll request powering the update_by_query.
func (*DeleteByQueryService) SearchTimeout ¶
func (s *DeleteByQueryService) SearchTimeout(searchTimeout string) *DeleteByQueryService
SearchTimeout defines an explicit timeout for each search request. Defaults to no timeout.
func (*DeleteByQueryService) SearchType ¶
func (s *DeleteByQueryService) SearchType(searchType string) *DeleteByQueryService
SearchType is the search operation type. Possible values are "query_then_fetch" and "dfs_query_then_fetch".
func (*DeleteByQueryService) Size ¶
func (s *DeleteByQueryService) Size(size int) *DeleteByQueryService
Size represents the number of hits to return (default: 10).
func (*DeleteByQueryService) Slices ¶
func (s *DeleteByQueryService) Slices(slices interface{}) *DeleteByQueryService
Slices represents the number of slices (default: 1). It used to be a number, but can be set to "auto" as of 6.7.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-delete-by-query.html#docs-delete-by-query-automatic-slice for details.
func (*DeleteByQueryService) Sort ¶
func (s *DeleteByQueryService) Sort(sort ...string) *DeleteByQueryService
Sort is a list of <field>:<direction> pairs.
func (*DeleteByQueryService) SortByField ¶
func (s *DeleteByQueryService) SortByField(field string, ascending bool) *DeleteByQueryService
SortByField adds a sort order.
func (*DeleteByQueryService) Stats ¶
func (s *DeleteByQueryService) Stats(stats ...string) *DeleteByQueryService
Stats specifies specific tag(s) of the request for logging and statistical purposes.
func (*DeleteByQueryService) StoredFields ¶
func (s *DeleteByQueryService) StoredFields(storedFields ...string) *DeleteByQueryService
StoredFields specifies the list of stored fields to return as part of a hit.
func (*DeleteByQueryService) SuggestField ¶
func (s *DeleteByQueryService) SuggestField(suggestField string) *DeleteByQueryService
SuggestField specifies which field to use for suggestions.
func (*DeleteByQueryService) SuggestMode ¶
func (s *DeleteByQueryService) SuggestMode(suggestMode string) *DeleteByQueryService
SuggestMode specifies the suggest mode. Possible values are "missing", "popular", and "always".
func (*DeleteByQueryService) SuggestSize ¶
func (s *DeleteByQueryService) SuggestSize(suggestSize int) *DeleteByQueryService
SuggestSize specifies how many suggestions to return in response.
func (*DeleteByQueryService) SuggestText ¶
func (s *DeleteByQueryService) SuggestText(suggestText string) *DeleteByQueryService
SuggestText specifies the source text for which the suggestions should be returned.
func (*DeleteByQueryService) TerminateAfter ¶
func (s *DeleteByQueryService) TerminateAfter(terminateAfter int) *DeleteByQueryService
TerminateAfter indicates the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*DeleteByQueryService) Timeout ¶
func (s *DeleteByQueryService) Timeout(timeout string) *DeleteByQueryService
Timeout is the time each individual bulk request should wait for shards that are unavailable.
func (*DeleteByQueryService) TimeoutInMillis ¶
func (s *DeleteByQueryService) TimeoutInMillis(timeoutInMillis int) *DeleteByQueryService
TimeoutInMillis sets the timeout in milliseconds.
func (*DeleteByQueryService) TrackScores ¶
func (s *DeleteByQueryService) TrackScores(trackScores bool) *DeleteByQueryService
TrackScores indicates whether to calculate and return scores even if they are not used for sorting.
func (*DeleteByQueryService) Type ¶
func (s *DeleteByQueryService) Type(typ ...string) *DeleteByQueryService
Type limits the delete operation to the given types.
func (*DeleteByQueryService) Validate ¶
func (s *DeleteByQueryService) Validate() error
Validate checks if the operation is valid.
func (*DeleteByQueryService) Version ¶
func (s *DeleteByQueryService) Version(version bool) *DeleteByQueryService
Version specifies whether to return document version as part of a hit.
func (*DeleteByQueryService) WaitForActiveShards ¶
func (s *DeleteByQueryService) WaitForActiveShards(waitForActiveShards string) *DeleteByQueryService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
func (*DeleteByQueryService) WaitForCompletion ¶
func (s *DeleteByQueryService) WaitForCompletion(waitForCompletion bool) *DeleteByQueryService
WaitForCompletion indicates if the request should block until the reindex is complete.
func (*DeleteByQueryService) XSource ¶
func (s *DeleteByQueryService) XSource(xSource ...string) *DeleteByQueryService
XSource is true or false to return the _source field or not, or a list of fields to return.
func (*DeleteByQueryService) XSourceExclude ¶
func (s *DeleteByQueryService) XSourceExclude(xSourceExclude ...string) *DeleteByQueryService
XSourceExclude represents a list of fields to exclude from the returned _source field.
func (*DeleteByQueryService) XSourceInclude ¶
func (s *DeleteByQueryService) XSourceInclude(xSourceInclude ...string) *DeleteByQueryService
XSourceInclude represents a list of fields to extract and return from the _source field.
type DeleteResponse ¶
type DeleteResponse struct { Index string `json:"_index,omitempty"` Type string `json:"_type,omitempty"` Id string `json:"_id,omitempty"` Version int64 `json:"_version,omitempty"` Result string `json:"result,omitempty"` Shards *ShardsInfo `json:"_shards,omitempty"` SeqNo int64 `json:"_seq_no,omitempty"` PrimaryTerm int64 `json:"_primary_term,omitempty"` Status int `json:"status,omitempty"` ForcedRefresh bool `json:"forced_refresh,omitempty"` }
DeleteResponse is the outcome of running DeleteService.Do.
type DeleteScriptResponse ¶
type DeleteScriptResponse struct {
AcknowledgedResponse
}
DeleteScriptResponse is the result of deleting a stored script in Elasticsearch.
type DeleteScriptService ¶
type DeleteScriptService struct {
// contains filtered or unexported fields
}
DeleteScriptService removes a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details.
func NewDeleteScriptService ¶
func NewDeleteScriptService(client *Client) *DeleteScriptService
NewDeleteScriptService creates a new DeleteScriptService.
func (*DeleteScriptService) Do ¶
func (s *DeleteScriptService) Do(ctx context.Context) (*DeleteScriptResponse, error)
Do executes the operation.
func (*DeleteScriptService) ErrorTrace ¶
func (s *DeleteScriptService) ErrorTrace(errorTrace bool) *DeleteScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*DeleteScriptService) FilterPath ¶
func (s *DeleteScriptService) FilterPath(filterPath ...string) *DeleteScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*DeleteScriptService) Header ¶
func (s *DeleteScriptService) Header(name string, value string) *DeleteScriptService
Header adds a header to the request.
func (*DeleteScriptService) Headers ¶
func (s *DeleteScriptService) Headers(headers http.Header) *DeleteScriptService
Headers specifies the headers of the request.
func (*DeleteScriptService) Human ¶
func (s *DeleteScriptService) Human(human bool) *DeleteScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*DeleteScriptService) Id ¶
func (s *DeleteScriptService) Id(id string) *DeleteScriptService
Id is the script ID.
func (*DeleteScriptService) MasterTimeout ¶
func (s *DeleteScriptService) MasterTimeout(masterTimeout string) *DeleteScriptService
MasterTimeout is the timeout for connecting to master.
func (*DeleteScriptService) Pretty ¶
func (s *DeleteScriptService) Pretty(pretty bool) *DeleteScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*DeleteScriptService) Timeout ¶
func (s *DeleteScriptService) Timeout(timeout string) *DeleteScriptService
Timeout is an explicit operation timeout.
func (*DeleteScriptService) Validate ¶
func (s *DeleteScriptService) Validate() error
Validate checks if the operation is valid.
type DeleteService ¶
type DeleteService struct {
// contains filtered or unexported fields
}
DeleteService allows to delete a typed JSON document from a specified index based on its id.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-delete.html for details.
func NewDeleteService ¶
func NewDeleteService(client *Client) *DeleteService
NewDeleteService creates a new DeleteService.
func (*DeleteService) Do ¶
func (s *DeleteService) Do(ctx context.Context) (*DeleteResponse, error)
Do executes the operation. If the document is not found (404), Elasticsearch will still return a response. This response is serialized and returned as well. In other words, for HTTP status code 404, both an error and a response might be returned.
func (*DeleteService) ErrorTrace ¶
func (s *DeleteService) ErrorTrace(errorTrace bool) *DeleteService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*DeleteService) FilterPath ¶
func (s *DeleteService) FilterPath(filterPath ...string) *DeleteService
FilterPath specifies a list of filters used to reduce the response.
func (*DeleteService) Header ¶
func (s *DeleteService) Header(name string, value string) *DeleteService
Header adds a header to the request.
func (*DeleteService) Headers ¶
func (s *DeleteService) Headers(headers http.Header) *DeleteService
Headers specifies the headers of the request.
func (*DeleteService) Human ¶
func (s *DeleteService) Human(human bool) *DeleteService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*DeleteService) Id ¶
func (s *DeleteService) Id(id string) *DeleteService
Id is the document ID.
func (*DeleteService) IfPrimaryTerm ¶
func (s *DeleteService) IfPrimaryTerm(primaryTerm int64) *DeleteService
IfPrimaryTerm indicates to only perform the delete operation if the last operation that has changed the document has the specified primary term.
func (*DeleteService) IfSeqNo ¶
func (s *DeleteService) IfSeqNo(seqNo int64) *DeleteService
IfSeqNo indicates to only perform the delete operation if the last operation that has changed the document has the specified sequence number.
func (*DeleteService) Index ¶
func (s *DeleteService) Index(index string) *DeleteService
Index is the name of the index.
func (*DeleteService) Parent ¶
func (s *DeleteService) Parent(parent string) *DeleteService
Parent is the ID of parent document.
func (*DeleteService) Pretty ¶
func (s *DeleteService) Pretty(pretty bool) *DeleteService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*DeleteService) Refresh ¶
func (s *DeleteService) Refresh(refresh string) *DeleteService
Refresh the index after performing the operation.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*DeleteService) Routing ¶
func (s *DeleteService) Routing(routing string) *DeleteService
Routing is a specific routing value.
func (*DeleteService) Timeout ¶
func (s *DeleteService) Timeout(timeout string) *DeleteService
Timeout is an explicit operation timeout.
func (*DeleteService) Type ¶
func (s *DeleteService) Type(typ string) *DeleteService
Type is the type of the document.
func (*DeleteService) Validate ¶
func (s *DeleteService) Validate() error
Validate checks if the operation is valid.
func (*DeleteService) Version ¶
func (s *DeleteService) Version(version interface{}) *DeleteService
Version is an explicit version number for concurrency control.
func (*DeleteService) VersionType ¶
func (s *DeleteService) VersionType(versionType string) *DeleteService
VersionType is a specific version type.
func (*DeleteService) WaitForActiveShards ¶
func (s *DeleteService) WaitForActiveShards(waitForActiveShards string) *DeleteService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
type DerivativeAggregation ¶
type DerivativeAggregation struct {
// contains filtered or unexported fields
}
DerivativeAggregation is a parent pipeline aggregation which calculates the derivative of a specified metric in a parent histogram (or date_histogram) aggregation. The specified metric must be numeric and the enclosing histogram must have min_doc_count set to 0 (default for histogram aggregations).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-derivative-aggregation.html
func NewDerivativeAggregation ¶
func NewDerivativeAggregation() *DerivativeAggregation
NewDerivativeAggregation creates and initializes a new DerivativeAggregation.
func (*DerivativeAggregation) BucketsPath ¶
func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*DerivativeAggregation) Format ¶
func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation
Format to use on the output of this aggregation.
func (*DerivativeAggregation) GapInsertZeros ¶
func (a *DerivativeAggregation) GapInsertZeros() *DerivativeAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*DerivativeAggregation) GapPolicy ¶
func (a *DerivativeAggregation) GapPolicy(gapPolicy string) *DerivativeAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*DerivativeAggregation) GapSkip ¶
func (a *DerivativeAggregation) GapSkip() *DerivativeAggregation
GapSkip skips gaps in the series.
func (*DerivativeAggregation) Meta ¶
func (a *DerivativeAggregation) Meta(metaData map[string]interface{}) *DerivativeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DerivativeAggregation) Source ¶
func (a *DerivativeAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*DerivativeAggregation) Unit ¶
func (a *DerivativeAggregation) Unit(unit string) *DerivativeAggregation
Unit sets the unit provided, e.g. "1d" or "1y". It is only useful when calculating the derivative using a date_histogram.
type DirectCandidateGenerator ¶
type DirectCandidateGenerator struct {
// contains filtered or unexported fields
}
DirectCandidateGenerator implements a direct candidate generator. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewDirectCandidateGenerator ¶
func NewDirectCandidateGenerator(field string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Accuracy ¶
func (g *DirectCandidateGenerator) Accuracy(accuracy float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Field ¶
func (g *DirectCandidateGenerator) Field(field string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxEdits ¶
func (g *DirectCandidateGenerator) MaxEdits(maxEdits int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxInspections ¶
func (g *DirectCandidateGenerator) MaxInspections(maxInspections int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MaxTermFreq ¶
func (g *DirectCandidateGenerator) MaxTermFreq(maxTermFreq float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MinDocFreq ¶
func (g *DirectCandidateGenerator) MinDocFreq(minDocFreq float64) *DirectCandidateGenerator
func (*DirectCandidateGenerator) MinWordLength ¶
func (g *DirectCandidateGenerator) MinWordLength(minWordLength int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PostFilter ¶
func (g *DirectCandidateGenerator) PostFilter(postFilter string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PreFilter ¶
func (g *DirectCandidateGenerator) PreFilter(preFilter string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) PrefixLength ¶
func (g *DirectCandidateGenerator) PrefixLength(prefixLength int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Size ¶
func (g *DirectCandidateGenerator) Size(size int) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Sort ¶
func (g *DirectCandidateGenerator) Sort(sort string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Source ¶
func (g *DirectCandidateGenerator) Source() (interface{}, error)
func (*DirectCandidateGenerator) StringDistance ¶
func (g *DirectCandidateGenerator) StringDistance(stringDistance string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) SuggestMode ¶
func (g *DirectCandidateGenerator) SuggestMode(suggestMode string) *DirectCandidateGenerator
func (*DirectCandidateGenerator) Type ¶
func (g *DirectCandidateGenerator) Type() string
type DisMaxQuery ¶
type DisMaxQuery struct {
// contains filtered or unexported fields
}
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.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-dis-max-query.html
func NewDisMaxQuery ¶
func NewDisMaxQuery() *DisMaxQuery
NewDisMaxQuery creates and initializes a new dis max query.
func (*DisMaxQuery) Boost ¶
func (q *DisMaxQuery) Boost(boost float64) *DisMaxQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*DisMaxQuery) Query ¶
func (q *DisMaxQuery) Query(queries ...Query) *DisMaxQuery
Query adds one or more queries to the dis max query.
func (*DisMaxQuery) QueryName ¶
func (q *DisMaxQuery) QueryName(queryName string) *DisMaxQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*DisMaxQuery) Source ¶
func (q *DisMaxQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
func (*DisMaxQuery) TieBreaker ¶
func (q *DisMaxQuery) TieBreaker(tieBreaker float64) *DisMaxQuery
TieBreaker is the factor by which the score of each non-maximum disjunct for a document is multiplied with and added into the final score.
If non-zero, the value should be small, on the order of 0.1, which says that 10 occurrences of word in a lower-scored field that is also in a higher scored field is just as good as a unique word in the lower scored field (i.e., one that is not in any higher scored field).
type DiscoveryNode ¶
type DiscoveryNode struct { Name string `json:"name"` TransportAddress string `json:"transport_address"` Host string `json:"host"` IP string `json:"ip"` Roles []string `json:"roles"` // "master", "data", or "ingest" Attributes map[string]interface{} `json:"attributes"` // Tasks returns the tasks by its id (as a string). Tasks map[string]*TaskInfo `json:"tasks"` }
type DiversifiedSamplerAggregation ¶
type DiversifiedSamplerAggregation struct {
// contains filtered or unexported fields
}
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. The diversified_sampler aggregation adds the ability to limit the number of matches that share a common value such as an "author".
func NewDiversifiedSamplerAggregation ¶
func NewDiversifiedSamplerAggregation() *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) ExecutionHint ¶
func (a *DiversifiedSamplerAggregation) ExecutionHint(hint string) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) Field ¶
func (a *DiversifiedSamplerAggregation) Field(field string) *DiversifiedSamplerAggregation
Field on which the aggregation is processed.
func (*DiversifiedSamplerAggregation) MaxDocsPerValue ¶
func (a *DiversifiedSamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) Meta ¶
func (a *DiversifiedSamplerAggregation) Meta(metaData map[string]interface{}) *DiversifiedSamplerAggregation
Meta sets the meta data to be included in the aggregation response.
func (*DiversifiedSamplerAggregation) Script ¶
func (a *DiversifiedSamplerAggregation) Script(script *Script) *DiversifiedSamplerAggregation
func (*DiversifiedSamplerAggregation) ShardSize ¶
func (a *DiversifiedSamplerAggregation) ShardSize(shardSize int) *DiversifiedSamplerAggregation
ShardSize sets the maximum number of docs returned from each shard.
func (*DiversifiedSamplerAggregation) Source ¶
func (a *DiversifiedSamplerAggregation) Source() (interface{}, error)
func (*DiversifiedSamplerAggregation) SubAggregation ¶
func (a *DiversifiedSamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *DiversifiedSamplerAggregation
type DocvalueField ¶
DocvalueField represents a docvalue field, its name and its format (optional).
func (DocvalueField) Source ¶
func (d DocvalueField) Source() (interface{}, error)
Source serializes the DocvalueField into JSON.
type DocvalueFields ¶
type DocvalueFields []DocvalueField
DocvalueFields is a slice of DocvalueField instances.
func (DocvalueFields) Source ¶
func (d DocvalueFields) Source() (interface{}, error)
Source serializes the DocvalueFields into JSON.
type DumpConfig ¶
DumpConfig config is dump request or response
type EWMAMovAvgModel ¶
type EWMAMovAvgModel struct {
// contains filtered or unexported fields
}
EWMAMovAvgModel calculates an exponentially weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html#_ewma_exponentially_weighted
func NewEWMAMovAvgModel ¶
func NewEWMAMovAvgModel() *EWMAMovAvgModel
NewEWMAMovAvgModel creates and initializes a new EWMAMovAvgModel.
func (*EWMAMovAvgModel) Alpha ¶
func (m *EWMAMovAvgModel) Alpha(alpha float64) *EWMAMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*EWMAMovAvgModel) Settings ¶
func (m *EWMAMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type Error ¶
type Error struct { Status int `json:"status"` Details *ErrorDetails `json:"error,omitempty"` }
Error encapsulates error details as returned from Elasticsearch.
type ErrorDetails ¶
type ErrorDetails struct { Type string `json:"type"` Reason string `json:"reason"` ResourceType string `json:"resource.type,omitempty"` ResourceId string `json:"resource.id,omitempty"` Index string `json:"index,omitempty"` Phase string `json:"phase,omitempty"` Grouped bool `json:"grouped,omitempty"` CausedBy map[string]interface{} `json:"caused_by,omitempty"` RootCause []*ErrorDetails `json:"root_cause,omitempty"` FailedShards []map[string]interface{} `json:"failed_shards,omitempty"` }
ErrorDetails encapsulate error details from Elasticsearch. It is used in e.g. elastic.Error and elastic.BulkResponseItem.
type ExistsQuery ¶
type ExistsQuery struct {
// contains filtered or unexported fields
}
ExistsQuery is a query that only matches on documents that the field has a value in them.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-exists-query.html
func NewExistsQuery ¶
func NewExistsQuery(name string) *ExistsQuery
NewExistsQuery creates and initializes a new exists query.
func (*ExistsQuery) QueryName ¶
func (q *ExistsQuery) QueryName(queryName string) *ExistsQuery
QueryName sets the query name for the filter that can be used when searching for matched queries per hit.
func (*ExistsQuery) Source ¶
func (q *ExistsQuery) Source() (interface{}, error)
Source returns the JSON serializable content for this query.
type ExistsService ¶
type ExistsService struct {
// contains filtered or unexported fields
}
ExistsService checks for the existence of a document using HEAD.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-get.html for details.
func NewExistsService ¶
func NewExistsService(client *Client) *ExistsService
NewExistsService creates a new ExistsService.
func (*ExistsService) Do ¶
func (s *ExistsService) Do(ctx context.Context) (bool, error)
Do executes the operation.
func (*ExistsService) ErrorTrace ¶
func (s *ExistsService) ErrorTrace(errorTrace bool) *ExistsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ExistsService) FilterPath ¶
func (s *ExistsService) FilterPath(filterPath ...string) *ExistsService
FilterPath specifies a list of filters used to reduce the response.
func (*ExistsService) Header ¶
func (s *ExistsService) Header(name string, value string) *ExistsService
Header adds a header to the request.
func (*ExistsService) Headers ¶
func (s *ExistsService) Headers(headers http.Header) *ExistsService
Headers specifies the headers of the request.
func (*ExistsService) Human ¶
func (s *ExistsService) Human(human bool) *ExistsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ExistsService) Id ¶
func (s *ExistsService) Id(id string) *ExistsService
Id is the document ID.
func (*ExistsService) Index ¶
func (s *ExistsService) Index(index string) *ExistsService
Index is the name of the index.
func (*ExistsService) Parent ¶
func (s *ExistsService) Parent(parent string) *ExistsService
Parent is the ID of the parent document.
func (*ExistsService) Preference ¶
func (s *ExistsService) Preference(preference string) *ExistsService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*ExistsService) Pretty ¶
func (s *ExistsService) Pretty(pretty bool) *ExistsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ExistsService) Realtime ¶
func (s *ExistsService) Realtime(realtime bool) *ExistsService
Realtime specifies whether to perform the operation in realtime or search mode.
func (*ExistsService) Refresh ¶
func (s *ExistsService) Refresh(refresh string) *ExistsService
Refresh the shard containing the document before performing the operation.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*ExistsService) Routing ¶
func (s *ExistsService) Routing(routing string) *ExistsService
Routing is a specific routing value.
func (*ExistsService) Type ¶
func (s *ExistsService) Type(typ string) *ExistsService
Type is the type of the document (use `_all` to fetch the first document matching the ID across all types).
func (*ExistsService) Validate ¶
func (s *ExistsService) Validate() error
Validate checks if the operation is valid.
type ExplainResponse ¶
type ExplainResponse struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Matched bool `json:"matched"` Explanation map[string]interface{} `json:"explanation"` }
ExplainResponse is the response of ExplainService.Do.
type ExplainService ¶
type ExplainService struct {
// contains filtered or unexported fields
}
ExplainService computes a score explanation for a query and a specific document. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-explain.html.
func NewExplainService ¶
func NewExplainService(client *Client) *ExplainService
NewExplainService creates a new ExplainService.
func (*ExplainService) AnalyzeWildcard ¶
func (s *ExplainService) AnalyzeWildcard(analyzeWildcard bool) *ExplainService
AnalyzeWildcard specifies whether wildcards and prefix queries in the query string query should be analyzed (default: false).
func (*ExplainService) Analyzer ¶
func (s *ExplainService) Analyzer(analyzer string) *ExplainService
Analyzer is the analyzer for the query string query.
func (*ExplainService) BodyJson ¶
func (s *ExplainService) BodyJson(body interface{}) *ExplainService
BodyJson sets the query definition using the Query DSL.
func (*ExplainService) BodyString ¶
func (s *ExplainService) BodyString(body string) *ExplainService
BodyString sets the query definition using the Query DSL as a string.
func (*ExplainService) DefaultOperator ¶
func (s *ExplainService) DefaultOperator(defaultOperator string) *ExplainService
DefaultOperator is the default operator for query string query (AND or OR).
func (*ExplainService) Df ¶
func (s *ExplainService) Df(df string) *ExplainService
Df is the default field for query string query (default: _all).
func (*ExplainService) Do ¶
func (s *ExplainService) Do(ctx context.Context) (*ExplainResponse, error)
Do executes the operation.
func (*ExplainService) ErrorTrace ¶
func (s *ExplainService) ErrorTrace(errorTrace bool) *ExplainService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ExplainService) Fields ¶
func (s *ExplainService) Fields(fields ...string) *ExplainService
Fields is a list of fields to return in the response.
func (*ExplainService) FilterPath ¶
func (s *ExplainService) FilterPath(filterPath ...string) *ExplainService
FilterPath specifies a list of filters used to reduce the response.
func (*ExplainService) Header ¶
func (s *ExplainService) Header(name string, value string) *ExplainService
Header adds a header to the request.
func (*ExplainService) Headers ¶
func (s *ExplainService) Headers(headers http.Header) *ExplainService
Headers specifies the headers of the request.
func (*ExplainService) Human ¶
func (s *ExplainService) Human(human bool) *ExplainService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ExplainService) Id ¶
func (s *ExplainService) Id(id string) *ExplainService
Id is the document ID.
func (*ExplainService) Index ¶
func (s *ExplainService) Index(index string) *ExplainService
Index is the name of the index.
func (*ExplainService) Lenient ¶
func (s *ExplainService) Lenient(lenient bool) *ExplainService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*ExplainService) LowercaseExpandedTerms ¶
func (s *ExplainService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *ExplainService
LowercaseExpandedTerms specifies whether query terms should be lowercased.
func (*ExplainService) Parent ¶
func (s *ExplainService) Parent(parent string) *ExplainService
Parent is the ID of the parent document.
func (*ExplainService) Preference ¶
func (s *ExplainService) Preference(preference string) *ExplainService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*ExplainService) Pretty ¶
func (s *ExplainService) Pretty(pretty bool) *ExplainService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ExplainService) Q ¶
func (s *ExplainService) Q(q string) *ExplainService
Query in the Lucene query string syntax.
func (*ExplainService) Query ¶
func (s *ExplainService) Query(query Query) *ExplainService
Query sets a query definition using the Query DSL.
func (*ExplainService) Routing ¶
func (s *ExplainService) Routing(routing string) *ExplainService
Routing sets a specific routing value.
func (*ExplainService) Source ¶
func (s *ExplainService) Source(source string) *ExplainService
Source is the URL-encoded query definition (instead of using the request body).
func (*ExplainService) Type ¶
func (s *ExplainService) Type(typ string) *ExplainService
Type is the type of the document.
func (*ExplainService) Validate ¶
func (s *ExplainService) Validate() error
Validate checks if the operation is valid.
func (*ExplainService) XSource ¶
func (s *ExplainService) XSource(xSource ...string) *ExplainService
XSource is true or false to return the _source field or not, or a list of fields to return.
func (*ExplainService) XSourceExclude ¶
func (s *ExplainService) XSourceExclude(xSourceExclude ...string) *ExplainService
XSourceExclude is a list of fields to exclude from the returned _source field.
func (*ExplainService) XSourceInclude ¶
func (s *ExplainService) XSourceInclude(xSourceInclude ...string) *ExplainService
XSourceInclude is a list of fields to extract and return from the _source field.
type ExponentialBackoff ¶
type ExponentialBackoff struct {
// contains filtered or unexported fields
}
ExponentialBackoff implements the simple exponential backoff described by Douglas Thain at http://dthain.blogspot.de/2009/02/exponential-backoff-in-distributed.html.
func NewExponentialBackoff ¶
func NewExponentialBackoff(initialTimeout, maxTimeout time.Duration) *ExponentialBackoff
NewExponentialBackoff returns a ExponentialBackoff backoff policy. Use initialTimeout to set the first/minimal interval and maxTimeout to set the maximum wait interval.
type ExponentialDecayFunction ¶
type ExponentialDecayFunction struct {
// contains filtered or unexported fields
}
ExponentialDecayFunction builds an exponential decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html for details.
func NewExponentialDecayFunction ¶
func NewExponentialDecayFunction() *ExponentialDecayFunction
NewExponentialDecayFunction creates a new ExponentialDecayFunction.
func (*ExponentialDecayFunction) Decay ¶
func (fn *ExponentialDecayFunction) Decay(decay float64) *ExponentialDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*ExponentialDecayFunction) FieldName ¶
func (fn *ExponentialDecayFunction) FieldName(fieldName string) *ExponentialDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*ExponentialDecayFunction) GetWeight ¶
func (fn *ExponentialDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*ExponentialDecayFunction) MultiValueMode ¶
func (fn *ExponentialDecayFunction) MultiValueMode(mode string) *ExponentialDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*ExponentialDecayFunction) Name ¶
func (fn *ExponentialDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*ExponentialDecayFunction) Offset ¶
func (fn *ExponentialDecayFunction) Offset(offset interface{}) *ExponentialDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*ExponentialDecayFunction) Origin ¶
func (fn *ExponentialDecayFunction) Origin(origin interface{}) *ExponentialDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*ExponentialDecayFunction) Scale ¶
func (fn *ExponentialDecayFunction) Scale(scale interface{}) *ExponentialDecayFunction
Scale defines the scale to be used with Decay.
func (*ExponentialDecayFunction) Source ¶
func (fn *ExponentialDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*ExponentialDecayFunction) Weight ¶
func (fn *ExponentialDecayFunction) Weight(weight float64) *ExponentialDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type ExtendedStatsAggregation ¶
type ExtendedStatsAggregation struct {
// contains filtered or unexported fields
}
ExtendedExtendedStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-extendedstats-aggregation.html
func NewExtendedStatsAggregation ¶
func NewExtendedStatsAggregation() *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Field ¶
func (a *ExtendedStatsAggregation) Field(field string) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Format ¶
func (a *ExtendedStatsAggregation) Format(format string) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Meta ¶
func (a *ExtendedStatsAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ExtendedStatsAggregation) Missing ¶
func (a *ExtendedStatsAggregation) Missing(missing interface{}) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Script ¶
func (a *ExtendedStatsAggregation) Script(script *Script) *ExtendedStatsAggregation
func (*ExtendedStatsAggregation) Source ¶
func (a *ExtendedStatsAggregation) Source() (interface{}, error)
func (*ExtendedStatsAggregation) SubAggregation ¶
func (a *ExtendedStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *ExtendedStatsAggregation
type ExtendedStatsBucketAggregation ¶
type ExtendedStatsBucketAggregation struct {
// contains filtered or unexported fields
}
ExtendedStatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
This aggregation provides a few more statistics (sum of squares, standard deviation, etc) compared to the stats_bucket aggregation. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-extended-stats-bucket-aggregation.html
func NewExtendedStatsBucketAggregation ¶
func NewExtendedStatsBucketAggregation() *ExtendedStatsBucketAggregation
NewExtendedStatsBucketAggregation creates and initializes a new ExtendedStatsBucketAggregation.
func (*ExtendedStatsBucketAggregation) BucketsPath ¶
func (s *ExtendedStatsBucketAggregation) BucketsPath(bucketsPaths ...string) *ExtendedStatsBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*ExtendedStatsBucketAggregation) Format ¶
func (s *ExtendedStatsBucketAggregation) Format(format string) *ExtendedStatsBucketAggregation
Format to use on the output of this aggregation.
func (*ExtendedStatsBucketAggregation) GapInsertZeros ¶
func (s *ExtendedStatsBucketAggregation) GapInsertZeros() *ExtendedStatsBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*ExtendedStatsBucketAggregation) GapPolicy ¶
func (s *ExtendedStatsBucketAggregation) GapPolicy(gapPolicy string) *ExtendedStatsBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*ExtendedStatsBucketAggregation) GapSkip ¶
func (s *ExtendedStatsBucketAggregation) GapSkip() *ExtendedStatsBucketAggregation
GapSkip skips gaps in the series.
func (*ExtendedStatsBucketAggregation) Meta ¶
func (s *ExtendedStatsBucketAggregation) Meta(metaData map[string]interface{}) *ExtendedStatsBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ExtendedStatsBucketAggregation) Sigma ¶
func (s *ExtendedStatsBucketAggregation) Sigma(sigma float32) *ExtendedStatsBucketAggregation
Sigma sets number of standard deviations above/below the mean to display
func (*ExtendedStatsBucketAggregation) Source ¶
func (s *ExtendedStatsBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type FailedNodeException ¶
type FailedNodeException struct { *ErrorDetails NodeId string `json:"node_id"` }
type FetchSourceContext ¶
type FetchSourceContext struct {
// contains filtered or unexported fields
}
FetchSourceContext enables source filtering, i.e. it allows control over how the _source field is returned with every hit. It is used with various endpoints, e.g. when searching for documents, retrieving individual documents, or even updating documents.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-source-filtering.html for details.
func NewFetchSourceContext ¶
func NewFetchSourceContext(fetchSource bool) *FetchSourceContext
NewFetchSourceContext returns a new FetchSourceContext.
func (*FetchSourceContext) Exclude ¶
func (fsc *FetchSourceContext) Exclude(excludes ...string) *FetchSourceContext
Exclude indicates to exclude specific parts of the _source. Wildcards are allowed here.
func (*FetchSourceContext) FetchSource ¶
func (fsc *FetchSourceContext) FetchSource() bool
FetchSource indicates whether to return the _source.
func (*FetchSourceContext) Include ¶
func (fsc *FetchSourceContext) Include(includes ...string) *FetchSourceContext
Include indicates to return specific parts of the _source. Wildcards are allowed here.
func (*FetchSourceContext) Query ¶
func (fsc *FetchSourceContext) Query() url.Values
Query returns the parameters in a form suitable for a URL query string.
func (*FetchSourceContext) SetFetchSource ¶
func (fsc *FetchSourceContext) SetFetchSource(fetchSource bool)
SetFetchSource specifies whether to return the _source.
func (*FetchSourceContext) Source ¶
func (fsc *FetchSourceContext) Source() (interface{}, error)
Source returns the JSON-serializable data to be used in a body.
type FieldCaps ¶
type FieldCaps struct { Type string `json:"type"` Searchable bool `json:"searchable"` Aggregatable bool `json:"aggregatable"` Indices []string `json:"indices,omitempty"` NonSearchableIndices []string `json:"non_searchable_indices,omitempty"` NonAggregatableIndices []string `json:"non_aggregatable_indices,omitempty"` }
FieldCaps contains capabilities of an individual field.
type FieldCapsRequest ¶
type FieldCapsRequest struct {
Fields []string `json:"fields"`
}
FieldCapsRequest can be used to set up the body to be used in the Field Capabilities API.
type FieldCapsResponse ¶
type FieldCapsResponse struct {
Fields map[string]FieldCapsType `json:"fields,omitempty"` // Name -> type -> caps
}
FieldCapsResponse contains field capabilities.
type FieldCapsService ¶
type FieldCapsService struct {
// contains filtered or unexported fields
}
FieldCapsService allows retrieving the capabilities of fields among multiple indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-field-caps.html for details
func NewFieldCapsService ¶
func NewFieldCapsService(client *Client) *FieldCapsService
NewFieldCapsService creates a new FieldCapsService
func (*FieldCapsService) AllowNoIndices ¶
func (s *FieldCapsService) AllowNoIndices(allowNoIndices bool) *FieldCapsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*FieldCapsService) BodyJson ¶
func (s *FieldCapsService) BodyJson(body interface{}) *FieldCapsService
BodyJson is documented as: Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds.
func (*FieldCapsService) BodyString ¶
func (s *FieldCapsService) BodyString(body string) *FieldCapsService
BodyString is documented as: Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds.
func (*FieldCapsService) Do ¶
func (s *FieldCapsService) Do(ctx context.Context) (*FieldCapsResponse, error)
Do executes the operation.
func (*FieldCapsService) ErrorTrace ¶
func (s *FieldCapsService) ErrorTrace(errorTrace bool) *FieldCapsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*FieldCapsService) ExpandWildcards ¶
func (s *FieldCapsService) ExpandWildcards(expandWildcards string) *FieldCapsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*FieldCapsService) Fields ¶
func (s *FieldCapsService) Fields(fields ...string) *FieldCapsService
Fields is a list of fields for to get field capabilities.
func (*FieldCapsService) FilterPath ¶
func (s *FieldCapsService) FilterPath(filterPath ...string) *FieldCapsService
FilterPath specifies a list of filters used to reduce the response.
func (*FieldCapsService) Header ¶
func (s *FieldCapsService) Header(name string, value string) *FieldCapsService
Header adds a header to the request.
func (*FieldCapsService) Headers ¶
func (s *FieldCapsService) Headers(headers http.Header) *FieldCapsService
Headers specifies the headers of the request.
func (*FieldCapsService) Human ¶
func (s *FieldCapsService) Human(human bool) *FieldCapsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*FieldCapsService) IgnoreUnavailable ¶
func (s *FieldCapsService) IgnoreUnavailable(ignoreUnavailable bool) *FieldCapsService
IgnoreUnavailable is documented as: Whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*FieldCapsService) Index ¶
func (s *FieldCapsService) Index(index ...string) *FieldCapsService
Index is a list of index names; use `_all` or empty string to perform the operation on all indices.
func (*FieldCapsService) Pretty ¶
func (s *FieldCapsService) Pretty(pretty bool) *FieldCapsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*FieldCapsService) Validate ¶
func (s *FieldCapsService) Validate() error
Validate checks if the operation is valid.
type FieldCapsType ¶
FieldCapsType represents a mapping from type (e.g. keyword) to capabilities.
type FieldSort ¶
type FieldSort struct { Sorter // contains filtered or unexported fields }
FieldSort sorts by a given field.
func NewFieldSort ¶
NewFieldSort creates a new FieldSort.
func (*FieldSort) Filter ¶
Filter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*FieldSort) Missing ¶
Missing sets the value to be used when a field is missing in a document. You can also use "_last" or "_first" to sort missing last or first respectively.
func (*FieldSort) Nested ¶
func (s *FieldSort) Nested(nested *NestedSort) *FieldSort
Nested is available starting with 6.1 and will replace Filter and Path.
func (*FieldSort) NestedFilter ¶
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting. Deprecated: Use Filter instead.
func (*FieldSort) NestedPath ¶
NestedPath is used if sorting occurs on a field that is inside a nested object. Deprecated: Use Path instead.
func (*FieldSort) NestedSort ¶
func (s *FieldSort) NestedSort(nestedSort *NestedSort) *FieldSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath. Deprecated: Use Nested instead.
func (*FieldSort) SortMode ¶
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min, max, sum, and avg.
func (*FieldSort) UnmappedType ¶
UnmappedType sets the type to use when the current field is not mapped in an index.
type FieldStatistics ¶
type FieldValueFactorFunction ¶
type FieldValueFactorFunction struct {
// contains filtered or unexported fields
}
FieldValueFactorFunction is a function score function that allows you to use a field from a document to influence the score. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_field_value_factor.
func NewFieldValueFactorFunction ¶
func NewFieldValueFactorFunction() *FieldValueFactorFunction
NewFieldValueFactorFunction initializes and returns a new FieldValueFactorFunction.
func (*FieldValueFactorFunction) Factor ¶
func (fn *FieldValueFactorFunction) Factor(factor float64) *FieldValueFactorFunction
Factor is the (optional) factor to multiply the field with. If you do not specify a factor, the default is 1.
func (*FieldValueFactorFunction) Field ¶
func (fn *FieldValueFactorFunction) Field(field string) *FieldValueFactorFunction
Field is the field to be extracted from the document.
func (*FieldValueFactorFunction) GetWeight ¶
func (fn *FieldValueFactorFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*FieldValueFactorFunction) Missing ¶
func (fn *FieldValueFactorFunction) Missing(missing float64) *FieldValueFactorFunction
Missing is used if a document does not have that field.
func (*FieldValueFactorFunction) Modifier ¶
func (fn *FieldValueFactorFunction) Modifier(modifier string) *FieldValueFactorFunction
Modifier to apply to the field value. It can be one of: none, log, log1p, log2p, ln, ln1p, ln2p, square, sqrt, or reciprocal. Defaults to: none.
func (*FieldValueFactorFunction) Name ¶
func (fn *FieldValueFactorFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*FieldValueFactorFunction) Source ¶
func (fn *FieldValueFactorFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*FieldValueFactorFunction) Weight ¶
func (fn *FieldValueFactorFunction) Weight(weight float64) *FieldValueFactorFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type FilterAggregation ¶
type FilterAggregation struct {
// contains filtered or unexported fields
}
FilterAggregation defines a single bucket of all the documents in the current document set context that match a specified filter. Often this will be used to narrow down the current aggregation context to a specific set of documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-filter-aggregation.html
func NewFilterAggregation ¶
func NewFilterAggregation() *FilterAggregation
func (*FilterAggregation) Filter ¶
func (a *FilterAggregation) Filter(filter Query) *FilterAggregation
func (*FilterAggregation) Meta ¶
func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation
Meta sets the meta data to be included in the aggregation response.
func (*FilterAggregation) Source ¶
func (a *FilterAggregation) Source() (interface{}, error)
func (*FilterAggregation) SubAggregation ¶
func (a *FilterAggregation) SubAggregation(name string, subAggregation Aggregation) *FilterAggregation
type FiltersAggregation ¶
type FiltersAggregation struct {
// contains filtered or unexported fields
}
FiltersAggregation defines a multi bucket aggregations where each bucket is associated with a filter. Each bucket will collect all documents that match its associated filter.
Notice that the caller has to decide whether to add filters by name (using FilterWithName) or unnamed filters (using Filter or Filters). One cannot use both named and unnamed filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-filters-aggregation.html
func NewFiltersAggregation ¶
func NewFiltersAggregation() *FiltersAggregation
NewFiltersAggregation initializes a new FiltersAggregation.
func (*FiltersAggregation) Filter ¶
func (a *FiltersAggregation) Filter(filter Query) *FiltersAggregation
Filter adds an unnamed filter. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) FilterWithName ¶
func (a *FiltersAggregation) FilterWithName(name string, filter Query) *FiltersAggregation
FilterWithName adds a filter with a specific name. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) Filters ¶
func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation
Filters adds one or more unnamed filters. Notice that you can either use named or unnamed filters, but not both.
func (*FiltersAggregation) Meta ¶
func (a *FiltersAggregation) Meta(metaData map[string]interface{}) *FiltersAggregation
Meta sets the meta data to be included in the aggregation response.
func (*FiltersAggregation) OtherBucket ¶
func (a *FiltersAggregation) OtherBucket(otherBucket bool) *FiltersAggregation
OtherBucket indicates whether to include a bucket for documents not matching any filter.
func (*FiltersAggregation) OtherBucketKey ¶
func (a *FiltersAggregation) OtherBucketKey(key string) *FiltersAggregation
OtherBucketKey sets the key to use for the bucket for documents not matching any filter.
func (*FiltersAggregation) Source ¶
func (a *FiltersAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface. If the aggregation is invalid, an error is returned. This may e.g. happen if you mixed named and unnamed filters.
func (*FiltersAggregation) SubAggregation ¶
func (a *FiltersAggregation) SubAggregation(name string, subAggregation Aggregation) *FiltersAggregation
SubAggregation adds a sub-aggregation to this aggregation.
type FunctionScoreQuery ¶
type FunctionScoreQuery struct {
// contains filtered or unexported fields
}
FunctionScoreQuery allows you to modify the score of documents that are retrieved by a query. This can be useful if, for example, a score function is computationally expensive and it is sufficient to compute the score on a filtered set of documents.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html
func NewFunctionScoreQuery ¶
func NewFunctionScoreQuery() *FunctionScoreQuery
NewFunctionScoreQuery creates and initializes a new function score query.
func (*FunctionScoreQuery) Add ¶
func (q *FunctionScoreQuery) Add(filter Query, scoreFunc ScoreFunction) *FunctionScoreQuery
Add adds a score function that will execute on all the documents matching the filter.
func (*FunctionScoreQuery) AddScoreFunc ¶
func (q *FunctionScoreQuery) AddScoreFunc(scoreFunc ScoreFunction) *FunctionScoreQuery
AddScoreFunc adds a score function that will execute the function on all documents.
func (*FunctionScoreQuery) Boost ¶
func (q *FunctionScoreQuery) Boost(boost float64) *FunctionScoreQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*FunctionScoreQuery) BoostMode ¶
func (q *FunctionScoreQuery) BoostMode(boostMode string) *FunctionScoreQuery
BoostMode defines how the combined result of score functions will influence the final score together with the sub query score.
func (*FunctionScoreQuery) Filter ¶
func (q *FunctionScoreQuery) Filter(filter Query) *FunctionScoreQuery
Filter sets the filter for the function score query.
func (*FunctionScoreQuery) MaxBoost ¶
func (q *FunctionScoreQuery) MaxBoost(maxBoost float64) *FunctionScoreQuery
MaxBoost is the maximum boost that will be applied by function score.
func (*FunctionScoreQuery) MinScore ¶
func (q *FunctionScoreQuery) MinScore(minScore float64) *FunctionScoreQuery
MinScore sets the minimum score.
func (*FunctionScoreQuery) Query ¶
func (q *FunctionScoreQuery) Query(query Query) *FunctionScoreQuery
Query sets the query for the function score query.
func (*FunctionScoreQuery) ScoreMode ¶
func (q *FunctionScoreQuery) ScoreMode(scoreMode string) *FunctionScoreQuery
ScoreMode defines how results of individual score functions will be aggregated. Can be first, avg, max, sum, min, or multiply.
func (*FunctionScoreQuery) Source ¶
func (q *FunctionScoreQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type FuzzyCompletionSuggesterOptions ¶
type FuzzyCompletionSuggesterOptions struct {
// contains filtered or unexported fields
}
FuzzyCompletionSuggesterOptions represents the options for fuzzy completion suggester.
func NewFuzzyCompletionSuggesterOptions ¶
func NewFuzzyCompletionSuggesterOptions() *FuzzyCompletionSuggesterOptions
NewFuzzyCompletionSuggesterOptions initializes a new FuzzyCompletionSuggesterOptions instance.
func (*FuzzyCompletionSuggesterOptions) EditDistance ¶
func (o *FuzzyCompletionSuggesterOptions) EditDistance(editDistance interface{}) *FuzzyCompletionSuggesterOptions
EditDistance specifies the maximum number of edits, e.g. a number like "1" or "2" or a string like "0..2" or ">5".
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/common-options.html#fuzziness for details.
func (*FuzzyCompletionSuggesterOptions) MaxDeterminizedStates ¶
func (o *FuzzyCompletionSuggesterOptions) MaxDeterminizedStates(max int) *FuzzyCompletionSuggesterOptions
MaxDeterminizedStates is currently undocumented in Elasticsearch. It represents the maximum automaton states allowed for fuzzy expansion.
func (*FuzzyCompletionSuggesterOptions) MinLength ¶
func (o *FuzzyCompletionSuggesterOptions) MinLength(minLength int) *FuzzyCompletionSuggesterOptions
MinLength represents the minimum length of the input before fuzzy suggestions are returned (defaults to 3).
func (*FuzzyCompletionSuggesterOptions) PrefixLength ¶
func (o *FuzzyCompletionSuggesterOptions) PrefixLength(prefixLength int) *FuzzyCompletionSuggesterOptions
PrefixLength represents the minimum length of the input, which is not checked for fuzzy alternatives (defaults to 1).
func (*FuzzyCompletionSuggesterOptions) Source ¶
func (o *FuzzyCompletionSuggesterOptions) Source() (interface{}, error)
Source creates the JSON data.
func (*FuzzyCompletionSuggesterOptions) Transpositions ¶
func (o *FuzzyCompletionSuggesterOptions) Transpositions(transpositions bool) *FuzzyCompletionSuggesterOptions
Transpositions, if set to true, are counted as one change instead of two (defaults to true).
func (*FuzzyCompletionSuggesterOptions) UnicodeAware ¶
func (o *FuzzyCompletionSuggesterOptions) UnicodeAware(unicodeAware bool) *FuzzyCompletionSuggesterOptions
UnicodeAware, if true, all measurements (like fuzzy edit distance, transpositions, and lengths) are measured in Unicode code points instead of in bytes. This is slightly slower than raw bytes, so it is set to false by default.
type FuzzyQuery ¶
type FuzzyQuery struct {
// contains filtered or unexported fields
}
FuzzyQuery uses similarity based on Levenshtein edit distance for string fields, and a +/- margin on numeric and date fields.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-fuzzy-query.html
func NewFuzzyQuery ¶
func NewFuzzyQuery(name string, value interface{}) *FuzzyQuery
NewFuzzyQuery creates a new fuzzy query.
func (*FuzzyQuery) Boost ¶
func (q *FuzzyQuery) Boost(boost float64) *FuzzyQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*FuzzyQuery) Fuzziness ¶
func (q *FuzzyQuery) Fuzziness(fuzziness interface{}) *FuzzyQuery
Fuzziness can be an integer/long like 0, 1 or 2 as well as strings like "auto", "0..1", "1..4" or "0.0..1.0".
func (*FuzzyQuery) MaxExpansions ¶
func (q *FuzzyQuery) MaxExpansions(maxExpansions int) *FuzzyQuery
func (*FuzzyQuery) PrefixLength ¶
func (q *FuzzyQuery) PrefixLength(prefixLength int) *FuzzyQuery
func (*FuzzyQuery) QueryName ¶
func (q *FuzzyQuery) QueryName(queryName string) *FuzzyQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*FuzzyQuery) Rewrite ¶
func (q *FuzzyQuery) Rewrite(rewrite string) *FuzzyQuery
func (*FuzzyQuery) Source ¶
func (q *FuzzyQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*FuzzyQuery) Transpositions ¶
func (q *FuzzyQuery) Transpositions(transpositions bool) *FuzzyQuery
type GNDSignificanceHeuristic ¶
type GNDSignificanceHeuristic struct {
// contains filtered or unexported fields
}
GNDSignificanceHeuristic implements the "Google Normalized Distance" as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_google_normalized_distance for details.
func NewGNDSignificanceHeuristic ¶
func NewGNDSignificanceHeuristic() *GNDSignificanceHeuristic
NewGNDSignificanceHeuristic implements a new GNDSignificanceHeuristic.
func (*GNDSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *GNDSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *GNDSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*GNDSignificanceHeuristic) Name ¶
func (sh *GNDSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*GNDSignificanceHeuristic) Source ¶
func (sh *GNDSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type GaussDecayFunction ¶
type GaussDecayFunction struct {
// contains filtered or unexported fields
}
GaussDecayFunction builds a gauss decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html for details.
func NewGaussDecayFunction ¶
func NewGaussDecayFunction() *GaussDecayFunction
NewGaussDecayFunction returns a new GaussDecayFunction.
func (*GaussDecayFunction) Decay ¶
func (fn *GaussDecayFunction) Decay(decay float64) *GaussDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*GaussDecayFunction) FieldName ¶
func (fn *GaussDecayFunction) FieldName(fieldName string) *GaussDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*GaussDecayFunction) GetWeight ¶
func (fn *GaussDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*GaussDecayFunction) MultiValueMode ¶
func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*GaussDecayFunction) Name ¶
func (fn *GaussDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*GaussDecayFunction) Offset ¶
func (fn *GaussDecayFunction) Offset(offset interface{}) *GaussDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*GaussDecayFunction) Origin ¶
func (fn *GaussDecayFunction) Origin(origin interface{}) *GaussDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*GaussDecayFunction) Scale ¶
func (fn *GaussDecayFunction) Scale(scale interface{}) *GaussDecayFunction
Scale defines the scale to be used with Decay.
func (*GaussDecayFunction) Source ¶
func (fn *GaussDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*GaussDecayFunction) Weight ¶
func (fn *GaussDecayFunction) Weight(weight float64) *GaussDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type GeoBoundingBoxQuery ¶
type GeoBoundingBoxQuery struct {
// contains filtered or unexported fields
}
GeoBoundingBoxQuery allows to filter hits based on a point location using a bounding box.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-geo-bounding-box-query.html
func NewGeoBoundingBoxQuery ¶
func NewGeoBoundingBoxQuery(name string) *GeoBoundingBoxQuery
NewGeoBoundingBoxQuery creates and initializes a new GeoBoundingBoxQuery.
func (*GeoBoundingBoxQuery) BottomLeft ¶
func (q *GeoBoundingBoxQuery) BottomLeft(bottom, left float64) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) BottomLeftFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) BottomLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) BottomRight ¶
func (q *GeoBoundingBoxQuery) BottomRight(bottom, right float64) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) BottomRightFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) BottomRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) QueryName ¶
func (q *GeoBoundingBoxQuery) QueryName(queryName string) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) Source ¶
func (q *GeoBoundingBoxQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*GeoBoundingBoxQuery) TopLeft ¶
func (q *GeoBoundingBoxQuery) TopLeft(top, left float64) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) TopLeftFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) TopLeftFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) TopRight ¶
func (q *GeoBoundingBoxQuery) TopRight(top, right float64) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) TopRightFromGeoPoint ¶
func (q *GeoBoundingBoxQuery) TopRightFromGeoPoint(point *GeoPoint) *GeoBoundingBoxQuery
func (*GeoBoundingBoxQuery) Type ¶
func (q *GeoBoundingBoxQuery) Type(typ string) *GeoBoundingBoxQuery
Type sets the type of executing the geo bounding box. It can be either memory or indexed. It defaults to memory.
type GeoBoundsAggregation ¶
type GeoBoundsAggregation struct {
// contains filtered or unexported fields
}
GeoBoundsAggregation is a metric aggregation that computes the bounding box containing all geo_point values for a field. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-geobounds-aggregation.html
func NewGeoBoundsAggregation ¶
func NewGeoBoundsAggregation() *GeoBoundsAggregation
func (*GeoBoundsAggregation) Field ¶
func (a *GeoBoundsAggregation) Field(field string) *GeoBoundsAggregation
func (*GeoBoundsAggregation) Meta ¶
func (a *GeoBoundsAggregation) Meta(metaData map[string]interface{}) *GeoBoundsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoBoundsAggregation) Script ¶
func (a *GeoBoundsAggregation) Script(script *Script) *GeoBoundsAggregation
func (*GeoBoundsAggregation) Source ¶
func (a *GeoBoundsAggregation) Source() (interface{}, error)
func (*GeoBoundsAggregation) SubAggregation ¶
func (a *GeoBoundsAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoBoundsAggregation
func (*GeoBoundsAggregation) WrapLongitude ¶
func (a *GeoBoundsAggregation) WrapLongitude(wrapLongitude bool) *GeoBoundsAggregation
type GeoCentroidAggregation ¶
type GeoCentroidAggregation struct {
// contains filtered or unexported fields
}
GeoCentroidAggregation is a metric aggregation that computes the weighted centroid from all coordinate values for a Geo-point datatype field. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-geocentroid-aggregation.html
func NewGeoCentroidAggregation ¶
func NewGeoCentroidAggregation() *GeoCentroidAggregation
func (*GeoCentroidAggregation) Field ¶
func (a *GeoCentroidAggregation) Field(field string) *GeoCentroidAggregation
func (*GeoCentroidAggregation) Meta ¶
func (a *GeoCentroidAggregation) Meta(metaData map[string]interface{}) *GeoCentroidAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoCentroidAggregation) Script ¶
func (a *GeoCentroidAggregation) Script(script *Script) *GeoCentroidAggregation
func (*GeoCentroidAggregation) Source ¶
func (a *GeoCentroidAggregation) Source() (interface{}, error)
func (*GeoCentroidAggregation) SubAggregation ¶
func (a *GeoCentroidAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoCentroidAggregation
type GeoDistanceAggregation ¶
type GeoDistanceAggregation struct {
// contains filtered or unexported fields
}
GeoDistanceAggregation is a multi-bucket aggregation that works on geo_point fields and conceptually works very similar to the range aggregation. The user can define a point of origin and a set of distance range buckets. The aggregation evaluate the distance of each document value from the origin point and determines the buckets it belongs to based on the ranges (a document belongs to a bucket if the distance between the document and the origin falls within the distance range of the bucket). See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-geodistance-aggregation.html
func NewGeoDistanceAggregation ¶
func NewGeoDistanceAggregation() *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddRange ¶
func (a *GeoDistanceAggregation) AddRange(from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddRangeWithKey ¶
func (a *GeoDistanceAggregation) AddRangeWithKey(key string, from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedFrom ¶
func (a *GeoDistanceAggregation) AddUnboundedFrom(to float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedFromWithKey ¶
func (a *GeoDistanceAggregation) AddUnboundedFromWithKey(key string, to float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedTo ¶
func (a *GeoDistanceAggregation) AddUnboundedTo(from float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) AddUnboundedToWithKey ¶
func (a *GeoDistanceAggregation) AddUnboundedToWithKey(key string, from float64) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Between ¶
func (a *GeoDistanceAggregation) Between(from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) BetweenWithKey ¶
func (a *GeoDistanceAggregation) BetweenWithKey(key string, from, to interface{}) *GeoDistanceAggregation
func (*GeoDistanceAggregation) DistanceType ¶
func (a *GeoDistanceAggregation) DistanceType(distanceType string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Field ¶
func (a *GeoDistanceAggregation) Field(field string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Meta ¶
func (a *GeoDistanceAggregation) Meta(metaData map[string]interface{}) *GeoDistanceAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GeoDistanceAggregation) Point ¶
func (a *GeoDistanceAggregation) Point(latLon string) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Source ¶
func (a *GeoDistanceAggregation) Source() (interface{}, error)
func (*GeoDistanceAggregation) SubAggregation ¶
func (a *GeoDistanceAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoDistanceAggregation
func (*GeoDistanceAggregation) Unit ¶
func (a *GeoDistanceAggregation) Unit(unit string) *GeoDistanceAggregation
type GeoDistanceQuery ¶
type GeoDistanceQuery struct {
// contains filtered or unexported fields
}
GeoDistanceQuery filters documents that include only hits that exists within a specific distance from a geo point.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-geo-distance-query.html
func NewGeoDistanceQuery ¶
func NewGeoDistanceQuery(name string) *GeoDistanceQuery
NewGeoDistanceQuery creates and initializes a new GeoDistanceQuery.
func (*GeoDistanceQuery) Distance ¶
func (q *GeoDistanceQuery) Distance(distance string) *GeoDistanceQuery
func (*GeoDistanceQuery) DistanceType ¶
func (q *GeoDistanceQuery) DistanceType(distanceType string) *GeoDistanceQuery
func (*GeoDistanceQuery) GeoHash ¶
func (q *GeoDistanceQuery) GeoHash(geohash string) *GeoDistanceQuery
func (*GeoDistanceQuery) GeoPoint ¶
func (q *GeoDistanceQuery) GeoPoint(point *GeoPoint) *GeoDistanceQuery
func (*GeoDistanceQuery) Lat ¶
func (q *GeoDistanceQuery) Lat(lat float64) *GeoDistanceQuery
func (*GeoDistanceQuery) Lon ¶
func (q *GeoDistanceQuery) Lon(lon float64) *GeoDistanceQuery
func (*GeoDistanceQuery) Point ¶
func (q *GeoDistanceQuery) Point(lat, lon float64) *GeoDistanceQuery
func (*GeoDistanceQuery) QueryName ¶
func (q *GeoDistanceQuery) QueryName(queryName string) *GeoDistanceQuery
func (*GeoDistanceQuery) Source ¶
func (q *GeoDistanceQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type GeoDistanceSort ¶
type GeoDistanceSort struct { Sorter // contains filtered or unexported fields }
GeoDistanceSort allows for sorting by geographic distance. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-sort.html#_geo_distance_sorting.
func NewGeoDistanceSort ¶
func NewGeoDistanceSort(fieldName string) *GeoDistanceSort
NewGeoDistanceSort creates a new sorter for geo distances.
func (*GeoDistanceSort) Asc ¶
func (s *GeoDistanceSort) Asc() *GeoDistanceSort
Asc sets ascending sort order.
func (*GeoDistanceSort) Desc ¶
func (s *GeoDistanceSort) Desc() *GeoDistanceSort
Desc sets descending sort order.
func (*GeoDistanceSort) DistanceType ¶
func (s *GeoDistanceSort) DistanceType(distanceType string) *GeoDistanceSort
DistanceType describes how to compute the distance, e.g. "arc" or "plane". See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-sort.html#geo-sorting for details.
func (*GeoDistanceSort) FieldName ¶
func (s *GeoDistanceSort) FieldName(fieldName string) *GeoDistanceSort
FieldName specifies the name of the (geo) field to use for sorting.
func (*GeoDistanceSort) GeoDistance ¶
func (s *GeoDistanceSort) GeoDistance(geoDistance string) *GeoDistanceSort
GeoDistance is an alias for DistanceType.
func (*GeoDistanceSort) GeoHashes ¶
func (s *GeoDistanceSort) GeoHashes(geohashes ...string) *GeoDistanceSort
GeoHashes specifies the geo point to create the range distance aggregations from.
func (*GeoDistanceSort) NestedFilter ¶
func (s *GeoDistanceSort) NestedFilter(nestedFilter Query) *GeoDistanceSort
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*GeoDistanceSort) NestedPath ¶
func (s *GeoDistanceSort) NestedPath(nestedPath string) *GeoDistanceSort
NestedPath is used if sorting occurs on a field that is inside a nested object.
func (*GeoDistanceSort) NestedSort ¶
func (s *GeoDistanceSort) NestedSort(nestedSort *NestedSort) *GeoDistanceSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath.
func (*GeoDistanceSort) Order ¶
func (s *GeoDistanceSort) Order(ascending bool) *GeoDistanceSort
Order defines whether sorting ascending (default) or descending.
func (*GeoDistanceSort) Point ¶
func (s *GeoDistanceSort) Point(lat, lon float64) *GeoDistanceSort
Point specifies a point to create the range distance aggregations from.
func (*GeoDistanceSort) Points ¶
func (s *GeoDistanceSort) Points(points ...*GeoPoint) *GeoDistanceSort
Points specifies the geo point(s) to create the range distance aggregations from.
func (*GeoDistanceSort) SortMode ¶
func (s *GeoDistanceSort) SortMode(sortMode string) *GeoDistanceSort
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min, max, sum, and avg.
func (*GeoDistanceSort) Source ¶
func (s *GeoDistanceSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*GeoDistanceSort) Unit ¶
func (s *GeoDistanceSort) Unit(unit string) *GeoDistanceSort
Unit specifies the distance unit to use. It defaults to km. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/common-options.html#distance-units for details.
type GeoHashGridAggregation ¶
type GeoHashGridAggregation struct {
// contains filtered or unexported fields
}
func NewGeoHashGridAggregation ¶
func NewGeoHashGridAggregation() *GeoHashGridAggregation
func (*GeoHashGridAggregation) Field ¶
func (a *GeoHashGridAggregation) Field(field string) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Meta ¶
func (a *GeoHashGridAggregation) Meta(metaData map[string]interface{}) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Precision ¶
func (a *GeoHashGridAggregation) Precision(precision interface{}) *GeoHashGridAggregation
Precision accepts the level as int value between 1 and 12 or Distance Units like "2km", "5mi" as described at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/common-options.html#distance-units and https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-geohashgrid-aggregation.html
func (*GeoHashGridAggregation) ShardSize ¶
func (a *GeoHashGridAggregation) ShardSize(shardSize int) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Size ¶
func (a *GeoHashGridAggregation) Size(size int) *GeoHashGridAggregation
func (*GeoHashGridAggregation) Source ¶
func (a *GeoHashGridAggregation) Source() (interface{}, error)
func (*GeoHashGridAggregation) SubAggregation ¶
func (a *GeoHashGridAggregation) SubAggregation(name string, subAggregation Aggregation) *GeoHashGridAggregation
type GeoPoint ¶
GeoPoint is a geographic position described via latitude and longitude.
func GeoPointFromLatLon ¶
GeoPointFromLatLon initializes a new GeoPoint by latitude and longitude.
func GeoPointFromString ¶
GeoPointFromString initializes a new GeoPoint by a string that is formatted as "{latitude},{longitude}", e.g. "40.10210,-70.12091".
func (*GeoPoint) MarshalJSON ¶
MarshalJSON encodes the GeoPoint to JSON.
type GeoPolygonQuery ¶
type GeoPolygonQuery struct {
// contains filtered or unexported fields
}
GeoPolygonQuery allows to include hits that only fall within a polygon of points.
For more details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-geo-polygon-query.html
func NewGeoPolygonQuery ¶
func NewGeoPolygonQuery(name string) *GeoPolygonQuery
NewGeoPolygonQuery creates and initializes a new GeoPolygonQuery.
func (*GeoPolygonQuery) AddGeoPoint ¶
func (q *GeoPolygonQuery) AddGeoPoint(point *GeoPoint) *GeoPolygonQuery
AddGeoPoint adds a GeoPoint.
func (*GeoPolygonQuery) AddPoint ¶
func (q *GeoPolygonQuery) AddPoint(lat, lon float64) *GeoPolygonQuery
AddPoint adds a point from latitude and longitude.
func (*GeoPolygonQuery) QueryName ¶
func (q *GeoPolygonQuery) QueryName(queryName string) *GeoPolygonQuery
func (*GeoPolygonQuery) Source ¶
func (q *GeoPolygonQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type GetResult ¶
type GetResult struct { Index string `json:"_index"` // index meta field Type string `json:"_type"` // type meta field Id string `json:"_id"` // id meta field Uid string `json:"_uid"` // uid meta field (see MapperService.java for all meta fields) Routing string `json:"_routing"` // routing meta field Parent string `json:"_parent"` // parent meta field Version *int64 `json:"_version"` // version number, when Version is set to true in SearchService SeqNo *int64 `json:"_seq_no"` PrimaryTerm *int64 `json:"_primary_term"` Source *json.RawMessage `json:"_source,omitempty"` Found bool `json:"found,omitempty"` Fields map[string]interface{} `json:"fields,omitempty"` //Error string `json:"error,omitempty"` // used only in MultiGet // TODO double-check that MultiGet now returns details error information Error *ErrorDetails `json:"error,omitempty"` // only used in MultiGet }
GetResult is the outcome of GetService.Do.
type GetScriptResponse ¶
type GetScriptResponse struct { Id string `json:"_id"` Found bool `json:"found"` Script json.RawMessage `json:"script"` }
GetScriptResponse is the result of getting a stored script from Elasticsearch.
type GetScriptService ¶
type GetScriptService struct {
// contains filtered or unexported fields
}
GetScriptService reads a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details.
func NewGetScriptService ¶
func NewGetScriptService(client *Client) *GetScriptService
NewGetScriptService creates a new GetScriptService.
func (*GetScriptService) Do ¶
func (s *GetScriptService) Do(ctx context.Context) (*GetScriptResponse, error)
Do executes the operation.
func (*GetScriptService) ErrorTrace ¶
func (s *GetScriptService) ErrorTrace(errorTrace bool) *GetScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*GetScriptService) FilterPath ¶
func (s *GetScriptService) FilterPath(filterPath ...string) *GetScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*GetScriptService) Header ¶
func (s *GetScriptService) Header(name string, value string) *GetScriptService
Header adds a header to the request.
func (*GetScriptService) Headers ¶
func (s *GetScriptService) Headers(headers http.Header) *GetScriptService
Headers specifies the headers of the request.
func (*GetScriptService) Human ¶
func (s *GetScriptService) Human(human bool) *GetScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*GetScriptService) Id ¶
func (s *GetScriptService) Id(id string) *GetScriptService
Id is the script ID.
func (*GetScriptService) Pretty ¶
func (s *GetScriptService) Pretty(pretty bool) *GetScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*GetScriptService) Validate ¶
func (s *GetScriptService) Validate() error
Validate checks if the operation is valid.
type GetService ¶
type GetService struct {
// contains filtered or unexported fields
}
GetService allows to get a typed JSON document from the index based on its id.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-get.html for details.
func NewGetService ¶
func NewGetService(client *Client) *GetService
NewGetService creates a new GetService.
func (*GetService) Do ¶
func (s *GetService) Do(ctx context.Context) (*GetResult, error)
Do executes the operation.
func (*GetService) ErrorTrace ¶
func (s *GetService) ErrorTrace(errorTrace bool) *GetService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*GetService) FetchSource ¶
func (s *GetService) FetchSource(fetchSource bool) *GetService
func (*GetService) FetchSourceContext ¶
func (s *GetService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *GetService
func (*GetService) FilterPath ¶
func (s *GetService) FilterPath(filterPath ...string) *GetService
FilterPath specifies a list of filters used to reduce the response.
func (*GetService) Header ¶
func (s *GetService) Header(name string, value string) *GetService
Header adds a header to the request.
func (*GetService) Headers ¶
func (s *GetService) Headers(headers http.Header) *GetService
Headers specifies the headers of the request.
func (*GetService) Human ¶
func (s *GetService) Human(human bool) *GetService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*GetService) IgnoreErrorsOnGeneratedFields ¶
func (s *GetService) IgnoreErrorsOnGeneratedFields(ignore bool) *GetService
IgnoreErrorsOnGeneratedFields indicates whether to ignore fields that are generated if the transaction log is accessed.
func (*GetService) Index ¶
func (s *GetService) Index(index string) *GetService
Index is the name of the index.
func (*GetService) Parent ¶
func (s *GetService) Parent(parent string) *GetService
Parent is the ID of the parent document.
func (*GetService) Preference ¶
func (s *GetService) Preference(preference string) *GetService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*GetService) Pretty ¶
func (s *GetService) Pretty(pretty bool) *GetService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*GetService) Realtime ¶
func (s *GetService) Realtime(realtime bool) *GetService
Realtime specifies whether to perform the operation in realtime or search mode.
func (*GetService) Refresh ¶
func (s *GetService) Refresh(refresh string) *GetService
Refresh the shard containing the document before performing the operation.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*GetService) Routing ¶
func (s *GetService) Routing(routing string) *GetService
Routing is the specific routing value.
func (*GetService) StoredFields ¶
func (s *GetService) StoredFields(storedFields ...string) *GetService
StoredFields is a list of fields to return in the response.
func (*GetService) Type ¶
func (s *GetService) Type(typ string) *GetService
Type is the type of the document (use `_all` to fetch the first document matching the ID across all types).
func (*GetService) Validate ¶
func (s *GetService) Validate() error
Validate checks if the operation is valid.
func (*GetService) Version ¶
func (s *GetService) Version(version interface{}) *GetService
Version is an explicit version number for concurrency control.
func (*GetService) VersionType ¶
func (s *GetService) VersionType(versionType string) *GetService
VersionType is the specific version type.
type GlobalAggregation ¶
type GlobalAggregation struct {
// contains filtered or unexported fields
}
GlobalAggregation defines a single bucket of all the documents within the search execution context. This context is defined by the indices and the document types you’re searching on, but is not influenced by the search query itself. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-global-aggregation.html
func NewGlobalAggregation ¶
func NewGlobalAggregation() *GlobalAggregation
func (*GlobalAggregation) Meta ¶
func (a *GlobalAggregation) Meta(metaData map[string]interface{}) *GlobalAggregation
Meta sets the meta data to be included in the aggregation response.
func (*GlobalAggregation) Source ¶
func (a *GlobalAggregation) Source() (interface{}, error)
func (*GlobalAggregation) SubAggregation ¶
func (a *GlobalAggregation) SubAggregation(name string, subAggregation Aggregation) *GlobalAggregation
type HasChildQuery ¶
type HasChildQuery struct {
// contains filtered or unexported fields
}
HasChildQuery accepts a query and the child type to run against, and results in parent documents that have child docs matching the query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-has-child-query.html
func NewHasChildQuery ¶
func NewHasChildQuery(childType string, query Query) *HasChildQuery
NewHasChildQuery creates and initializes a new has_child query.
func (*HasChildQuery) Boost ¶
func (q *HasChildQuery) Boost(boost float64) *HasChildQuery
Boost sets the boost for this query.
func (*HasChildQuery) InnerHit ¶
func (q *HasChildQuery) InnerHit(innerHit *InnerHit) *HasChildQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*HasChildQuery) MaxChildren ¶
func (q *HasChildQuery) MaxChildren(maxChildren int) *HasChildQuery
MaxChildren defines the maximum number of children that are required to match for the parent to be considered a match.
func (*HasChildQuery) MinChildren ¶
func (q *HasChildQuery) MinChildren(minChildren int) *HasChildQuery
MinChildren defines the minimum number of children that are required to match for the parent to be considered a match.
func (*HasChildQuery) QueryName ¶
func (q *HasChildQuery) QueryName(queryName string) *HasChildQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*HasChildQuery) ScoreMode ¶
func (q *HasChildQuery) ScoreMode(scoreMode string) *HasChildQuery
ScoreMode defines how the scores from the matching child documents are mapped into the parent document. Allowed values are: min, max, avg, or none.
func (*HasChildQuery) ShortCircuitCutoff ¶
func (q *HasChildQuery) ShortCircuitCutoff(shortCircuitCutoff int) *HasChildQuery
ShortCircuitCutoff configures what cut off point only to evaluate parent documents that contain the matching parent id terms instead of evaluating all parent docs.
func (*HasChildQuery) Source ¶
func (q *HasChildQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type HasParentQuery ¶
type HasParentQuery struct {
// contains filtered or unexported fields
}
HasParentQuery accepts a query and a parent type. The query is executed in the parent document space which is specified by the parent type. This query returns child documents which associated parents have matched. For the rest has_parent query has the same options and works in the same manner as has_child query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-has-parent-query.html
func NewHasParentQuery ¶
func NewHasParentQuery(parentType string, query Query) *HasParentQuery
NewHasParentQuery creates and initializes a new has_parent query.
func (*HasParentQuery) Boost ¶
func (q *HasParentQuery) Boost(boost float64) *HasParentQuery
Boost sets the boost for this query.
func (*HasParentQuery) IgnoreUnmapped ¶
func (q *HasParentQuery) IgnoreUnmapped(ignore bool) *HasParentQuery
IgnoreUnmapped specifies whether unmapped types should be ignored. If set to false, the query failes when an unmapped type is found.
func (*HasParentQuery) InnerHit ¶
func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*HasParentQuery) QueryName ¶
func (q *HasParentQuery) QueryName(queryName string) *HasParentQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*HasParentQuery) Score ¶
func (q *HasParentQuery) Score(score bool) *HasParentQuery
Score defines if the parent score is mapped into the child documents.
func (*HasParentQuery) Source ¶
func (q *HasParentQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type Highlight ¶
type Highlight struct {
// contains filtered or unexported fields
}
Highlight allows highlighting search results on one or more fields. For details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-highlighting.html
func NewHighlight ¶
func NewHighlight() *Highlight
func (*Highlight) BoundaryChars ¶
func (*Highlight) BoundaryMaxScan ¶
func (*Highlight) BoundaryScannerLocale ¶
func (*Highlight) BoundaryScannerType ¶
func (*Highlight) Fields ¶
func (hl *Highlight) Fields(fields ...*HighlighterField) *Highlight
func (*Highlight) ForceSource ¶
func (*Highlight) FragmentSize ¶
func (*Highlight) Fragmenter ¶
func (*Highlight) HighlightFilter ¶
func (*Highlight) HighlightQuery ¶
func (*Highlight) HighlighterType ¶
func (*Highlight) NoMatchSize ¶
func (*Highlight) NumOfFragments ¶
func (*Highlight) RequireFieldMatch ¶
func (*Highlight) TagsSchema ¶
func (*Highlight) UseExplicitFieldOrder ¶
type HighlighterField ¶
type HighlighterField struct { Name string // contains filtered or unexported fields }
HighlighterField specifies a highlighted field.
func NewHighlighterField ¶
func NewHighlighterField(name string) *HighlighterField
func (*HighlighterField) BoundaryChars ¶
func (f *HighlighterField) BoundaryChars(boundaryChars ...rune) *HighlighterField
func (*HighlighterField) BoundaryMaxScan ¶
func (f *HighlighterField) BoundaryMaxScan(boundaryMaxScan int) *HighlighterField
func (*HighlighterField) ForceSource ¶
func (f *HighlighterField) ForceSource(forceSource bool) *HighlighterField
func (*HighlighterField) FragmentOffset ¶
func (f *HighlighterField) FragmentOffset(fragmentOffset int) *HighlighterField
func (*HighlighterField) FragmentSize ¶
func (f *HighlighterField) FragmentSize(fragmentSize int) *HighlighterField
func (*HighlighterField) Fragmenter ¶
func (f *HighlighterField) Fragmenter(fragmenter string) *HighlighterField
func (*HighlighterField) HighlightFilter ¶
func (f *HighlighterField) HighlightFilter(highlightFilter bool) *HighlighterField
func (*HighlighterField) HighlightQuery ¶
func (f *HighlighterField) HighlightQuery(highlightQuery Query) *HighlighterField
func (*HighlighterField) HighlighterType ¶
func (f *HighlighterField) HighlighterType(highlighterType string) *HighlighterField
func (*HighlighterField) MatchedFields ¶
func (f *HighlighterField) MatchedFields(matchedFields ...string) *HighlighterField
func (*HighlighterField) NoMatchSize ¶
func (f *HighlighterField) NoMatchSize(noMatchSize int) *HighlighterField
func (*HighlighterField) NumOfFragments ¶
func (f *HighlighterField) NumOfFragments(numOfFragments int) *HighlighterField
func (*HighlighterField) Options ¶
func (f *HighlighterField) Options(options map[string]interface{}) *HighlighterField
func (*HighlighterField) Order ¶
func (f *HighlighterField) Order(order string) *HighlighterField
func (*HighlighterField) PhraseLimit ¶
func (f *HighlighterField) PhraseLimit(phraseLimit int) *HighlighterField
func (*HighlighterField) PostTags ¶
func (f *HighlighterField) PostTags(postTags ...string) *HighlighterField
func (*HighlighterField) PreTags ¶
func (f *HighlighterField) PreTags(preTags ...string) *HighlighterField
func (*HighlighterField) RequireFieldMatch ¶
func (f *HighlighterField) RequireFieldMatch(requireFieldMatch bool) *HighlighterField
func (*HighlighterField) Source ¶
func (f *HighlighterField) Source() (interface{}, error)
type HistogramAggregation ¶
type HistogramAggregation struct {
// contains filtered or unexported fields
}
HistogramAggregation is a multi-bucket values source based aggregation that can be applied on numeric values extracted from the documents. It dynamically builds fixed size (a.k.a. interval) buckets over the values. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-histogram-aggregation.html
func NewHistogramAggregation ¶
func NewHistogramAggregation() *HistogramAggregation
func (*HistogramAggregation) ExtendedBounds ¶
func (a *HistogramAggregation) ExtendedBounds(min, max float64) *HistogramAggregation
func (*HistogramAggregation) ExtendedBoundsMax ¶
func (a *HistogramAggregation) ExtendedBoundsMax(max float64) *HistogramAggregation
func (*HistogramAggregation) ExtendedBoundsMin ¶
func (a *HistogramAggregation) ExtendedBoundsMin(min float64) *HistogramAggregation
func (*HistogramAggregation) Field ¶
func (a *HistogramAggregation) Field(field string) *HistogramAggregation
func (*HistogramAggregation) Interval ¶
func (a *HistogramAggregation) Interval(interval float64) *HistogramAggregation
Interval for this builder, must be greater than 0.
func (*HistogramAggregation) MaxBounds ¶
func (a *HistogramAggregation) MaxBounds(max float64) *HistogramAggregation
func (*HistogramAggregation) Meta ¶
func (a *HistogramAggregation) Meta(metaData map[string]interface{}) *HistogramAggregation
Meta sets the meta data to be included in the aggregation response.
func (*HistogramAggregation) MinBounds ¶
func (a *HistogramAggregation) MinBounds(min float64) *HistogramAggregation
func (*HistogramAggregation) MinDocCount ¶
func (a *HistogramAggregation) MinDocCount(minDocCount int64) *HistogramAggregation
func (*HistogramAggregation) Missing ¶
func (a *HistogramAggregation) Missing(missing interface{}) *HistogramAggregation
Missing configures the value to use when documents miss a value.
func (*HistogramAggregation) Offset ¶
func (a *HistogramAggregation) Offset(offset float64) *HistogramAggregation
Offset into the histogram
func (*HistogramAggregation) Order ¶
func (a *HistogramAggregation) Order(order string, asc bool) *HistogramAggregation
Order specifies the sort order. Valid values for order are: "_key", "_count", a sub-aggregation name, or a sub-aggregation name with a metric.
func (*HistogramAggregation) OrderByAggregation ¶
func (a *HistogramAggregation) OrderByAggregation(aggName string, asc bool) *HistogramAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*HistogramAggregation) OrderByAggregationAndMetric ¶
func (a *HistogramAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *HistogramAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*HistogramAggregation) OrderByCount ¶
func (a *HistogramAggregation) OrderByCount(asc bool) *HistogramAggregation
func (*HistogramAggregation) OrderByCountAsc ¶
func (a *HistogramAggregation) OrderByCountAsc() *HistogramAggregation
func (*HistogramAggregation) OrderByCountDesc ¶
func (a *HistogramAggregation) OrderByCountDesc() *HistogramAggregation
func (*HistogramAggregation) OrderByKey ¶
func (a *HistogramAggregation) OrderByKey(asc bool) *HistogramAggregation
func (*HistogramAggregation) OrderByKeyAsc ¶
func (a *HistogramAggregation) OrderByKeyAsc() *HistogramAggregation
func (*HistogramAggregation) OrderByKeyDesc ¶
func (a *HistogramAggregation) OrderByKeyDesc() *HistogramAggregation
func (*HistogramAggregation) Script ¶
func (a *HistogramAggregation) Script(script *Script) *HistogramAggregation
func (*HistogramAggregation) Source ¶
func (a *HistogramAggregation) Source() (interface{}, error)
func (*HistogramAggregation) SubAggregation ¶
func (a *HistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *HistogramAggregation
type HoltLinearMovAvgModel ¶
type HoltLinearMovAvgModel struct {
// contains filtered or unexported fields
}
HoltLinearMovAvgModel calculates a doubly exponential weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html#_holt_linear
func NewHoltLinearMovAvgModel ¶
func NewHoltLinearMovAvgModel() *HoltLinearMovAvgModel
NewHoltLinearMovAvgModel creates and initializes a new HoltLinearMovAvgModel.
func (*HoltLinearMovAvgModel) Alpha ¶
func (m *HoltLinearMovAvgModel) Alpha(alpha float64) *HoltLinearMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*HoltLinearMovAvgModel) Beta ¶
func (m *HoltLinearMovAvgModel) Beta(beta float64) *HoltLinearMovAvgModel
Beta is equivalent to Alpha but controls the smoothing of the trend instead of the data.
func (*HoltLinearMovAvgModel) Name ¶
func (m *HoltLinearMovAvgModel) Name() string
Name of the model.
func (*HoltLinearMovAvgModel) Settings ¶
func (m *HoltLinearMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type HoltWintersMovAvgModel ¶
type HoltWintersMovAvgModel struct {
// contains filtered or unexported fields
}
HoltWintersMovAvgModel calculates a triple exponential weighted moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html#_holt_winters
func NewHoltWintersMovAvgModel ¶
func NewHoltWintersMovAvgModel() *HoltWintersMovAvgModel
NewHoltWintersMovAvgModel creates and initializes a new HoltWintersMovAvgModel.
func (*HoltWintersMovAvgModel) Alpha ¶
func (m *HoltWintersMovAvgModel) Alpha(alpha float64) *HoltWintersMovAvgModel
Alpha controls the smoothing of the data. Alpha = 1 retains no memory of past values (e.g. a random walk), while alpha = 0 retains infinite memory of past values (e.g. the series mean). Useful values are somewhere in between. Defaults to 0.5.
func (*HoltWintersMovAvgModel) Beta ¶
func (m *HoltWintersMovAvgModel) Beta(beta float64) *HoltWintersMovAvgModel
Beta is equivalent to Alpha but controls the smoothing of the trend instead of the data.
func (*HoltWintersMovAvgModel) Gamma ¶
func (m *HoltWintersMovAvgModel) Gamma(gamma float64) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Name ¶
func (m *HoltWintersMovAvgModel) Name() string
Name of the model.
func (*HoltWintersMovAvgModel) Pad ¶
func (m *HoltWintersMovAvgModel) Pad(pad bool) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Period ¶
func (m *HoltWintersMovAvgModel) Period(period int) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) SeasonalityType ¶
func (m *HoltWintersMovAvgModel) SeasonalityType(typ string) *HoltWintersMovAvgModel
func (*HoltWintersMovAvgModel) Settings ¶
func (m *HoltWintersMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type IPRangeAggregation ¶
type IPRangeAggregation struct {
// contains filtered or unexported fields
}
IPRangeAggregation is a range aggregation that is dedicated for IP addresses.
func NewIPRangeAggregation ¶
func NewIPRangeAggregation() *IPRangeAggregation
func (*IPRangeAggregation) AddMaskRange ¶
func (a *IPRangeAggregation) AddMaskRange(mask string) *IPRangeAggregation
func (*IPRangeAggregation) AddMaskRangeWithKey ¶
func (a *IPRangeAggregation) AddMaskRangeWithKey(key, mask string) *IPRangeAggregation
func (*IPRangeAggregation) AddRange ¶
func (a *IPRangeAggregation) AddRange(from, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddRangeWithKey ¶
func (a *IPRangeAggregation) AddRangeWithKey(key, from, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedFrom ¶
func (a *IPRangeAggregation) AddUnboundedFrom(to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedFromWithKey ¶
func (a *IPRangeAggregation) AddUnboundedFromWithKey(key, to string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedTo ¶
func (a *IPRangeAggregation) AddUnboundedTo(from string) *IPRangeAggregation
func (*IPRangeAggregation) AddUnboundedToWithKey ¶
func (a *IPRangeAggregation) AddUnboundedToWithKey(key, from string) *IPRangeAggregation
func (*IPRangeAggregation) Between ¶
func (a *IPRangeAggregation) Between(from, to string) *IPRangeAggregation
func (*IPRangeAggregation) BetweenWithKey ¶
func (a *IPRangeAggregation) BetweenWithKey(key, from, to string) *IPRangeAggregation
func (*IPRangeAggregation) Field ¶
func (a *IPRangeAggregation) Field(field string) *IPRangeAggregation
func (*IPRangeAggregation) Gt ¶
func (a *IPRangeAggregation) Gt(from string) *IPRangeAggregation
func (*IPRangeAggregation) GtWithKey ¶
func (a *IPRangeAggregation) GtWithKey(key, from string) *IPRangeAggregation
func (*IPRangeAggregation) Keyed ¶
func (a *IPRangeAggregation) Keyed(keyed bool) *IPRangeAggregation
func (*IPRangeAggregation) Lt ¶
func (a *IPRangeAggregation) Lt(to string) *IPRangeAggregation
func (*IPRangeAggregation) LtWithKey ¶
func (a *IPRangeAggregation) LtWithKey(key, to string) *IPRangeAggregation
func (*IPRangeAggregation) Meta ¶
func (a *IPRangeAggregation) Meta(metaData map[string]interface{}) *IPRangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*IPRangeAggregation) Source ¶
func (a *IPRangeAggregation) Source() (interface{}, error)
func (*IPRangeAggregation) SubAggregation ¶
func (a *IPRangeAggregation) SubAggregation(name string, subAggregation Aggregation) *IPRangeAggregation
type IPRangeAggregationEntry ¶
type IdsQuery ¶
type IdsQuery struct {
// contains filtered or unexported fields
}
IdsQuery filters documents that only have the provided ids. Note, this query uses the _uid field.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-ids-query.html
func NewIdsQuery ¶
NewIdsQuery creates and initializes a new ids query.
type IndexResponse ¶
type IndexResponse struct { Index string `json:"_index,omitempty"` Type string `json:"_type,omitempty"` Id string `json:"_id,omitempty"` Version int64 `json:"_version,omitempty"` Result string `json:"result,omitempty"` Shards *ShardsInfo `json:"_shards,omitempty"` SeqNo int64 `json:"_seq_no,omitempty"` PrimaryTerm int64 `json:"_primary_term,omitempty"` Status int `json:"status,omitempty"` ForcedRefresh bool `json:"forced_refresh,omitempty"` }
IndexResponse is the result of indexing a document in Elasticsearch.
type IndexSegments ¶
type IndexSegments struct { // Shards provides a map into the shard related information of an index. // The key of the map is the number of a specific shard. Shards map[string][]*IndexSegmentsShards `json:"shards,omitempty"` }
type IndexSegmentsDetails ¶
type IndexSegmentsDetails struct { Generation int64 `json:"generation,omitempty"` NumDocs int64 `json:"num_docs,omitempty"` DeletedDocs int64 `json:"deleted_docs,omitempty"` Size string `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes,omitempty"` Memory string `json:"memory,omitempty"` MemoryInBytes int64 `json:"memory_in_bytes,omitempty"` Committed bool `json:"committed,omitempty"` Search bool `json:"search,omitempty"` Version string `json:"version,omitempty"` Compound bool `json:"compound,omitempty"` MergeId string `json:"merge_id,omitempty"` Sort []*IndexSegmentsSort `json:"sort,omitempty"` RAMTree []*IndexSegmentsRamTree `json:"ram_tree,omitempty"` Attributes map[string]string `json:"attributes,omitempty"` }
type IndexSegmentsRamTree ¶
type IndexSegmentsRamTree struct { Description string `json:"description,omitempty"` Size string `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes,omitempty"` Children []*IndexSegmentsRamTree `json:"children,omitempty"` }
type IndexSegmentsRouting ¶
type IndexSegmentsShards ¶
type IndexSegmentsShards struct { Routing *IndexSegmentsRouting `json:"routing,omitempty"` NumCommittedSegments int64 `json:"num_committed_segments,omitempty"` NumSearchSegments int64 `json:"num_search_segments"` // Segments provides a map into the segment related information of a shard. // The key of the map is the specific lucene segment id. Segments map[string]*IndexSegmentsDetails `json:"segments,omitempty"` }
type IndexSegmentsSort ¶
type IndexService ¶
type IndexService struct {
// contains filtered or unexported fields
}
IndexService adds or updates a typed JSON document in a specified index, making it searchable.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-index_.html for details.
func NewIndexService ¶
func NewIndexService(client *Client) *IndexService
NewIndexService creates a new IndexService.
func (*IndexService) BodyJson ¶
func (s *IndexService) BodyJson(body interface{}) *IndexService
BodyJson is the document as a serializable JSON interface.
func (*IndexService) BodyString ¶
func (s *IndexService) BodyString(body string) *IndexService
BodyString is the document encoded as a string.
func (*IndexService) Do ¶
func (s *IndexService) Do(ctx context.Context) (*IndexResponse, error)
Do executes the operation.
func (*IndexService) ErrorTrace ¶
func (s *IndexService) ErrorTrace(errorTrace bool) *IndexService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndexService) FilterPath ¶
func (s *IndexService) FilterPath(filterPath ...string) *IndexService
FilterPath specifies a list of filters used to reduce the response.
func (*IndexService) Header ¶
func (s *IndexService) Header(name string, value string) *IndexService
Header adds a header to the request.
func (*IndexService) Headers ¶
func (s *IndexService) Headers(headers http.Header) *IndexService
Headers specifies the headers of the request.
func (*IndexService) Human ¶
func (s *IndexService) Human(human bool) *IndexService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndexService) IfPrimaryTerm ¶
func (s *IndexService) IfPrimaryTerm(primaryTerm int64) *IndexService
IfPrimaryTerm indicates to only perform the index operation if the last operation that has changed the document has the specified primary term.
func (*IndexService) IfSeqNo ¶
func (s *IndexService) IfSeqNo(seqNo int64) *IndexService
IfSeqNo indicates to only perform the index operation if the last operation that has changed the document has the specified sequence number.
func (*IndexService) Index ¶
func (s *IndexService) Index(index string) *IndexService
Index is the name of the index.
func (*IndexService) OpType ¶
func (s *IndexService) OpType(opType string) *IndexService
OpType is an explicit operation type, i.e. "create" or "index" (default).
func (*IndexService) Parent ¶
func (s *IndexService) Parent(parent string) *IndexService
Parent is the ID of the parent document.
func (*IndexService) Pipeline ¶
func (s *IndexService) Pipeline(pipeline string) *IndexService
Pipeline specifies the pipeline id to preprocess incoming documents with.
func (*IndexService) Pretty ¶
func (s *IndexService) Pretty(pretty bool) *IndexService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndexService) Refresh ¶
func (s *IndexService) Refresh(refresh string) *IndexService
Refresh the index after performing the operation.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*IndexService) Routing ¶
func (s *IndexService) Routing(routing string) *IndexService
Routing is a specific routing value.
func (*IndexService) TTL ¶
func (s *IndexService) TTL(ttl string) *IndexService
TTL is an expiration time for the document (alias for Ttl).
func (*IndexService) Timeout ¶
func (s *IndexService) Timeout(timeout string) *IndexService
Timeout is an explicit operation timeout.
func (*IndexService) Timestamp ¶
func (s *IndexService) Timestamp(timestamp string) *IndexService
Timestamp is an explicit timestamp for the document.
func (*IndexService) Ttl ¶
func (s *IndexService) Ttl(ttl string) *IndexService
Ttl is an expiration time for the document.
func (*IndexService) Type ¶
func (s *IndexService) Type(typ string) *IndexService
Type is the type of the document.
func (*IndexService) Validate ¶
func (s *IndexService) Validate() error
Validate checks if the operation is valid.
func (*IndexService) Version ¶
func (s *IndexService) Version(version interface{}) *IndexService
Version is an explicit version number for concurrency control.
func (*IndexService) VersionType ¶
func (s *IndexService) VersionType(versionType string) *IndexService
VersionType is a specific version type.
func (*IndexService) WaitForActiveShards ¶
func (s *IndexService) WaitForActiveShards(waitForActiveShards string) *IndexService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
type IndexStats ¶
type IndexStats struct { UUID string `json:"uuid,omitempty"` Primaries *IndexStatsDetails `json:"primaries,omitempty"` Total *IndexStatsDetails `json:"total,omitempty"` Shards map[string][]*IndexStatsDetails `json:"shards,omitempty"` }
IndexStats is index stats for a specific index.
type IndexStatsCommit ¶
type IndexStatsCompletion ¶
type IndexStatsDetails ¶
type IndexStatsDetails struct { Routing *IndexStatsRouting `json:"routing,omitempty"` Docs *IndexStatsDocs `json:"docs,omitempty"` Store *IndexStatsStore `json:"store,omitempty"` Indexing *IndexStatsIndexing `json:"indexing,omitempty"` Get *IndexStatsGet `json:"get,omitempty"` Search *IndexStatsSearch `json:"search,omitempty"` Merges *IndexStatsMerges `json:"merges,omitempty"` Refresh *IndexStatsRefresh `json:"refresh,omitempty"` Flush *IndexStatsFlush `json:"flush,omitempty"` Warmer *IndexStatsWarmer `json:"warmer,omitempty"` QueryCache *IndexStatsQueryCache `json:"query_cache,omitempty"` Fielddata *IndexStatsFielddata `json:"fielddata,omitempty"` Completion *IndexStatsCompletion `json:"completion,omitempty"` Segments *IndexStatsSegments `json:"segments,omitempty"` Translog *IndexStatsTranslog `json:"translog,omitempty"` RequestCache *IndexStatsRequestCache `json:"request_cache,omitempty"` Recovery *IndexStatsRecovery `json:"recovery,omitempty"` Commit *IndexStatsCommit `json:"commit,omitempty"` ShardPath *IndexStatsShardPath `json:"shard_path,omitempty"` SeqNo *IndexStatsSeqNo `json:"seq_no,omitempty"` RetentionLeases *IndexStatsRetentionLeases `json:"retention_leases,omitempty"` FilterCache *IndexStatsFilterCache `json:"filter_cache,omitempty"` IdCache *IndexStatsIdCache `json:"id_cache,omitempty"` Percolate *IndexStatsPercolate `json:"percolate,omitempty"` Suggest *IndexStatsSuggest `json:"suggest,omitempty"` }
type IndexStatsDocs ¶
type IndexStatsFielddata ¶
type IndexStatsFilterCache ¶
type IndexStatsFlush ¶
type IndexStatsGet ¶
type IndexStatsGet struct { Total int64 `json:"total,omitempty"` GetTime string `json:"getTime,omitempty"` // getTime on 6.8.3 TimeInMillis int64 `json:"time_in_millis,omitempty"` ExistsTotal int64 `json:"exists_total,omitempty"` ExistsTime string `json:"exists_time,omitempty"` ExistsTimeInMillis int64 `json:"exists_time_in_millis,omitempty"` MissingTotal int64 `json:"missing_total,omitempty"` MissingTime string `json:"missing_time,omitempty"` MissingTimeInMillis int64 `json:"missing_time_in_millis,omitempty"` Current int64 `json:"current,omitempty"` }
type IndexStatsIdCache ¶
type IndexStatsIndexing ¶
type IndexStatsIndexing struct { IndexTotal int64 `json:"index_total,omitempty"` IndexTime string `json:"index_time,omitempty"` IndexTimeInMillis int64 `json:"index_time_in_millis,omitempty"` IndexCurrent int64 `json:"index_current,omitempty"` IndexFailed int64 `json:"index_failed,omitempty"` DeleteTotal int64 `json:"delete_total,omitempty"` DeleteTime string `json:"delete_time,omitempty"` DeleteTimeInMillis int64 `json:"delete_time_in_millis,omitempty"` DeleteCurrent int64 `json:"delete_current,omitempty"` NoopUpdateTotal int64 `json:"noop_update_total,omitempty"` IsThrottled bool `json:"is_throttled,omitempty"` ThrottleTime string `json:"throttle_time,omitempty"` ThrottleTimeInMillis int64 `json:"throttle_time_in_millis,omitempty"` }
type IndexStatsMerges ¶
type IndexStatsMerges struct { Current int64 `json:"current,omitempty"` CurrentDocs int64 `json:"current_docs,omitempty"` CurrentSize string `json:"current_size,omitempty"` CurrentSizeInBytes int64 `json:"current_size_in_bytes,omitempty"` Total int64 `json:"total,omitempty"` TotalTime string `json:"total_time,omitempty"` TotalTimeInMillis int64 `json:"total_time_in_millis,omitempty"` TotalDocs int64 `json:"total_docs,omitempty"` TotalSize string `json:"total_size,omitempty"` TotalSizeInBytes int64 `json:"total_size_in_bytes,omitempty"` TotalStoppedTime string `json:"total_stopped_time,omitempty"` TotalStoppedTimeInMillis int64 `json:"total_stopped_time_in_millis,omitempty"` TotalThrottledTime string `json:"total_throttled_time,omitempty"` TotalThrottledTimeInMillis int64 `json:"total_throttled_time_in_millis,omitempty"` TotalAutoThrottle string `json:"total_auto_throttle,omitempty"` TotalAutoThrottleInBytes int64 `json:"total_auto_throttle_in_bytes,omitempty"` }
type IndexStatsPercolate ¶
type IndexStatsPercolate struct { Total int64 `json:"total,omitempty"` GetTime string `json:"get_time,omitempty"` TimeInMillis int64 `json:"time_in_millis,omitempty"` Current int64 `json:"current,omitempty"` MemorySize string `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"` Queries int64 `json:"queries,omitempty"` }
type IndexStatsQueryCache ¶
type IndexStatsQueryCache struct { MemorySize string `json:"memory_size,omitempty"` MemorySizeInBytes int64 `json:"memory_size_in_bytes,omitempty"` TotalCount int64 `json:"total_count,omitempty"` HitCount int64 `json:"hit_count,omitempty"` MissCount int64 `json:"miss_count,omitempty"` CacheSize int64 `json:"cache_size,omitempty"` CacheCount int64 `json:"cache_count,omitempty"` Evictions int64 `json:"evictions,omitempty"` }
type IndexStatsRecovery ¶
type IndexStatsRefresh ¶
type IndexStatsRequestCache ¶
type IndexStatsRetentionLeases ¶
type IndexStatsRetentionLeases struct { PrimaryTerm int64 `json:"primary_term,omitempty"` Version int64 `json:"version,omitempty"` Leases []*IndexStatsRetentionLease `json:"leases,omitempty"` }
type IndexStatsRouting ¶
type IndexStatsSearch ¶
type IndexStatsSearch struct { OpenContexts int64 `json:"open_contexts,omitempty"` QueryTotal int64 `json:"query_total,omitempty"` QueryTime string `json:"query_time,omitempty"` QueryTimeInMillis int64 `json:"query_time_in_millis,omitempty"` QueryCurrent int64 `json:"query_current,omitempty"` FetchTotal int64 `json:"fetch_total,omitempty"` FetchTime string `json:"fetch_time,omitempty"` FetchTimeInMillis int64 `json:"fetch_time_in_millis,omitempty"` FetchCurrent int64 `json:"fetch_current,omitempty"` ScrollTotal int64 `json:"scroll_total,omitempty"` ScrollTime string `json:"scroll_time,omitempty"` ScrollTimeInMillis int64 `json:"scroll_time_in_millis,omitempty"` ScrollCurrent int64 `json:"scroll_current,omitempty"` SuggestTotal int64 `json:"suggest_total,omitempty"` SuggestTime string `json:"suggest_time,omitempty"` SuggestTimeInMillis int64 `json:"suggest_time_in_millis,omitempty"` SuggestCurrent int64 `json:"suggest_current,omitempty"` }
type IndexStatsSegments ¶
type IndexStatsSegments struct { Count int64 `json:"count"` Memory string `json:"memory"` // e.g. "61.3kb" MemoryInBytes int64 `json:"memory_in_bytes"` TermsMemory string `json:"terms_memory"` // e.g. "61.3kb" TermsMemoryInBytes int64 `json:"terms_memory_in_bytes"` StoredFieldsMemory string `json:"stored_fields_memory"` // e.g. "61.3kb" StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"` TermVectorsMemory string `json:"term_vectors_memory"` // e.g. "61.3kb" TermVectorsMemoryInBytes int64 `json:"term_vectors_memory_in_bytes"` NormsMemory string `json:"norms_memory"` // e.g. "61.3kb" NormsMemoryInBytes int64 `json:"norms_memory_in_bytes"` PointsMemory string `json:"points_memory"` // e.g. "61.3kb" PointsMemoryInBytes int64 `json:"points_memory_in_bytes"` DocValuesMemory string `json:"doc_values_memory"` // e.g. "61.3kb" DocValuesMemoryInBytes int64 `json:"doc_values_memory_in_bytes"` IndexWriterMemory string `json:"index_writer_memory"` // e.g. "61.3kb" IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"` VersionMapMemory string `json:"version_map_memory"` // e.g. "61.3kb" VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"` FixedBitSet string `json:"fixed_bit_set"` // e.g. "61.3kb" FixedBitSetInBytes int64 `json:"fixed_bit_set_memory_in_bytes"` MaxUnsafeAutoIDTimestamp int64 `json:"max_unsafe_auto_id_timestamp"` FileSizes map[string]*ClusterStatsIndicesSegmentsFile `json:"file_sizes"` }
type IndexStatsSeqNo ¶
type IndexStatsShardPath ¶
type IndexStatsStore ¶
type IndexStatsSuggest ¶
type IndexStatsTranslog ¶
type IndexStatsTranslog struct { Operations int64 `json:"operations,omitempty"` Size string `json:"size,omitempty"` SizeInBytes int64 `json:"size_in_bytes,omitempty"` UncommittedOperations int64 `json:"uncommitted_operations,omitempty"` UncommittedSize string `json:"uncommitted_size,omitempty"` UncommittedSizeInBytes int64 `json:"uncommitted_size_in_bytes,omitempty"` EarliestLastModifiedAge int64 `json:"earliest_last_modified_age,omitempty"` }
type IndexStatsWarmer ¶
type IndicesAnalyzeRequest ¶
type IndicesAnalyzeRequest struct { Text []string `json:"text,omitempty"` Analyzer string `json:"analyzer,omitempty"` Tokenizer string `json:"tokenizer,omitempty"` Filter []string `json:"filter,omitempty"` CharFilter []string `json:"char_filter,omitempty"` Field string `json:"field,omitempty"` Explain bool `json:"explain,omitempty"` Attributes []string `json:"attributes,omitempty"` }
IndicesAnalyzeRequest specifies the parameters of the analyze request.
type IndicesAnalyzeResponse ¶
type IndicesAnalyzeResponse struct { Tokens []AnalyzeToken `json:"tokens"` // json part for normal message Detail IndicesAnalyzeResponseDetail `json:"detail"` // json part for verbose message of explain request }
type IndicesAnalyzeResponseDetail ¶
type IndicesAnalyzeResponseDetail struct { CustomAnalyzer bool `json:"custom_analyzer"` Analyzer *AnalyzeTokenList `json:"analyzer,omitempty"` Charfilters []*CharFilteredText `json:"charfilters,omitempty"` Tokenizer *AnalyzeTokenList `json:"tokenizer,omitempty"` TokenFilters []*AnalyzeTokenList `json:"tokenfilters,omitempty"` }
type IndicesAnalyzeService ¶
type IndicesAnalyzeService struct {
// contains filtered or unexported fields
}
IndicesAnalyzeService performs the analysis process on a text and returns the tokens breakdown of the text.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-analyze.html for detail.
func NewIndicesAnalyzeService ¶
func NewIndicesAnalyzeService(client *Client) *IndicesAnalyzeService
NewIndicesAnalyzeService creates a new IndicesAnalyzeService.
func (*IndicesAnalyzeService) Analyzer ¶
func (s *IndicesAnalyzeService) Analyzer(analyzer string) *IndicesAnalyzeService
Analyzer is the name of the analyzer to use.
func (*IndicesAnalyzeService) Attributes ¶
func (s *IndicesAnalyzeService) Attributes(attributes ...string) *IndicesAnalyzeService
Attributes is a list of token attributes to output; this parameter works only with explain=true.
func (*IndicesAnalyzeService) BodyJson ¶
func (s *IndicesAnalyzeService) BodyJson(body interface{}) *IndicesAnalyzeService
BodyJson is the text on which the analysis should be performed.
func (*IndicesAnalyzeService) BodyString ¶
func (s *IndicesAnalyzeService) BodyString(body string) *IndicesAnalyzeService
BodyString is the text on which the analysis should be performed.
func (*IndicesAnalyzeService) CharFilter ¶
func (s *IndicesAnalyzeService) CharFilter(charFilter ...string) *IndicesAnalyzeService
CharFilter is a list of character filters to use for the analysis.
func (*IndicesAnalyzeService) Do ¶
func (s *IndicesAnalyzeService) Do(ctx context.Context) (*IndicesAnalyzeResponse, error)
Do will execute the request with the given context.
func (*IndicesAnalyzeService) ErrorTrace ¶
func (s *IndicesAnalyzeService) ErrorTrace(errorTrace bool) *IndicesAnalyzeService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesAnalyzeService) Explain ¶
func (s *IndicesAnalyzeService) Explain(explain bool) *IndicesAnalyzeService
Explain, when true, outputs more advanced details (default: false).
func (*IndicesAnalyzeService) Field ¶
func (s *IndicesAnalyzeService) Field(field string) *IndicesAnalyzeService
Field specifies to use a specific analyzer configured for this field (instead of passing the analyzer name).
func (*IndicesAnalyzeService) Filter ¶
func (s *IndicesAnalyzeService) Filter(filter ...string) *IndicesAnalyzeService
Filter is a list of filters to use for the analysis.
func (*IndicesAnalyzeService) FilterPath ¶
func (s *IndicesAnalyzeService) FilterPath(filterPath ...string) *IndicesAnalyzeService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesAnalyzeService) Format ¶
func (s *IndicesAnalyzeService) Format(format string) *IndicesAnalyzeService
Format of the output.
func (*IndicesAnalyzeService) Header ¶
func (s *IndicesAnalyzeService) Header(name string, value string) *IndicesAnalyzeService
Header adds a header to the request.
func (*IndicesAnalyzeService) Headers ¶
func (s *IndicesAnalyzeService) Headers(headers http.Header) *IndicesAnalyzeService
Headers specifies the headers of the request.
func (*IndicesAnalyzeService) Human ¶
func (s *IndicesAnalyzeService) Human(human bool) *IndicesAnalyzeService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesAnalyzeService) Index ¶
func (s *IndicesAnalyzeService) Index(index string) *IndicesAnalyzeService
Index is the name of the index to scope the operation.
func (*IndicesAnalyzeService) PreferLocal ¶
func (s *IndicesAnalyzeService) PreferLocal(preferLocal bool) *IndicesAnalyzeService
PreferLocal, when true, specifies that a local shard should be used if available. When false, a random shard is used (default: true).
func (*IndicesAnalyzeService) Pretty ¶
func (s *IndicesAnalyzeService) Pretty(pretty bool) *IndicesAnalyzeService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesAnalyzeService) Request ¶
func (s *IndicesAnalyzeService) Request(request *IndicesAnalyzeRequest) *IndicesAnalyzeService
Request passes the analyze request to use.
func (*IndicesAnalyzeService) Text ¶
func (s *IndicesAnalyzeService) Text(text ...string) *IndicesAnalyzeService
Text is the text on which the analysis should be performed (when request body is not used).
func (*IndicesAnalyzeService) Tokenizer ¶
func (s *IndicesAnalyzeService) Tokenizer(tokenizer string) *IndicesAnalyzeService
Tokenizer is the name of the tokenizer to use for the analysis.
func (*IndicesAnalyzeService) Validate ¶
func (s *IndicesAnalyzeService) Validate() error
type IndicesClearCacheResponse ¶
type IndicesClearCacheResponse struct {
Shards *ShardsInfo `json:"_shards"`
}
IndicesClearCacheResponse is the response of IndicesClearCacheService.Do.
type IndicesClearCacheService ¶
type IndicesClearCacheService struct {
// contains filtered or unexported fields
}
IndicesClearCacheService allows to clear either all caches or specific cached associated with one or more indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-clearcache.html for details.
func NewIndicesClearCacheService ¶
func NewIndicesClearCacheService(client *Client) *IndicesClearCacheService
NewIndicesClearCacheService initializes a new instance of IndicesClearCacheService.
func (*IndicesClearCacheService) AllowNoIndices ¶
func (s *IndicesClearCacheService) AllowNoIndices(allowNoIndices bool) *IndicesClearCacheService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesClearCacheService) Do ¶
func (s *IndicesClearCacheService) Do(ctx context.Context) (*IndicesClearCacheResponse, error)
Do executes the operation.
func (*IndicesClearCacheService) ErrorTrace ¶
func (s *IndicesClearCacheService) ErrorTrace(errorTrace bool) *IndicesClearCacheService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesClearCacheService) ExpandWildcards ¶
func (s *IndicesClearCacheService) ExpandWildcards(expandWildcards string) *IndicesClearCacheService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesClearCacheService) FieldData ¶
func (s *IndicesClearCacheService) FieldData(fieldData bool) *IndicesClearCacheService
FieldData indicates whether to clear the fields cache. Use the fields parameter to clear the cache of specific fields only.
func (*IndicesClearCacheService) Fields ¶
func (s *IndicesClearCacheService) Fields(fields string) *IndicesClearCacheService
Fields indicates comma-separated list of field names used to limit the fielddata parameter. Defaults to all fields.
func (*IndicesClearCacheService) FilterPath ¶
func (s *IndicesClearCacheService) FilterPath(filterPath ...string) *IndicesClearCacheService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesClearCacheService) Header ¶
func (s *IndicesClearCacheService) Header(name string, value string) *IndicesClearCacheService
Header adds a header to the request.
func (*IndicesClearCacheService) Headers ¶
func (s *IndicesClearCacheService) Headers(headers http.Header) *IndicesClearCacheService
Headers specifies the headers of the request.
func (*IndicesClearCacheService) Human ¶
func (s *IndicesClearCacheService) Human(human bool) *IndicesClearCacheService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesClearCacheService) IgnoreUnavailable ¶
func (s *IndicesClearCacheService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesClearCacheService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesClearCacheService) Index ¶
func (s *IndicesClearCacheService) Index(indices ...string) *IndicesClearCacheService
Index is the comma-separated list or wildcard expression of index names used to clear cache.
func (*IndicesClearCacheService) Pretty ¶
func (s *IndicesClearCacheService) Pretty(pretty bool) *IndicesClearCacheService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesClearCacheService) Query ¶
func (s *IndicesClearCacheService) Query(queryCache bool) *IndicesClearCacheService
Query indicates whether to clear only query cache.
func (*IndicesClearCacheService) Request ¶
func (s *IndicesClearCacheService) Request(requestCache bool) *IndicesClearCacheService
Request indicates whether to clear only request cache.
func (*IndicesClearCacheService) Validate ¶
func (s *IndicesClearCacheService) Validate() error
Validate checks if the operation is valid.
type IndicesCloseResponse ¶
type IndicesCloseResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesCloseResponse is the response of IndicesCloseService.Do.
type IndicesCloseService ¶
type IndicesCloseService struct {
// contains filtered or unexported fields
}
IndicesCloseService closes an index.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-open-close.html for details.
func NewIndicesCloseService ¶
func NewIndicesCloseService(client *Client) *IndicesCloseService
NewIndicesCloseService creates and initializes a new IndicesCloseService.
func (*IndicesCloseService) AllowNoIndices ¶
func (s *IndicesCloseService) AllowNoIndices(allowNoIndices bool) *IndicesCloseService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesCloseService) Do ¶
func (s *IndicesCloseService) Do(ctx context.Context) (*IndicesCloseResponse, error)
Do executes the operation.
func (*IndicesCloseService) ErrorTrace ¶
func (s *IndicesCloseService) ErrorTrace(errorTrace bool) *IndicesCloseService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesCloseService) ExpandWildcards ¶
func (s *IndicesCloseService) ExpandWildcards(expandWildcards string) *IndicesCloseService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesCloseService) FilterPath ¶
func (s *IndicesCloseService) FilterPath(filterPath ...string) *IndicesCloseService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesCloseService) Header ¶
func (s *IndicesCloseService) Header(name string, value string) *IndicesCloseService
Header adds a header to the request.
func (*IndicesCloseService) Headers ¶
func (s *IndicesCloseService) Headers(headers http.Header) *IndicesCloseService
Headers specifies the headers of the request.
func (*IndicesCloseService) Human ¶
func (s *IndicesCloseService) Human(human bool) *IndicesCloseService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesCloseService) IgnoreUnavailable ¶
func (s *IndicesCloseService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesCloseService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesCloseService) Index ¶
func (s *IndicesCloseService) Index(index string) *IndicesCloseService
Index is the name of the index to close.
func (*IndicesCloseService) MasterTimeout ¶
func (s *IndicesCloseService) MasterTimeout(masterTimeout string) *IndicesCloseService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesCloseService) Pretty ¶
func (s *IndicesCloseService) Pretty(pretty bool) *IndicesCloseService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesCloseService) Timeout ¶
func (s *IndicesCloseService) Timeout(timeout string) *IndicesCloseService
Timeout is an explicit operation timeout.
func (*IndicesCloseService) Validate ¶
func (s *IndicesCloseService) Validate() error
Validate checks if the operation is valid.
type IndicesCreateResult ¶
type IndicesCreateResult struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesCreateResult is the outcome of creating a new index.
type IndicesCreateService ¶
type IndicesCreateService struct {
// contains filtered or unexported fields
}
IndicesCreateService creates a new index.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-create-index.html for details.
Example ¶
package main import ( "context" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Create a new index. createIndex, err := client.CreateIndex("twitter").IncludeTypeName(true).Do(context.Background()) if err != nil { // Handle error panic(err) } if !createIndex.Acknowledged { // Not acknowledged } }
Output:
func NewIndicesCreateService ¶
func NewIndicesCreateService(client *Client) *IndicesCreateService
NewIndicesCreateService returns a new IndicesCreateService.
func (*IndicesCreateService) Body ¶
func (s *IndicesCreateService) Body(body string) *IndicesCreateService
Body specifies the configuration of the index as a string. It is an alias for BodyString.
func (*IndicesCreateService) BodyJson ¶
func (s *IndicesCreateService) BodyJson(body interface{}) *IndicesCreateService
BodyJson specifies the configuration of the index. The interface{} will be serializes as a JSON document, so use a map[string]interface{}.
func (*IndicesCreateService) BodyString ¶
func (s *IndicesCreateService) BodyString(body string) *IndicesCreateService
BodyString specifies the configuration of the index as a string.
func (*IndicesCreateService) Do ¶
func (s *IndicesCreateService) Do(ctx context.Context) (*IndicesCreateResult, error)
Do executes the operation.
func (*IndicesCreateService) ErrorTrace ¶
func (s *IndicesCreateService) ErrorTrace(errorTrace bool) *IndicesCreateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesCreateService) FilterPath ¶
func (s *IndicesCreateService) FilterPath(filterPath ...string) *IndicesCreateService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesCreateService) Header ¶
func (s *IndicesCreateService) Header(name string, value string) *IndicesCreateService
Header adds a header to the request.
func (*IndicesCreateService) Headers ¶
func (s *IndicesCreateService) Headers(headers http.Header) *IndicesCreateService
Headers specifies the headers of the request.
func (*IndicesCreateService) Human ¶
func (s *IndicesCreateService) Human(human bool) *IndicesCreateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesCreateService) IncludeTypeName ¶
func (s *IndicesCreateService) IncludeTypeName(include bool) *IndicesCreateService
IncludeTypeName indicates whether a type should be expected in the body of the mappings.
func (*IndicesCreateService) Index ¶
func (s *IndicesCreateService) Index(index string) *IndicesCreateService
Index is the name of the index to create.
func (*IndicesCreateService) MasterTimeout ¶
func (s *IndicesCreateService) MasterTimeout(masterTimeout string) *IndicesCreateService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesCreateService) Pretty ¶
func (s *IndicesCreateService) Pretty(pretty bool) *IndicesCreateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesCreateService) Timeout ¶
func (s *IndicesCreateService) Timeout(timeout string) *IndicesCreateService
Timeout the explicit operation timeout, e.g. "5s".
func (*IndicesCreateService) UpdateAllTypes ¶
func (s *IndicesCreateService) UpdateAllTypes(update bool) *IndicesCreateService
UpdateAllTypes indicates whether to update the mapping for all fields with the same name across all types or not.
type IndicesDeleteResponse ¶
type IndicesDeleteResponse struct {
Acknowledged bool `json:"acknowledged"`
}
IndicesDeleteResponse is the response of IndicesDeleteService.Do.
type IndicesDeleteService ¶
type IndicesDeleteService struct {
// contains filtered or unexported fields
}
IndicesDeleteService allows to delete existing indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-delete-index.html for details.
Example ¶
package main import ( "context" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Delete an index. deleteIndex, err := client.DeleteIndex("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if !deleteIndex.Acknowledged { // Not acknowledged } }
Output:
func NewIndicesDeleteService ¶
func NewIndicesDeleteService(client *Client) *IndicesDeleteService
NewIndicesDeleteService creates and initializes a new IndicesDeleteService.
func (*IndicesDeleteService) Do ¶
func (s *IndicesDeleteService) Do(ctx context.Context) (*IndicesDeleteResponse, error)
Do executes the operation.
func (*IndicesDeleteService) ErrorTrace ¶
func (s *IndicesDeleteService) ErrorTrace(errorTrace bool) *IndicesDeleteService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesDeleteService) FilterPath ¶
func (s *IndicesDeleteService) FilterPath(filterPath ...string) *IndicesDeleteService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesDeleteService) Header ¶
func (s *IndicesDeleteService) Header(name string, value string) *IndicesDeleteService
Header adds a header to the request.
func (*IndicesDeleteService) Headers ¶
func (s *IndicesDeleteService) Headers(headers http.Header) *IndicesDeleteService
Headers specifies the headers of the request.
func (*IndicesDeleteService) Human ¶
func (s *IndicesDeleteService) Human(human bool) *IndicesDeleteService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesDeleteService) Index ¶
func (s *IndicesDeleteService) Index(index []string) *IndicesDeleteService
Index adds the list of indices to delete. Use `_all` or `*` string to delete all indices.
func (*IndicesDeleteService) MasterTimeout ¶
func (s *IndicesDeleteService) MasterTimeout(masterTimeout string) *IndicesDeleteService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesDeleteService) Pretty ¶
func (s *IndicesDeleteService) Pretty(pretty bool) *IndicesDeleteService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesDeleteService) Timeout ¶
func (s *IndicesDeleteService) Timeout(timeout string) *IndicesDeleteService
Timeout is an explicit operation timeout.
func (*IndicesDeleteService) Validate ¶
func (s *IndicesDeleteService) Validate() error
Validate checks if the operation is valid.
type IndicesDeleteTemplateResponse ¶
type IndicesDeleteTemplateResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesDeleteTemplateResponse is the response of IndicesDeleteTemplateService.Do.
type IndicesDeleteTemplateService ¶
type IndicesDeleteTemplateService struct {
// contains filtered or unexported fields
}
IndicesDeleteTemplateService deletes index templates. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-templates.html.
func NewIndicesDeleteTemplateService ¶
func NewIndicesDeleteTemplateService(client *Client) *IndicesDeleteTemplateService
NewIndicesDeleteTemplateService creates a new IndicesDeleteTemplateService.
func (*IndicesDeleteTemplateService) Do ¶
func (s *IndicesDeleteTemplateService) Do(ctx context.Context) (*IndicesDeleteTemplateResponse, error)
Do executes the operation.
func (*IndicesDeleteTemplateService) ErrorTrace ¶
func (s *IndicesDeleteTemplateService) ErrorTrace(errorTrace bool) *IndicesDeleteTemplateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesDeleteTemplateService) FilterPath ¶
func (s *IndicesDeleteTemplateService) FilterPath(filterPath ...string) *IndicesDeleteTemplateService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesDeleteTemplateService) Header ¶
func (s *IndicesDeleteTemplateService) Header(name string, value string) *IndicesDeleteTemplateService
Header adds a header to the request.
func (*IndicesDeleteTemplateService) Headers ¶
func (s *IndicesDeleteTemplateService) Headers(headers http.Header) *IndicesDeleteTemplateService
Headers specifies the headers of the request.
func (*IndicesDeleteTemplateService) Human ¶
func (s *IndicesDeleteTemplateService) Human(human bool) *IndicesDeleteTemplateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesDeleteTemplateService) MasterTimeout ¶
func (s *IndicesDeleteTemplateService) MasterTimeout(masterTimeout string) *IndicesDeleteTemplateService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesDeleteTemplateService) Name ¶
func (s *IndicesDeleteTemplateService) Name(name string) *IndicesDeleteTemplateService
Name is the name of the template.
func (*IndicesDeleteTemplateService) Pretty ¶
func (s *IndicesDeleteTemplateService) Pretty(pretty bool) *IndicesDeleteTemplateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesDeleteTemplateService) Timeout ¶
func (s *IndicesDeleteTemplateService) Timeout(timeout string) *IndicesDeleteTemplateService
Timeout is an explicit operation timeout.
func (*IndicesDeleteTemplateService) Validate ¶
func (s *IndicesDeleteTemplateService) Validate() error
Validate checks if the operation is valid.
type IndicesExistsService ¶
type IndicesExistsService struct {
// contains filtered or unexported fields
}
IndicesExistsService checks if an index or indices exist or not.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-exists.html for details.
Example ¶
package main import ( "context" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Use the IndexExists service to check if the index "twitter" exists. exists, err := client.IndexExists("twitter").Do(context.Background()) if err != nil { // Handle error panic(err) } if exists { // ... } }
Output:
func NewIndicesExistsService ¶
func NewIndicesExistsService(client *Client) *IndicesExistsService
NewIndicesExistsService creates and initializes a new IndicesExistsService.
func (*IndicesExistsService) AllowNoIndices ¶
func (s *IndicesExistsService) AllowNoIndices(allowNoIndices bool) *IndicesExistsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesExistsService) Do ¶
func (s *IndicesExistsService) Do(ctx context.Context) (bool, error)
Do executes the operation.
func (*IndicesExistsService) ErrorTrace ¶
func (s *IndicesExistsService) ErrorTrace(errorTrace bool) *IndicesExistsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesExistsService) ExpandWildcards ¶
func (s *IndicesExistsService) ExpandWildcards(expandWildcards string) *IndicesExistsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesExistsService) FilterPath ¶
func (s *IndicesExistsService) FilterPath(filterPath ...string) *IndicesExistsService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesExistsService) Header ¶
func (s *IndicesExistsService) Header(name string, value string) *IndicesExistsService
Header adds a header to the request.
func (*IndicesExistsService) Headers ¶
func (s *IndicesExistsService) Headers(headers http.Header) *IndicesExistsService
Headers specifies the headers of the request.
func (*IndicesExistsService) Human ¶
func (s *IndicesExistsService) Human(human bool) *IndicesExistsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesExistsService) IgnoreUnavailable ¶
func (s *IndicesExistsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesExistsService) Index ¶
func (s *IndicesExistsService) Index(index []string) *IndicesExistsService
Index is a list of one or more indices to check.
func (*IndicesExistsService) Local ¶
func (s *IndicesExistsService) Local(local bool) *IndicesExistsService
Local, when set, returns local information and does not retrieve the state from master node (default: false).
func (*IndicesExistsService) Pretty ¶
func (s *IndicesExistsService) Pretty(pretty bool) *IndicesExistsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesExistsService) Validate ¶
func (s *IndicesExistsService) Validate() error
Validate checks if the operation is valid.
type IndicesExistsTemplateService ¶
type IndicesExistsTemplateService struct {
// contains filtered or unexported fields
}
IndicesExistsTemplateService checks if a given template exists. See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-templates.html#indices-templates-exists for documentation.
func NewIndicesExistsTemplateService ¶
func NewIndicesExistsTemplateService(client *Client) *IndicesExistsTemplateService
NewIndicesExistsTemplateService creates a new IndicesExistsTemplateService.
func (*IndicesExistsTemplateService) Do ¶
func (s *IndicesExistsTemplateService) Do(ctx context.Context) (bool, error)
Do executes the operation.
func (*IndicesExistsTemplateService) ErrorTrace ¶
func (s *IndicesExistsTemplateService) ErrorTrace(errorTrace bool) *IndicesExistsTemplateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesExistsTemplateService) FilterPath ¶
func (s *IndicesExistsTemplateService) FilterPath(filterPath ...string) *IndicesExistsTemplateService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesExistsTemplateService) Header ¶
func (s *IndicesExistsTemplateService) Header(name string, value string) *IndicesExistsTemplateService
Header adds a header to the request.
func (*IndicesExistsTemplateService) Headers ¶
func (s *IndicesExistsTemplateService) Headers(headers http.Header) *IndicesExistsTemplateService
Headers specifies the headers of the request.
func (*IndicesExistsTemplateService) Human ¶
func (s *IndicesExistsTemplateService) Human(human bool) *IndicesExistsTemplateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesExistsTemplateService) IncludeTypeName ¶
func (s *IndicesExistsTemplateService) IncludeTypeName(include bool) *IndicesExistsTemplateService
IncludeTypeName indicates whether a type should be expected in the body of the mappings.
func (*IndicesExistsTemplateService) Local ¶
func (s *IndicesExistsTemplateService) Local(local bool) *IndicesExistsTemplateService
Local indicates whether to return local information, i.e. do not retrieve the state from master node (default: false).
func (*IndicesExistsTemplateService) Name ¶
func (s *IndicesExistsTemplateService) Name(name string) *IndicesExistsTemplateService
Name is the name of the template.
func (*IndicesExistsTemplateService) Pretty ¶
func (s *IndicesExistsTemplateService) Pretty(pretty bool) *IndicesExistsTemplateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesExistsTemplateService) Validate ¶
func (s *IndicesExistsTemplateService) Validate() error
Validate checks if the operation is valid.
type IndicesExistsTypeService ¶
type IndicesExistsTypeService struct {
// contains filtered or unexported fields
}
IndicesExistsTypeService checks if one or more types exist in one or more indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-types-exists.html for details.
func NewIndicesExistsTypeService ¶
func NewIndicesExistsTypeService(client *Client) *IndicesExistsTypeService
NewIndicesExistsTypeService creates a new IndicesExistsTypeService.
func (*IndicesExistsTypeService) AllowNoIndices ¶
func (s *IndicesExistsTypeService) AllowNoIndices(allowNoIndices bool) *IndicesExistsTypeService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesExistsTypeService) Do ¶
func (s *IndicesExistsTypeService) Do(ctx context.Context) (bool, error)
Do executes the operation.
func (*IndicesExistsTypeService) ErrorTrace ¶
func (s *IndicesExistsTypeService) ErrorTrace(errorTrace bool) *IndicesExistsTypeService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesExistsTypeService) ExpandWildcards ¶
func (s *IndicesExistsTypeService) ExpandWildcards(expandWildcards string) *IndicesExistsTypeService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesExistsTypeService) FilterPath ¶
func (s *IndicesExistsTypeService) FilterPath(filterPath ...string) *IndicesExistsTypeService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesExistsTypeService) Header ¶
func (s *IndicesExistsTypeService) Header(name string, value string) *IndicesExistsTypeService
Header adds a header to the request.
func (*IndicesExistsTypeService) Headers ¶
func (s *IndicesExistsTypeService) Headers(headers http.Header) *IndicesExistsTypeService
Headers specifies the headers of the request.
func (*IndicesExistsTypeService) Human ¶
func (s *IndicesExistsTypeService) Human(human bool) *IndicesExistsTypeService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesExistsTypeService) IgnoreUnavailable ¶
func (s *IndicesExistsTypeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesExistsTypeService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesExistsTypeService) IncludeTypeName ¶
func (s *IndicesExistsTypeService) IncludeTypeName(include bool) *IndicesExistsTypeService
IncludeTypeName indicates whether a type should be expected in the body of the mappings.
func (*IndicesExistsTypeService) Index ¶
func (s *IndicesExistsTypeService) Index(indices ...string) *IndicesExistsTypeService
Index is a list of index names; use `_all` to check the types across all indices.
func (*IndicesExistsTypeService) Local ¶
func (s *IndicesExistsTypeService) Local(local bool) *IndicesExistsTypeService
Local specifies whether to return local information, i.e. do not retrieve the state from master node (default: false).
func (*IndicesExistsTypeService) Pretty ¶
func (s *IndicesExistsTypeService) Pretty(pretty bool) *IndicesExistsTypeService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesExistsTypeService) Type ¶
func (s *IndicesExistsTypeService) Type(types ...string) *IndicesExistsTypeService
Type is a list of document types to check.
func (*IndicesExistsTypeService) Validate ¶
func (s *IndicesExistsTypeService) Validate() error
Validate checks if the operation is valid.
type IndicesFlushResponse ¶
type IndicesFlushResponse struct {
Shards *ShardsInfo `json:"_shards"`
}
type IndicesFlushService ¶
type IndicesFlushService struct {
// contains filtered or unexported fields
}
Flush allows to flush one or more indices. The flush process of an index basically frees memory from the index by flushing data to the index storage and clearing the internal transaction log.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-flush.html for details.
func NewIndicesFlushService ¶
func NewIndicesFlushService(client *Client) *IndicesFlushService
NewIndicesFlushService creates a new IndicesFlushService.
func (*IndicesFlushService) AllowNoIndices ¶
func (s *IndicesFlushService) AllowNoIndices(allowNoIndices bool) *IndicesFlushService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesFlushService) Do ¶
func (s *IndicesFlushService) Do(ctx context.Context) (*IndicesFlushResponse, error)
Do executes the service.
func (*IndicesFlushService) ErrorTrace ¶
func (s *IndicesFlushService) ErrorTrace(errorTrace bool) *IndicesFlushService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesFlushService) ExpandWildcards ¶
func (s *IndicesFlushService) ExpandWildcards(expandWildcards string) *IndicesFlushService
ExpandWildcards specifies whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesFlushService) FilterPath ¶
func (s *IndicesFlushService) FilterPath(filterPath ...string) *IndicesFlushService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesFlushService) Force ¶
func (s *IndicesFlushService) Force(force bool) *IndicesFlushService
Force indicates whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal).
func (*IndicesFlushService) Header ¶
func (s *IndicesFlushService) Header(name string, value string) *IndicesFlushService
Header adds a header to the request.
func (*IndicesFlushService) Headers ¶
func (s *IndicesFlushService) Headers(headers http.Header) *IndicesFlushService
Headers specifies the headers of the request.
func (*IndicesFlushService) Human ¶
func (s *IndicesFlushService) Human(human bool) *IndicesFlushService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesFlushService) IgnoreUnavailable ¶
func (s *IndicesFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesFlushService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesFlushService) Index ¶
func (s *IndicesFlushService) Index(indices ...string) *IndicesFlushService
Index is a list of index names; use `_all` or empty string for all indices.
func (*IndicesFlushService) Pretty ¶
func (s *IndicesFlushService) Pretty(pretty bool) *IndicesFlushService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesFlushService) Validate ¶
func (s *IndicesFlushService) Validate() error
Validate checks if the operation is valid.
func (*IndicesFlushService) WaitIfOngoing ¶
func (s *IndicesFlushService) WaitIfOngoing(waitIfOngoing bool) *IndicesFlushService
WaitIfOngoing, if set to true, indicates that the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running..
type IndicesForcemergeResponse ¶
type IndicesForcemergeResponse struct {
Shards *ShardsInfo `json:"_shards"`
}
IndicesForcemergeResponse is the response of IndicesForcemergeService.Do.
type IndicesForcemergeService ¶
type IndicesForcemergeService struct {
// contains filtered or unexported fields
}
IndicesForcemergeService allows to force merging of one or more indices. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the number of segments by merging them.
See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/indices-forcemerge.html for more information.
func NewIndicesForcemergeService ¶
func NewIndicesForcemergeService(client *Client) *IndicesForcemergeService
NewIndicesForcemergeService creates a new IndicesForcemergeService.
func (*IndicesForcemergeService) AllowNoIndices ¶
func (s *IndicesForcemergeService) AllowNoIndices(allowNoIndices bool) *IndicesForcemergeService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesForcemergeService) Do ¶
func (s *IndicesForcemergeService) Do(ctx context.Context) (*IndicesForcemergeResponse, error)
Do executes the operation.
func (*IndicesForcemergeService) ErrorTrace ¶
func (s *IndicesForcemergeService) ErrorTrace(errorTrace bool) *IndicesForcemergeService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesForcemergeService) ExpandWildcards ¶
func (s *IndicesForcemergeService) ExpandWildcards(expandWildcards string) *IndicesForcemergeService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesForcemergeService) FilterPath ¶
func (s *IndicesForcemergeService) FilterPath(filterPath ...string) *IndicesForcemergeService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesForcemergeService) Flush ¶
func (s *IndicesForcemergeService) Flush(flush bool) *IndicesForcemergeService
Flush specifies whether the index should be flushed after performing the operation (default: true).
func (*IndicesForcemergeService) Header ¶
func (s *IndicesForcemergeService) Header(name string, value string) *IndicesForcemergeService
Header adds a header to the request.
func (*IndicesForcemergeService) Headers ¶
func (s *IndicesForcemergeService) Headers(headers http.Header) *IndicesForcemergeService
Headers specifies the headers of the request.
func (*IndicesForcemergeService) Human ¶
func (s *IndicesForcemergeService) Human(human bool) *IndicesForcemergeService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesForcemergeService) IgnoreUnavailable ¶
func (s *IndicesForcemergeService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesForcemergeService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesForcemergeService) Index ¶
func (s *IndicesForcemergeService) Index(index ...string) *IndicesForcemergeService
Index is a list of index names; use `_all` or empty string to perform the operation on all indices.
func (*IndicesForcemergeService) MaxNumSegments ¶
func (s *IndicesForcemergeService) MaxNumSegments(maxNumSegments interface{}) *IndicesForcemergeService
MaxNumSegments specifies the number of segments the index should be merged into (default: dynamic).
func (*IndicesForcemergeService) OnlyExpungeDeletes ¶
func (s *IndicesForcemergeService) OnlyExpungeDeletes(onlyExpungeDeletes bool) *IndicesForcemergeService
OnlyExpungeDeletes specifies whether the operation should only expunge deleted documents.
func (*IndicesForcemergeService) Pretty ¶
func (s *IndicesForcemergeService) Pretty(pretty bool) *IndicesForcemergeService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesForcemergeService) Validate ¶
func (s *IndicesForcemergeService) Validate() error
Validate checks if the operation is valid.
type IndicesGetFieldMappingService ¶
type IndicesGetFieldMappingService struct {
// contains filtered or unexported fields
}
IndicesGetFieldMappingService retrieves the mapping definitions for the fields in an index
or index/type.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-field-mapping.html for details.
func NewGetFieldMappingService ¶
func NewGetFieldMappingService(client *Client) *IndicesGetFieldMappingService
NewGetFieldMappingService is an alias for NewIndicesGetFieldMappingService. Use NewIndicesGetFieldMappingService.
func NewIndicesGetFieldMappingService ¶
func NewIndicesGetFieldMappingService(client *Client) *IndicesGetFieldMappingService
NewIndicesGetFieldMappingService creates a new IndicesGetFieldMappingService.
func (*IndicesGetFieldMappingService) AllowNoIndices ¶
func (s *IndicesGetFieldMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetFieldMappingService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. This includes `_all` string or when no indices have been specified.
func (*IndicesGetFieldMappingService) Do ¶
func (s *IndicesGetFieldMappingService) Do(ctx context.Context) (map[string]interface{}, error)
Do executes the operation. It returns mapping definitions for an index or index/type.
func (*IndicesGetFieldMappingService) ErrorTrace ¶
func (s *IndicesGetFieldMappingService) ErrorTrace(errorTrace bool) *IndicesGetFieldMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesGetFieldMappingService) ExpandWildcards ¶
func (s *IndicesGetFieldMappingService) ExpandWildcards(expandWildcards string) *IndicesGetFieldMappingService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesGetFieldMappingService) Field ¶
func (s *IndicesGetFieldMappingService) Field(fields ...string) *IndicesGetFieldMappingService
Field is a list of fields.
func (*IndicesGetFieldMappingService) FilterPath ¶
func (s *IndicesGetFieldMappingService) FilterPath(filterPath ...string) *IndicesGetFieldMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesGetFieldMappingService) Header ¶
func (s *IndicesGetFieldMappingService) Header(name string, value string) *IndicesGetFieldMappingService
Header adds a header to the request.
func (*IndicesGetFieldMappingService) Headers ¶
func (s *IndicesGetFieldMappingService) Headers(headers http.Header) *IndicesGetFieldMappingService
Headers specifies the headers of the request.
func (*IndicesGetFieldMappingService) Human ¶
func (s *IndicesGetFieldMappingService) Human(human bool) *IndicesGetFieldMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesGetFieldMappingService) IgnoreUnavailable ¶
func (s *IndicesGetFieldMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetFieldMappingService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesGetFieldMappingService) Index ¶
func (s *IndicesGetFieldMappingService) Index(indices ...string) *IndicesGetFieldMappingService
Index is a list of index names.
func (*IndicesGetFieldMappingService) Local ¶
func (s *IndicesGetFieldMappingService) Local(local bool) *IndicesGetFieldMappingService
Local indicates whether to return local information, do not retrieve the state from master node (default: false).
func (*IndicesGetFieldMappingService) Pretty ¶
func (s *IndicesGetFieldMappingService) Pretty(pretty bool) *IndicesGetFieldMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesGetFieldMappingService) Type ¶
func (s *IndicesGetFieldMappingService) Type(types ...string) *IndicesGetFieldMappingService
Type is a list of document types.
func (*IndicesGetFieldMappingService) Validate ¶
func (s *IndicesGetFieldMappingService) Validate() error
Validate checks if the operation is valid.
type IndicesGetMappingService ¶
type IndicesGetMappingService struct {
// contains filtered or unexported fields
}
IndicesGetMappingService retrieves the mapping definitions for an index or index/type.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-mapping.html for details.
func NewGetMappingService ¶
func NewGetMappingService(client *Client) *IndicesGetMappingService
NewGetMappingService is an alias for NewIndicesGetMappingService. Use NewIndicesGetMappingService.
func NewIndicesGetMappingService ¶
func NewIndicesGetMappingService(client *Client) *IndicesGetMappingService
NewIndicesGetMappingService creates a new IndicesGetMappingService.
func (*IndicesGetMappingService) AllowNoIndices ¶
func (s *IndicesGetMappingService) AllowNoIndices(allowNoIndices bool) *IndicesGetMappingService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. This includes `_all` string or when no indices have been specified.
func (*IndicesGetMappingService) Do ¶
func (s *IndicesGetMappingService) Do(ctx context.Context) (map[string]interface{}, error)
Do executes the operation. It returns mapping definitions for an index or index/type.
func (*IndicesGetMappingService) ErrorTrace ¶
func (s *IndicesGetMappingService) ErrorTrace(errorTrace bool) *IndicesGetMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesGetMappingService) ExpandWildcards ¶
func (s *IndicesGetMappingService) ExpandWildcards(expandWildcards string) *IndicesGetMappingService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesGetMappingService) FilterPath ¶
func (s *IndicesGetMappingService) FilterPath(filterPath ...string) *IndicesGetMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesGetMappingService) Header ¶
func (s *IndicesGetMappingService) Header(name string, value string) *IndicesGetMappingService
Header adds a header to the request.
func (*IndicesGetMappingService) Headers ¶
func (s *IndicesGetMappingService) Headers(headers http.Header) *IndicesGetMappingService
Headers specifies the headers of the request.
func (*IndicesGetMappingService) Human ¶
func (s *IndicesGetMappingService) Human(human bool) *IndicesGetMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesGetMappingService) IgnoreUnavailable ¶
func (s *IndicesGetMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetMappingService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesGetMappingService) IncludeTypeName ¶
func (s *IndicesGetMappingService) IncludeTypeName(include bool) *IndicesGetMappingService
IncludeTypeName indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesGetMappingService) Index ¶
func (s *IndicesGetMappingService) Index(indices ...string) *IndicesGetMappingService
Index is a list of index names.
func (*IndicesGetMappingService) Local ¶
func (s *IndicesGetMappingService) Local(local bool) *IndicesGetMappingService
Local indicates whether to return local information, do not retrieve the state from master node (default: false).
func (*IndicesGetMappingService) Pretty ¶
func (s *IndicesGetMappingService) Pretty(pretty bool) *IndicesGetMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesGetMappingService) Type ¶
func (s *IndicesGetMappingService) Type(types ...string) *IndicesGetMappingService
Type is a list of document types.
func (*IndicesGetMappingService) Validate ¶
func (s *IndicesGetMappingService) Validate() error
Validate checks if the operation is valid.
type IndicesGetResponse ¶
type IndicesGetResponse struct { Aliases map[string]interface{} `json:"aliases"` Mappings map[string]interface{} `json:"mappings"` Settings map[string]interface{} `json:"settings"` Warmers map[string]interface{} `json:"warmers"` }
IndicesGetResponse is part of the response of IndicesGetService.Do.
type IndicesGetService ¶
type IndicesGetService struct {
// contains filtered or unexported fields
}
IndicesGetService retrieves information about one or more indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html for more details.
func NewIndicesGetService ¶
func NewIndicesGetService(client *Client) *IndicesGetService
NewIndicesGetService creates a new IndicesGetService.
func (*IndicesGetService) AllowNoIndices ¶
func (s *IndicesGetService) AllowNoIndices(allowNoIndices bool) *IndicesGetService
AllowNoIndices indicates whether to ignore if a wildcard expression resolves to no concrete indices (default: false).
func (*IndicesGetService) Do ¶
func (s *IndicesGetService) Do(ctx context.Context) (map[string]*IndicesGetResponse, error)
Do executes the operation.
func (*IndicesGetService) ErrorTrace ¶
func (s *IndicesGetService) ErrorTrace(errorTrace bool) *IndicesGetService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesGetService) ExpandWildcards ¶
func (s *IndicesGetService) ExpandWildcards(expandWildcards string) *IndicesGetService
ExpandWildcards indicates whether wildcard expressions should get expanded to open or closed indices (default: open).
func (*IndicesGetService) Feature ¶
func (s *IndicesGetService) Feature(features ...string) *IndicesGetService
Feature is a list of features.
func (*IndicesGetService) FilterPath ¶
func (s *IndicesGetService) FilterPath(filterPath ...string) *IndicesGetService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesGetService) Header ¶
func (s *IndicesGetService) Header(name string, value string) *IndicesGetService
Header adds a header to the request.
func (*IndicesGetService) Headers ¶
func (s *IndicesGetService) Headers(headers http.Header) *IndicesGetService
Headers specifies the headers of the request.
func (*IndicesGetService) Human ¶
func (s *IndicesGetService) Human(human bool) *IndicesGetService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesGetService) IgnoreUnavailable ¶
func (s *IndicesGetService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetService
IgnoreUnavailable indicates whether to ignore unavailable indexes (default: false).
func (*IndicesGetService) IncludeTypeName ¶
func (s *IndicesGetService) IncludeTypeName(include bool) *IndicesGetService
IncludeTypeName indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesGetService) Index ¶
func (s *IndicesGetService) Index(indices ...string) *IndicesGetService
Index is a list of index names.
func (*IndicesGetService) Local ¶
func (s *IndicesGetService) Local(local bool) *IndicesGetService
Local indicates whether to return local information, i.e. do not retrieve the state from master node (default: false).
func (*IndicesGetService) Pretty ¶
func (s *IndicesGetService) Pretty(pretty bool) *IndicesGetService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesGetService) Validate ¶
func (s *IndicesGetService) Validate() error
Validate checks if the operation is valid.
type IndicesGetSettingsResponse ¶
type IndicesGetSettingsResponse struct {
Settings map[string]interface{} `json:"settings"`
}
IndicesGetSettingsResponse is the response of IndicesGetSettingsService.Do.
type IndicesGetSettingsService ¶
type IndicesGetSettingsService struct {
// contains filtered or unexported fields
}
IndicesGetSettingsService allows to retrieve settings of one or more indices.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-settings.html for more details.
func NewIndicesGetSettingsService ¶
func NewIndicesGetSettingsService(client *Client) *IndicesGetSettingsService
NewIndicesGetSettingsService creates a new IndicesGetSettingsService.
func (*IndicesGetSettingsService) AllowNoIndices ¶
func (s *IndicesGetSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesGetSettingsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesGetSettingsService) Do ¶
func (s *IndicesGetSettingsService) Do(ctx context.Context) (map[string]*IndicesGetSettingsResponse, error)
Do executes the operation.
func (*IndicesGetSettingsService) ErrorTrace ¶
func (s *IndicesGetSettingsService) ErrorTrace(errorTrace bool) *IndicesGetSettingsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesGetSettingsService) ExpandWildcards ¶
func (s *IndicesGetSettingsService) ExpandWildcards(expandWildcards string) *IndicesGetSettingsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both. Options: open, closed, none, all. Default: open,closed.
func (*IndicesGetSettingsService) FilterPath ¶
func (s *IndicesGetSettingsService) FilterPath(filterPath ...string) *IndicesGetSettingsService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesGetSettingsService) FlatSettings ¶
func (s *IndicesGetSettingsService) FlatSettings(flatSettings bool) *IndicesGetSettingsService
FlatSettings indicates whether to return settings in flat format (default: false).
func (*IndicesGetSettingsService) Header ¶
func (s *IndicesGetSettingsService) Header(name string, value string) *IndicesGetSettingsService
Header adds a header to the request.
func (*IndicesGetSettingsService) Headers ¶
func (s *IndicesGetSettingsService) Headers(headers http.Header) *IndicesGetSettingsService
Headers specifies the headers of the request.
func (*IndicesGetSettingsService) Human ¶
func (s *IndicesGetSettingsService) Human(human bool) *IndicesGetSettingsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesGetSettingsService) IgnoreUnavailable ¶
func (s *IndicesGetSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetSettingsService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesGetSettingsService) Index ¶
func (s *IndicesGetSettingsService) Index(indices ...string) *IndicesGetSettingsService
Index is a list of index names; use `_all` or empty string to perform the operation on all indices.
func (*IndicesGetSettingsService) Local ¶
func (s *IndicesGetSettingsService) Local(local bool) *IndicesGetSettingsService
Local indicates whether to return local information, do not retrieve the state from master node (default: false).
func (*IndicesGetSettingsService) Name ¶
func (s *IndicesGetSettingsService) Name(name ...string) *IndicesGetSettingsService
Name are the names of the settings that should be included.
func (*IndicesGetSettingsService) Pretty ¶
func (s *IndicesGetSettingsService) Pretty(pretty bool) *IndicesGetSettingsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesGetSettingsService) Validate ¶
func (s *IndicesGetSettingsService) Validate() error
Validate checks if the operation is valid.
type IndicesGetTemplateResponse ¶
type IndicesGetTemplateResponse struct { Order int `json:"order,omitempty"` Version int `json:"version,omitempty"` IndexPatterns []string `json:"index_patterns,omitempty"` Settings map[string]interface{} `json:"settings,omitempty"` Mappings map[string]interface{} `json:"mappings,omitempty"` Aliases map[string]interface{} `json:"aliases,omitempty"` }
IndicesGetTemplateResponse is the response of IndicesGetTemplateService.Do.
type IndicesGetTemplateService ¶
type IndicesGetTemplateService struct {
// contains filtered or unexported fields
}
IndicesGetTemplateService returns an index template. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-templates.html.
func NewIndicesGetTemplateService ¶
func NewIndicesGetTemplateService(client *Client) *IndicesGetTemplateService
NewIndicesGetTemplateService creates a new IndicesGetTemplateService.
func (*IndicesGetTemplateService) Do ¶
func (s *IndicesGetTemplateService) Do(ctx context.Context) (map[string]*IndicesGetTemplateResponse, error)
Do executes the operation.
func (*IndicesGetTemplateService) ErrorTrace ¶
func (s *IndicesGetTemplateService) ErrorTrace(errorTrace bool) *IndicesGetTemplateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesGetTemplateService) FilterPath ¶
func (s *IndicesGetTemplateService) FilterPath(filterPath ...string) *IndicesGetTemplateService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesGetTemplateService) FlatSettings ¶
func (s *IndicesGetTemplateService) FlatSettings(flatSettings bool) *IndicesGetTemplateService
FlatSettings is returns settings in flat format (default: false).
func (*IndicesGetTemplateService) Header ¶
func (s *IndicesGetTemplateService) Header(name string, value string) *IndicesGetTemplateService
Header adds a header to the request.
func (*IndicesGetTemplateService) Headers ¶
func (s *IndicesGetTemplateService) Headers(headers http.Header) *IndicesGetTemplateService
Headers specifies the headers of the request.
func (*IndicesGetTemplateService) Human ¶
func (s *IndicesGetTemplateService) Human(human bool) *IndicesGetTemplateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesGetTemplateService) IncludeTypeName ¶
func (s *IndicesGetTemplateService) IncludeTypeName(include bool) *IndicesGetTemplateService
IncludeTypeName indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesGetTemplateService) Local ¶
func (s *IndicesGetTemplateService) Local(local bool) *IndicesGetTemplateService
Local indicates whether to return local information, i.e. do not retrieve the state from master node (default: false).
func (*IndicesGetTemplateService) Name ¶
func (s *IndicesGetTemplateService) Name(name ...string) *IndicesGetTemplateService
Name is the name of the index template.
func (*IndicesGetTemplateService) Pretty ¶
func (s *IndicesGetTemplateService) Pretty(pretty bool) *IndicesGetTemplateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesGetTemplateService) Validate ¶
func (s *IndicesGetTemplateService) Validate() error
Validate checks if the operation is valid.
type IndicesOpenResponse ¶
type IndicesOpenResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesOpenResponse is the response of IndicesOpenService.Do.
type IndicesOpenService ¶
type IndicesOpenService struct {
// contains filtered or unexported fields
}
IndicesOpenService opens an index.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-open-close.html for details.
func NewIndicesOpenService ¶
func NewIndicesOpenService(client *Client) *IndicesOpenService
NewIndicesOpenService creates and initializes a new IndicesOpenService.
func (*IndicesOpenService) AllowNoIndices ¶
func (s *IndicesOpenService) AllowNoIndices(allowNoIndices bool) *IndicesOpenService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesOpenService) Do ¶
func (s *IndicesOpenService) Do(ctx context.Context) (*IndicesOpenResponse, error)
Do executes the operation.
func (*IndicesOpenService) ErrorTrace ¶
func (s *IndicesOpenService) ErrorTrace(errorTrace bool) *IndicesOpenService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesOpenService) ExpandWildcards ¶
func (s *IndicesOpenService) ExpandWildcards(expandWildcards string) *IndicesOpenService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesOpenService) FilterPath ¶
func (s *IndicesOpenService) FilterPath(filterPath ...string) *IndicesOpenService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesOpenService) Header ¶
func (s *IndicesOpenService) Header(name string, value string) *IndicesOpenService
Header adds a header to the request.
func (*IndicesOpenService) Headers ¶
func (s *IndicesOpenService) Headers(headers http.Header) *IndicesOpenService
Headers specifies the headers of the request.
func (*IndicesOpenService) Human ¶
func (s *IndicesOpenService) Human(human bool) *IndicesOpenService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesOpenService) IgnoreUnavailable ¶
func (s *IndicesOpenService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesOpenService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesOpenService) Index ¶
func (s *IndicesOpenService) Index(index string) *IndicesOpenService
Index is the name of the index to open.
func (*IndicesOpenService) MasterTimeout ¶
func (s *IndicesOpenService) MasterTimeout(masterTimeout string) *IndicesOpenService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesOpenService) Pretty ¶
func (s *IndicesOpenService) Pretty(pretty bool) *IndicesOpenService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesOpenService) Timeout ¶
func (s *IndicesOpenService) Timeout(timeout string) *IndicesOpenService
Timeout is an explicit operation timeout.
func (*IndicesOpenService) Validate ¶
func (s *IndicesOpenService) Validate() error
Validate checks if the operation is valid.
func (*IndicesOpenService) WaitForActiveShards ¶
func (s *IndicesOpenService) WaitForActiveShards(waitForActiveShards string) *IndicesOpenService
WaitForActiveShards specifies the number of shards that must be allocated before the Open operation returns. Valid values are "all" or an integer between 0 and number_of_replicas+1 (default: 0)
type IndicesPutMappingService ¶
type IndicesPutMappingService struct {
// contains filtered or unexported fields
}
IndicesPutMappingService allows to register specific mapping definition for a specific type.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-put-mapping.html for details.
func NewIndicesPutMappingService ¶
func NewIndicesPutMappingService(client *Client) *IndicesPutMappingService
NewIndicesPutMappingService creates a new IndicesPutMappingService.
func NewPutMappingService ¶
func NewPutMappingService(client *Client) *IndicesPutMappingService
NewPutMappingService is an alias for NewIndicesPutMappingService. Use NewIndicesPutMappingService.
func (*IndicesPutMappingService) AllowNoIndices ¶
func (s *IndicesPutMappingService) AllowNoIndices(allowNoIndices bool) *IndicesPutMappingService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. This includes `_all` string or when no indices have been specified.
func (*IndicesPutMappingService) BodyJson ¶
func (s *IndicesPutMappingService) BodyJson(mapping map[string]interface{}) *IndicesPutMappingService
BodyJson contains the mapping definition.
func (*IndicesPutMappingService) BodyString ¶
func (s *IndicesPutMappingService) BodyString(mapping string) *IndicesPutMappingService
BodyString is the mapping definition serialized as a string.
func (*IndicesPutMappingService) Do ¶
func (s *IndicesPutMappingService) Do(ctx context.Context) (*PutMappingResponse, error)
Do executes the operation.
func (*IndicesPutMappingService) ErrorTrace ¶
func (s *IndicesPutMappingService) ErrorTrace(errorTrace bool) *IndicesPutMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesPutMappingService) ExpandWildcards ¶
func (s *IndicesPutMappingService) ExpandWildcards(expandWildcards string) *IndicesPutMappingService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesPutMappingService) FilterPath ¶
func (s *IndicesPutMappingService) FilterPath(filterPath ...string) *IndicesPutMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesPutMappingService) Header ¶
func (s *IndicesPutMappingService) Header(name string, value string) *IndicesPutMappingService
Header adds a header to the request.
func (*IndicesPutMappingService) Headers ¶
func (s *IndicesPutMappingService) Headers(headers http.Header) *IndicesPutMappingService
Headers specifies the headers of the request.
func (*IndicesPutMappingService) Human ¶
func (s *IndicesPutMappingService) Human(human bool) *IndicesPutMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesPutMappingService) IgnoreUnavailable ¶
func (s *IndicesPutMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutMappingService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesPutMappingService) IncludeTypeName ¶
func (s *IndicesPutMappingService) IncludeTypeName(include bool) *IndicesPutMappingService
IncludeTypeName indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesPutMappingService) Index ¶
func (s *IndicesPutMappingService) Index(indices ...string) *IndicesPutMappingService
Index is a list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
func (*IndicesPutMappingService) MasterTimeout ¶
func (s *IndicesPutMappingService) MasterTimeout(masterTimeout string) *IndicesPutMappingService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesPutMappingService) Pretty ¶
func (s *IndicesPutMappingService) Pretty(pretty bool) *IndicesPutMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesPutMappingService) Timeout ¶
func (s *IndicesPutMappingService) Timeout(timeout string) *IndicesPutMappingService
Timeout is an explicit operation timeout.
func (*IndicesPutMappingService) Type ¶
func (s *IndicesPutMappingService) Type(typ string) *IndicesPutMappingService
Type is the name of the document type.
func (*IndicesPutMappingService) UpdateAllTypes ¶
func (s *IndicesPutMappingService) UpdateAllTypes(update bool) *IndicesPutMappingService
UpdateAllTypes indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesPutMappingService) Validate ¶
func (s *IndicesPutMappingService) Validate() error
Validate checks if the operation is valid.
type IndicesPutSettingsResponse ¶
type IndicesPutSettingsResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesPutSettingsResponse is the response of IndicesPutSettingsService.Do.
type IndicesPutSettingsService ¶
type IndicesPutSettingsService struct {
// contains filtered or unexported fields
}
IndicesPutSettingsService changes specific index level settings in real time.
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-update-settings.html.
func NewIndicesPutSettingsService ¶
func NewIndicesPutSettingsService(client *Client) *IndicesPutSettingsService
NewIndicesPutSettingsService creates a new IndicesPutSettingsService.
func (*IndicesPutSettingsService) AllowNoIndices ¶
func (s *IndicesPutSettingsService) AllowNoIndices(allowNoIndices bool) *IndicesPutSettingsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesPutSettingsService) BodyJson ¶
func (s *IndicesPutSettingsService) BodyJson(body interface{}) *IndicesPutSettingsService
BodyJson is documented as: The index settings to be updated.
func (*IndicesPutSettingsService) BodyString ¶
func (s *IndicesPutSettingsService) BodyString(body string) *IndicesPutSettingsService
BodyString is documented as: The index settings to be updated.
func (*IndicesPutSettingsService) Do ¶
func (s *IndicesPutSettingsService) Do(ctx context.Context) (*IndicesPutSettingsResponse, error)
Do executes the operation.
func (*IndicesPutSettingsService) ErrorTrace ¶
func (s *IndicesPutSettingsService) ErrorTrace(errorTrace bool) *IndicesPutSettingsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesPutSettingsService) ExpandWildcards ¶
func (s *IndicesPutSettingsService) ExpandWildcards(expandWildcards string) *IndicesPutSettingsService
ExpandWildcards specifies whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesPutSettingsService) FilterPath ¶
func (s *IndicesPutSettingsService) FilterPath(filterPath ...string) *IndicesPutSettingsService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesPutSettingsService) FlatSettings ¶
func (s *IndicesPutSettingsService) FlatSettings(flatSettings bool) *IndicesPutSettingsService
FlatSettings indicates whether to return settings in flat format (default: false).
func (*IndicesPutSettingsService) Header ¶
func (s *IndicesPutSettingsService) Header(name string, value string) *IndicesPutSettingsService
Header adds a header to the request.
func (*IndicesPutSettingsService) Headers ¶
func (s *IndicesPutSettingsService) Headers(headers http.Header) *IndicesPutSettingsService
Headers specifies the headers of the request.
func (*IndicesPutSettingsService) Human ¶
func (s *IndicesPutSettingsService) Human(human bool) *IndicesPutSettingsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesPutSettingsService) IgnoreUnavailable ¶
func (s *IndicesPutSettingsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesPutSettingsService
IgnoreUnavailable specifies whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesPutSettingsService) Index ¶
func (s *IndicesPutSettingsService) Index(indices ...string) *IndicesPutSettingsService
Index is a list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
func (*IndicesPutSettingsService) MasterTimeout ¶
func (s *IndicesPutSettingsService) MasterTimeout(masterTimeout string) *IndicesPutSettingsService
MasterTimeout is the timeout for connection to master.
func (*IndicesPutSettingsService) Pretty ¶
func (s *IndicesPutSettingsService) Pretty(pretty bool) *IndicesPutSettingsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesPutSettingsService) Validate ¶
func (s *IndicesPutSettingsService) Validate() error
Validate checks if the operation is valid.
type IndicesPutTemplateResponse ¶
type IndicesPutTemplateResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesPutTemplateResponse is the response of IndicesPutTemplateService.Do.
type IndicesPutTemplateService ¶
type IndicesPutTemplateService struct {
// contains filtered or unexported fields
}
IndicesPutTemplateService creates or updates index mappings. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-templates.html.
func NewIndicesPutTemplateService ¶
func NewIndicesPutTemplateService(client *Client) *IndicesPutTemplateService
NewIndicesPutTemplateService creates a new IndicesPutTemplateService.
func (*IndicesPutTemplateService) BodyJson ¶
func (s *IndicesPutTemplateService) BodyJson(body interface{}) *IndicesPutTemplateService
BodyJson is documented as: The template definition.
func (*IndicesPutTemplateService) BodyString ¶
func (s *IndicesPutTemplateService) BodyString(body string) *IndicesPutTemplateService
BodyString is documented as: The template definition.
func (*IndicesPutTemplateService) Cause ¶
func (s *IndicesPutTemplateService) Cause(cause string) *IndicesPutTemplateService
Cause describes the cause for this index template creation. This is currently undocumented, but part of the Java source.
func (*IndicesPutTemplateService) Create ¶
func (s *IndicesPutTemplateService) Create(create bool) *IndicesPutTemplateService
Create indicates whether the index template should only be added if new or can also replace an existing one.
func (*IndicesPutTemplateService) Do ¶
func (s *IndicesPutTemplateService) Do(ctx context.Context) (*IndicesPutTemplateResponse, error)
Do executes the operation.
func (*IndicesPutTemplateService) ErrorTrace ¶
func (s *IndicesPutTemplateService) ErrorTrace(errorTrace bool) *IndicesPutTemplateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesPutTemplateService) FilterPath ¶
func (s *IndicesPutTemplateService) FilterPath(filterPath ...string) *IndicesPutTemplateService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesPutTemplateService) FlatSettings ¶
func (s *IndicesPutTemplateService) FlatSettings(flatSettings bool) *IndicesPutTemplateService
FlatSettings indicates whether to return settings in flat format (default: false).
func (*IndicesPutTemplateService) Header ¶
func (s *IndicesPutTemplateService) Header(name string, value string) *IndicesPutTemplateService
Header adds a header to the request.
func (*IndicesPutTemplateService) Headers ¶
func (s *IndicesPutTemplateService) Headers(headers http.Header) *IndicesPutTemplateService
Headers specifies the headers of the request.
func (*IndicesPutTemplateService) Human ¶
func (s *IndicesPutTemplateService) Human(human bool) *IndicesPutTemplateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesPutTemplateService) IncludeTypeName ¶
func (s *IndicesPutTemplateService) IncludeTypeName(include bool) *IndicesPutTemplateService
IncludeTypeName indicates whether to update the mapping for all fields with the same name across all types or not.
func (*IndicesPutTemplateService) MasterTimeout ¶
func (s *IndicesPutTemplateService) MasterTimeout(masterTimeout string) *IndicesPutTemplateService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesPutTemplateService) Name ¶
func (s *IndicesPutTemplateService) Name(name string) *IndicesPutTemplateService
Name is the name of the index template.
func (*IndicesPutTemplateService) Order ¶
func (s *IndicesPutTemplateService) Order(order interface{}) *IndicesPutTemplateService
Order is the order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers).
func (*IndicesPutTemplateService) Pretty ¶
func (s *IndicesPutTemplateService) Pretty(pretty bool) *IndicesPutTemplateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesPutTemplateService) Timeout ¶
func (s *IndicesPutTemplateService) Timeout(timeout string) *IndicesPutTemplateService
Timeout is an explicit operation timeout.
func (*IndicesPutTemplateService) Validate ¶
func (s *IndicesPutTemplateService) Validate() error
Validate checks if the operation is valid.
func (*IndicesPutTemplateService) Version ¶
func (s *IndicesPutTemplateService) Version(version int) *IndicesPutTemplateService
Version sets the version number for this template.
type IndicesRolloverResponse ¶
type IndicesRolloverResponse struct { OldIndex string `json:"old_index"` NewIndex string `json:"new_index"` RolledOver bool `json:"rolled_over"` DryRun bool `json:"dry_run"` Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Conditions map[string]bool `json:"conditions"` }
IndicesRolloverResponse is the response of IndicesRolloverService.Do.
type IndicesRolloverService ¶
type IndicesRolloverService struct {
// contains filtered or unexported fields
}
IndicesRolloverService rolls an alias over to a new index when the existing index is considered to be too large or too old.
It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-rollover-index.html.
func NewIndicesRolloverService ¶
func NewIndicesRolloverService(client *Client) *IndicesRolloverService
NewIndicesRolloverService creates a new IndicesRolloverService.
func (*IndicesRolloverService) AddCondition ¶
func (s *IndicesRolloverService) AddCondition(name string, value interface{}) *IndicesRolloverService
AddCondition adds a condition to the rollover decision.
func (*IndicesRolloverService) AddMapping ¶
func (s *IndicesRolloverService) AddMapping(typ string, mapping interface{}) *IndicesRolloverService
AddMapping adds a mapping for the given type.
func (*IndicesRolloverService) AddMaxIndexAgeCondition ¶
func (s *IndicesRolloverService) AddMaxIndexAgeCondition(time string) *IndicesRolloverService
AddMaxIndexAgeCondition adds a condition to set the max index age.
func (*IndicesRolloverService) AddMaxIndexDocsCondition ¶
func (s *IndicesRolloverService) AddMaxIndexDocsCondition(docs int64) *IndicesRolloverService
AddMaxIndexDocsCondition adds a condition to set the max documents in the index.
func (*IndicesRolloverService) AddSetting ¶
func (s *IndicesRolloverService) AddSetting(name string, value interface{}) *IndicesRolloverService
AddSetting adds an index setting.
func (*IndicesRolloverService) Alias ¶
func (s *IndicesRolloverService) Alias(alias string) *IndicesRolloverService
Alias is the name of the alias to rollover.
func (*IndicesRolloverService) BodyJson ¶
func (s *IndicesRolloverService) BodyJson(body interface{}) *IndicesRolloverService
BodyJson sets the conditions that needs to be met for executing rollover, specified as a serializable JSON instance which is sent as the body of the request.
func (*IndicesRolloverService) BodyString ¶
func (s *IndicesRolloverService) BodyString(body string) *IndicesRolloverService
BodyString sets the conditions that needs to be met for executing rollover, specified as a string which is sent as the body of the request.
func (*IndicesRolloverService) Conditions ¶
func (s *IndicesRolloverService) Conditions(conditions map[string]interface{}) *IndicesRolloverService
Conditions allows to specify all conditions as a dictionary.
func (*IndicesRolloverService) Do ¶
func (s *IndicesRolloverService) Do(ctx context.Context) (*IndicesRolloverResponse, error)
Do executes the operation.
func (*IndicesRolloverService) DryRun ¶
func (s *IndicesRolloverService) DryRun(dryRun bool) *IndicesRolloverService
DryRun, when set, specifies that only conditions are checked without performing the actual rollover.
func (*IndicesRolloverService) ErrorTrace ¶
func (s *IndicesRolloverService) ErrorTrace(errorTrace bool) *IndicesRolloverService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesRolloverService) FilterPath ¶
func (s *IndicesRolloverService) FilterPath(filterPath ...string) *IndicesRolloverService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesRolloverService) Header ¶
func (s *IndicesRolloverService) Header(name string, value string) *IndicesRolloverService
Header adds a header to the request.
func (*IndicesRolloverService) Headers ¶
func (s *IndicesRolloverService) Headers(headers http.Header) *IndicesRolloverService
Headers specifies the headers of the request.
func (*IndicesRolloverService) Human ¶
func (s *IndicesRolloverService) Human(human bool) *IndicesRolloverService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesRolloverService) Mappings ¶
func (s *IndicesRolloverService) Mappings(mappings map[string]interface{}) *IndicesRolloverService
Mappings adds the index mappings.
func (*IndicesRolloverService) MasterTimeout ¶
func (s *IndicesRolloverService) MasterTimeout(masterTimeout string) *IndicesRolloverService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesRolloverService) NewIndex ¶
func (s *IndicesRolloverService) NewIndex(newIndex string) *IndicesRolloverService
NewIndex is the name of the rollover index.
func (*IndicesRolloverService) Pretty ¶
func (s *IndicesRolloverService) Pretty(pretty bool) *IndicesRolloverService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesRolloverService) Settings ¶
func (s *IndicesRolloverService) Settings(settings map[string]interface{}) *IndicesRolloverService
Settings adds the index settings.
func (*IndicesRolloverService) Timeout ¶
func (s *IndicesRolloverService) Timeout(timeout string) *IndicesRolloverService
Timeout sets an explicit operation timeout.
func (*IndicesRolloverService) Validate ¶
func (s *IndicesRolloverService) Validate() error
Validate checks if the operation is valid.
func (*IndicesRolloverService) WaitForActiveShards ¶
func (s *IndicesRolloverService) WaitForActiveShards(waitForActiveShards string) *IndicesRolloverService
WaitForActiveShards sets the number of active shards to wait for on the newly created rollover index before the operation returns.
type IndicesSegmentsResponse ¶
type IndicesSegmentsResponse struct { // Shards provides information returned from shards. Shards *ShardsInfo `json:"_shards"` // Indices provides a map into the stats of an index. // The key of the map is the index name. Indices map[string]*IndexSegments `json:"indices,omitempty"` }
IndicesSegmentsResponse is the response of IndicesSegmentsService.Do.
type IndicesSegmentsService ¶
type IndicesSegmentsService struct {
// contains filtered or unexported fields
}
IndicesSegmentsService provides low level segments information that a Lucene index (shard level) is built with. Allows to be used to provide more information on the state of a shard and an index, possibly optimization information, data "wasted" on deletes, and so on.
Find further documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-segments.html.
func NewIndicesSegmentsService ¶
func NewIndicesSegmentsService(client *Client) *IndicesSegmentsService
NewIndicesSegmentsService creates a new IndicesSegmentsService.
func (*IndicesSegmentsService) AllowNoIndices ¶
func (s *IndicesSegmentsService) AllowNoIndices(allowNoIndices bool) *IndicesSegmentsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesSegmentsService) Do ¶
func (s *IndicesSegmentsService) Do(ctx context.Context) (*IndicesSegmentsResponse, error)
Do executes the operation.
func (*IndicesSegmentsService) ErrorTrace ¶
func (s *IndicesSegmentsService) ErrorTrace(errorTrace bool) *IndicesSegmentsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesSegmentsService) ExpandWildcards ¶
func (s *IndicesSegmentsService) ExpandWildcards(expandWildcards string) *IndicesSegmentsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*IndicesSegmentsService) FilterPath ¶
func (s *IndicesSegmentsService) FilterPath(filterPath ...string) *IndicesSegmentsService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesSegmentsService) Header ¶
func (s *IndicesSegmentsService) Header(name string, value string) *IndicesSegmentsService
Header adds a header to the request.
func (*IndicesSegmentsService) Headers ¶
func (s *IndicesSegmentsService) Headers(headers http.Header) *IndicesSegmentsService
Headers specifies the headers of the request.
func (*IndicesSegmentsService) Human ¶
func (s *IndicesSegmentsService) Human(human bool) *IndicesSegmentsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesSegmentsService) IgnoreUnavailable ¶
func (s *IndicesSegmentsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSegmentsService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesSegmentsService) Index ¶
func (s *IndicesSegmentsService) Index(indices ...string) *IndicesSegmentsService
Index is a comma-separated list of index names; use `_all` or empty string to perform the operation on all indices.
func (*IndicesSegmentsService) OperationThreading ¶
func (s *IndicesSegmentsService) OperationThreading(operationThreading interface{}) *IndicesSegmentsService
OperationThreading is undocumented in Elasticsearch as of now.
func (*IndicesSegmentsService) Pretty ¶
func (s *IndicesSegmentsService) Pretty(pretty bool) *IndicesSegmentsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesSegmentsService) Validate ¶
func (s *IndicesSegmentsService) Validate() error
Validate checks if the operation is valid.
func (*IndicesSegmentsService) Verbose ¶
func (s *IndicesSegmentsService) Verbose(verbose bool) *IndicesSegmentsService
Verbose, when set to true, includes detailed memory usage by Lucene.
type IndicesShardsSyncedFlushResult ¶
type IndicesShardsSyncedFlushResult struct { Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` Failures []IndicesShardsSyncedFlushResultFailure `json:"failures,omitempty"` }
IndicesShardsSyncedFlushResult represents synced flush information about a specific index.
type IndicesShardsSyncedFlushResultFailure ¶
type IndicesShardsSyncedFlushResultFailure struct { Shard int `json:"shard"` Reason string `json:"reason"` Routing struct { State string `json:"state"` Primary bool `json:"primary"` Node string `json:"node"` RelocatingNode *string `json:"relocating_node"` Shard int `json:"shard"` Index string `json:"index"` ExpectedShardSizeInBytes int64 `json:"expected_shard_size_in_bytes,omitempty"` } `json:"routing"` }
IndicesShardsSyncedFlushResultFailure represents a failure of a synced flush operation.
type IndicesShrinkResponse ¶
type IndicesShrinkResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IndicesShrinkResponse is the response of IndicesShrinkService.Do.
type IndicesShrinkService ¶
type IndicesShrinkService struct {
// contains filtered or unexported fields
}
IndicesShrinkService allows you to shrink an existing index into a new index with fewer primary shards.
For further details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-shrink-index.html.
func NewIndicesShrinkService ¶
func NewIndicesShrinkService(client *Client) *IndicesShrinkService
NewIndicesShrinkService creates a new IndicesShrinkService.
func (*IndicesShrinkService) BodyJson ¶
func (s *IndicesShrinkService) BodyJson(body interface{}) *IndicesShrinkService
BodyJson is the configuration for the target index (`settings` and `aliases`) defined as a JSON-serializable instance to be sent as the request body.
func (*IndicesShrinkService) BodyString ¶
func (s *IndicesShrinkService) BodyString(body string) *IndicesShrinkService
BodyString is the configuration for the target index (`settings` and `aliases`) defined as a string to send as the request body.
func (*IndicesShrinkService) Do ¶
func (s *IndicesShrinkService) Do(ctx context.Context) (*IndicesShrinkResponse, error)
Do executes the operation.
func (*IndicesShrinkService) ErrorTrace ¶
func (s *IndicesShrinkService) ErrorTrace(errorTrace bool) *IndicesShrinkService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesShrinkService) FilterPath ¶
func (s *IndicesShrinkService) FilterPath(filterPath ...string) *IndicesShrinkService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesShrinkService) Header ¶
func (s *IndicesShrinkService) Header(name string, value string) *IndicesShrinkService
Header adds a header to the request.
func (*IndicesShrinkService) Headers ¶
func (s *IndicesShrinkService) Headers(headers http.Header) *IndicesShrinkService
Headers specifies the headers of the request.
func (*IndicesShrinkService) Human ¶
func (s *IndicesShrinkService) Human(human bool) *IndicesShrinkService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesShrinkService) MasterTimeout ¶
func (s *IndicesShrinkService) MasterTimeout(masterTimeout string) *IndicesShrinkService
MasterTimeout specifies the timeout for connection to master.
func (*IndicesShrinkService) Pretty ¶
func (s *IndicesShrinkService) Pretty(pretty bool) *IndicesShrinkService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesShrinkService) Source ¶
func (s *IndicesShrinkService) Source(source string) *IndicesShrinkService
Source is the name of the source index to shrink.
func (*IndicesShrinkService) Target ¶
func (s *IndicesShrinkService) Target(target string) *IndicesShrinkService
Target is the name of the target index to shrink into.
func (*IndicesShrinkService) Timeout ¶
func (s *IndicesShrinkService) Timeout(timeout string) *IndicesShrinkService
Timeout is an explicit operation timeout.
func (*IndicesShrinkService) Validate ¶
func (s *IndicesShrinkService) Validate() error
Validate checks if the operation is valid.
func (*IndicesShrinkService) WaitForActiveShards ¶
func (s *IndicesShrinkService) WaitForActiveShards(waitForActiveShards string) *IndicesShrinkService
WaitForActiveShards sets the number of active shards to wait for on the shrunken index before the operation returns.
type IndicesStatsResponse ¶
type IndicesStatsResponse struct { // Shards provides information returned from shards. Shards *ShardsInfo `json:"_shards"` // All provides summary stats about all indices. All *IndexStats `json:"_all,omitempty"` // Indices provides a map into the stats of an index. The key of the // map is the index name. Indices map[string]*IndexStats `json:"indices,omitempty"` }
IndicesStatsResponse is the response of IndicesStatsService.Do.
type IndicesStatsService ¶
type IndicesStatsService struct {
// contains filtered or unexported fields
}
IndicesStatsService provides stats on various metrics of one or more indices. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-stats.html.
func NewIndicesStatsService ¶
func NewIndicesStatsService(client *Client) *IndicesStatsService
NewIndicesStatsService creates a new IndicesStatsService.
func (*IndicesStatsService) CompletionFields ¶
func (s *IndicesStatsService) CompletionFields(completionFields ...string) *IndicesStatsService
CompletionFields is a list of fields for `fielddata` and `suggest` index metric (supports wildcards).
func (*IndicesStatsService) Do ¶
func (s *IndicesStatsService) Do(ctx context.Context) (*IndicesStatsResponse, error)
Do executes the operation.
func (*IndicesStatsService) ErrorTrace ¶
func (s *IndicesStatsService) ErrorTrace(errorTrace bool) *IndicesStatsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesStatsService) FielddataFields ¶
func (s *IndicesStatsService) FielddataFields(fielddataFields ...string) *IndicesStatsService
FielddataFields is a list of fields for `fielddata` index metric (supports wildcards).
func (*IndicesStatsService) Fields ¶
func (s *IndicesStatsService) Fields(fields ...string) *IndicesStatsService
Fields is a list of fields for `fielddata` and `completion` index metric (supports wildcards).
func (*IndicesStatsService) FilterPath ¶
func (s *IndicesStatsService) FilterPath(filterPath ...string) *IndicesStatsService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesStatsService) Groups ¶
func (s *IndicesStatsService) Groups(groups ...string) *IndicesStatsService
Groups is a list of search groups for `search` index metric.
func (*IndicesStatsService) Header ¶
func (s *IndicesStatsService) Header(name string, value string) *IndicesStatsService
Header adds a header to the request.
func (*IndicesStatsService) Headers ¶
func (s *IndicesStatsService) Headers(headers http.Header) *IndicesStatsService
Headers specifies the headers of the request.
func (*IndicesStatsService) Human ¶
func (s *IndicesStatsService) Human(human bool) *IndicesStatsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesStatsService) Index ¶
func (s *IndicesStatsService) Index(indices ...string) *IndicesStatsService
Index is the list of index names; use `_all` or empty string to perform the operation on all indices.
func (*IndicesStatsService) Level ¶
func (s *IndicesStatsService) Level(level string) *IndicesStatsService
Level returns stats aggregated at cluster, index or shard level.
func (*IndicesStatsService) Metric ¶
func (s *IndicesStatsService) Metric(metric ...string) *IndicesStatsService
Metric limits the information returned the specific metrics. Options are: docs, store, indexing, get, search, completion, fielddata, flush, merge, query_cache, refresh, suggest, and warmer.
func (*IndicesStatsService) Pretty ¶
func (s *IndicesStatsService) Pretty(pretty bool) *IndicesStatsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesStatsService) Type ¶
func (s *IndicesStatsService) Type(types ...string) *IndicesStatsService
Type is a list of document types for the `indexing` index metric.
func (*IndicesStatsService) Validate ¶
func (s *IndicesStatsService) Validate() error
Validate checks if the operation is valid.
type IndicesSyncedFlushResponse ¶
type IndicesSyncedFlushResponse struct { Shards *ShardsInfo `json:"_shards"` Index map[string]*IndicesShardsSyncedFlushResult `json:"-"` }
IndicesSyncedFlushResponse is the outcome of a synched flush call.
func (*IndicesSyncedFlushResponse) UnmarshalJSON ¶
func (resp *IndicesSyncedFlushResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON parses the output from Synced Flush API.
type IndicesSyncedFlushService ¶
type IndicesSyncedFlushService struct {
// contains filtered or unexported fields
}
IndicesSyncedFlushService performs a normal flush, then adds a generated unique marked (sync_id) to all shards.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-synced-flush.html for details.
func NewIndicesSyncedFlushService ¶
func NewIndicesSyncedFlushService(client *Client) *IndicesSyncedFlushService
NewIndicesSyncedFlushService creates a new IndicesSyncedFlushService.
func (*IndicesSyncedFlushService) AllowNoIndices ¶
func (s *IndicesSyncedFlushService) AllowNoIndices(allowNoIndices bool) *IndicesSyncedFlushService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*IndicesSyncedFlushService) Do ¶
func (s *IndicesSyncedFlushService) Do(ctx context.Context) (*IndicesSyncedFlushResponse, error)
Do executes the service.
func (*IndicesSyncedFlushService) ErrorTrace ¶
func (s *IndicesSyncedFlushService) ErrorTrace(errorTrace bool) *IndicesSyncedFlushService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IndicesSyncedFlushService) ExpandWildcards ¶
func (s *IndicesSyncedFlushService) ExpandWildcards(expandWildcards string) *IndicesSyncedFlushService
ExpandWildcards specifies whether to expand wildcard expression to concrete indices that are open, closed or both..
func (*IndicesSyncedFlushService) FilterPath ¶
func (s *IndicesSyncedFlushService) FilterPath(filterPath ...string) *IndicesSyncedFlushService
FilterPath specifies a list of filters used to reduce the response.
func (*IndicesSyncedFlushService) Header ¶
func (s *IndicesSyncedFlushService) Header(name string, value string) *IndicesSyncedFlushService
Header adds a header to the request.
func (*IndicesSyncedFlushService) Headers ¶
func (s *IndicesSyncedFlushService) Headers(headers http.Header) *IndicesSyncedFlushService
Headers specifies the headers of the request.
func (*IndicesSyncedFlushService) Human ¶
func (s *IndicesSyncedFlushService) Human(human bool) *IndicesSyncedFlushService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IndicesSyncedFlushService) IgnoreUnavailable ¶
func (s *IndicesSyncedFlushService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSyncedFlushService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*IndicesSyncedFlushService) Index ¶
func (s *IndicesSyncedFlushService) Index(indices ...string) *IndicesSyncedFlushService
Index is a list of index names; use `_all` or empty string for all indices.
func (*IndicesSyncedFlushService) Pretty ¶
func (s *IndicesSyncedFlushService) Pretty(pretty bool) *IndicesSyncedFlushService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IndicesSyncedFlushService) Validate ¶
func (s *IndicesSyncedFlushService) Validate() error
Validate checks if the operation is valid.
type IngestDeletePipelineResponse ¶
type IngestDeletePipelineResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IngestDeletePipelineResponse is the response of IngestDeletePipelineService.Do.
type IngestDeletePipelineService ¶
type IngestDeletePipelineService struct {
// contains filtered or unexported fields
}
IngestDeletePipelineService deletes pipelines by ID. It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/delete-pipeline-api.html.
func NewIngestDeletePipelineService ¶
func NewIngestDeletePipelineService(client *Client) *IngestDeletePipelineService
NewIngestDeletePipelineService creates a new IngestDeletePipelineService.
func (*IngestDeletePipelineService) Do ¶
func (s *IngestDeletePipelineService) Do(ctx context.Context) (*IngestDeletePipelineResponse, error)
Do executes the operation.
func (*IngestDeletePipelineService) ErrorTrace ¶
func (s *IngestDeletePipelineService) ErrorTrace(errorTrace bool) *IngestDeletePipelineService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IngestDeletePipelineService) FilterPath ¶
func (s *IngestDeletePipelineService) FilterPath(filterPath ...string) *IngestDeletePipelineService
FilterPath specifies a list of filters used to reduce the response.
func (*IngestDeletePipelineService) Header ¶
func (s *IngestDeletePipelineService) Header(name string, value string) *IngestDeletePipelineService
Header adds a header to the request.
func (*IngestDeletePipelineService) Headers ¶
func (s *IngestDeletePipelineService) Headers(headers http.Header) *IngestDeletePipelineService
Headers specifies the headers of the request.
func (*IngestDeletePipelineService) Human ¶
func (s *IngestDeletePipelineService) Human(human bool) *IngestDeletePipelineService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IngestDeletePipelineService) Id ¶
func (s *IngestDeletePipelineService) Id(id string) *IngestDeletePipelineService
Id is documented as: Pipeline ID.
func (*IngestDeletePipelineService) MasterTimeout ¶
func (s *IngestDeletePipelineService) MasterTimeout(masterTimeout string) *IngestDeletePipelineService
MasterTimeout is documented as: Explicit operation timeout for connection to master node.
func (*IngestDeletePipelineService) Pretty ¶
func (s *IngestDeletePipelineService) Pretty(pretty bool) *IngestDeletePipelineService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IngestDeletePipelineService) Timeout ¶
func (s *IngestDeletePipelineService) Timeout(timeout string) *IngestDeletePipelineService
Timeout is documented as: Explicit operation timeout.
func (*IngestDeletePipelineService) Validate ¶
func (s *IngestDeletePipelineService) Validate() error
Validate checks if the operation is valid.
type IngestGetPipeline ¶
type IngestGetPipeline struct { Description string `json:"description"` Processors []map[string]interface{} `json:"processors"` Version int64 `json:"version,omitempty"` OnFailure []map[string]interface{} `json:"on_failure,omitempty"` }
IngestGetPipeline describes a specific ingest pipeline, its processors etc.
type IngestGetPipelineResponse ¶
type IngestGetPipelineResponse map[string]*IngestGetPipeline
IngestGetPipelineResponse is the response of IngestGetPipelineService.Do.
type IngestGetPipelineService ¶
type IngestGetPipelineService struct {
// contains filtered or unexported fields
}
IngestGetPipelineService returns pipelines based on ID. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/get-pipeline-api.html for documentation.
func NewIngestGetPipelineService ¶
func NewIngestGetPipelineService(client *Client) *IngestGetPipelineService
NewIngestGetPipelineService creates a new IngestGetPipelineService.
func (*IngestGetPipelineService) Do ¶
func (s *IngestGetPipelineService) Do(ctx context.Context) (IngestGetPipelineResponse, error)
Do executes the operation.
func (*IngestGetPipelineService) ErrorTrace ¶
func (s *IngestGetPipelineService) ErrorTrace(errorTrace bool) *IngestGetPipelineService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IngestGetPipelineService) FilterPath ¶
func (s *IngestGetPipelineService) FilterPath(filterPath ...string) *IngestGetPipelineService
FilterPath specifies a list of filters used to reduce the response.
func (*IngestGetPipelineService) Header ¶
func (s *IngestGetPipelineService) Header(name string, value string) *IngestGetPipelineService
Header adds a header to the request.
func (*IngestGetPipelineService) Headers ¶
func (s *IngestGetPipelineService) Headers(headers http.Header) *IngestGetPipelineService
Headers specifies the headers of the request.
func (*IngestGetPipelineService) Human ¶
func (s *IngestGetPipelineService) Human(human bool) *IngestGetPipelineService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IngestGetPipelineService) Id ¶
func (s *IngestGetPipelineService) Id(id ...string) *IngestGetPipelineService
Id is a list of pipeline ids. Wildcards supported.
func (*IngestGetPipelineService) MasterTimeout ¶
func (s *IngestGetPipelineService) MasterTimeout(masterTimeout string) *IngestGetPipelineService
MasterTimeout is an explicit operation timeout for connection to master node.
func (*IngestGetPipelineService) Pretty ¶
func (s *IngestGetPipelineService) Pretty(pretty bool) *IngestGetPipelineService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IngestGetPipelineService) Validate ¶
func (s *IngestGetPipelineService) Validate() error
Validate checks if the operation is valid.
type IngestPutPipelineResponse ¶
type IngestPutPipelineResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
IngestPutPipelineResponse is the response of IngestPutPipelineService.Do.
type IngestPutPipelineService ¶
type IngestPutPipelineService struct {
// contains filtered or unexported fields
}
IngestPutPipelineService adds pipelines and updates existing pipelines in the cluster.
It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/put-pipeline-api.html.
func NewIngestPutPipelineService ¶
func NewIngestPutPipelineService(client *Client) *IngestPutPipelineService
NewIngestPutPipelineService creates a new IngestPutPipelineService.
func (*IngestPutPipelineService) BodyJson ¶
func (s *IngestPutPipelineService) BodyJson(body interface{}) *IngestPutPipelineService
BodyJson is the ingest definition, defined as a JSON-serializable document. Use e.g. a map[string]interface{} here.
func (*IngestPutPipelineService) BodyString ¶
func (s *IngestPutPipelineService) BodyString(body string) *IngestPutPipelineService
BodyString is the ingest definition, specified as a string.
func (*IngestPutPipelineService) Do ¶
func (s *IngestPutPipelineService) Do(ctx context.Context) (*IngestPutPipelineResponse, error)
Do executes the operation.
func (*IngestPutPipelineService) ErrorTrace ¶
func (s *IngestPutPipelineService) ErrorTrace(errorTrace bool) *IngestPutPipelineService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IngestPutPipelineService) FilterPath ¶
func (s *IngestPutPipelineService) FilterPath(filterPath ...string) *IngestPutPipelineService
FilterPath specifies a list of filters used to reduce the response.
func (*IngestPutPipelineService) Header ¶
func (s *IngestPutPipelineService) Header(name string, value string) *IngestPutPipelineService
Header adds a header to the request.
func (*IngestPutPipelineService) Headers ¶
func (s *IngestPutPipelineService) Headers(headers http.Header) *IngestPutPipelineService
Headers specifies the headers of the request.
func (*IngestPutPipelineService) Human ¶
func (s *IngestPutPipelineService) Human(human bool) *IngestPutPipelineService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IngestPutPipelineService) Id ¶
func (s *IngestPutPipelineService) Id(id string) *IngestPutPipelineService
Id is the pipeline ID.
func (*IngestPutPipelineService) MasterTimeout ¶
func (s *IngestPutPipelineService) MasterTimeout(masterTimeout string) *IngestPutPipelineService
MasterTimeout is an explicit operation timeout for connection to master node.
func (*IngestPutPipelineService) Pretty ¶
func (s *IngestPutPipelineService) Pretty(pretty bool) *IngestPutPipelineService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IngestPutPipelineService) Timeout ¶
func (s *IngestPutPipelineService) Timeout(timeout string) *IngestPutPipelineService
Timeout specifies an explicit operation timeout.
func (*IngestPutPipelineService) Validate ¶
func (s *IngestPutPipelineService) Validate() error
Validate checks if the operation is valid.
type IngestSimulateDocumentResult ¶
type IngestSimulateDocumentResult struct { Doc map[string]interface{} `json:"doc"` ProcessorResults []*IngestSimulateProcessorResult `json:"processor_results"` }
type IngestSimulatePipelineResponse ¶
type IngestSimulatePipelineResponse struct {
Docs []*IngestSimulateDocumentResult `json:"docs"`
}
IngestSimulatePipelineResponse is the response of IngestSimulatePipeline.Do.
type IngestSimulatePipelineService ¶
type IngestSimulatePipelineService struct {
// contains filtered or unexported fields
}
IngestSimulatePipelineService executes a specific pipeline against the set of documents provided in the body of the request.
The API is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/simulate-pipeline-api.html.
func NewIngestSimulatePipelineService ¶
func NewIngestSimulatePipelineService(client *Client) *IngestSimulatePipelineService
NewIngestSimulatePipelineService creates a new IngestSimulatePipeline.
func (*IngestSimulatePipelineService) BodyJson ¶
func (s *IngestSimulatePipelineService) BodyJson(body interface{}) *IngestSimulatePipelineService
BodyJson is the ingest definition, defined as a JSON-serializable simulate definition. Use e.g. a map[string]interface{} here.
func (*IngestSimulatePipelineService) BodyString ¶
func (s *IngestSimulatePipelineService) BodyString(body string) *IngestSimulatePipelineService
BodyString is the simulate definition, defined as a string.
func (*IngestSimulatePipelineService) Do ¶
func (s *IngestSimulatePipelineService) Do(ctx context.Context) (*IngestSimulatePipelineResponse, error)
Do executes the operation.
func (*IngestSimulatePipelineService) ErrorTrace ¶
func (s *IngestSimulatePipelineService) ErrorTrace(errorTrace bool) *IngestSimulatePipelineService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*IngestSimulatePipelineService) FilterPath ¶
func (s *IngestSimulatePipelineService) FilterPath(filterPath ...string) *IngestSimulatePipelineService
FilterPath specifies a list of filters used to reduce the response.
func (*IngestSimulatePipelineService) Header ¶
func (s *IngestSimulatePipelineService) Header(name string, value string) *IngestSimulatePipelineService
Header adds a header to the request.
func (*IngestSimulatePipelineService) Headers ¶
func (s *IngestSimulatePipelineService) Headers(headers http.Header) *IngestSimulatePipelineService
Headers specifies the headers of the request.
func (*IngestSimulatePipelineService) Human ¶
func (s *IngestSimulatePipelineService) Human(human bool) *IngestSimulatePipelineService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*IngestSimulatePipelineService) Id ¶
func (s *IngestSimulatePipelineService) Id(id string) *IngestSimulatePipelineService
Id specifies the pipeline ID.
func (*IngestSimulatePipelineService) Pretty ¶
func (s *IngestSimulatePipelineService) Pretty(pretty bool) *IngestSimulatePipelineService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*IngestSimulatePipelineService) Validate ¶
func (s *IngestSimulatePipelineService) Validate() error
Validate checks if the operation is valid.
func (*IngestSimulatePipelineService) Verbose ¶
func (s *IngestSimulatePipelineService) Verbose(verbose bool) *IngestSimulatePipelineService
Verbose mode. Display data output for each processor in executed pipeline.
type InnerHit ¶
type InnerHit struct {
// contains filtered or unexported fields
}
InnerHit implements a simple join for parent/child, nested, and even top-level documents in Elasticsearch. It is an experimental feature for Elasticsearch versions 1.5 (or greater). See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-inner-hits.html for documentation.
See the tests for SearchSource, HasChildFilter, HasChildQuery, HasParentFilter, HasParentQuery, NestedFilter, and NestedQuery for usage examples.
func (*InnerHit) DocvalueField ¶
func (*InnerHit) DocvalueFieldWithFormat ¶
func (hit *InnerHit) DocvalueFieldWithFormat(docvalueField DocvalueField) *InnerHit
func (*InnerHit) DocvalueFields ¶
func (*InnerHit) DocvalueFieldsWithFormat ¶
func (hit *InnerHit) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *InnerHit
func (*InnerHit) FetchSource ¶
func (*InnerHit) FetchSourceContext ¶
func (hit *InnerHit) FetchSourceContext(fetchSourceContext *FetchSourceContext) *InnerHit
func (*InnerHit) Highlighter ¶
func (*InnerHit) NoStoredFields ¶
func (*InnerHit) ScriptField ¶
func (hit *InnerHit) ScriptField(scriptField *ScriptField) *InnerHit
func (*InnerHit) ScriptFields ¶
func (hit *InnerHit) ScriptFields(scriptFields ...*ScriptField) *InnerHit
func (*InnerHit) SortWithInfo ¶
func (*InnerHit) StoredField ¶
func (*InnerHit) StoredFields ¶
func (*InnerHit) TrackScores ¶
type JLHScoreSignificanceHeuristic ¶
type JLHScoreSignificanceHeuristic struct{}
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.
func NewJLHScoreSignificanceHeuristic ¶
func NewJLHScoreSignificanceHeuristic() *JLHScoreSignificanceHeuristic
NewJLHScoreSignificanceHeuristic initializes a new JLHScoreSignificanceHeuristic.
func (*JLHScoreSignificanceHeuristic) Name ¶
func (sh *JLHScoreSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*JLHScoreSignificanceHeuristic) Source ¶
func (sh *JLHScoreSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type LaplaceSmoothingModel ¶
type LaplaceSmoothingModel struct {
// contains filtered or unexported fields
}
LaplaceSmoothingModel implements a laplace smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewLaplaceSmoothingModel ¶
func NewLaplaceSmoothingModel(alpha float64) *LaplaceSmoothingModel
func (*LaplaceSmoothingModel) Source ¶
func (sm *LaplaceSmoothingModel) Source() (interface{}, error)
func (*LaplaceSmoothingModel) Type ¶
func (sm *LaplaceSmoothingModel) Type() string
type LinearDecayFunction ¶
type LinearDecayFunction struct {
// contains filtered or unexported fields
}
LinearDecayFunction builds a linear decay score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html for details.
func NewLinearDecayFunction ¶
func NewLinearDecayFunction() *LinearDecayFunction
NewLinearDecayFunction initializes and returns a new LinearDecayFunction.
func (*LinearDecayFunction) Decay ¶
func (fn *LinearDecayFunction) Decay(decay float64) *LinearDecayFunction
Decay defines how documents are scored at the distance given a Scale. If no decay is defined, documents at the distance Scale will be scored 0.5.
func (*LinearDecayFunction) FieldName ¶
func (fn *LinearDecayFunction) FieldName(fieldName string) *LinearDecayFunction
FieldName specifies the name of the field to which this decay function is applied to.
func (*LinearDecayFunction) GetMultiValueMode ¶
func (fn *LinearDecayFunction) GetMultiValueMode() string
GetMultiValueMode returns how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*LinearDecayFunction) GetWeight ¶
func (fn *LinearDecayFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*LinearDecayFunction) MultiValueMode ¶
func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction
MultiValueMode specifies how the decay function should be calculated on a field that has multiple values. Valid modes are: min, max, avg, and sum.
func (*LinearDecayFunction) Name ¶
func (fn *LinearDecayFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*LinearDecayFunction) Offset ¶
func (fn *LinearDecayFunction) Offset(offset interface{}) *LinearDecayFunction
Offset, if defined, computes the decay function only for a distance greater than the defined offset.
func (*LinearDecayFunction) Origin ¶
func (fn *LinearDecayFunction) Origin(origin interface{}) *LinearDecayFunction
Origin defines the "central point" by which the decay function calculates "distance".
func (*LinearDecayFunction) Scale ¶
func (fn *LinearDecayFunction) Scale(scale interface{}) *LinearDecayFunction
Scale defines the scale to be used with Decay.
func (*LinearDecayFunction) Source ¶
func (fn *LinearDecayFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*LinearDecayFunction) Weight ¶
func (fn *LinearDecayFunction) Weight(weight float64) *LinearDecayFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type LinearInterpolationSmoothingModel ¶
type LinearInterpolationSmoothingModel struct {
// contains filtered or unexported fields
}
LinearInterpolationSmoothingModel implements a linear interpolation smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewLinearInterpolationSmoothingModel ¶
func NewLinearInterpolationSmoothingModel(trigramLamda, bigramLambda, unigramLambda float64) *LinearInterpolationSmoothingModel
func (*LinearInterpolationSmoothingModel) Source ¶
func (sm *LinearInterpolationSmoothingModel) Source() (interface{}, error)
func (*LinearInterpolationSmoothingModel) Type ¶
func (sm *LinearInterpolationSmoothingModel) Type() string
type LinearMovAvgModel ¶
type LinearMovAvgModel struct { }
LinearMovAvgModel calculates a linearly weighted moving average, such that older values are linearly less important. "Time" is determined by position in collection.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html#_linear
func NewLinearMovAvgModel ¶
func NewLinearMovAvgModel() *LinearMovAvgModel
NewLinearMovAvgModel creates and initializes a new LinearMovAvgModel.
func (*LinearMovAvgModel) Settings ¶
func (m *LinearMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger specifies the interface for all log operations.
type LoggerWithContext ¶
type LoggerWithContext interface { Logger PrintfWithContext(ctx context.Context, format string, v ...interface{}) }
LoggerWithContext extends the Logger interface by a context.
type MatchAllQuery ¶
type MatchAllQuery struct {
// contains filtered or unexported fields
}
MatchAllQuery is the most simple query, which matches all documents, giving them all a _score of 1.0.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-match-all-query.html
func NewMatchAllQuery ¶
func NewMatchAllQuery() *MatchAllQuery
NewMatchAllQuery creates and initializes a new match all query.
func (*MatchAllQuery) Boost ¶
func (q *MatchAllQuery) Boost(boost float64) *MatchAllQuery
Boost sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
func (*MatchAllQuery) QueryName ¶
func (q *MatchAllQuery) QueryName(name string) *MatchAllQuery
QueryName sets the query name.
func (MatchAllQuery) Source ¶
func (q MatchAllQuery) Source() (interface{}, error)
Source returns JSON for the match all query.
type MatchNoneQuery ¶
type MatchNoneQuery struct {
// contains filtered or unexported fields
}
MatchNoneQuery returns no documents. It is the inverse of MatchAllQuery.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-match-all-query.html
func NewMatchNoneQuery ¶
func NewMatchNoneQuery() *MatchNoneQuery
NewMatchNoneQuery creates and initializes a new match none query.
func (*MatchNoneQuery) QueryName ¶
func (q *MatchNoneQuery) QueryName(name string) *MatchNoneQuery
QueryName sets the query name.
func (MatchNoneQuery) Source ¶
func (q MatchNoneQuery) Source() (interface{}, error)
Source returns JSON for the match none query.
type MatchPhrasePrefixQuery ¶
type MatchPhrasePrefixQuery struct {
// contains filtered or unexported fields
}
MatchPhrasePrefixQuery is the same as match_phrase, except that it allows for prefix matches on the last term in the text.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-match-query-phrase-prefix.html
func NewMatchPhrasePrefixQuery ¶
func NewMatchPhrasePrefixQuery(name string, value interface{}) *MatchPhrasePrefixQuery
NewMatchPhrasePrefixQuery creates and initializes a new MatchPhrasePrefixQuery.
func (*MatchPhrasePrefixQuery) Analyzer ¶
func (q *MatchPhrasePrefixQuery) Analyzer(analyzer string) *MatchPhrasePrefixQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchPhrasePrefixQuery) Boost ¶
func (q *MatchPhrasePrefixQuery) Boost(boost float64) *MatchPhrasePrefixQuery
Boost sets the boost to apply to this query.
func (*MatchPhrasePrefixQuery) MaxExpansions ¶
func (q *MatchPhrasePrefixQuery) MaxExpansions(n int) *MatchPhrasePrefixQuery
MaxExpansions sets the number of term expansions to use.
func (*MatchPhrasePrefixQuery) QueryName ¶
func (q *MatchPhrasePrefixQuery) QueryName(queryName string) *MatchPhrasePrefixQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchPhrasePrefixQuery) Slop ¶
func (q *MatchPhrasePrefixQuery) Slop(slop int) *MatchPhrasePrefixQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MatchPhrasePrefixQuery) Source ¶
func (q *MatchPhrasePrefixQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type MatchPhraseQuery ¶
type MatchPhraseQuery struct {
// contains filtered or unexported fields
}
MatchPhraseQuery analyzes the text and creates a phrase query out of the analyzed text.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-match-query-phrase.html
func NewMatchPhraseQuery ¶
func NewMatchPhraseQuery(name string, value interface{}) *MatchPhraseQuery
NewMatchPhraseQuery creates and initializes a new MatchPhraseQuery.
func (*MatchPhraseQuery) Analyzer ¶
func (q *MatchPhraseQuery) Analyzer(analyzer string) *MatchPhraseQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchPhraseQuery) Boost ¶
func (q *MatchPhraseQuery) Boost(boost float64) *MatchPhraseQuery
Boost sets the boost to apply to this query.
func (*MatchPhraseQuery) QueryName ¶
func (q *MatchPhraseQuery) QueryName(queryName string) *MatchPhraseQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchPhraseQuery) Slop ¶
func (q *MatchPhraseQuery) Slop(slop int) *MatchPhraseQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MatchPhraseQuery) Source ¶
func (q *MatchPhraseQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
type MatchQuery ¶
type MatchQuery struct {
// contains filtered or unexported fields
}
MatchQuery is a family of queries that accepts text/numerics/dates, analyzes them, and constructs a query.
To create a new MatchQuery, use NewMatchQuery. To create specific types of queries, e.g. a match_phrase query, use NewMatchPhrQuery(...).Type("phrase"), or use one of the shortcuts e.g. NewMatchPhraseQuery(...).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-match-query.html
func NewMatchQuery ¶
func NewMatchQuery(name string, text interface{}) *MatchQuery
NewMatchQuery creates and initializes a new MatchQuery.
func (*MatchQuery) Analyzer ¶
func (q *MatchQuery) Analyzer(analyzer string) *MatchQuery
Analyzer explicitly sets the analyzer to use. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MatchQuery) Boost ¶
func (q *MatchQuery) Boost(boost float64) *MatchQuery
Boost sets the boost to apply to this query.
func (*MatchQuery) CutoffFrequency ¶
func (q *MatchQuery) CutoffFrequency(cutoff float64) *MatchQuery
CutoffFrequency can be a value in [0..1] (or an absolute number >=1). It represents the maximum treshold of a terms document frequency to be considered a low frequency term.
func (*MatchQuery) Fuzziness ¶
func (q *MatchQuery) Fuzziness(fuzziness string) *MatchQuery
Fuzziness sets the fuzziness when evaluated to a fuzzy query type. Defaults to "AUTO".
func (*MatchQuery) FuzzyRewrite ¶
func (q *MatchQuery) FuzzyRewrite(fuzzyRewrite string) *MatchQuery
FuzzyRewrite sets the fuzzy_rewrite parameter controlling how the fuzzy query will get rewritten.
func (*MatchQuery) FuzzyTranspositions ¶
func (q *MatchQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchQuery
FuzzyTranspositions sets whether transpositions are supported in fuzzy queries.
The default metric used by fuzzy queries to determine a match is the Damerau-Levenshtein distance formula which supports transpositions. Setting transposition to false will * switch to classic Levenshtein distance. * If not set, Damerau-Levenshtein distance metric will be used.
func (*MatchQuery) Lenient ¶
func (q *MatchQuery) Lenient(lenient bool) *MatchQuery
Lenient specifies whether format based failures will be ignored.
func (*MatchQuery) MaxExpansions ¶
func (q *MatchQuery) MaxExpansions(maxExpansions int) *MatchQuery
MaxExpansions is used with fuzzy or prefix type queries. It specifies the number of term expansions to use. It defaults to unbounded so that its recommended to set it to a reasonable value for faster execution.
func (*MatchQuery) MinimumShouldMatch ¶
func (q *MatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchQuery
MinimumShouldMatch sets the optional minimumShouldMatch value to apply to the query.
func (*MatchQuery) Operator ¶
func (q *MatchQuery) Operator(operator string) *MatchQuery
Operator sets the operator to use when using a boolean query. Can be "AND" or "OR" (default).
func (*MatchQuery) PrefixLength ¶
func (q *MatchQuery) PrefixLength(prefixLength int) *MatchQuery
PrefixLength sets the length of a length of common (non-fuzzy) prefix for fuzzy match queries. It must be non-negative.
func (*MatchQuery) QueryName ¶
func (q *MatchQuery) QueryName(queryName string) *MatchQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MatchQuery) Source ¶
func (q *MatchQuery) Source() (interface{}, error)
Source returns JSON for the function score query.
func (*MatchQuery) ZeroTermsQuery ¶
func (q *MatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MatchQuery
ZeroTermsQuery can be "all" or "none".
type MatrixStatsAggregation ¶
type MatrixStatsAggregation struct {
// contains filtered or unexported fields
}
MatrixMatrixStatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
The stats that are returned consist of: min, max, sum, count and avg.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-stats-aggregation.html for details.
func NewMatrixStatsAggregation ¶
func NewMatrixStatsAggregation() *MatrixStatsAggregation
NewMatrixStatsAggregation initializes a new MatrixStatsAggregation.
func (*MatrixStatsAggregation) Fields ¶
func (a *MatrixStatsAggregation) Fields(fields ...string) *MatrixStatsAggregation
func (*MatrixStatsAggregation) Format ¶
func (a *MatrixStatsAggregation) Format(format string) *MatrixStatsAggregation
func (*MatrixStatsAggregation) Meta ¶
func (a *MatrixStatsAggregation) Meta(metaData map[string]interface{}) *MatrixStatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MatrixStatsAggregation) Missing ¶
func (a *MatrixStatsAggregation) Missing(missing interface{}) *MatrixStatsAggregation
Missing configures the value to use when documents miss a value.
func (*MatrixStatsAggregation) Mode ¶
func (a *MatrixStatsAggregation) Mode(mode string) *MatrixStatsAggregation
Mode specifies how to operate. Valid values are: sum, avg, median, min, or max.
func (*MatrixStatsAggregation) Source ¶
func (a *MatrixStatsAggregation) Source() (interface{}, error)
Source returns the JSON to serialize into the request, or an error.
func (*MatrixStatsAggregation) SubAggregation ¶
func (a *MatrixStatsAggregation) SubAggregation(name string, subAggregation Aggregation) *MatrixStatsAggregation
func (*MatrixStatsAggregation) ValueType ¶
func (a *MatrixStatsAggregation) ValueType(valueType interface{}) *MatrixStatsAggregation
type MaxAggregation ¶
type MaxAggregation struct {
// contains filtered or unexported fields
}
MaxAggregation is a single-value metrics aggregation that keeps track and returns the maximum value among the numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-max-aggregation.html
func NewMaxAggregation ¶
func NewMaxAggregation() *MaxAggregation
func (*MaxAggregation) Field ¶
func (a *MaxAggregation) Field(field string) *MaxAggregation
func (*MaxAggregation) Format ¶
func (a *MaxAggregation) Format(format string) *MaxAggregation
func (*MaxAggregation) Meta ¶
func (a *MaxAggregation) Meta(metaData map[string]interface{}) *MaxAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MaxAggregation) Missing ¶
func (a *MaxAggregation) Missing(missing interface{}) *MaxAggregation
func (*MaxAggregation) Script ¶
func (a *MaxAggregation) Script(script *Script) *MaxAggregation
func (*MaxAggregation) Source ¶
func (a *MaxAggregation) Source() (interface{}, error)
func (*MaxAggregation) SubAggregation ¶
func (a *MaxAggregation) SubAggregation(name string, subAggregation Aggregation) *MaxAggregation
type MaxBucketAggregation ¶
type MaxBucketAggregation struct {
// contains filtered or unexported fields
}
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). The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-max-bucket-aggregation.html
func NewMaxBucketAggregation ¶
func NewMaxBucketAggregation() *MaxBucketAggregation
NewMaxBucketAggregation creates and initializes a new MaxBucketAggregation.
func (*MaxBucketAggregation) BucketsPath ¶
func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MaxBucketAggregation) Format ¶
func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation
Format to use on the output of this aggregation.
func (*MaxBucketAggregation) GapInsertZeros ¶
func (a *MaxBucketAggregation) GapInsertZeros() *MaxBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MaxBucketAggregation) GapPolicy ¶
func (a *MaxBucketAggregation) GapPolicy(gapPolicy string) *MaxBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MaxBucketAggregation) GapSkip ¶
func (a *MaxBucketAggregation) GapSkip() *MaxBucketAggregation
GapSkip skips gaps in the series.
func (*MaxBucketAggregation) Meta ¶
func (a *MaxBucketAggregation) Meta(metaData map[string]interface{}) *MaxBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MaxBucketAggregation) Source ¶
func (a *MaxBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type MgetResponse ¶
type MgetResponse struct {
Docs []*GetResult `json:"docs,omitempty"`
}
MgetResponse is the outcome of a Multi GET API request.
type MgetService ¶
type MgetService struct {
// contains filtered or unexported fields
}
MgetService allows to get multiple documents based on an index, type (optional) and id (possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the Get API.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-multi-get.html for details.
func NewMgetService ¶
func NewMgetService(client *Client) *MgetService
NewMgetService initializes a new Multi GET API request call.
func (*MgetService) Add ¶
func (s *MgetService) Add(items ...*MultiGetItem) *MgetService
Add an item to the request.
func (*MgetService) Do ¶
func (s *MgetService) Do(ctx context.Context) (*MgetResponse, error)
Do executes the request.
func (*MgetService) ErrorTrace ¶
func (s *MgetService) ErrorTrace(errorTrace bool) *MgetService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*MgetService) FilterPath ¶
func (s *MgetService) FilterPath(filterPath ...string) *MgetService
FilterPath specifies a list of filters used to reduce the response.
func (*MgetService) Header ¶
func (s *MgetService) Header(name string, value string) *MgetService
Header adds a header to the request.
func (*MgetService) Headers ¶
func (s *MgetService) Headers(headers http.Header) *MgetService
Headers specifies the headers of the request.
func (*MgetService) Human ¶
func (s *MgetService) Human(human bool) *MgetService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*MgetService) Preference ¶
func (s *MgetService) Preference(preference string) *MgetService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*MgetService) Pretty ¶
func (s *MgetService) Pretty(pretty bool) *MgetService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*MgetService) Realtime ¶
func (s *MgetService) Realtime(realtime bool) *MgetService
Realtime specifies whether to perform the operation in realtime or search mode.
func (*MgetService) Refresh ¶
func (s *MgetService) Refresh(refresh string) *MgetService
Refresh the shard containing the document before performing the operation.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*MgetService) Routing ¶
func (s *MgetService) Routing(routing string) *MgetService
Routing is the specific routing value.
func (*MgetService) Source ¶
func (s *MgetService) Source() (interface{}, error)
Source returns the request body, which will be serialized into JSON.
func (*MgetService) StoredFields ¶
func (s *MgetService) StoredFields(storedFields ...string) *MgetService
StoredFields is a list of fields to return in the response.
type MinAggregation ¶
type MinAggregation struct {
// contains filtered or unexported fields
}
MinAggregation is a single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-min-aggregation.html
func NewMinAggregation ¶
func NewMinAggregation() *MinAggregation
func (*MinAggregation) Field ¶
func (a *MinAggregation) Field(field string) *MinAggregation
func (*MinAggregation) Format ¶
func (a *MinAggregation) Format(format string) *MinAggregation
func (*MinAggregation) Meta ¶
func (a *MinAggregation) Meta(metaData map[string]interface{}) *MinAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MinAggregation) Missing ¶
func (a *MinAggregation) Missing(missing interface{}) *MinAggregation
func (*MinAggregation) Script ¶
func (a *MinAggregation) Script(script *Script) *MinAggregation
func (*MinAggregation) Source ¶
func (a *MinAggregation) Source() (interface{}, error)
func (*MinAggregation) SubAggregation ¶
func (a *MinAggregation) SubAggregation(name string, subAggregation Aggregation) *MinAggregation
type MinBucketAggregation ¶
type MinBucketAggregation struct {
// contains filtered or unexported fields
}
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). The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-min-bucket-aggregation.html
func NewMinBucketAggregation ¶
func NewMinBucketAggregation() *MinBucketAggregation
NewMinBucketAggregation creates and initializes a new MinBucketAggregation.
func (*MinBucketAggregation) BucketsPath ¶
func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MinBucketAggregation) Format ¶
func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation
Format to use on the output of this aggregation.
func (*MinBucketAggregation) GapInsertZeros ¶
func (a *MinBucketAggregation) GapInsertZeros() *MinBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MinBucketAggregation) GapPolicy ¶
func (a *MinBucketAggregation) GapPolicy(gapPolicy string) *MinBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MinBucketAggregation) GapSkip ¶
func (a *MinBucketAggregation) GapSkip() *MinBucketAggregation
GapSkip skips gaps in the series.
func (*MinBucketAggregation) Meta ¶
func (a *MinBucketAggregation) Meta(metaData map[string]interface{}) *MinBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MinBucketAggregation) Source ¶
func (a *MinBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type MissingAggregation ¶
type MissingAggregation struct {
// contains filtered or unexported fields
}
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). This aggregator will often be used in conjunction with other field data bucket aggregators (such as ranges) to return information for all the documents that could not be placed in any of the other buckets due to missing field data values. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-missing-aggregation.html
func NewMissingAggregation ¶
func NewMissingAggregation() *MissingAggregation
func (*MissingAggregation) Field ¶
func (a *MissingAggregation) Field(field string) *MissingAggregation
func (*MissingAggregation) Meta ¶
func (a *MissingAggregation) Meta(metaData map[string]interface{}) *MissingAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MissingAggregation) Source ¶
func (a *MissingAggregation) Source() (interface{}, error)
func (*MissingAggregation) SubAggregation ¶
func (a *MissingAggregation) SubAggregation(name string, subAggregation Aggregation) *MissingAggregation
type MoreLikeThisQuery ¶
type MoreLikeThisQuery struct {
// contains filtered or unexported fields
}
MoreLikeThis query (MLT Query) finds documents that are "like" a given set of documents. In order to do so, MLT selects a set of representative terms of these input documents, forms a query using these terms, executes the query and returns the results. The user controls the input documents, how the terms should be selected and how the query is formed.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-mlt-query.html
func NewMoreLikeThisQuery ¶
func NewMoreLikeThisQuery() *MoreLikeThisQuery
NewMoreLikeThisQuery creates and initializes a new MoreLikeThisQuery.
func (*MoreLikeThisQuery) Analyzer ¶
func (q *MoreLikeThisQuery) Analyzer(analyzer string) *MoreLikeThisQuery
Analyzer specifies the analyzer that will be use to analyze the text. Defaults to the analyzer associated with the field.
func (*MoreLikeThisQuery) Boost ¶
func (q *MoreLikeThisQuery) Boost(boost float64) *MoreLikeThisQuery
Boost sets the boost for this query.
func (*MoreLikeThisQuery) BoostTerms ¶
func (q *MoreLikeThisQuery) BoostTerms(boostTerms float64) *MoreLikeThisQuery
BoostTerms sets the boost factor to use when boosting terms. It defaults to 1.
func (*MoreLikeThisQuery) FailOnUnsupportedField ¶
func (q *MoreLikeThisQuery) FailOnUnsupportedField(fail bool) *MoreLikeThisQuery
FailOnUnsupportedField indicates whether to fail or return no result when this query is run against a field which is not supported such as a binary/numeric field.
func (*MoreLikeThisQuery) Field ¶
func (q *MoreLikeThisQuery) Field(fields ...string) *MoreLikeThisQuery
Field adds one or more field names to the query.
func (*MoreLikeThisQuery) Ids ¶
func (q *MoreLikeThisQuery) Ids(ids ...string) *MoreLikeThisQuery
Ids sets the document ids to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) IgnoreLikeItems ¶
func (q *MoreLikeThisQuery) IgnoreLikeItems(ignoreDocs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
IgnoreLikeItems sets the documents from which the terms should not be selected from.
func (*MoreLikeThisQuery) IgnoreLikeText ¶
func (q *MoreLikeThisQuery) IgnoreLikeText(ignoreLikeText ...string) *MoreLikeThisQuery
IgnoreLikeText sets the text from which the terms should not be selected from.
func (*MoreLikeThisQuery) Include ¶
func (q *MoreLikeThisQuery) Include(include bool) *MoreLikeThisQuery
Include specifies whether the input documents should also be included in the results returned. Defaults to false.
func (*MoreLikeThisQuery) LikeItems ¶
func (q *MoreLikeThisQuery) LikeItems(docs ...*MoreLikeThisQueryItem) *MoreLikeThisQuery
LikeItems sets the documents to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) LikeText ¶
func (q *MoreLikeThisQuery) LikeText(likeTexts ...string) *MoreLikeThisQuery
LikeText sets the text to use in order to find documents that are "like" this.
func (*MoreLikeThisQuery) MaxDocFreq ¶
func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery
MaxDocFreq sets the maximum frequency for which words may still appear. Words that appear in more than this many docs will be ignored. It defaults to unbounded.
func (*MoreLikeThisQuery) MaxQueryTerms ¶
func (q *MoreLikeThisQuery) MaxQueryTerms(maxQueryTerms int) *MoreLikeThisQuery
MaxQueryTerms sets the maximum number of query terms that will be included in any generated query. It defaults to 25.
func (*MoreLikeThisQuery) MaxWordLength ¶
func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery
MaxWordLength sets the maximum word length above which words will be ignored. Defaults to unbounded (0).
func (*MoreLikeThisQuery) MinDocFreq ¶
func (q *MoreLikeThisQuery) MinDocFreq(minDocFreq int) *MoreLikeThisQuery
MinDocFreq sets the frequency at which words will be ignored which do not occur in at least this many docs. The default is 5.
func (*MoreLikeThisQuery) MinTermFreq ¶
func (q *MoreLikeThisQuery) MinTermFreq(minTermFreq int) *MoreLikeThisQuery
MinTermFreq is the frequency below which terms will be ignored in the source doc. The default frequency is 2.
func (*MoreLikeThisQuery) MinWordLength ¶
func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery
MinWordLength sets the minimum word length below which words will be ignored. It defaults to 0.
func (*MoreLikeThisQuery) MinimumShouldMatch ¶
func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery
MinimumShouldMatch sets the number of terms that must match the generated query expressed in the common syntax for minimum should match. The default value is "30%".
This used to be "PercentTermsToMatch" in Elasticsearch versions before 2.0.
func (*MoreLikeThisQuery) QueryName ¶
func (q *MoreLikeThisQuery) QueryName(queryName string) *MoreLikeThisQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*MoreLikeThisQuery) Source ¶
func (q *MoreLikeThisQuery) Source() (interface{}, error)
Source creates the source for the MLT query. It may return an error if the caller forgot to specify any documents to be "liked" in the MoreLikeThisQuery.
func (*MoreLikeThisQuery) StopWord ¶
func (q *MoreLikeThisQuery) StopWord(stopWords ...string) *MoreLikeThisQuery
StopWord sets the stopwords. Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".
type MoreLikeThisQueryItem ¶
type MoreLikeThisQueryItem struct {
// contains filtered or unexported fields
}
MoreLikeThisQueryItem represents a single item of a MoreLikeThisQuery to be "liked" or "unliked".
func NewMoreLikeThisQueryItem ¶
func NewMoreLikeThisQueryItem() *MoreLikeThisQueryItem
NewMoreLikeThisQueryItem creates and initializes a MoreLikeThisQueryItem.
func (*MoreLikeThisQueryItem) Doc ¶
func (item *MoreLikeThisQueryItem) Doc(doc interface{}) *MoreLikeThisQueryItem
Doc represents a raw document template for the item.
func (*MoreLikeThisQueryItem) FetchSourceContext ¶
func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem
FetchSourceContext represents the fetch source of the item which controls if and how _source should be returned.
func (*MoreLikeThisQueryItem) Fields ¶
func (item *MoreLikeThisQueryItem) Fields(fields ...string) *MoreLikeThisQueryItem
Fields represents the list of fields of the item.
func (*MoreLikeThisQueryItem) Id ¶
func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem
Id represents the document id of the item.
func (*MoreLikeThisQueryItem) Index ¶
func (item *MoreLikeThisQueryItem) Index(index string) *MoreLikeThisQueryItem
Index represents the index of the item.
func (*MoreLikeThisQueryItem) LikeText ¶
func (item *MoreLikeThisQueryItem) LikeText(likeText string) *MoreLikeThisQueryItem
LikeText represents a text to be "liked".
func (*MoreLikeThisQueryItem) Routing ¶
func (item *MoreLikeThisQueryItem) Routing(routing string) *MoreLikeThisQueryItem
Routing sets the routing associated with the item.
func (*MoreLikeThisQueryItem) Source ¶
func (item *MoreLikeThisQueryItem) Source() (interface{}, error)
Source returns the JSON-serializable fragment of the entity.
func (*MoreLikeThisQueryItem) Type ¶
func (item *MoreLikeThisQueryItem) Type(typ string) *MoreLikeThisQueryItem
Type represents the document type of the item.
func (*MoreLikeThisQueryItem) Version ¶
func (item *MoreLikeThisQueryItem) Version(version int64) *MoreLikeThisQueryItem
Version specifies the version of the item.
func (*MoreLikeThisQueryItem) VersionType ¶
func (item *MoreLikeThisQueryItem) VersionType(versionType string) *MoreLikeThisQueryItem
VersionType represents the version type of the item.
type MovAvgAggregation
deprecated
type MovAvgAggregation struct {
// contains filtered or unexported fields
}
MovAvgAggregation operates on a series of data. It will slide a window across the data and emit the average value of that window.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func NewMovAvgAggregation
deprecated
func NewMovAvgAggregation() *MovAvgAggregation
NewMovAvgAggregation creates and initializes a new MovAvgAggregation.
Deprecated: The MovAvgAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (*MovAvgAggregation) BucketsPath ¶
func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MovAvgAggregation) Format ¶
func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation
Format to use on the output of this aggregation.
func (*MovAvgAggregation) GapInsertZeros ¶
func (a *MovAvgAggregation) GapInsertZeros() *MovAvgAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MovAvgAggregation) GapPolicy ¶
func (a *MovAvgAggregation) GapPolicy(gapPolicy string) *MovAvgAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MovAvgAggregation) GapSkip ¶
func (a *MovAvgAggregation) GapSkip() *MovAvgAggregation
GapSkip skips gaps in the series.
func (*MovAvgAggregation) Meta ¶
func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MovAvgAggregation) Minimize ¶
func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation
Minimize determines if the model should be fit to the data using a cost minimizing algorithm.
func (*MovAvgAggregation) Model ¶
func (a *MovAvgAggregation) Model(model MovAvgModel) *MovAvgAggregation
Model is used to define what type of moving average you want to use in the series.
func (*MovAvgAggregation) Predict ¶
func (a *MovAvgAggregation) Predict(numPredictions int) *MovAvgAggregation
Predict sets the number of predictions that should be returned. Each prediction will be spaced at the intervals in the histogram. E.g. a predict of 2 will return two new buckets at the end of the histogram with the predicted values.
func (*MovAvgAggregation) Source ¶
func (a *MovAvgAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*MovAvgAggregation) Window ¶
func (a *MovAvgAggregation) Window(window int) *MovAvgAggregation
Window sets the window size for the moving average. This window will "slide" across the series, and the values inside that window will be used to calculate the moving avg value.
type MovAvgModel ¶
MovAvgModel specifies the model to use with the MovAvgAggregation.
type MovFnAggregation ¶
type MovFnAggregation struct {
// contains filtered or unexported fields
}
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.
You must pass a script to process the values. There are a number of predefined script functions you can use as described here: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movfn-aggregation.html#_pre_built_functions.
Example:
agg := elastic.NewMovFnAggregation( "the_sum", // bucket path elastic.NewScript("MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))"), 10, // window size )
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movfn-aggregation.html.
func NewMovFnAggregation
deprecated
func NewMovFnAggregation(bucketsPath string, script *Script, window int) *MovFnAggregation
NewMovFnAggregation creates and initializes a new MovFnAggregation.
Deprecated: The MovFnAggregation has been deprecated in 6.4.0. Use the more generate MovFnAggregation instead.
func (*MovFnAggregation) BucketsPath ¶
func (a *MovFnAggregation) BucketsPath(bucketsPaths ...string) *MovFnAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*MovFnAggregation) Format ¶
func (a *MovFnAggregation) Format(format string) *MovFnAggregation
Format to use on the output of this aggregation.
func (*MovFnAggregation) GapInsertZeros ¶
func (a *MovFnAggregation) GapInsertZeros() *MovFnAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*MovFnAggregation) GapPolicy ¶
func (a *MovFnAggregation) GapPolicy(gapPolicy string) *MovFnAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*MovFnAggregation) GapSkip ¶
func (a *MovFnAggregation) GapSkip() *MovFnAggregation
GapSkip skips gaps in the series.
func (*MovFnAggregation) Meta ¶
func (a *MovFnAggregation) Meta(metaData map[string]interface{}) *MovFnAggregation
Meta sets the meta data to be included in the aggregation response.
func (*MovFnAggregation) Script ¶
func (a *MovFnAggregation) Script(script *Script) *MovFnAggregation
Script is the script to run.
func (*MovFnAggregation) Source ¶
func (a *MovFnAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
func (*MovFnAggregation) Window ¶
func (a *MovFnAggregation) Window(window int) *MovFnAggregation
Window sets the window size for this aggregation.
type MoveAllocationCommand ¶
type MoveAllocationCommand struct {
// contains filtered or unexported fields
}
MoveAllocationCommand moves a shard from a specific node to another node.
func NewMoveAllocationCommand ¶
func NewMoveAllocationCommand(index string, shardId int, fromNode, toNode string) *MoveAllocationCommand
NewMoveAllocationCommand creates a new MoveAllocationCommand.
func (*MoveAllocationCommand) Name ¶
func (cmd *MoveAllocationCommand) Name() string
Name of the command in a request to the Cluster Reroute API.
func (*MoveAllocationCommand) Source ¶
func (cmd *MoveAllocationCommand) Source() (interface{}, error)
Source generates the (inner) JSON to be used when serializing the command.
type MultiGetItem ¶
type MultiGetItem struct {
// contains filtered or unexported fields
}
MultiGetItem is a single document to retrieve via the MgetService.
func NewMultiGetItem ¶
func NewMultiGetItem() *MultiGetItem
NewMultiGetItem initializes a new, single item for a Multi GET request.
func (*MultiGetItem) FetchSource ¶
func (item *MultiGetItem) FetchSource(fetchSourceContext *FetchSourceContext) *MultiGetItem
FetchSource allows to specify source filtering.
func (*MultiGetItem) Id ¶
func (item *MultiGetItem) Id(id string) *MultiGetItem
Id specifies the identifier of the document.
func (*MultiGetItem) Index ¶
func (item *MultiGetItem) Index(index string) *MultiGetItem
Index specifies the index name.
func (*MultiGetItem) Routing ¶
func (item *MultiGetItem) Routing(routing string) *MultiGetItem
Routing is the specific routing value.
func (*MultiGetItem) Source ¶
func (item *MultiGetItem) Source() (interface{}, error)
Source returns the serialized JSON to be sent to Elasticsearch as part of a MultiGet search.
func (*MultiGetItem) StoredFields ¶
func (item *MultiGetItem) StoredFields(storedFields ...string) *MultiGetItem
StoredFields is a list of fields to return in the response.
func (*MultiGetItem) Type ¶
func (item *MultiGetItem) Type(typ string) *MultiGetItem
Type specifies the type name.
func (*MultiGetItem) Version ¶
func (item *MultiGetItem) Version(version int64) *MultiGetItem
Version can be MatchAny (-3), MatchAnyPre120 (0), NotFound (-1), or NotSet (-2). These are specified in org.elasticsearch.common.lucene.uid.Versions. The default in Elasticsearch is MatchAny (-3).
func (*MultiGetItem) VersionType ¶
func (item *MultiGetItem) VersionType(versionType string) *MultiGetItem
VersionType can be "internal", "external", "external_gt", or "external_gte". See org.elasticsearch.index.VersionType in Elasticsearch source. It is "internal" by default.
type MultiMatchQuery ¶
type MultiMatchQuery struct {
// contains filtered or unexported fields
}
MultiMatchQuery builds on the MatchQuery to allow multi-field queries.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-multi-match-query.html
func NewMultiMatchQuery ¶
func NewMultiMatchQuery(text interface{}, fields ...string) *MultiMatchQuery
MultiMatchQuery creates and initializes a new MultiMatchQuery.
func (*MultiMatchQuery) Analyzer ¶
func (q *MultiMatchQuery) Analyzer(analyzer string) *MultiMatchQuery
Analyzer sets the analyzer to use explicitly. It defaults to use explicit mapping config for the field, or, if not set, the default search analyzer.
func (*MultiMatchQuery) Boost ¶
func (q *MultiMatchQuery) Boost(boost float64) *MultiMatchQuery
Boost sets the boost for this query.
func (*MultiMatchQuery) CutoffFrequency ¶
func (q *MultiMatchQuery) CutoffFrequency(cutoff float64) *MultiMatchQuery
CutoffFrequency sets a cutoff value in [0..1] (or absolute number >=1) representing the maximum threshold of a terms document frequency to be considered a low frequency term.
func (*MultiMatchQuery) Field ¶
func (q *MultiMatchQuery) Field(field string) *MultiMatchQuery
Field adds a field to run the multi match against.
func (*MultiMatchQuery) FieldWithBoost ¶
func (q *MultiMatchQuery) FieldWithBoost(field string, boost float64) *MultiMatchQuery
FieldWithBoost adds a field to run the multi match against with a specific boost.
func (*MultiMatchQuery) Fuzziness ¶
func (q *MultiMatchQuery) Fuzziness(fuzziness string) *MultiMatchQuery
Fuzziness sets the fuzziness used when evaluated to a fuzzy query type. It defaults to "AUTO".
func (*MultiMatchQuery) FuzzyRewrite ¶
func (q *MultiMatchQuery) FuzzyRewrite(fuzzyRewrite string) *MultiMatchQuery
func (*MultiMatchQuery) Lenient ¶
func (q *MultiMatchQuery) Lenient(lenient bool) *MultiMatchQuery
Lenient indicates whether format based failures will be ignored.
func (*MultiMatchQuery) MaxExpansions ¶
func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery
MaxExpansions is the number of term expansions to use when using fuzzy or prefix type query. It defaults to unbounded so it's recommended to set it to a reasonable value for faster execution.
func (*MultiMatchQuery) MinimumShouldMatch ¶
func (q *MultiMatchQuery) MinimumShouldMatch(minimumShouldMatch string) *MultiMatchQuery
MinimumShouldMatch represents the minimum number of optional should clauses to match.
func (*MultiMatchQuery) Operator ¶
func (q *MultiMatchQuery) Operator(operator string) *MultiMatchQuery
Operator sets the operator to use when using boolean query. It can be either AND or OR (default).
func (*MultiMatchQuery) PrefixLength ¶
func (q *MultiMatchQuery) PrefixLength(prefixLength int) *MultiMatchQuery
PrefixLength for the fuzzy process.
func (*MultiMatchQuery) QueryName ¶
func (q *MultiMatchQuery) QueryName(queryName string) *MultiMatchQuery
QueryName sets the query name for the filter that can be used when searching for matched filters per hit.
func (*MultiMatchQuery) Rewrite ¶
func (q *MultiMatchQuery) Rewrite(rewrite string) *MultiMatchQuery
func (*MultiMatchQuery) Slop ¶
func (q *MultiMatchQuery) Slop(slop int) *MultiMatchQuery
Slop sets the phrase slop if evaluated to a phrase query type.
func (*MultiMatchQuery) Source ¶
func (q *MultiMatchQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*MultiMatchQuery) TieBreaker ¶
func (q *MultiMatchQuery) TieBreaker(tieBreaker float64) *MultiMatchQuery
TieBreaker for "best-match" disjunction queries (OR queries). The tie breaker capability allows documents that match more than one query clause (in this case on more than one field) to be scored better than documents that match only the best of the fields, without confusing this with the better case of two distinct matches in the multiple fields.
A tie-breaker value of 1.0 is interpreted as a signal to score queries as "most-match" queries where all matching query clauses are considered for scoring.
func (*MultiMatchQuery) Type ¶
func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery
Type can be "best_fields", "boolean", "most_fields", "cross_fields", "phrase", or "phrase_prefix".
func (*MultiMatchQuery) ZeroTermsQuery ¶
func (q *MultiMatchQuery) ZeroTermsQuery(zeroTermsQuery string) *MultiMatchQuery
ZeroTermsQuery can be "all" or "none".
type MultiSearchResult ¶
type MultiSearchResult struct { TookInMillis int64 `json:"took,omitempty"` // search time in milliseconds Responses []*SearchResult `json:"responses,omitempty"` }
MultiSearchResult is the outcome of running a multi-search operation.
type MultiSearchService ¶
type MultiSearchService struct {
// contains filtered or unexported fields
}
MultiSearch executes one or more searches in one roundtrip.
func NewMultiSearchService ¶
func NewMultiSearchService(client *Client) *MultiSearchService
func (*MultiSearchService) Add ¶
func (s *MultiSearchService) Add(requests ...*SearchRequest) *MultiSearchService
func (*MultiSearchService) Do ¶
func (s *MultiSearchService) Do(ctx context.Context) (*MultiSearchResult, error)
func (*MultiSearchService) ErrorTrace ¶
func (s *MultiSearchService) ErrorTrace(errorTrace bool) *MultiSearchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*MultiSearchService) FilterPath ¶
func (s *MultiSearchService) FilterPath(filterPath ...string) *MultiSearchService
FilterPath specifies a list of filters used to reduce the response.
func (*MultiSearchService) Header ¶
func (s *MultiSearchService) Header(name string, value string) *MultiSearchService
Header adds a header to the request.
func (*MultiSearchService) Headers ¶
func (s *MultiSearchService) Headers(headers http.Header) *MultiSearchService
Headers specifies the headers of the request.
func (*MultiSearchService) Human ¶
func (s *MultiSearchService) Human(human bool) *MultiSearchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*MultiSearchService) Index ¶
func (s *MultiSearchService) Index(indices ...string) *MultiSearchService
func (*MultiSearchService) MaxConcurrentSearches ¶
func (s *MultiSearchService) MaxConcurrentSearches(max int) *MultiSearchService
func (*MultiSearchService) PreFilterShardSize ¶
func (s *MultiSearchService) PreFilterShardSize(size int) *MultiSearchService
func (*MultiSearchService) Pretty ¶
func (s *MultiSearchService) Pretty(pretty bool) *MultiSearchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*MultiSearchService) RestTotalHitsAsInt ¶
func (s *MultiSearchService) RestTotalHitsAsInt(v bool) *MultiSearchService
RestTotalHitsAsInt is a flag that is temporarily available for ES 7.x servers to return total hits as an int64 instead of a response structure.
Warning: Using it indicates that you are using elastic.v6 with ES 7.x, which is an unsupported scenario. Use at your own risk. This option will also be removed with ES 8.x. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#hits-total-now-object-search-response.
type MultiTermvectorItem ¶
type MultiTermvectorItem struct {
// contains filtered or unexported fields
}
MultiTermvectorItem is a single document to retrieve via MultiTermvectorService.
func NewMultiTermvectorItem ¶
func NewMultiTermvectorItem() *MultiTermvectorItem
func (*MultiTermvectorItem) Doc ¶
func (s *MultiTermvectorItem) Doc(doc interface{}) *MultiTermvectorItem
Doc is the document to analyze.
func (*MultiTermvectorItem) FieldStatistics ¶
func (s *MultiTermvectorItem) FieldStatistics(fieldStatistics bool) *MultiTermvectorItem
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
func (*MultiTermvectorItem) Fields ¶
func (s *MultiTermvectorItem) Fields(fields ...string) *MultiTermvectorItem
Fields a list of fields to return.
func (*MultiTermvectorItem) Id ¶
func (s *MultiTermvectorItem) Id(id string) *MultiTermvectorItem
func (*MultiTermvectorItem) Index ¶
func (s *MultiTermvectorItem) Index(index string) *MultiTermvectorItem
func (*MultiTermvectorItem) Offsets ¶
func (s *MultiTermvectorItem) Offsets(offsets bool) *MultiTermvectorItem
Offsets specifies if term offsets should be returned.
func (*MultiTermvectorItem) Parent ¶
func (s *MultiTermvectorItem) Parent(parent string) *MultiTermvectorItem
Parent id of documents.
func (*MultiTermvectorItem) Payloads ¶
func (s *MultiTermvectorItem) Payloads(payloads bool) *MultiTermvectorItem
Payloads specifies if term payloads should be returned.
func (*MultiTermvectorItem) PerFieldAnalyzer ¶
func (s *MultiTermvectorItem) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *MultiTermvectorItem
PerFieldAnalyzer allows to specify a different analyzer than the one at the field.
func (*MultiTermvectorItem) Positions ¶
func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem
Positions specifies if term positions should be returned.
func (*MultiTermvectorItem) Preference ¶
func (s *MultiTermvectorItem) Preference(preference string) *MultiTermvectorItem
Preference specify the node or shard the operation should be performed on (default: random).
func (*MultiTermvectorItem) Realtime ¶
func (s *MultiTermvectorItem) Realtime(realtime bool) *MultiTermvectorItem
Realtime specifies if request is real-time as opposed to near-real-time (default: true).
func (*MultiTermvectorItem) Routing ¶
func (s *MultiTermvectorItem) Routing(routing string) *MultiTermvectorItem
Routing is a specific routing value.
func (*MultiTermvectorItem) Source ¶
func (s *MultiTermvectorItem) Source() interface{}
Source returns the serialized JSON to be sent to Elasticsearch as part of a MultiTermvector.
func (*MultiTermvectorItem) TermStatistics ¶
func (s *MultiTermvectorItem) TermStatistics(termStatistics bool) *MultiTermvectorItem
TermStatistics specifies if total term frequency and document frequency should be returned.
func (*MultiTermvectorItem) Type ¶
func (s *MultiTermvectorItem) Type(typ string) *MultiTermvectorItem
type MultiTermvectorResponse ¶
type MultiTermvectorResponse struct {
Docs []*TermvectorsResponse `json:"docs"`
}
MultiTermvectorResponse is the response of MultiTermvectorService.Do.
type MultiTermvectorService ¶
type MultiTermvectorService struct {
// contains filtered or unexported fields
}
MultiTermvectorService returns information and statistics on terms in the fields of a particular document. The document could be stored in the index or artificially provided by the user.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-multi-termvectors.html for documentation.
func NewMultiTermvectorService ¶
func NewMultiTermvectorService(client *Client) *MultiTermvectorService
NewMultiTermvectorService creates a new MultiTermvectorService.
func (*MultiTermvectorService) Add ¶
func (s *MultiTermvectorService) Add(docs ...*MultiTermvectorItem) *MultiTermvectorService
Add adds documents to MultiTermvectors service.
func (*MultiTermvectorService) BodyJson ¶
func (s *MultiTermvectorService) BodyJson(body interface{}) *MultiTermvectorService
BodyJson is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
func (*MultiTermvectorService) BodyString ¶
func (s *MultiTermvectorService) BodyString(body string) *MultiTermvectorService
BodyString is documented as: Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation..
func (*MultiTermvectorService) Do ¶
func (s *MultiTermvectorService) Do(ctx context.Context) (*MultiTermvectorResponse, error)
Do executes the operation.
func (*MultiTermvectorService) ErrorTrace ¶
func (s *MultiTermvectorService) ErrorTrace(errorTrace bool) *MultiTermvectorService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*MultiTermvectorService) FieldStatistics ¶
func (s *MultiTermvectorService) FieldStatistics(fieldStatistics bool) *MultiTermvectorService
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Fields ¶
func (s *MultiTermvectorService) Fields(fields []string) *MultiTermvectorService
Fields is a comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) FilterPath ¶
func (s *MultiTermvectorService) FilterPath(filterPath ...string) *MultiTermvectorService
FilterPath specifies a list of filters used to reduce the response.
func (*MultiTermvectorService) Header ¶
func (s *MultiTermvectorService) Header(name string, value string) *MultiTermvectorService
Header adds a header to the request.
func (*MultiTermvectorService) Headers ¶
func (s *MultiTermvectorService) Headers(headers http.Header) *MultiTermvectorService
Headers specifies the headers of the request.
func (*MultiTermvectorService) Human ¶
func (s *MultiTermvectorService) Human(human bool) *MultiTermvectorService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*MultiTermvectorService) Ids ¶
func (s *MultiTermvectorService) Ids(ids []string) *MultiTermvectorService
Ids is a comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body.
func (*MultiTermvectorService) Index ¶
func (s *MultiTermvectorService) Index(index string) *MultiTermvectorService
Index in which the document resides.
func (*MultiTermvectorService) Offsets ¶
func (s *MultiTermvectorService) Offsets(offsets bool) *MultiTermvectorService
Offsets specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Parent ¶
func (s *MultiTermvectorService) Parent(parent string) *MultiTermvectorService
Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Payloads ¶
func (s *MultiTermvectorService) Payloads(payloads bool) *MultiTermvectorService
Payloads specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Positions ¶
func (s *MultiTermvectorService) Positions(positions bool) *MultiTermvectorService
Positions specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Preference ¶
func (s *MultiTermvectorService) Preference(preference string) *MultiTermvectorService
Preference specifies the node or shard the operation should be performed on (default: random). Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Pretty ¶
func (s *MultiTermvectorService) Pretty(pretty bool) *MultiTermvectorService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*MultiTermvectorService) Realtime ¶
func (s *MultiTermvectorService) Realtime(realtime bool) *MultiTermvectorService
Realtime specifies if requests are real-time as opposed to near-real-time (default: true).
func (*MultiTermvectorService) Routing ¶
func (s *MultiTermvectorService) Routing(routing string) *MultiTermvectorService
Routing specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Source ¶
func (s *MultiTermvectorService) Source() interface{}
func (*MultiTermvectorService) TermStatistics ¶
func (s *MultiTermvectorService) TermStatistics(termStatistics bool) *MultiTermvectorService
TermStatistics specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
func (*MultiTermvectorService) Type ¶
func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService
Type of the document.
func (*MultiTermvectorService) Validate ¶
func (s *MultiTermvectorService) Validate() error
Validate checks if the operation is valid.
func (*MultiTermvectorService) Version ¶
func (s *MultiTermvectorService) Version(version interface{}) *MultiTermvectorService
Version is explicit version number for concurrency control.
func (*MultiTermvectorService) VersionType ¶
func (s *MultiTermvectorService) VersionType(versionType string) *MultiTermvectorService
VersionType is specific version type.
type MultiValuesSourceFieldConfig ¶
type MultiValuesSourceFieldConfig struct { FieldName string Missing interface{} Script *Script TimeZone string }
MultiValuesSourceFieldConfig represents a field configuration used e.g. in WeightedAvgAggregation.
func (*MultiValuesSourceFieldConfig) Source ¶
func (f *MultiValuesSourceFieldConfig) Source() (interface{}, error)
type MutualInformationSignificanceHeuristic ¶
type MutualInformationSignificanceHeuristic struct {
// contains filtered or unexported fields
}
MutualInformationSignificanceHeuristic implements Mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_mutual_information for details.
func NewMutualInformationSignificanceHeuristic ¶
func NewMutualInformationSignificanceHeuristic() *MutualInformationSignificanceHeuristic
NewMutualInformationSignificanceHeuristic initializes a new instance of MutualInformationSignificanceHeuristic.
func (*MutualInformationSignificanceHeuristic) BackgroundIsSuperset ¶
func (sh *MutualInformationSignificanceHeuristic) BackgroundIsSuperset(backgroundIsSuperset bool) *MutualInformationSignificanceHeuristic
BackgroundIsSuperset indicates whether you defined a custom background filter that represents a difference set of documents that you want to compare to.
func (*MutualInformationSignificanceHeuristic) IncludeNegatives ¶
func (sh *MutualInformationSignificanceHeuristic) IncludeNegatives(includeNegatives bool) *MutualInformationSignificanceHeuristic
IncludeNegatives indicates whether to filter out the terms that appear much less in the subset than in the background without the subset.
func (*MutualInformationSignificanceHeuristic) Name ¶
func (sh *MutualInformationSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*MutualInformationSignificanceHeuristic) Source ¶
func (sh *MutualInformationSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type NestedAggregation ¶
type NestedAggregation struct {
// contains filtered or unexported fields
}
NestedAggregation is a special single bucket aggregation that enables aggregating nested documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-nested-aggregation.html
func NewNestedAggregation ¶
func NewNestedAggregation() *NestedAggregation
func (*NestedAggregation) Meta ¶
func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation
Meta sets the meta data to be included in the aggregation response.
func (*NestedAggregation) Path ¶
func (a *NestedAggregation) Path(path string) *NestedAggregation
func (*NestedAggregation) Source ¶
func (a *NestedAggregation) Source() (interface{}, error)
func (*NestedAggregation) SubAggregation ¶
func (a *NestedAggregation) SubAggregation(name string, subAggregation Aggregation) *NestedAggregation
type NestedHit ¶
type NestedHit struct { Field string `json:"field"` Offset int `json:"offset,omitempty"` Child *NestedHit `json:"_nested,omitempty"` }
NestedHit is a nested innerhit
type NestedQuery ¶
type NestedQuery struct {
// contains filtered or unexported fields
}
NestedQuery allows to query nested objects / docs. The query is executed against the nested objects / docs as if they were indexed as separate docs (they are, internally) and resulting in the root parent doc (or parent nested mapping).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-nested-query.html
func NewNestedQuery ¶
func NewNestedQuery(path string, query Query) *NestedQuery
NewNestedQuery creates and initializes a new NestedQuery.
func (*NestedQuery) Boost ¶
func (q *NestedQuery) Boost(boost float64) *NestedQuery
Boost sets the boost for this query.
func (*NestedQuery) IgnoreUnmapped ¶
func (q *NestedQuery) IgnoreUnmapped(value bool) *NestedQuery
IgnoreUnmapped sets the ignore_unmapped option for the filter that ignores unmapped nested fields
func (*NestedQuery) InnerHit ¶
func (q *NestedQuery) InnerHit(innerHit *InnerHit) *NestedQuery
InnerHit sets the inner hit definition in the scope of this nested query and reusing the defined path and query.
func (*NestedQuery) QueryName ¶
func (q *NestedQuery) QueryName(queryName string) *NestedQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*NestedQuery) ScoreMode ¶
func (q *NestedQuery) ScoreMode(scoreMode string) *NestedQuery
ScoreMode specifies the score mode.
func (*NestedQuery) Source ¶
func (q *NestedQuery) Source() (interface{}, error)
Source returns JSON for the query.
type NestedSort ¶
type NestedSort struct { Sorter // contains filtered or unexported fields }
NestedSort is used for fields that are inside a nested object. It takes a "path" argument and an optional nested filter that the nested objects should match with in order to be taken into account for sorting.
NestedSort is available from 6.1 and replaces nestedFilter and nestedPath in the other sorters.
func NewNestedSort ¶
func NewNestedSort(path string) *NestedSort
NewNestedSort creates a new NestedSort.
func (*NestedSort) Filter ¶
func (s *NestedSort) Filter(filter Query) *NestedSort
Filter sets the filter.
func (*NestedSort) NestedSort ¶
func (s *NestedSort) NestedSort(nestedSort *NestedSort) *NestedSort
NestedSort embeds another level of nested sorting.
func (*NestedSort) Source ¶
func (s *NestedSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
type NodesInfoNode ¶
type NodesInfoNode struct { // Name of the node, e.g. "Mister Fear" Name string `json:"name"` // TransportAddress, e.g. "127.0.0.1:9300" TransportAddress string `json:"transport_address"` // Host is the host name, e.g. "macbookair" Host string `json:"host"` // IP is the IP address, e.g. "192.168.1.2" IP string `json:"ip"` // Version is the Elasticsearch version running on the node, e.g. "1.4.3" Version string `json:"version"` // BuildHash is the Elasticsearch build bash, e.g. "36a29a7" BuildHash string `json:"build_hash"` // TotalIndexingBuffer represents the total heap allowed to be used to // hold recently indexed documents before they must be written to disk. TotalIndexingBuffer int64 `json:"total_indexing_buffer"` // e.g. 16gb // TotalIndexingBufferInBytes is the same as TotalIndexingBuffer, but // expressed in bytes. TotalIndexingBufferInBytes string `json:"total_indexing_buffer_in_bytes"` // Roles of the node, e.g. [master, ingest, data] Roles []string `json:"roles"` // Attributes of the node. Attributes map[string]string `json:"attributes"` // Settings of the node, e.g. paths and pidfile. Settings map[string]interface{} `json:"settings"` // OS information, e.g. CPU and memory. OS *NodesInfoNodeOS `json:"os"` // Process information, e.g. max file descriptors. Process *NodesInfoNodeProcess `json:"process"` // JVM information, e.g. VM version. JVM *NodesInfoNodeJVM `json:"jvm"` // ThreadPool information. ThreadPool *NodesInfoNodeThreadPool `json:"thread_pool"` // Network information. Transport *NodesInfoNodeTransport `json:"transport"` // HTTP information. HTTP *NodesInfoNodeHTTP `json:"http"` // Plugins information. Plugins []*NodesInfoNodePlugin `json:"plugins"` // Modules information. Modules []*NodesInfoNodeModule `json:"modules"` // Ingest information. Ingest *NodesInfoNodeIngest `json:"ingest"` }
NodesInfoNode represents information about a node in the cluster.
func (*NodesInfoNode) HasRole ¶
func (n *NodesInfoNode) HasRole(role string) bool
HasRole returns true if the node fulfills the given role.
func (*NodesInfoNode) IsData ¶
func (n *NodesInfoNode) IsData() bool
IsData returns true if the node is a data node.
func (*NodesInfoNode) IsIngest ¶
func (n *NodesInfoNode) IsIngest() bool
IsIngest returns true if the node is an ingest node.
func (*NodesInfoNode) IsMaster ¶
func (n *NodesInfoNode) IsMaster() bool
IsMaster returns true if the node is a master node.
type NodesInfoNodeHTTP ¶
type NodesInfoNodeHTTP struct { BoundAddress []string `json:"bound_address"` // e.g. ["127.0.0.1:9200", "[fe80::1]:9200", "[::1]:9200"] PublishAddress string `json:"publish_address"` // e.g. "127.0.0.1:9300" MaxContentLength string `json:"max_content_length"` // e.g. "100mb" MaxContentLengthInBytes int64 `json:"max_content_length_in_bytes"` }
NodesInfoNodeHTTP represents HTTP-related information.
type NodesInfoNodeIngest ¶
type NodesInfoNodeIngest struct {
Processors []*NodesInfoNodeIngestProcessorInfo `json:"processors"`
}
NodesInfoNodeIngest represents information about the ingester.
type NodesInfoNodeIngestProcessorInfo ¶
type NodesInfoNodeIngestProcessorInfo struct {
Type string `json:"type"` // e.g. append, convert, date etc.
}
NodesInfoNodeIngestProcessorInfo represents ingest processor info.
type NodesInfoNodeJVM ¶
type NodesInfoNodeJVM struct { PID int `json:"pid"` // process id, e.g. 87079 Version string `json:"version"` // e.g. "1.8.0_161" VMName string `json:"vm_name"` // e.g. "OpenJDK 64-Bit Server VM" VMVersion string `json:"vm_version"` // e.g. "25.161-b14" VMVendor string `json:"vm_vendor"` // e.g. "Oracle Corporation" StartTime time.Time `json:"start_time"` // e.g. "2018-03-30T11:06:36.644Z" StartTimeInMillis int64 `json:"start_time_in_millis"` // e.g. 1522407996644 // Mem information Mem struct { HeapInit string `json:"heap_init"` // e.g. "1gb" HeapInitInBytes int `json:"heap_init_in_bytes"` // e.g. 1073741824 HeapMax string `json:"heap_max"` // e.g. "1007.3mb" HeapMaxInBytes int `json:"heap_max_in_bytes"` // e.g. 1056309248 NonHeapInit string `json:"non_heap_init"` // e.g. "2.4mb" NonHeapInitInBytes int `json:"non_heap_init_in_bytes"` // e.g. 2555904 NonHeapMax string `json:"non_heap_max"` // e.g. "0b" NonHeapMaxInBytes int `json:"non_heap_max_in_bytes"` // e.g. 0 DirectMax string `json:"direct_max"` // e.g. "1007.3mb" DirectMaxInBytes int `json:"direct_max_in_bytes"` // e.g. 1056309248 } `json:"mem"` GCCollectors []string `json:"gc_collectors"` // e.g. ["ParNew", "ConcurrentMarkSweep"] MemoryPools []string `json:"memory_pools"` // e.g. ["Code Cache", "Metaspace", "Compressed Class Space", "Par Eden Space", "Par Survivor Space", "CMS Old Gen"] // UsingCompressedOrdinaryObjectPointers should be a bool, but is a // string in 6.2.3. We use an interface{} for now so that it won't break // when this will be fixed in later versions of Elasticsearch. UsingCompressedOrdinaryObjectPointers interface{} `json:"using_compressed_ordinary_object_pointers"` InputArguments []string `json:"input_arguments"` // e.g. ["-Xms1g", "-Xmx1g" ...] }
NodesInfoNodeJVM represents JVM-related information.
type NodesInfoNodeModule ¶
type NodesInfoNodeModule struct { Name string `json:"name"` // e.g. "ingest-geoip" Version string `json:"version"` // e.g. "6.2.3" ElasticsearchVersion string `json:"elasticsearch_version"` JavaVersion string `json:"java_version"` Description string `json:"description"` // e.g. "Ingest processor ..." Classname string `json:"classname"` // e.g. "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin" ExtendedPlugins []string `json:"extended_plugins"` HasNativeController bool `json:"has_native_controller"` RequiresKeystore bool `json:"requires_keystore"` }
NodesInfoNodeModule represents information about a module.
type NodesInfoNodeOS ¶
type NodesInfoNodeOS struct { RefreshInterval string `json:"refresh_interval"` // e.g. 1s RefreshIntervalInMillis int `json:"refresh_interval_in_millis"` // e.g. 1000 Name string `json:"name"` // e.g. Linux Arch string `json:"arch"` // e.g. amd64 Version string `json:"version"` // e.g. 4.9.87-linuxkit-aufs AvailableProcessors int `json:"available_processors"` // e.g. 4 AllocatedProcessors int `json:"allocated_processors"` // e.g. 4 }
NodesInfoNodeOS represents OS-specific details about a node.
type NodesInfoNodePlugin ¶
type NodesInfoNodePlugin struct { Name string `json:"name"` // e.g. "ingest-geoip" Version string `json:"version"` // e.g. "6.2.3" ElasticsearchVersion string `json:"elasticsearch_version"` JavaVersion string `json:"java_version"` Description string `json:"description"` // e.g. "Ingest processor ..." Classname string `json:"classname"` // e.g. "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin" ExtendedPlugins []string `json:"extended_plugins"` HasNativeController bool `json:"has_native_controller"` RequiresKeystore bool `json:"requires_keystore"` }
NodesInfoNodePlugin represents information about a plugin.
type NodesInfoNodeProcess ¶
type NodesInfoNodeProcess struct { RefreshInterval string `json:"refresh_interval"` // e.g. 1s RefreshIntervalInMillis int64 `json:"refresh_interval_in_millis"` // e.g. 1000 ID int `json:"id"` // process id, e.g. 87079 Mlockall bool `json:"mlockall"` // e.g. false }
NodesInfoNodeProcess represents process-related information.
type NodesInfoNodeThreadPool ¶
type NodesInfoNodeThreadPool struct { ForceMerge *NodesInfoNodeThreadPoolSection `json:"force_merge"` FetchShardStarted *NodesInfoNodeThreadPoolSection `json:"fetch_shard_started"` Listener *NodesInfoNodeThreadPoolSection `json:"listener"` Index *NodesInfoNodeThreadPoolSection `json:"index"` Refresh *NodesInfoNodeThreadPoolSection `json:"refresh"` Generic *NodesInfoNodeThreadPoolSection `json:"generic"` Warmer *NodesInfoNodeThreadPoolSection `json:"warmer"` Search *NodesInfoNodeThreadPoolSection `json:"search"` Flush *NodesInfoNodeThreadPoolSection `json:"flush"` FetchShardStore *NodesInfoNodeThreadPoolSection `json:"fetch_shard_store"` Management *NodesInfoNodeThreadPoolSection `json:"management"` Get *NodesInfoNodeThreadPoolSection `json:"get"` Bulk *NodesInfoNodeThreadPoolSection `json:"bulk"` Snapshot *NodesInfoNodeThreadPoolSection `json:"snapshot"` Percolate *NodesInfoNodeThreadPoolSection `json:"percolate"` // check Bench *NodesInfoNodeThreadPoolSection `json:"bench"` // check Suggest *NodesInfoNodeThreadPoolSection `json:"suggest"` // deprecated Optimize *NodesInfoNodeThreadPoolSection `json:"optimize"` // deprecated Merge *NodesInfoNodeThreadPoolSection `json:"merge"` // deprecated }
NodesInfoNodeThreadPool represents information about the thread pool.
type NodesInfoNodeThreadPoolSection ¶
type NodesInfoNodeThreadPoolSection struct { Type string `json:"type"` // e.g. fixed, scaling, or fixed_auto_queue_size Min int `json:"min"` // e.g. 4 Max int `json:"max"` // e.g. 4 KeepAlive string `json:"keep_alive"` // e.g. "5m" QueueSize interface{} `json:"queue_size"` // e.g. "1k" or -1 }
NodesInfoNodeThreadPoolSection represents information about a certain type of thread pool, e.g. for indexing or searching.
type NodesInfoNodeTransport ¶
type NodesInfoNodeTransport struct { BoundAddress []string `json:"bound_address"` PublishAddress string `json:"publish_address"` Profiles map[string]*NodesInfoNodeTransportProfile `json:"profiles"` }
NodesInfoNodeTransport represents transport-related information.
type NodesInfoNodeTransportProfile ¶
type NodesInfoNodeTransportProfile struct { BoundAddress []string `json:"bound_address"` PublishAddress string `json:"publish_address"` }
NodesInfoNodeTransportProfile represents a transport profile.
type NodesInfoResponse ¶
type NodesInfoResponse struct { ClusterName string `json:"cluster_name"` Nodes map[string]*NodesInfoNode `json:"nodes"` }
NodesInfoResponse is the response of NodesInfoService.Do.
type NodesInfoService ¶
type NodesInfoService struct {
// contains filtered or unexported fields
}
NodesInfoService allows to retrieve one or more or all of the cluster nodes information. It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/cluster-nodes-info.html.
func NewNodesInfoService ¶
func NewNodesInfoService(client *Client) *NodesInfoService
NewNodesInfoService creates a new NodesInfoService.
func (*NodesInfoService) Do ¶
func (s *NodesInfoService) Do(ctx context.Context) (*NodesInfoResponse, error)
Do executes the operation.
func (*NodesInfoService) ErrorTrace ¶
func (s *NodesInfoService) ErrorTrace(errorTrace bool) *NodesInfoService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*NodesInfoService) FilterPath ¶
func (s *NodesInfoService) FilterPath(filterPath ...string) *NodesInfoService
FilterPath specifies a list of filters used to reduce the response.
func (*NodesInfoService) FlatSettings ¶
func (s *NodesInfoService) FlatSettings(flatSettings bool) *NodesInfoService
FlatSettings returns settings in flat format (default: false).
func (*NodesInfoService) Header ¶
func (s *NodesInfoService) Header(name string, value string) *NodesInfoService
Header adds a header to the request.
func (*NodesInfoService) Headers ¶
func (s *NodesInfoService) Headers(headers http.Header) *NodesInfoService
Headers specifies the headers of the request.
func (*NodesInfoService) Human ¶
func (s *NodesInfoService) Human(human bool) *NodesInfoService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*NodesInfoService) Metric ¶
func (s *NodesInfoService) Metric(metric ...string) *NodesInfoService
Metric is a list of metrics you wish returned. Leave empty to return all. Valid metrics are: settings, os, process, jvm, thread_pool, network, transport, http, and plugins.
func (*NodesInfoService) NodeId ¶
func (s *NodesInfoService) NodeId(nodeId ...string) *NodesInfoService
NodeId is a list of node IDs or names to limit the returned information. Use "_local" to return information from the node you're connecting to, leave empty to get information from all nodes.
func (*NodesInfoService) Pretty ¶
func (s *NodesInfoService) Pretty(pretty bool) *NodesInfoService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*NodesInfoService) Validate ¶
func (s *NodesInfoService) Validate() error
Validate checks if the operation is valid.
type NodesStatsBreaker ¶
type NodesStatsDiscovery ¶
type NodesStatsDiscovery struct {
ClusterStateQueue *NodesStatsDiscoveryStats `json:"cluster_state_queue"`
}
type NodesStatsDocsStats ¶
type NodesStatsFielddataStats ¶
type NodesStatsFielddataStats struct { MemorySize string `json:"memory_size"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` Evictions int64 `json:"evictions"` Fields map[string]struct { MemorySize string `json:"memory_size"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` } `json:"fields"` }
type NodesStatsFlushStats ¶
type NodesStatsGetStats ¶
type NodesStatsGetStats struct { Total int64 `json:"total"` Time string `json:"get_time"` TimeInMillis int64 `json:"time_in_millis"` Exists int64 `json:"exists"` ExistsTime string `json:"exists_time"` ExistsTimeInMillis int64 `json:"exists_in_millis"` Missing int64 `json:"missing"` MissingTime string `json:"missing_time"` MissingTimeInMillis int64 `json:"missing_in_millis"` Current int64 `json:"current"` }
type NodesStatsIndex ¶
type NodesStatsIndex struct { Docs *NodesStatsDocsStats `json:"docs"` Store *NodesStatsStoreStats `json:"store"` Indexing *NodesStatsIndexingStats `json:"indexing"` Get *NodesStatsGetStats `json:"get"` Search *NodesStatsSearchStats `json:"search"` Merges *NodesStatsMergeStats `json:"merges"` Refresh *NodesStatsRefreshStats `json:"refresh"` Flush *NodesStatsFlushStats `json:"flush"` Warmer *NodesStatsWarmerStats `json:"warmer"` QueryCache *NodesStatsQueryCacheStats `json:"query_cache"` Fielddata *NodesStatsFielddataStats `json:"fielddata"` Percolate *NodesStatsPercolateStats `json:"percolate"` Completion *NodesStatsCompletionStats `json:"completion"` Segments *NodesStatsSegmentsStats `json:"segments"` Translog *NodesStatsTranslogStats `json:"translog"` Suggest *NodesStatsSuggestStats `json:"suggest"` RequestCache *NodesStatsRequestCacheStats `json:"request_cache"` Recovery NodesStatsRecoveryStats `json:"recovery"` Indices map[string]*NodesStatsIndex `json:"indices"` // for level=indices Shards map[string]*NodesStatsIndex `json:"shards"` // for level=shards }
type NodesStatsIndexingStats ¶
type NodesStatsIndexingStats struct { IndexTotal int64 `json:"index_total"` IndexTime string `json:"index_time"` IndexTimeInMillis int64 `json:"index_time_in_millis"` IndexCurrent int64 `json:"index_current"` IndexFailed int64 `json:"index_failed"` DeleteTotal int64 `json:"delete_total"` DeleteTime string `json:"delete_time"` DeleteTimeInMillis int64 `json:"delete_time_in_millis"` DeleteCurrent int64 `json:"delete_current"` NoopUpdateTotal int64 `json:"noop_update_total"` IsThrottled bool `json:"is_throttled"` ThrottledTime string `json:"throttle_time"` // no typo, see https://github.com/elastic/elasticsearch/blob/v6.8.3/server/src/main/java/org/elasticsearch/index/shard/IndexingStats.java#L276 ThrottledTimeInMillis int64 `json:"throttle_time_in_millis"` Types map[string]*NodesStatsIndexingStats `json:"types"` // stats for individual types }
type NodesStatsIngest ¶
type NodesStatsIngest struct { Total *NodesStatsIngestStats `json:"total"` Pipelines interface{} `json:"pipelines"` }
type NodesStatsIngestStats ¶
type NodesStatsMergeStats ¶
type NodesStatsMergeStats struct { Current int64 `json:"current"` CurrentDocs int64 `json:"current_docs"` CurrentSize string `json:"current_size"` CurrentSizeInBytes int64 `json:"current_size_in_bytes"` Total int64 `json:"total"` TotalTime string `json:"total_time"` TotalTimeInMillis int64 `json:"total_time_in_millis"` TotalDocs int64 `json:"total_docs"` TotalSize string `json:"total_size"` TotalSizeInBytes int64 `json:"total_size_in_bytes"` TotalStoppedTime string `json:"total_stopped_time"` TotalStoppedTimeInMillis int64 `json:"total_stopped_time_in_millis"` TotalThrottledTime string `json:"total_throttled_time"` TotalThrottledTimeInMillis int64 `json:"total_throttled_time_in_millis"` TotalThrottleBytes string `json:"total_auto_throttle"` TotalThrottleBytesInBytes int64 `json:"total_auto_throttle_in_bytes"` }
type NodesStatsNode ¶
type NodesStatsNode struct { // Timestamp when these stats we're gathered. Timestamp int64 `json:"timestamp"` // Name of the node, e.g. "Mister Fear" Name string `json:"name"` // TransportAddress, e.g. "127.0.0.1:9300" TransportAddress string `json:"transport_address"` // Host is the host name, e.g. "macbookair" Host string `json:"host"` // IP is an IP address, e.g. "192.168.1.2" IP string `json:"ip"` // Roles is a list of the roles of the node, e.g. master, data, ingest. Roles []string `json:"roles"` // Attributes of the node. Attributes map[string]interface{} `json:"attributes"` // Indices returns index information. Indices *NodesStatsIndex `json:"indices"` // OS information, e.g. CPU and memory. OS *NodesStatsNodeOS `json:"os"` // Process information, e.g. max file descriptors. Process *NodesStatsNodeProcess `json:"process"` // JVM information, e.g. VM version. JVM *NodesStatsNodeJVM `json:"jvm"` // ThreadPool information. ThreadPool map[string]*NodesStatsNodeThreadPool `json:"thread_pool"` // FS returns information about the filesystem. FS *NodesStatsNodeFS `json:"fs"` // Network information. Transport *NodesStatsNodeTransport `json:"transport"` // HTTP information. HTTP *NodesStatsNodeHTTP `json:"http"` // Breaker contains information about circuit breakers. Breaker map[string]*NodesStatsBreaker `json:"breakers"` // ScriptStats information. ScriptStats *NodesStatsScriptStats `json:"script"` // Discovery information. Discovery *NodesStatsDiscovery `json:"discovery"` // Ingest information Ingest *NodesStatsIngest `json:"ingest"` }
type NodesStatsNodeFS ¶
type NodesStatsNodeFS struct { Timestamp int64 `json:"timestamp"` Total *NodesStatsNodeFSEntry `json:"total"` Data []*NodesStatsNodeFSEntry `json:"data"` IOStats *NodesStatsNodeFSIOStats `json:"io_stats"` }
type NodesStatsNodeFSEntry ¶
type NodesStatsNodeFSEntry struct { Path string `json:"path"` Mount string `json:"mount"` Type string `json:"type"` Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` Free string `json:"free"` FreeInBytes int64 `json:"free_in_bytes"` Available string `json:"available"` AvailableInBytes int64 `json:"available_in_bytes"` Spins string `json:"spins"` }
type NodesStatsNodeFSIOStats ¶
type NodesStatsNodeFSIOStats struct { Devices []*NodesStatsNodeFSIOStatsEntry `json:"devices"` Total *NodesStatsNodeFSIOStatsEntry `json:"total"` }
type NodesStatsNodeFSIOStatsEntry ¶
type NodesStatsNodeFSIOStatsEntry struct { DeviceName string `json:"device_name"` Operations int64 `json:"operations"` ReadOperations int64 `json:"read_operations"` WriteOperations int64 `json:"write_operations"` ReadKilobytes int64 `json:"read_kilobytes"` WriteKilobytes int64 `json:"write_kilobytes"` }
type NodesStatsNodeHTTP ¶
type NodesStatsNodeJVM ¶
type NodesStatsNodeJVM struct { Timestamp int64 `json:"timestamp"` Uptime string `json:"uptime"` UptimeInMillis int64 `json:"uptime_in_millis"` Mem *NodesStatsNodeJVMMem `json:"mem"` Threads *NodesStatsNodeJVMThreads `json:"threads"` GC *NodesStatsNodeJVMGC `json:"gc"` BufferPools map[string]*NodesStatsNodeJVMBufferPool `json:"buffer_pools"` Classes *NodesStatsNodeJVMClasses `json:"classes"` }
type NodesStatsNodeJVMGC ¶
type NodesStatsNodeJVMGC struct {
Collectors map[string]*NodesStatsNodeJVMGCCollector `json:"collectors"`
}
type NodesStatsNodeJVMMem ¶
type NodesStatsNodeJVMMem struct { HeapUsed string `json:"heap_used"` HeapUsedInBytes int64 `json:"heap_used_in_bytes"` HeapUsedPercent int `json:"heap_used_percent"` HeapCommitted string `json:"heap_committed"` HeapCommittedInBytes int64 `json:"heap_committed_in_bytes"` HeapMax string `json:"heap_max"` HeapMaxInBytes int64 `json:"heap_max_in_bytes"` NonHeapUsed string `json:"non_heap_used"` NonHeapUsedInBytes int64 `json:"non_heap_used_in_bytes"` NonHeapCommitted string `json:"non_heap_committed"` NonHeapCommittedInBytes int64 `json:"non_heap_committed_in_bytes"` Pools map[string]struct { Used string `json:"used"` UsedInBytes int64 `json:"used_in_bytes"` Max string `json:"max"` MaxInBytes int64 `json:"max_in_bytes"` PeakUsed string `json:"peak_used"` PeakUsedInBytes int64 `json:"peak_used_in_bytes"` PeakMax string `json:"peak_max"` PeakMaxInBytes int64 `json:"peak_max_in_bytes"` } `json:"pools"` }
type NodesStatsNodeOS ¶
type NodesStatsNodeOS struct { Timestamp int64 `json:"timestamp"` CPU *NodesStatsNodeOSCPU `json:"cpu"` Mem *NodesStatsNodeOSMem `json:"mem"` Swap *NodesStatsNodeOSSwap `json:"swap"` }
type NodesStatsNodeOSCPU ¶
type NodesStatsNodeOSMem ¶
type NodesStatsNodeOSMem struct { Total string `json:"total"` TotalInBytes int64 `json:"total_in_bytes"` Free string `json:"free"` FreeInBytes int64 `json:"free_in_bytes"` Used string `json:"used"` UsedInBytes int64 `json:"used_in_bytes"` FreePercent int `json:"free_percent"` UsedPercent int `json:"used_percent"` }
type NodesStatsNodeOSSwap ¶
type NodesStatsNodeProcess ¶
type NodesStatsNodeProcess struct { Timestamp int64 `json:"timestamp"` OpenFileDescriptors int64 `json:"open_file_descriptors"` MaxFileDescriptors int64 `json:"max_file_descriptors"` CPU struct { Percent int `json:"percent"` Total string `json:"total"` TotalInMillis int64 `json:"total_in_millis"` } `json:"cpu"` Mem struct { TotalVirtual string `json:"total_virtual"` TotalVirtualInBytes int64 `json:"total_virtual_in_bytes"` } `json:"mem"` }
type NodesStatsNodeTransport ¶
type NodesStatsQueryCacheStats ¶
type NodesStatsQueryCacheStats struct { MemorySize string `json:"memory_size"` MemorySizeInBytes int64 `json:"memory_size_in_bytes"` TotalCount int64 `json:"total_count"` HitCount int64 `json:"hit_count"` MissCount int64 `json:"miss_count"` CacheSize int64 `json:"cache_size"` CacheCount int64 `json:"cache_count"` Evictions int64 `json:"evictions"` }
type NodesStatsRecoveryStats ¶
type NodesStatsRefreshStats ¶
type NodesStatsResponse ¶
type NodesStatsResponse struct { ClusterName string `json:"cluster_name"` Nodes map[string]*NodesStatsNode `json:"nodes"` }
NodesStatsResponse is the response of NodesStatsService.Do.
type NodesStatsScriptStats ¶
type NodesStatsSearchStats ¶
type NodesStatsSearchStats struct { OpenContexts int64 `json:"open_contexts"` QueryTotal int64 `json:"query_total"` QueryTime string `json:"query_time"` QueryTimeInMillis int64 `json:"query_time_in_millis"` QueryCurrent int64 `json:"query_current"` FetchTotal int64 `json:"fetch_total"` FetchTime string `json:"fetch_time"` FetchTimeInMillis int64 `json:"fetch_time_in_millis"` FetchCurrent int64 `json:"fetch_current"` ScrollTotal int64 `json:"scroll_total"` ScrollTime string `json:"scroll_time"` ScrollTimeInMillis int64 `json:"scroll_time_in_millis"` ScrollCurrent int64 `json:"scroll_current"` Groups map[string]*NodesStatsSearchStats `json:"groups"` // stats for individual groups }
type NodesStatsSegmentsStats ¶
type NodesStatsSegmentsStats struct { Count int64 `json:"count"` Memory string `json:"memory"` MemoryInBytes int64 `json:"memory_in_bytes"` TermsMemory string `json:"terms_memory"` TermsMemoryInBytes int64 `json:"terms_memory_in_bytes"` StoredFieldsMemory string `json:"stored_fields_memory"` StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"` TermVectorsMemory string `json:"term_vectors_memory"` TermVectorsMemoryInBytes int64 `json:"term_vectors_memory_in_bytes"` NormsMemory string `json:"norms_memory"` NormsMemoryInBytes int64 `json:"norms_memory_in_bytes"` DocValuesMemory string `json:"doc_values_memory"` DocValuesMemoryInBytes int64 `json:"doc_values_memory_in_bytes"` IndexWriterMemory string `json:"index_writer_memory"` IndexWriterMemoryInBytes int64 `json:"index_writer_memory_in_bytes"` IndexWriterMaxMemory string `json:"index_writer_max_memory"` IndexWriterMaxMemoryInBytes int64 `json:"index_writer_max_memory_in_bytes"` VersionMapMemory string `json:"version_map_memory"` VersionMapMemoryInBytes int64 `json:"version_map_memory_in_bytes"` FixedBitSetMemory string `json:"fixed_bit_set"` // not a typo FixedBitSetMemoryInBytes int64 `json:"fixed_bit_set_memory_in_bytes"` }
type NodesStatsService ¶
type NodesStatsService struct {
// contains filtered or unexported fields
}
NodesStatsService returns node statistics. See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/cluster-nodes-stats.html for details.
func NewNodesStatsService ¶
func NewNodesStatsService(client *Client) *NodesStatsService
NewNodesStatsService creates a new NodesStatsService.
func (*NodesStatsService) CompletionFields ¶
func (s *NodesStatsService) CompletionFields(completionFields ...string) *NodesStatsService
CompletionFields is a list of fields for `fielddata` and `suggest` index metric (supports wildcards).
func (*NodesStatsService) Do ¶
func (s *NodesStatsService) Do(ctx context.Context) (*NodesStatsResponse, error)
Do executes the operation.
func (*NodesStatsService) ErrorTrace ¶
func (s *NodesStatsService) ErrorTrace(errorTrace bool) *NodesStatsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*NodesStatsService) FielddataFields ¶
func (s *NodesStatsService) FielddataFields(fielddataFields ...string) *NodesStatsService
FielddataFields is a list of fields for `fielddata` index metric (supports wildcards).
func (*NodesStatsService) Fields ¶
func (s *NodesStatsService) Fields(fields ...string) *NodesStatsService
Fields is a list of fields for `fielddata` and `completion` index metric (supports wildcards).
func (*NodesStatsService) FilterPath ¶
func (s *NodesStatsService) FilterPath(filterPath ...string) *NodesStatsService
FilterPath specifies a list of filters used to reduce the response.
func (*NodesStatsService) Groups ¶
func (s *NodesStatsService) Groups(groups bool) *NodesStatsService
Groups is a list of search groups for `search` index metric.
func (*NodesStatsService) Header ¶
func (s *NodesStatsService) Header(name string, value string) *NodesStatsService
Header adds a header to the request.
func (*NodesStatsService) Headers ¶
func (s *NodesStatsService) Headers(headers http.Header) *NodesStatsService
Headers specifies the headers of the request.
func (*NodesStatsService) Human ¶
func (s *NodesStatsService) Human(human bool) *NodesStatsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*NodesStatsService) IndexMetric ¶
func (s *NodesStatsService) IndexMetric(indexMetric ...string) *NodesStatsService
IndexMetric limits the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified..
func (*NodesStatsService) Level ¶
func (s *NodesStatsService) Level(level string) *NodesStatsService
Level specifies whether to return indices stats aggregated at node, index or shard level.
func (*NodesStatsService) Metric ¶
func (s *NodesStatsService) Metric(metric ...string) *NodesStatsService
Metric limits the information returned to the specified metrics.
func (*NodesStatsService) NodeId ¶
func (s *NodesStatsService) NodeId(nodeId ...string) *NodesStatsService
NodeId is a list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
func (*NodesStatsService) Pretty ¶
func (s *NodesStatsService) Pretty(pretty bool) *NodesStatsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*NodesStatsService) Timeout ¶
func (s *NodesStatsService) Timeout(timeout string) *NodesStatsService
Timeout specifies an explicit operation timeout.
func (*NodesStatsService) Types ¶
func (s *NodesStatsService) Types(types ...string) *NodesStatsService
Types a list of document types for the `indexing` index metric.
func (*NodesStatsService) Validate ¶
func (s *NodesStatsService) Validate() error
Validate checks if the operation is valid.
type NodesStatsStoreStats ¶
type NodesStatsSuggestStats ¶
type NodesStatsTranslogStats ¶
type NodesStatsWarmerStats ¶
type Notify ¶
type Notify func(error)
Notify is a notify-on-error function. It receives error returned from an operation.
Notice that if the backoff policy stated to stop retrying, the notify function isn't called.
type NumberDecoder ¶
type NumberDecoder struct{}
NumberDecoder uses json.NewDecoder, with UseNumber() enabled, from the Go standard library to decode JSON data.
func (*NumberDecoder) Decode ¶
func (u *NumberDecoder) Decode(data []byte, v interface{}) error
Decode decodes with json.Unmarshal from the Go standard library.
type Operation ¶
type Operation func() error
An Operation is executing by Retry() or RetryNotify(). The operation will be retried using a backoff policy if it returns an error.
type ParentIdQuery ¶
type ParentIdQuery struct {
// contains filtered or unexported fields
}
ParentIdQuery can be used to find child documents which belong to a particular parent. Given the following mapping definition.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-parent-id-query.html
func NewParentIdQuery ¶
func NewParentIdQuery(typ, id string) *ParentIdQuery
NewParentIdQuery creates and initializes a new parent_id query.
func (*ParentIdQuery) Boost ¶
func (q *ParentIdQuery) Boost(boost float64) *ParentIdQuery
Boost sets the boost for this query.
func (*ParentIdQuery) IgnoreUnmapped ¶
func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery
IgnoreUnmapped specifies whether unmapped types should be ignored. If set to false, the query failes when an unmapped type is found.
func (*ParentIdQuery) InnerHit ¶
func (q *ParentIdQuery) InnerHit(innerHit *InnerHit) *ParentIdQuery
InnerHit sets the inner hit definition in the scope of this query and reusing the defined type and query.
func (*ParentIdQuery) QueryName ¶
func (q *ParentIdQuery) QueryName(queryName string) *ParentIdQuery
QueryName specifies the query name for the filter that can be used when searching for matched filters per hit.
func (*ParentIdQuery) Source ¶
func (q *ParentIdQuery) Source() (interface{}, error)
Source returns JSON for the parent_id query.
func (*ParentIdQuery) Type ¶
func (q *ParentIdQuery) Type(typ string) *ParentIdQuery
Type sets the parent type.
type PercentageScoreSignificanceHeuristic ¶
type PercentageScoreSignificanceHeuristic struct{}
PercentageScoreSignificanceHeuristic implements the algorithm described in https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_percentage.
func NewPercentageScoreSignificanceHeuristic ¶
func NewPercentageScoreSignificanceHeuristic() *PercentageScoreSignificanceHeuristic
NewPercentageScoreSignificanceHeuristic initializes a new instance of PercentageScoreSignificanceHeuristic.
func (*PercentageScoreSignificanceHeuristic) Name ¶
func (sh *PercentageScoreSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*PercentageScoreSignificanceHeuristic) Source ¶
func (sh *PercentageScoreSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type PercentileRanksAggregation ¶
type PercentileRanksAggregation struct {
// contains filtered or unexported fields
}
PercentileRanksAggregation See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-percentile-rank-aggregation.html
func NewPercentileRanksAggregation ¶
func NewPercentileRanksAggregation() *PercentileRanksAggregation
func (*PercentileRanksAggregation) Compression ¶
func (a *PercentileRanksAggregation) Compression(compression float64) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Estimator ¶
func (a *PercentileRanksAggregation) Estimator(estimator string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Field ¶
func (a *PercentileRanksAggregation) Field(field string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Format ¶
func (a *PercentileRanksAggregation) Format(format string) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Meta ¶
func (a *PercentileRanksAggregation) Meta(metaData map[string]interface{}) *PercentileRanksAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentileRanksAggregation) Missing ¶
func (a *PercentileRanksAggregation) Missing(missing interface{}) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Script ¶
func (a *PercentileRanksAggregation) Script(script *Script) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Source ¶
func (a *PercentileRanksAggregation) Source() (interface{}, error)
func (*PercentileRanksAggregation) SubAggregation ¶
func (a *PercentileRanksAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentileRanksAggregation
func (*PercentileRanksAggregation) Values ¶
func (a *PercentileRanksAggregation) Values(values ...float64) *PercentileRanksAggregation
type PercentilesAggregation ¶
type PercentilesAggregation struct {
// contains filtered or unexported fields
}
PercentilesAggregation is a multi-value metrics aggregation that calculates one or more percentiles over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script.
func NewPercentilesAggregation ¶
func NewPercentilesAggregation() *PercentilesAggregation
func (*PercentilesAggregation) Compression ¶
func (a *PercentilesAggregation) Compression(compression float64) *PercentilesAggregation
func (*PercentilesAggregation) Estimator ¶
func (a *PercentilesAggregation) Estimator(estimator string) *PercentilesAggregation
func (*PercentilesAggregation) Field ¶
func (a *PercentilesAggregation) Field(field string) *PercentilesAggregation
func (*PercentilesAggregation) Format ¶
func (a *PercentilesAggregation) Format(format string) *PercentilesAggregation
func (*PercentilesAggregation) Meta ¶
func (a *PercentilesAggregation) Meta(metaData map[string]interface{}) *PercentilesAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentilesAggregation) Method ¶
func (a *PercentilesAggregation) Method(method string) *PercentilesAggregation
Method is the percentiles method, which can be "tdigest" (default) or "hdr".
func (*PercentilesAggregation) Missing ¶
func (a *PercentilesAggregation) Missing(missing interface{}) *PercentilesAggregation
func (*PercentilesAggregation) NumberOfSignificantValueDigits ¶
func (a *PercentilesAggregation) NumberOfSignificantValueDigits(digits int) *PercentilesAggregation
func (*PercentilesAggregation) Percentiles ¶
func (a *PercentilesAggregation) Percentiles(percentiles ...float64) *PercentilesAggregation
func (*PercentilesAggregation) Script ¶
func (a *PercentilesAggregation) Script(script *Script) *PercentilesAggregation
func (*PercentilesAggregation) Source ¶
func (a *PercentilesAggregation) Source() (interface{}, error)
func (*PercentilesAggregation) SubAggregation ¶
func (a *PercentilesAggregation) SubAggregation(name string, subAggregation Aggregation) *PercentilesAggregation
type PercentilesBucketAggregation ¶
type PercentilesBucketAggregation struct {
// contains filtered or unexported fields
}
PercentilesBucketAggregation is a sibling pipeline aggregation which calculates percentiles across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-percentiles-bucket-aggregation.html
func NewPercentilesBucketAggregation ¶
func NewPercentilesBucketAggregation() *PercentilesBucketAggregation
NewPercentilesBucketAggregation creates and initializes a new PercentilesBucketAggregation.
func (*PercentilesBucketAggregation) BucketsPath ¶
func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *PercentilesBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*PercentilesBucketAggregation) Format ¶
func (p *PercentilesBucketAggregation) Format(format string) *PercentilesBucketAggregation
Format to apply the output value of this aggregation.
func (*PercentilesBucketAggregation) GapInsertZeros ¶
func (p *PercentilesBucketAggregation) GapInsertZeros() *PercentilesBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*PercentilesBucketAggregation) GapPolicy ¶
func (p *PercentilesBucketAggregation) GapPolicy(gapPolicy string) *PercentilesBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*PercentilesBucketAggregation) GapSkip ¶
func (p *PercentilesBucketAggregation) GapSkip() *PercentilesBucketAggregation
GapSkip skips gaps in the series.
func (*PercentilesBucketAggregation) Meta ¶
func (p *PercentilesBucketAggregation) Meta(metaData map[string]interface{}) *PercentilesBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*PercentilesBucketAggregation) Percents ¶
func (p *PercentilesBucketAggregation) Percents(percents ...float64) *PercentilesBucketAggregation
Percents to calculate percentiles for in this aggregation.
func (*PercentilesBucketAggregation) Source ¶
func (p *PercentilesBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type PercolatorQuery ¶
type PercolatorQuery struct {
// contains filtered or unexported fields
}
PercolatorQuery can be used to match queries stored in an index.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-percolate-query.html
func NewPercolatorQuery ¶
func NewPercolatorQuery() *PercolatorQuery
NewPercolatorQuery creates and initializes a new Percolator query.
func (*PercolatorQuery) Document ¶
func (q *PercolatorQuery) Document(docs ...interface{}) *PercolatorQuery
func (*PercolatorQuery) DocumentType
deprecated
func (q *PercolatorQuery) DocumentType(typ string) *PercolatorQuery
Deprecated: DocumentType is deprecated as of 6.0.
func (*PercolatorQuery) Field ¶
func (q *PercolatorQuery) Field(field string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentId ¶
func (q *PercolatorQuery) IndexedDocumentId(id string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentIndex ¶
func (q *PercolatorQuery) IndexedDocumentIndex(index string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentPreference ¶
func (q *PercolatorQuery) IndexedDocumentPreference(preference string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentRouting ¶
func (q *PercolatorQuery) IndexedDocumentRouting(routing string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentType ¶
func (q *PercolatorQuery) IndexedDocumentType(typ string) *PercolatorQuery
func (*PercolatorQuery) IndexedDocumentVersion ¶
func (q *PercolatorQuery) IndexedDocumentVersion(version int64) *PercolatorQuery
func (*PercolatorQuery) Name ¶
func (q *PercolatorQuery) Name(name string) *PercolatorQuery
Name used for identification purposes in "_percolator_document_slot" response field when multiple percolate queries have been specified in the main query.
func (*PercolatorQuery) Source ¶
func (q *PercolatorQuery) Source() (interface{}, error)
Source returns JSON for the percolate query.
type PerformRequestOptions ¶
type PerformRequestOptions struct { Method string Path string Params url.Values Body interface{} ContentType string IgnoreErrors []int Retrier Retrier Headers http.Header MaxResponseSize int64 DumpConfig DumpConfig }
PerformRequestOptions must be passed into PerformRequest.
type PhraseSuggester ¶
type PhraseSuggester struct { Suggester // contains filtered or unexported fields }
PhraseSuggester provides an API to access word alternatives on a per token basis within a certain string distance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html.
func NewPhraseSuggester ¶
func NewPhraseSuggester(name string) *PhraseSuggester
NewPhraseSuggester creates a new PhraseSuggester.
func (*PhraseSuggester) Analyzer ¶
func (q *PhraseSuggester) Analyzer(analyzer string) *PhraseSuggester
func (*PhraseSuggester) CandidateGenerator ¶
func (q *PhraseSuggester) CandidateGenerator(generator CandidateGenerator) *PhraseSuggester
func (*PhraseSuggester) CandidateGenerators ¶
func (q *PhraseSuggester) CandidateGenerators(generators ...CandidateGenerator) *PhraseSuggester
func (*PhraseSuggester) ClearCandidateGenerator ¶
func (q *PhraseSuggester) ClearCandidateGenerator() *PhraseSuggester
func (*PhraseSuggester) CollateParams ¶
func (q *PhraseSuggester) CollateParams(collateParams map[string]interface{}) *PhraseSuggester
func (*PhraseSuggester) CollatePreference ¶
func (q *PhraseSuggester) CollatePreference(collatePreference string) *PhraseSuggester
func (*PhraseSuggester) CollatePrune ¶
func (q *PhraseSuggester) CollatePrune(collatePrune bool) *PhraseSuggester
func (*PhraseSuggester) CollateQuery ¶
func (q *PhraseSuggester) CollateQuery(collateQuery *Script) *PhraseSuggester
func (*PhraseSuggester) Confidence ¶
func (q *PhraseSuggester) Confidence(confidence float64) *PhraseSuggester
func (*PhraseSuggester) ContextQueries ¶
func (q *PhraseSuggester) ContextQueries(queries ...SuggesterContextQuery) *PhraseSuggester
func (*PhraseSuggester) ContextQuery ¶
func (q *PhraseSuggester) ContextQuery(query SuggesterContextQuery) *PhraseSuggester
func (*PhraseSuggester) Field ¶
func (q *PhraseSuggester) Field(field string) *PhraseSuggester
func (*PhraseSuggester) ForceUnigrams ¶
func (q *PhraseSuggester) ForceUnigrams(forceUnigrams bool) *PhraseSuggester
func (*PhraseSuggester) GramSize ¶
func (q *PhraseSuggester) GramSize(gramSize int) *PhraseSuggester
func (*PhraseSuggester) Highlight ¶
func (q *PhraseSuggester) Highlight(preTag, postTag string) *PhraseSuggester
func (*PhraseSuggester) MaxErrors ¶
func (q *PhraseSuggester) MaxErrors(maxErrors float64) *PhraseSuggester
func (*PhraseSuggester) Name ¶
func (q *PhraseSuggester) Name() string
func (*PhraseSuggester) RealWordErrorLikelihood ¶
func (q *PhraseSuggester) RealWordErrorLikelihood(realWordErrorLikelihood float64) *PhraseSuggester
func (*PhraseSuggester) Separator ¶
func (q *PhraseSuggester) Separator(separator string) *PhraseSuggester
func (*PhraseSuggester) ShardSize ¶
func (q *PhraseSuggester) ShardSize(shardSize int) *PhraseSuggester
func (*PhraseSuggester) Size ¶
func (q *PhraseSuggester) Size(size int) *PhraseSuggester
func (*PhraseSuggester) SmoothingModel ¶
func (q *PhraseSuggester) SmoothingModel(smoothingModel SmoothingModel) *PhraseSuggester
func (*PhraseSuggester) Source ¶
func (q *PhraseSuggester) Source(includeName bool) (interface{}, error)
Source generates the source for the phrase suggester.
func (*PhraseSuggester) Text ¶
func (q *PhraseSuggester) Text(text string) *PhraseSuggester
func (*PhraseSuggester) TokenLimit ¶
func (q *PhraseSuggester) TokenLimit(tokenLimit int) *PhraseSuggester
type PingResult ¶
type PingResult struct { Name string `json:"name"` ClusterName string `json:"cluster_name"` Version struct { Number string `json:"number"` BuildHash string `json:"build_hash"` BuildTimestamp string `json:"build_timestamp"` BuildSnapshot bool `json:"build_snapshot"` LuceneVersion string `json:"lucene_version"` } `json:"version"` TagLine string `json:"tagline"` }
PingResult is the result returned from querying the Elasticsearch server.
type PingService ¶
type PingService struct {
// contains filtered or unexported fields
}
PingService checks if an Elasticsearch server on a given URL is alive. When asked for, it can also return various information about the Elasticsearch server, e.g. the Elasticsearch version number.
Ping simply starts a HTTP GET request to the URL of the server. If the server responds with HTTP Status code 200 OK, the server is alive.
func NewPingService ¶
func NewPingService(client *Client) *PingService
func (*PingService) Do ¶
func (s *PingService) Do(ctx context.Context) (*PingResult, int, error)
Do returns the PingResult, the HTTP status code of the Elasticsearch server, and an error.
func (*PingService) ErrorTrace ¶
func (s *PingService) ErrorTrace(errorTrace bool) *PingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*PingService) FilterPath ¶
func (s *PingService) FilterPath(filterPath ...string) *PingService
FilterPath specifies a list of filters used to reduce the response.
func (*PingService) Header ¶
func (s *PingService) Header(name string, value string) *PingService
Header adds a header to the request.
func (*PingService) Headers ¶
func (s *PingService) Headers(headers http.Header) *PingService
Headers specifies the headers of the request.
func (*PingService) HttpHeadOnly ¶
func (s *PingService) HttpHeadOnly(httpHeadOnly bool) *PingService
HeadOnly makes the service to only return the status code in Do; the PingResult will be nil.
func (*PingService) Human ¶
func (s *PingService) Human(human bool) *PingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*PingService) Pretty ¶
func (s *PingService) Pretty(pretty bool) *PingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*PingService) Timeout ¶
func (s *PingService) Timeout(timeout string) *PingService
func (*PingService) URL ¶
func (s *PingService) URL(url string) *PingService
type PrefixQuery ¶
type PrefixQuery struct {
// contains filtered or unexported fields
}
PrefixQuery matches documents that have fields containing terms with a specified prefix (not analyzed).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-prefix-query.html
Example ¶
package main import ( "context" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Define wildcard query q := elastic.NewPrefixQuery("user", "oli") q = q.QueryName("my_query_name") searchResult, err := client.Search(). Index("twitter"). Query(q). Pretty(true). Do(context.Background()) if err != nil { // Handle error panic(err) } _ = searchResult }
Output:
func NewPrefixQuery ¶
func NewPrefixQuery(name string, prefix string) *PrefixQuery
NewPrefixQuery creates and initializes a new PrefixQuery.
func (*PrefixQuery) Boost ¶
func (q *PrefixQuery) Boost(boost float64) *PrefixQuery
Boost sets the boost for this query.
func (*PrefixQuery) QueryName ¶
func (q *PrefixQuery) QueryName(queryName string) *PrefixQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*PrefixQuery) Rewrite ¶
func (q *PrefixQuery) Rewrite(rewrite string) *PrefixQuery
func (*PrefixQuery) Source ¶
func (q *PrefixQuery) Source() (interface{}, error)
Source returns JSON for the query.
type ProfileResult ¶
type ProfileResult struct { Type string `json:"type"` Description string `json:"description,omitempty"` NodeTime string `json:"time,omitempty"` NodeTimeNanos int64 `json:"time_in_nanos,omitempty"` Breakdown map[string]int64 `json:"breakdown,omitempty"` Children []ProfileResult `json:"children,omitempty"` }
ProfileResult is the internal representation of a profiled query, corresponding to a single node in the query tree.
type PutMappingResponse ¶
type PutMappingResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
PutMappingResponse is the response of IndicesPutMappingService.Do.
type PutScriptResponse ¶
type PutScriptResponse struct {
AcknowledgedResponse
}
PutScriptResponse is the result of saving a stored script in Elasticsearch.
type PutScriptService ¶
type PutScriptService struct {
// contains filtered or unexported fields
}
PutScriptService adds or updates a stored script in Elasticsearch.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details.
func NewPutScriptService ¶
func NewPutScriptService(client *Client) *PutScriptService
NewPutScriptService creates a new PutScriptService.
func (*PutScriptService) BodyJson ¶
func (s *PutScriptService) BodyJson(body interface{}) *PutScriptService
BodyJson is the document as a serializable JSON interface.
func (*PutScriptService) BodyString ¶
func (s *PutScriptService) BodyString(body string) *PutScriptService
BodyString is the document encoded as a string.
func (*PutScriptService) Context ¶
func (s *PutScriptService) Context(context string) *PutScriptService
Context specifies the script context (optional).
func (*PutScriptService) Do ¶
func (s *PutScriptService) Do(ctx context.Context) (*PutScriptResponse, error)
Do executes the operation.
func (*PutScriptService) ErrorTrace ¶
func (s *PutScriptService) ErrorTrace(errorTrace bool) *PutScriptService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*PutScriptService) FilterPath ¶
func (s *PutScriptService) FilterPath(filterPath ...string) *PutScriptService
FilterPath specifies a list of filters used to reduce the response.
func (*PutScriptService) Header ¶
func (s *PutScriptService) Header(name string, value string) *PutScriptService
Header adds a header to the request.
func (*PutScriptService) Headers ¶
func (s *PutScriptService) Headers(headers http.Header) *PutScriptService
Headers specifies the headers of the request.
func (*PutScriptService) Human ¶
func (s *PutScriptService) Human(human bool) *PutScriptService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*PutScriptService) Id ¶
func (s *PutScriptService) Id(id string) *PutScriptService
Id is the script ID.
func (*PutScriptService) MasterTimeout ¶
func (s *PutScriptService) MasterTimeout(masterTimeout string) *PutScriptService
MasterTimeout is the timeout for connecting to master.
func (*PutScriptService) Pretty ¶
func (s *PutScriptService) Pretty(pretty bool) *PutScriptService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*PutScriptService) Timeout ¶
func (s *PutScriptService) Timeout(timeout string) *PutScriptService
Timeout is an explicit operation timeout.
func (*PutScriptService) Validate ¶
func (s *PutScriptService) Validate() error
Validate checks if the operation is valid.
type Query ¶
type Query interface { // Source returns the JSON-serializable query request. Source() (interface{}, error) }
Query represents the generic query interface. A query's sole purpose is to return the source of the query as a JSON-serializable object. Returning map[string]interface{} is the norm for queries.
type QueryProfileShardResult ¶
type QueryProfileShardResult struct { Query []ProfileResult `json:"query,omitempty"` RewriteTime int64 `json:"rewrite_time,omitempty"` Collector []interface{} `json:"collector,omitempty"` }
QueryProfileShardResult is a container class to hold the profile results for a single shard in the request. It comtains a list of query profiles, a collector tree and a total rewrite tree.
type QueryRescorer ¶
type QueryRescorer struct {
// contains filtered or unexported fields
}
func NewQueryRescorer ¶
func NewQueryRescorer(query Query) *QueryRescorer
func (*QueryRescorer) Name ¶
func (r *QueryRescorer) Name() string
func (*QueryRescorer) QueryWeight ¶
func (r *QueryRescorer) QueryWeight(queryWeight float64) *QueryRescorer
func (*QueryRescorer) RescoreQueryWeight ¶
func (r *QueryRescorer) RescoreQueryWeight(rescoreQueryWeight float64) *QueryRescorer
func (*QueryRescorer) ScoreMode ¶
func (r *QueryRescorer) ScoreMode(scoreMode string) *QueryRescorer
func (*QueryRescorer) Source ¶
func (r *QueryRescorer) Source() (interface{}, error)
type QueryStringQuery ¶
type QueryStringQuery struct {
// contains filtered or unexported fields
}
QueryStringQuery uses the query parser in order to parse its content.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-query-string-query.html
func NewQueryStringQuery ¶
func NewQueryStringQuery(queryString string) *QueryStringQuery
NewQueryStringQuery creates and initializes a new QueryStringQuery.
func (*QueryStringQuery) AllowLeadingWildcard ¶
func (q *QueryStringQuery) AllowLeadingWildcard(allowLeadingWildcard bool) *QueryStringQuery
AllowLeadingWildcard specifies whether leading wildcards should be allowed or not (defaults to true).
func (*QueryStringQuery) AnalyzeWildcard ¶
func (q *QueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *QueryStringQuery
AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
func (*QueryStringQuery) Analyzer ¶
func (q *QueryStringQuery) Analyzer(analyzer string) *QueryStringQuery
Analyzer is an optional analyzer used to analyze the query string. Note, if a field has search analyzer defined for it, then it will be used automatically. Defaults to the smart search analyzer.
func (*QueryStringQuery) Boost ¶
func (q *QueryStringQuery) Boost(boost float64) *QueryStringQuery
Boost sets the boost for this query.
func (*QueryStringQuery) DefaultField ¶
func (q *QueryStringQuery) DefaultField(defaultField string) *QueryStringQuery
DefaultField specifies the field to run against when no prefix field is specified. Only relevant when not explicitly adding fields the query string will run against.
func (*QueryStringQuery) DefaultOperator ¶
func (q *QueryStringQuery) DefaultOperator(operator string) *QueryStringQuery
DefaultOperator sets the boolean operator of the query parser used to parse the query string.
In default mode (OR) terms without any modifiers are considered optional, e.g. "capital of Hungary" is equal to "capital OR of OR Hungary".
In AND mode, terms are considered to be in conjunction. The above mentioned query is then parsed as "capital AND of AND Hungary".
func (*QueryStringQuery) EnablePositionIncrements ¶
func (q *QueryStringQuery) EnablePositionIncrements(enablePositionIncrements bool) *QueryStringQuery
EnablePositionIncrements indicates whether to enable position increments in result query. Defaults to true.
When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token.
func (*QueryStringQuery) Escape ¶
func (q *QueryStringQuery) Escape(escape bool) *QueryStringQuery
Escape performs escaping of the query string.
func (*QueryStringQuery) Field ¶
func (q *QueryStringQuery) Field(field string) *QueryStringQuery
Field adds a field to run the query string against.
func (*QueryStringQuery) FieldWithBoost ¶
func (q *QueryStringQuery) FieldWithBoost(field string, boost float64) *QueryStringQuery
FieldWithBoost adds a field to run the query string against with a specific boost.
func (*QueryStringQuery) Fuzziness ¶
func (q *QueryStringQuery) Fuzziness(fuzziness string) *QueryStringQuery
Fuzziness sets the edit distance for fuzzy queries. Default is "AUTO".
func (*QueryStringQuery) FuzzyMaxExpansions ¶
func (q *QueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *QueryStringQuery
func (*QueryStringQuery) FuzzyPrefixLength ¶
func (q *QueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *QueryStringQuery
FuzzyPrefixLength sets the minimum prefix length for fuzzy queries. Default is 1.
func (*QueryStringQuery) FuzzyRewrite ¶
func (q *QueryStringQuery) FuzzyRewrite(fuzzyRewrite string) *QueryStringQuery
func (*QueryStringQuery) Lenient ¶
func (q *QueryStringQuery) Lenient(lenient bool) *QueryStringQuery
Lenient indicates whether the query string parser should be lenient when parsing field values. It defaults to the index setting and if not set, defaults to false.
func (*QueryStringQuery) Locale
deprecated
func (q *QueryStringQuery) Locale(locale string) *QueryStringQuery
Locale specifies the locale to be used for string conversions.
Deprecated: Decision is now made by the analyzer.
func (*QueryStringQuery) LowercaseExpandedTerms
deprecated
func (q *QueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *QueryStringQuery
LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy and range queries are automatically lower-cased or not. Default is true.
Deprecated: Decision is now made by the analyzer.
func (*QueryStringQuery) MaxDeterminizedState ¶
func (q *QueryStringQuery) MaxDeterminizedState(maxDeterminizedStates int) *QueryStringQuery
MaxDeterminizedState protects against too-difficult regular expression queries.
func (*QueryStringQuery) MinimumShouldMatch ¶
func (q *QueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *QueryStringQuery
func (*QueryStringQuery) PhraseSlop ¶
func (q *QueryStringQuery) PhraseSlop(phraseSlop int) *QueryStringQuery
PhraseSlop sets the default slop for phrases. If zero, then exact matches are required. Default value is zero.
func (*QueryStringQuery) QueryName ¶
func (q *QueryStringQuery) QueryName(queryName string) *QueryStringQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*QueryStringQuery) QuoteAnalyzer ¶
func (q *QueryStringQuery) QuoteAnalyzer(quoteAnalyzer string) *QueryStringQuery
QuoteAnalyzer is an optional analyzer to be used to analyze the query string for phrase searches. Note, if a field has search analyzer defined for it, then it will be used automatically. Defaults to the smart search analyzer.
func (*QueryStringQuery) QuoteFieldSuffix ¶
func (q *QueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *QueryStringQuery
QuoteFieldSuffix is an optional field name suffix to automatically try and add to the field searched when using quoted text.
func (*QueryStringQuery) Rewrite ¶
func (q *QueryStringQuery) Rewrite(rewrite string) *QueryStringQuery
func (*QueryStringQuery) Source ¶
func (q *QueryStringQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*QueryStringQuery) TieBreaker ¶
func (q *QueryStringQuery) TieBreaker(tieBreaker float64) *QueryStringQuery
TieBreaker is used when more than one field is used with the query string, and combined queries are using dismax.
func (*QueryStringQuery) TimeZone ¶
func (q *QueryStringQuery) TimeZone(timeZone string) *QueryStringQuery
TimeZone can be used to automatically adjust to/from fields using a timezone. Only used with date fields, of course.
func (*QueryStringQuery) Type ¶
func (q *QueryStringQuery) Type(typ string) *QueryStringQuery
Type sets how multiple fields should be combined to build textual part queries, e.g. "best_fields".
type RandomFunction ¶
type RandomFunction struct {
// contains filtered or unexported fields
}
RandomFunction builds a random score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_random for details.
func NewRandomFunction ¶
func NewRandomFunction() *RandomFunction
NewRandomFunction initializes and returns a new RandomFunction.
func (*RandomFunction) Field ¶
func (fn *RandomFunction) Field(field string) *RandomFunction
Field is the field to be used for random number generation. This parameter is compulsory when a Seed is set and ignored otherwise. Note that documents that have the same value for a field will get the same score.
func (*RandomFunction) GetWeight ¶
func (fn *RandomFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*RandomFunction) Name ¶
func (fn *RandomFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*RandomFunction) Seed ¶
func (fn *RandomFunction) Seed(seed interface{}) *RandomFunction
Seed sets the seed based on which the random number will be generated. Using the same seed is guaranteed to generate the same random number for a specific doc. Seed must be an integer, e.g. int or int64. It is specified as an interface{} here for compatibility with older versions (which also accepted strings).
func (*RandomFunction) Source ¶
func (fn *RandomFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*RandomFunction) Weight ¶
func (fn *RandomFunction) Weight(weight float64) *RandomFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type RangeAggregation ¶
type RangeAggregation struct {
// contains filtered or unexported fields
}
RangeAggregation is a multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket. During the aggregation process, the values extracted from each document will be checked against each bucket range and "bucket" the relevant/matching document. Note that this aggregration includes the from value and excludes the to value for each range. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-range-aggregation.html
func NewRangeAggregation ¶
func NewRangeAggregation() *RangeAggregation
func (*RangeAggregation) AddRange ¶
func (a *RangeAggregation) AddRange(from, to interface{}) *RangeAggregation
func (*RangeAggregation) AddRangeWithKey ¶
func (a *RangeAggregation) AddRangeWithKey(key string, from, to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedFrom ¶
func (a *RangeAggregation) AddUnboundedFrom(to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedFromWithKey ¶
func (a *RangeAggregation) AddUnboundedFromWithKey(key string, to interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedTo ¶
func (a *RangeAggregation) AddUnboundedTo(from interface{}) *RangeAggregation
func (*RangeAggregation) AddUnboundedToWithKey ¶
func (a *RangeAggregation) AddUnboundedToWithKey(key string, from interface{}) *RangeAggregation
func (*RangeAggregation) Between ¶
func (a *RangeAggregation) Between(from, to interface{}) *RangeAggregation
func (*RangeAggregation) BetweenWithKey ¶
func (a *RangeAggregation) BetweenWithKey(key string, from, to interface{}) *RangeAggregation
func (*RangeAggregation) Field ¶
func (a *RangeAggregation) Field(field string) *RangeAggregation
func (*RangeAggregation) Gt ¶
func (a *RangeAggregation) Gt(from interface{}) *RangeAggregation
func (*RangeAggregation) GtWithKey ¶
func (a *RangeAggregation) GtWithKey(key string, from interface{}) *RangeAggregation
func (*RangeAggregation) Keyed ¶
func (a *RangeAggregation) Keyed(keyed bool) *RangeAggregation
func (*RangeAggregation) Lt ¶
func (a *RangeAggregation) Lt(to interface{}) *RangeAggregation
func (*RangeAggregation) LtWithKey ¶
func (a *RangeAggregation) LtWithKey(key string, to interface{}) *RangeAggregation
func (*RangeAggregation) Meta ¶
func (a *RangeAggregation) Meta(metaData map[string]interface{}) *RangeAggregation
Meta sets the meta data to be included in the aggregation response.
func (*RangeAggregation) Missing ¶
func (a *RangeAggregation) Missing(missing interface{}) *RangeAggregation
Missing configures the value to use when documents miss a value.
func (*RangeAggregation) Script ¶
func (a *RangeAggregation) Script(script *Script) *RangeAggregation
func (*RangeAggregation) Source ¶
func (a *RangeAggregation) Source() (interface{}, error)
func (*RangeAggregation) SubAggregation ¶
func (a *RangeAggregation) SubAggregation(name string, subAggregation Aggregation) *RangeAggregation
func (*RangeAggregation) Unmapped ¶
func (a *RangeAggregation) Unmapped(unmapped bool) *RangeAggregation
type RangeQuery ¶
type RangeQuery struct {
// contains filtered or unexported fields
}
RangeQuery matches documents with fields that have terms within a certain range.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-range-query.html
func NewRangeQuery ¶
func NewRangeQuery(name string) *RangeQuery
NewRangeQuery creates and initializes a new RangeQuery.
func (*RangeQuery) Boost ¶
func (q *RangeQuery) Boost(boost float64) *RangeQuery
Boost sets the boost for this query.
func (*RangeQuery) Format ¶
func (q *RangeQuery) Format(format string) *RangeQuery
Format is used for date fields. In that case, we can set the format to be used instead of the mapper format.
func (*RangeQuery) From ¶
func (q *RangeQuery) From(from interface{}) *RangeQuery
From indicates the from part of the RangeQuery. Use nil to indicate an unbounded from part.
func (*RangeQuery) Gt ¶
func (q *RangeQuery) Gt(from interface{}) *RangeQuery
Gt indicates a greater-than value for the from part. Use nil to indicate an unbounded from part.
func (*RangeQuery) Gte ¶
func (q *RangeQuery) Gte(from interface{}) *RangeQuery
Gte indicates a greater-than-or-equal value for the from part. Use nil to indicate an unbounded from part.
func (*RangeQuery) IncludeLower ¶
func (q *RangeQuery) IncludeLower(includeLower bool) *RangeQuery
IncludeLower indicates whether the lower bound should be included or not. Defaults to true.
func (*RangeQuery) IncludeUpper ¶
func (q *RangeQuery) IncludeUpper(includeUpper bool) *RangeQuery
IncludeUpper indicates whether the upper bound should be included or not. Defaults to true.
func (*RangeQuery) Lt ¶
func (q *RangeQuery) Lt(to interface{}) *RangeQuery
Lt indicates a less-than value for the to part. Use nil to indicate an unbounded to part.
func (*RangeQuery) Lte ¶
func (q *RangeQuery) Lte(to interface{}) *RangeQuery
Lte indicates a less-than-or-equal value for the to part. Use nil to indicate an unbounded to part.
func (*RangeQuery) QueryName ¶
func (q *RangeQuery) QueryName(queryName string) *RangeQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*RangeQuery) Relation ¶
func (q *RangeQuery) Relation(relation string) *RangeQuery
Relation is used for range fields. which can be one of "within", "contains", "intersects" (default) and "disjoint".
func (*RangeQuery) Source ¶
func (q *RangeQuery) Source() (interface{}, error)
Source returns JSON for the query.
func (*RangeQuery) TimeZone ¶
func (q *RangeQuery) TimeZone(timeZone string) *RangeQuery
TimeZone is used for date fields. In that case, we can adjust the from/to fields using a timezone.
func (*RangeQuery) To ¶
func (q *RangeQuery) To(to interface{}) *RangeQuery
To indicates the to part of the RangeQuery. Use nil to indicate an unbounded to part.
type RawStringQuery ¶
type RawStringQuery string
RawStringQuery can be used to treat a string representation of an ES query as a Query. Example usage:
q := RawStringQuery("{\"match_all\":{}}") db.Search().Query(q).From(1).Size(100).Do()
func NewRawStringQuery ¶
func NewRawStringQuery(q string) RawStringQuery
NewRawStringQuery ininitializes a new RawStringQuery. It is the same as RawStringQuery(q).
func (RawStringQuery) Source ¶
func (q RawStringQuery) Source() (interface{}, error)
Source returns the JSON encoded body
type RecoverySource ¶
type RecoverySource struct {
Type string `json:"type"`
}
type RefreshResult ¶
type RefreshResult struct {
Shards *ShardsInfo `json:"_shards,omitempty"`
}
RefreshResult is the outcome of RefreshService.Do.
type RefreshService ¶
type RefreshService struct {
// contains filtered or unexported fields
}
RefreshService explicitly refreshes one or more indices. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-refresh.html.
func NewRefreshService ¶
func NewRefreshService(client *Client) *RefreshService
NewRefreshService creates a new instance of RefreshService.
func (*RefreshService) Do ¶
func (s *RefreshService) Do(ctx context.Context) (*RefreshResult, error)
Do executes the request.
func (*RefreshService) ErrorTrace ¶
func (s *RefreshService) ErrorTrace(errorTrace bool) *RefreshService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*RefreshService) FilterPath ¶
func (s *RefreshService) FilterPath(filterPath ...string) *RefreshService
FilterPath specifies a list of filters used to reduce the response.
func (*RefreshService) Header ¶
func (s *RefreshService) Header(name string, value string) *RefreshService
Header adds a header to the request.
func (*RefreshService) Headers ¶
func (s *RefreshService) Headers(headers http.Header) *RefreshService
Headers specifies the headers of the request.
func (*RefreshService) Human ¶
func (s *RefreshService) Human(human bool) *RefreshService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*RefreshService) Index ¶
func (s *RefreshService) Index(index ...string) *RefreshService
Index specifies the indices to refresh.
func (*RefreshService) Pretty ¶
func (s *RefreshService) Pretty(pretty bool) *RefreshService
Pretty tells Elasticsearch whether to return a formatted JSON response.
type RegexCompletionSuggesterOptions ¶
type RegexCompletionSuggesterOptions struct {
// contains filtered or unexported fields
}
RegexCompletionSuggesterOptions represents the options for regex completion suggester.
func NewRegexCompletionSuggesterOptions ¶
func NewRegexCompletionSuggesterOptions() *RegexCompletionSuggesterOptions
NewRegexCompletionSuggesterOptions initializes a new RegexCompletionSuggesterOptions instance.
func (*RegexCompletionSuggesterOptions) Flags ¶
func (o *RegexCompletionSuggesterOptions) Flags(flags interface{}) *RegexCompletionSuggesterOptions
Flags represents internal regex flags. Possible flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-completion.html#regex for details.
func (*RegexCompletionSuggesterOptions) MaxDeterminizedStates ¶
func (o *RegexCompletionSuggesterOptions) MaxDeterminizedStates(max int) *RegexCompletionSuggesterOptions
MaxDeterminizedStates represents the maximum automaton states allowed for regex expansion.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-completion.html#regex for details.
func (*RegexCompletionSuggesterOptions) Source ¶
func (o *RegexCompletionSuggesterOptions) Source() (interface{}, error)
Source creates the JSON data.
type RegexpQuery ¶
type RegexpQuery struct {
// contains filtered or unexported fields
}
RegexpQuery allows you to use regular expression term queries.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-regexp-query.html
func NewRegexpQuery ¶
func NewRegexpQuery(name string, regexp string) *RegexpQuery
NewRegexpQuery creates and initializes a new RegexpQuery.
func (*RegexpQuery) Boost ¶
func (q *RegexpQuery) Boost(boost float64) *RegexpQuery
Boost sets the boost for this query.
func (*RegexpQuery) Flags ¶
func (q *RegexpQuery) Flags(flags string) *RegexpQuery
Flags sets the regexp flags.
func (*RegexpQuery) MaxDeterminizedStates ¶
func (q *RegexpQuery) MaxDeterminizedStates(maxDeterminizedStates int) *RegexpQuery
MaxDeterminizedStates protects against complex regular expressions.
func (*RegexpQuery) QueryName ¶
func (q *RegexpQuery) QueryName(queryName string) *RegexpQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*RegexpQuery) Rewrite ¶
func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery
func (*RegexpQuery) Source ¶
func (q *RegexpQuery) Source() (interface{}, error)
Source returns the JSON-serializable query data.
type ReindexDestination ¶
type ReindexDestination struct {
// contains filtered or unexported fields
}
ReindexDestination is the destination of a Reindex API call. It is basically the meta data of a BulkIndexRequest.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html fsourcer details.
func NewReindexDestination ¶
func NewReindexDestination() *ReindexDestination
NewReindexDestination returns a new ReindexDestination.
func (*ReindexDestination) Discard ¶
func (r *ReindexDestination) Discard() *ReindexDestination
Discard sets the routing on the bulk request sent for each match to null.
func (*ReindexDestination) Index ¶
func (r *ReindexDestination) Index(index string) *ReindexDestination
Index specifies name of the Elasticsearch index to use as the destination of a reindexing process.
func (*ReindexDestination) Keep ¶
func (r *ReindexDestination) Keep() *ReindexDestination
Keep sets the routing on the bulk request sent for each match to the routing of the match (the default).
func (*ReindexDestination) OpType ¶
func (r *ReindexDestination) OpType(opType string) *ReindexDestination
OpType specifies if this request should follow create-only or upsert behavior. This follows the OpType of the standard document index API. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-index_.html#operation-type for details.
func (*ReindexDestination) Parent ¶
func (r *ReindexDestination) Parent(parent string) *ReindexDestination
Parent specifies the identifier of the parent document (if available).
func (*ReindexDestination) Pipeline ¶
func (r *ReindexDestination) Pipeline(pipeline string) *ReindexDestination
Pipeline specifies the pipeline to use for reindexing.
func (*ReindexDestination) Routing ¶
func (r *ReindexDestination) Routing(routing string) *ReindexDestination
Routing specifies a routing value for the reindexing request. It can be "keep", "discard", or start with "=". The latter specifies the routing on the bulk request.
func (*ReindexDestination) Source ¶
func (r *ReindexDestination) Source() (interface{}, error)
Source returns a serializable JSON request for the request.
func (*ReindexDestination) Type ¶
func (r *ReindexDestination) Type(typ string) *ReindexDestination
Type specifies the Elasticsearch type to use for reindexing.
func (*ReindexDestination) Version ¶
func (r *ReindexDestination) Version(version int64) *ReindexDestination
Version indicates the version of the document as part of an optimistic concurrency model.
func (*ReindexDestination) VersionType ¶
func (r *ReindexDestination) VersionType(versionType string) *ReindexDestination
VersionType specifies how versions are created.
type ReindexRemoteInfo ¶
type ReindexRemoteInfo struct {
// contains filtered or unexported fields
}
ReindexRemoteInfo contains information for reindexing from a remote cluster.
func NewReindexRemoteInfo ¶
func NewReindexRemoteInfo() *ReindexRemoteInfo
NewReindexRemoteInfo creates a new ReindexRemoteInfo.
func (*ReindexRemoteInfo) ConnectTimeout ¶
func (ri *ReindexRemoteInfo) ConnectTimeout(timeout string) *ReindexRemoteInfo
ConnectTimeout sets the connection timeout to connect with the remote cluster. Use ES compatible values like e.g. "30s" or "1m".
func (*ReindexRemoteInfo) Host ¶
func (ri *ReindexRemoteInfo) Host(host string) *ReindexRemoteInfo
Host sets the host information of the remote cluster. It must be of the form "http(s)://<hostname>:<port>"
func (*ReindexRemoteInfo) Password ¶
func (ri *ReindexRemoteInfo) Password(password string) *ReindexRemoteInfo
Password sets the password to authenticate with the remote cluster.
func (*ReindexRemoteInfo) SocketTimeout ¶
func (ri *ReindexRemoteInfo) SocketTimeout(timeout string) *ReindexRemoteInfo
SocketTimeout sets the socket timeout to connect with the remote cluster. Use ES compatible values like e.g. "30s" or "1m".
func (*ReindexRemoteInfo) Source ¶
func (ri *ReindexRemoteInfo) Source() (interface{}, error)
Source returns the serializable JSON data for the request.
func (*ReindexRemoteInfo) Username ¶
func (ri *ReindexRemoteInfo) Username(username string) *ReindexRemoteInfo
Username sets the username to authenticate with the remote cluster.
type ReindexService ¶
type ReindexService struct {
// contains filtered or unexported fields
}
ReindexService is a method to copy documents from one index to another. It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html.
func NewReindexService ¶
func NewReindexService(client *Client) *ReindexService
NewReindexService creates a new ReindexService.
func (*ReindexService) AbortOnVersionConflict ¶
func (s *ReindexService) AbortOnVersionConflict() *ReindexService
AbortOnVersionConflict aborts the request on version conflicts. It is an alias to setting Conflicts("abort").
func (*ReindexService) Body ¶
func (s *ReindexService) Body(body interface{}) *ReindexService
Body specifies the body of the request to send to Elasticsearch. It overrides settings specified with other setters, e.g. Query.
func (*ReindexService) Conflicts ¶
func (s *ReindexService) Conflicts(conflicts string) *ReindexService
Conflicts indicates what to do when the process detects version conflicts. Possible values are "proceed" and "abort".
func (*ReindexService) Destination ¶
func (s *ReindexService) Destination(destination *ReindexDestination) *ReindexService
Destination specifies the destination of the reindexing process.
func (*ReindexService) DestinationIndex ¶
func (s *ReindexService) DestinationIndex(index string) *ReindexService
DestinationIndex specifies the destination index of the reindexing process.
func (*ReindexService) DestinationIndexAndType ¶
func (s *ReindexService) DestinationIndexAndType(index, typ string) *ReindexService
DestinationIndexAndType specifies both the destination index and type of the reindexing process.
func (*ReindexService) Do ¶
func (s *ReindexService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
Do executes the operation.
func (*ReindexService) DoAsync ¶
func (s *ReindexService) DoAsync(ctx context.Context) (*StartTaskResult, error)
DoAsync executes the reindexing operation asynchronously by starting a new task. Callers need to use the Task Management API to watch the outcome of the reindexing operation.
func (*ReindexService) ErrorTrace ¶
func (s *ReindexService) ErrorTrace(errorTrace bool) *ReindexService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ReindexService) FilterPath ¶
func (s *ReindexService) FilterPath(filterPath ...string) *ReindexService
FilterPath specifies a list of filters used to reduce the response.
func (*ReindexService) Header ¶
func (s *ReindexService) Header(name string, value string) *ReindexService
Header adds a header to the request.
func (*ReindexService) Headers ¶
func (s *ReindexService) Headers(headers http.Header) *ReindexService
Headers specifies the headers of the request.
func (*ReindexService) Human ¶
func (s *ReindexService) Human(human bool) *ReindexService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ReindexService) Pretty ¶
func (s *ReindexService) Pretty(pretty bool) *ReindexService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ReindexService) ProceedOnVersionConflict ¶
func (s *ReindexService) ProceedOnVersionConflict() *ReindexService
ProceedOnVersionConflict aborts the request on version conflicts. It is an alias to setting Conflicts("proceed").
func (*ReindexService) Refresh ¶
func (s *ReindexService) Refresh(refresh string) *ReindexService
Refresh indicates whether Elasticsearch should refresh the effected indexes immediately.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*ReindexService) RequestsPerSecond ¶
func (s *ReindexService) RequestsPerSecond(requestsPerSecond int) *ReindexService
RequestsPerSecond specifies the throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
func (*ReindexService) Script ¶
func (s *ReindexService) Script(script *Script) *ReindexService
Script allows for modification of the documents as they are reindexed from source to destination.
func (*ReindexService) Size ¶
func (s *ReindexService) Size(size int) *ReindexService
Size sets an upper limit for the number of processed documents.
func (*ReindexService) Slices ¶
func (s *ReindexService) Slices(slices interface{}) *ReindexService
Slices specifies the number of slices this task should be divided into. Defaults to 1. It used to be a number, but can be set to "auto" as of 6.7.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html#docs-reindex-slice for details.
func (*ReindexService) Source ¶
func (s *ReindexService) Source(source *ReindexSource) *ReindexService
Source specifies the source of the reindexing process.
func (*ReindexService) SourceIndex ¶
func (s *ReindexService) SourceIndex(index string) *ReindexService
SourceIndex specifies the source index of the reindexing process.
func (*ReindexService) Timeout ¶
func (s *ReindexService) Timeout(timeout string) *ReindexService
Timeout is the time each individual bulk request should wait for shards that are unavailable.
func (*ReindexService) Validate ¶
func (s *ReindexService) Validate() error
Validate checks if the operation is valid.
func (*ReindexService) WaitForActiveShards ¶
func (s *ReindexService) WaitForActiveShards(waitForActiveShards string) *ReindexService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
func (*ReindexService) WaitForCompletion ¶
func (s *ReindexService) WaitForCompletion(waitForCompletion bool) *ReindexService
WaitForCompletion indicates whether Elasticsearch should block until the reindex is complete.
type ReindexSource ¶
type ReindexSource struct {
// contains filtered or unexported fields
}
ReindexSource specifies the source of a Reindex process.
func NewReindexSource ¶
func NewReindexSource() *ReindexSource
NewReindexSource creates a new ReindexSource.
func (*ReindexSource) FetchSource ¶
func (r *ReindexSource) FetchSource(fetchSource bool) *ReindexSource
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*ReindexSource) FetchSourceContext ¶
func (r *ReindexSource) FetchSourceContext(fsc *FetchSourceContext) *ReindexSource
FetchSourceContext indicates how the _source should be fetched.
func (*ReindexSource) FetchSourceIncludeExclude ¶
func (r *ReindexSource) FetchSourceIncludeExclude(include, exclude []string) *ReindexSource
FetchSourceIncludeExclude specifies that _source should be returned with each hit, where "include" and "exclude" serve as a simple wildcard matcher that gets applied to its fields (e.g. include := []string{"obj1.*","obj2.*"}, exclude := []string{"description.*"}).
func (*ReindexSource) Index ¶
func (r *ReindexSource) Index(indices ...string) *ReindexSource
func (*ReindexSource) Preference ¶
func (r *ReindexSource) Preference(preference string) *ReindexSource
func (*ReindexSource) Query ¶
func (r *ReindexSource) Query(query Query) *ReindexSource
func (*ReindexSource) RemoteInfo ¶
func (r *ReindexSource) RemoteInfo(ri *ReindexRemoteInfo) *ReindexSource
RemoteInfo sets up reindexing from a remote cluster.
func (*ReindexSource) Request ¶
func (r *ReindexSource) Request(request *SearchRequest) *ReindexSource
Request specifies the search request used for source.
func (*ReindexSource) RequestCache ¶
func (r *ReindexSource) RequestCache(requestCache bool) *ReindexSource
func (*ReindexSource) Scroll ¶
func (r *ReindexSource) Scroll(scroll string) *ReindexSource
func (*ReindexSource) SearchType ¶
func (r *ReindexSource) SearchType(searchType string) *ReindexSource
SearchType is the search operation type. Possible values are "query_then_fetch" and "dfs_query_then_fetch".
func (*ReindexSource) SearchTypeDfsQueryThenFetch ¶
func (r *ReindexSource) SearchTypeDfsQueryThenFetch() *ReindexSource
func (*ReindexSource) SearchTypeQueryThenFetch ¶
func (r *ReindexSource) SearchTypeQueryThenFetch() *ReindexSource
func (*ReindexSource) Sort ¶
func (r *ReindexSource) Sort(field string, ascending bool) *ReindexSource
Sort adds a sort order.
func (*ReindexSource) SortBy ¶
func (r *ReindexSource) SortBy(sorter ...Sorter) *ReindexSource
SortBy adds a sort order.
func (*ReindexSource) SortWithInfo ¶
func (r *ReindexSource) SortWithInfo(info SortInfo) *ReindexSource
SortWithInfo adds a sort order.
func (*ReindexSource) Source ¶
func (r *ReindexSource) Source() (interface{}, error)
Source returns a serializable JSON request for the request.
func (*ReindexSource) Type ¶
func (r *ReindexSource) Type(types ...string) *ReindexSource
type Request ¶
Elasticsearch-specific HTTP request
func NewRequest ¶
NewRequest is a http.Request and adds features such as encoding the body.
func (*Request) SetBasicAuth ¶
SetBasicAuth wraps http.Request's SetBasicAuth.
type RerouteDecision ¶
type RerouteDecision interface{}
RerouteDecision is a decision the decider made while rerouting.
type RerouteExplanation ¶
type RerouteExplanation struct { Command string `json:"command"` Parameters map[string]interface{} `json:"parameters"` Decisions []RerouteDecision `json:"decisions"` }
RerouteExplanation is returned in ClusterRerouteResponse if the "explain" parameter is set to "true".
type Rescore ¶
type Rescore struct {
// contains filtered or unexported fields
}
func NewRescore ¶
func NewRescore() *Rescore
func (*Rescore) WindowSize ¶
type Response ¶
type Response struct { // StatusCode is the HTTP status code, e.g. 200. StatusCode int // Header is the HTTP header from the HTTP response. // Keys in the map are canonicalized (see http.CanonicalHeaderKey). Header http.Header // Body is the deserialized response body. Body json.RawMessage // DeprecationWarnings lists all deprecation warnings returned from // Elasticsearch. DeprecationWarnings []string }
Response represents a response from Elasticsearch.
type RestoreInfo ¶
type RestoreInfo struct { Snapshot string `json:"snapshot"` Indices []string `json:"indices"` Shards ShardsInfo `json:"shards"` }
RestoreInfo represents information about the restored snapshot.
type RestoreSource ¶
type Retrier ¶
type Retrier interface { // Retry is called when a request has failed. It decides whether to retry // the call, how long to wait for the next call, or whether to return an // error (which will be returned to the service that started the HTTP // request in the first place). // // Callers may also use this to inspect the HTTP request/response and // the error that happened. Additional data can be passed through via // the context. Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error) }
Retrier decides whether to retry a failed HTTP request with Elasticsearch.
type RetrierFunc ¶
type RetrierFunc func(context.Context, int, *http.Request, *http.Response, error) (time.Duration, bool, error)
RetrierFunc specifies the signature of a Retry function, and is an adapter to allow the use of ordinary Retry functions. If f is a function with the appropriate signature, RetrierFunc(f) is a Retrier that calls f.
type ReverseNestedAggregation ¶
type ReverseNestedAggregation struct {
// contains filtered or unexported fields
}
ReverseNestedAggregation defines a special single bucket aggregation that enables aggregating on parent docs from nested documents. Effectively this aggregation can break out of the nested block structure and link to other nested structures or the root document, which allows nesting other aggregations that aren’t part of the nested object in a nested aggregation.
func NewReverseNestedAggregation ¶
func NewReverseNestedAggregation() *ReverseNestedAggregation
NewReverseNestedAggregation initializes a new ReverseNestedAggregation bucket aggregation.
func (*ReverseNestedAggregation) Meta ¶
func (a *ReverseNestedAggregation) Meta(metaData map[string]interface{}) *ReverseNestedAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ReverseNestedAggregation) Path ¶
func (a *ReverseNestedAggregation) Path(path string) *ReverseNestedAggregation
Path set the path to use for this nested aggregation. The path must match the path to a nested object in the mappings. If it is not specified then this aggregation will go back to the root document.
func (*ReverseNestedAggregation) Source ¶
func (a *ReverseNestedAggregation) Source() (interface{}, error)
func (*ReverseNestedAggregation) SubAggregation ¶
func (a *ReverseNestedAggregation) SubAggregation(name string, subAggregation Aggregation) *ReverseNestedAggregation
type SamplerAggregation ¶
type SamplerAggregation struct {
// contains filtered or unexported fields
}
SamplerAggregation is a filtering aggregation used to limit any sub aggregations' processing to a sample of the top-scoring documents. Optionally, diversity settings can be used to limit the number of matches that share a common value such as an "author".
func NewSamplerAggregation ¶
func NewSamplerAggregation() *SamplerAggregation
func (*SamplerAggregation) ExecutionHint ¶
func (a *SamplerAggregation) ExecutionHint(hint string) *SamplerAggregation
func (*SamplerAggregation) MaxDocsPerValue ¶
func (a *SamplerAggregation) MaxDocsPerValue(maxDocsPerValue int) *SamplerAggregation
func (*SamplerAggregation) Meta ¶
func (a *SamplerAggregation) Meta(metaData map[string]interface{}) *SamplerAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SamplerAggregation) ShardSize ¶
func (a *SamplerAggregation) ShardSize(shardSize int) *SamplerAggregation
ShardSize sets the maximum number of docs returned from each shard.
func (*SamplerAggregation) Source ¶
func (a *SamplerAggregation) Source() (interface{}, error)
func (*SamplerAggregation) SubAggregation ¶
func (a *SamplerAggregation) SubAggregation(name string, subAggregation Aggregation) *SamplerAggregation
type ScoreFunction ¶
type ScoreFunction interface { Name() string GetWeight() *float64 // returns the weight which must be serialized at the level of FunctionScoreQuery Source() (interface{}, error) }
ScoreFunction is used in combination with the Function Score Query.
type ScoreSort ¶
type ScoreSort struct { Sorter // contains filtered or unexported fields }
ScoreSort sorts by relevancy score.
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
Script holds all the parameters necessary to compile or find in cache and then execute a script.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details of scripting.
func NewScript ¶
NewScript creates and initializes a new Script. By default, it is of type "inline". Use NewScriptStored for a stored script (where type is "id").
func NewScriptInline ¶
NewScriptInline creates and initializes a new inline script, i.e. code.
func NewScriptStored ¶
NewScriptStored creates and initializes a new stored script.
func (*Script) Lang ¶
Lang sets the language of the script. The default scripting language is Painless ("painless"). See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html for details.
func (*Script) Param ¶
Param adds a key/value pair to the parameters that this script will be executed with.
func (*Script) Script ¶
Script is either the cache key of the script to be compiled/executed or the actual script source code for inline scripts. For indexed scripts this is the id used in the request. For file scripts this is the file name.
type ScriptField ¶
type ScriptField struct { FieldName string // name of the field // contains filtered or unexported fields }
ScriptField is a single script field.
func NewScriptField ¶
func NewScriptField(fieldName string, script *Script) *ScriptField
NewScriptField creates and initializes a new ScriptField.
func (*ScriptField) IgnoreFailure ¶
func (f *ScriptField) IgnoreFailure(ignore bool) *ScriptField
IgnoreFailure indicates whether to ignore failures. It is used in e.g. ScriptSource.
func (*ScriptField) Source ¶
func (f *ScriptField) Source() (interface{}, error)
Source returns the serializable JSON for the ScriptField.
type ScriptFunction ¶
type ScriptFunction struct {
// contains filtered or unexported fields
}
ScriptFunction builds a script score function. It uses a script to compute or influence the score of documents that match with the inner query or filter.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_script_score for details.
func NewScriptFunction ¶
func NewScriptFunction(script *Script) *ScriptFunction
NewScriptFunction initializes and returns a new ScriptFunction.
func (*ScriptFunction) GetWeight ¶
func (fn *ScriptFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*ScriptFunction) Name ¶
func (fn *ScriptFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*ScriptFunction) Script ¶
func (fn *ScriptFunction) Script(script *Script) *ScriptFunction
Script specifies the script to be executed.
func (*ScriptFunction) Source ¶
func (fn *ScriptFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*ScriptFunction) Weight ¶
func (fn *ScriptFunction) Weight(weight float64) *ScriptFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type ScriptQuery ¶
type ScriptQuery struct {
// contains filtered or unexported fields
}
ScriptQuery allows to define scripts as filters.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-script-query.html
func NewScriptQuery ¶
func NewScriptQuery(script *Script) *ScriptQuery
NewScriptQuery creates and initializes a new ScriptQuery.
func (*ScriptQuery) QueryName ¶
func (q *ScriptQuery) QueryName(queryName string) *ScriptQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*ScriptQuery) Source ¶
func (q *ScriptQuery) Source() (interface{}, error)
Source returns JSON for the query.
type ScriptSignificanceHeuristic ¶
type ScriptSignificanceHeuristic struct {
// contains filtered or unexported fields
}
ScriptSignificanceHeuristic implements a scripted significance heuristic. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_scripted for details.
func NewScriptSignificanceHeuristic ¶
func NewScriptSignificanceHeuristic() *ScriptSignificanceHeuristic
NewScriptSignificanceHeuristic initializes a new instance of ScriptSignificanceHeuristic.
func (*ScriptSignificanceHeuristic) Name ¶
func (sh *ScriptSignificanceHeuristic) Name() string
Name returns the name of the heuristic in the REST interface.
func (*ScriptSignificanceHeuristic) Script ¶
func (sh *ScriptSignificanceHeuristic) Script(script *Script) *ScriptSignificanceHeuristic
Script specifies the script to use to get custom scores. The following parameters are available in the script: `_subset_freq`, `_superset_freq`, `_subset_size`, and `_superset_size`.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html#_scripted for details.
func (*ScriptSignificanceHeuristic) Source ¶
func (sh *ScriptSignificanceHeuristic) Source() (interface{}, error)
Source returns the parameters that need to be added to the REST parameters.
type ScriptSort ¶
type ScriptSort struct { Sorter // contains filtered or unexported fields }
ScriptSort sorts by a custom script. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting.html#modules-scripting for details about scripting.
func NewScriptSort ¶
func NewScriptSort(script *Script, typ string) *ScriptSort
NewScriptSort creates and initializes a new ScriptSort. You must provide a script and a type, e.g. "string" or "number".
func (*ScriptSort) NestedFilter ¶
func (s *ScriptSort) NestedFilter(nestedFilter Query) *ScriptSort
NestedFilter sets a filter that nested objects should match with in order to be taken into account for sorting.
func (*ScriptSort) NestedPath ¶
func (s *ScriptSort) NestedPath(nestedPath string) *ScriptSort
NestedPath is used if sorting occurs on a field that is inside a nested object.
func (*ScriptSort) NestedSort ¶
func (s *ScriptSort) NestedSort(nestedSort *NestedSort) *ScriptSort
NestedSort is available starting with 6.1 and will replace NestedFilter and NestedPath.
func (*ScriptSort) Order ¶
func (s *ScriptSort) Order(ascending bool) *ScriptSort
Order defines whether sorting ascending (default) or descending.
func (*ScriptSort) SortMode ¶
func (s *ScriptSort) SortMode(sortMode string) *ScriptSort
SortMode specifies what values to pick in case a document contains multiple values for the targeted sort field. Possible values are: min or max.
func (*ScriptSort) Source ¶
func (s *ScriptSort) Source() (interface{}, error)
Source returns the JSON-serializable data.
func (*ScriptSort) Type ¶
func (s *ScriptSort) Type(typ string) *ScriptSort
Type sets the script type, which can be either "string" or "number".
type ScriptedMetricAggregation ¶
type ScriptedMetricAggregation struct {
// contains filtered or unexported fields
}
ScriptedMetricAggregation is a a metric aggregation that executes using scripts to provide a metric output.
func NewScriptedMetricAggregation ¶
func NewScriptedMetricAggregation() *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) CombineScript ¶
func (a *ScriptedMetricAggregation) CombineScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) InitScript ¶
func (a *ScriptedMetricAggregation) InitScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) MapScript ¶
func (a *ScriptedMetricAggregation) MapScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) Meta ¶
func (a *ScriptedMetricAggregation) Meta(metaData map[string]interface{}) *ScriptedMetricAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ScriptedMetricAggregation) Params ¶
func (a *ScriptedMetricAggregation) Params(params map[string]interface{}) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) ReduceScript ¶
func (a *ScriptedMetricAggregation) ReduceScript(script *Script) *ScriptedMetricAggregation
func (*ScriptedMetricAggregation) Source ¶
func (a *ScriptedMetricAggregation) Source() (interface{}, error)
type ScrollService ¶
type ScrollService struct {
// contains filtered or unexported fields
}
ScrollService iterates over pages of search results from Elasticsearch.
func NewScrollService ¶
func NewScrollService(client *Client) *ScrollService
NewScrollService initializes and returns a new ScrollService.
func (*ScrollService) AllowNoIndices ¶
func (s *ScrollService) AllowNoIndices(allowNoIndices bool) *ScrollService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*ScrollService) Body ¶
func (s *ScrollService) Body(body interface{}) *ScrollService
Body sets the raw body to send to Elasticsearch. This can be e.g. a string, a map[string]interface{} or anything that can be serialized into JSON. Notice that setting the body disables the use of SearchSource and many other properties of the ScanService.
func (*ScrollService) Clear ¶
func (s *ScrollService) Clear(ctx context.Context) error
Clear cancels the current scroll operation. If you don't do this manually, the scroll will be expired automatically by Elasticsearch. You can control how long a scroll cursor is kept alive with the KeepAlive func.
func (*ScrollService) Do ¶
func (s *ScrollService) Do(ctx context.Context) (*SearchResult, error)
Do returns the next search result. It will return io.EOF as error if there are no more search results.
func (*ScrollService) ErrorTrace ¶
func (s *ScrollService) ErrorTrace(errorTrace bool) *ScrollService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ScrollService) ExpandWildcards ¶
func (s *ScrollService) ExpandWildcards(expandWildcards string) *ScrollService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*ScrollService) FetchSource ¶
func (s *ScrollService) FetchSource(fetchSource bool) *ScrollService
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*ScrollService) FetchSourceContext ¶
func (s *ScrollService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *ScrollService
FetchSourceContext indicates how the _source should be fetched.
func (*ScrollService) FilterPath ¶
func (s *ScrollService) FilterPath(filterPath ...string) *ScrollService
FilterPath specifies a list of filters used to reduce the response.
func (*ScrollService) Header ¶
func (s *ScrollService) Header(name string, value string) *ScrollService
Header adds a header to the request.
func (*ScrollService) Headers ¶
func (s *ScrollService) Headers(headers http.Header) *ScrollService
Headers specifies the headers of the request.
func (*ScrollService) Highlight ¶
func (s *ScrollService) Highlight(highlight *Highlight) *ScrollService
Highlight allows to highlight search results on one or more fields
func (*ScrollService) Human ¶
func (s *ScrollService) Human(human bool) *ScrollService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ScrollService) IgnoreUnavailable ¶
func (s *ScrollService) IgnoreUnavailable(ignoreUnavailable bool) *ScrollService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*ScrollService) Index ¶
func (s *ScrollService) Index(indices ...string) *ScrollService
Index sets the name of one or more indices to iterate over.
func (*ScrollService) KeepAlive ¶
func (s *ScrollService) KeepAlive(keepAlive string) *ScrollService
KeepAlive sets the maximum time after which the cursor will expire. It is "5m" by default.
func (*ScrollService) MaxResponseSize ¶
func (s *ScrollService) MaxResponseSize(maxResponseSize int64) *ScrollService
MaxResponseSize sets an upper limit on the response body size that we accept, to guard against OOM situations.
func (*ScrollService) PostFilter ¶
func (s *ScrollService) PostFilter(postFilter Query) *ScrollService
PostFilter is executed as the last filter. It only affects the search hits but not facets. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-post-filter.html for details.
func (*ScrollService) Preference ¶
func (s *ScrollService) Preference(preference string) *ScrollService
Preference sets the preference to execute the search. Defaults to randomize across shards ("random"). Can be set to "_local" to prefer local shards, "_primary" to execute on primary shards only, or a custom value which guarantees that the same order will be used across different requests.
func (*ScrollService) Pretty ¶
func (s *ScrollService) Pretty(pretty bool) *ScrollService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ScrollService) Query ¶
func (s *ScrollService) Query(query Query) *ScrollService
Query sets the query to perform, e.g. a MatchAllQuery.
func (*ScrollService) RestTotalHitsAsInt ¶
func (s *ScrollService) RestTotalHitsAsInt(enabled bool) *ScrollService
RestTotalHitsAsInt indicates whether hits.total should be rendered as an integer or an object in the rest search response.
func (*ScrollService) Retrier ¶
func (s *ScrollService) Retrier(retrier Retrier) *ScrollService
Retrier allows to set specific retry logic for this ScrollService. If not specified, it will use the client's default retrier.
func (*ScrollService) Routing ¶
func (s *ScrollService) Routing(routings ...string) *ScrollService
Routing is a list of specific routing values to control the shards the search will be executed on.
func (*ScrollService) Scroll ¶
func (s *ScrollService) Scroll(keepAlive string) *ScrollService
Scroll is an alias for KeepAlive, the time to keep the cursor alive (e.g. "5m" for 5 minutes).
func (*ScrollService) ScrollId ¶
func (s *ScrollService) ScrollId(scrollId string) *ScrollService
ScrollId specifies the identifier of a scroll in action.
func (*ScrollService) SearchSource ¶
func (s *ScrollService) SearchSource(searchSource *SearchSource) *ScrollService
SearchSource sets the search source builder to use with this iterator. Notice that only a certain number of properties can be used when scrolling, e.g. query and sorting.
func (*ScrollService) Size ¶
func (s *ScrollService) Size(size int) *ScrollService
Size specifies the number of documents Elasticsearch should return from each shard, per page.
func (*ScrollService) Slice ¶
func (s *ScrollService) Slice(sliceQuery Query) *ScrollService
Slice allows slicing the scroll request into several batches. This is supported in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html#sliced-scroll for details.
func (*ScrollService) Sort ¶
func (s *ScrollService) Sort(field string, ascending bool) *ScrollService
Sort adds a sort order. This can have negative effects on the performance of the scroll operation as Elasticsearch needs to sort first.
func (*ScrollService) SortBy ¶
func (s *ScrollService) SortBy(sorter ...Sorter) *ScrollService
SortBy specifies a sort order. Notice that sorting can have a negative impact on scroll performance.
func (*ScrollService) SortWithInfo ¶
func (s *ScrollService) SortWithInfo(info SortInfo) *ScrollService
SortWithInfo specifies a sort order. Notice that sorting can have a negative impact on scroll performance.
func (*ScrollService) Type ¶
func (s *ScrollService) Type(types ...string) *ScrollService
Type sets the name of one or more types to iterate over.
func (*ScrollService) Version ¶
func (s *ScrollService) Version(version bool) *ScrollService
Version can be set to true to return a version for each search hit. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-version.html.
type SearchExplanation ¶
type SearchExplanation struct { Value float64 `json:"value"` // e.g. 1.0 Description string `json:"description"` // e.g. "boost" or "ConstantScore(*:*), product of:" Details []SearchExplanation `json:"details,omitempty"` // recursive details }
SearchExplanation explains how the score for a hit was computed. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-explain.html.
type SearchHit ¶
type SearchHit struct { Score *float64 `json:"_score,omitempty"` // computed score Index string `json:"_index,omitempty"` // index name Type string `json:"_type,omitempty"` // type meta field Id string `json:"_id,omitempty"` // external or internal Uid string `json:"_uid,omitempty"` // uid meta field (see MapperService.java for all meta fields) Routing string `json:"_routing,omitempty"` // routing meta field Parent string `json:"_parent,omitempty"` // parent meta field Version *int64 `json:"_version,omitempty"` // version number, when Version is set to true in SearchService SeqNo *int64 `json:"_seq_no"` PrimaryTerm *int64 `json:"_primary_term"` Sort []interface{} `json:"sort,omitempty"` // sort information Highlight SearchHitHighlight `json:"highlight,omitempty"` // highlighter information Source *json.RawMessage `json:"_source,omitempty"` // stored document source Fields map[string]interface{} `json:"fields,omitempty"` // returned (stored) fields Explanation *SearchExplanation `json:"_explanation,omitempty"` // explains how the score was computed MatchedQueries []string `json:"matched_queries,omitempty"` // matched queries InnerHits map[string]*SearchHitInnerHits `json:"inner_hits,omitempty"` // inner hits with ES >= 1.5.0 Nested *NestedHit `json:"_nested,omitempty"` // for nested inner hits Shard string `json:"_shard,omitempty"` // used e.g. in Search Explain Node string `json:"_node,omitempty"` // used e.g. in Search Explain }
SearchHit is a single hit.
type SearchHitHighlight ¶
SearchHitHighlight is the highlight information of a search hit. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-highlighting.html for a general discussion of highlighting.
type SearchHitInnerHits ¶
type SearchHitInnerHits struct {
Hits *SearchHits `json:"hits,omitempty"`
}
SearchHitInnerHits is used for inner hits.
type SearchHits ¶
type SearchHits struct { TotalHits int64 `json:"total"` // total number of hits found MaxScore *float64 `json:"max_score,omitempty"` // maximum score of all hits Hits []*SearchHit `json:"hits,omitempty"` // the actual hits returned }
SearchHits specifies the list of search hits.
type SearchProfile ¶
type SearchProfile struct {
Shards []SearchProfileShardResult `json:"shards"`
}
SearchProfile is a list of shard profiling data collected during query execution in the "profile" section of a SearchResult
type SearchProfileShardResult ¶
type SearchProfileShardResult struct { ID string `json:"id"` Searches []QueryProfileShardResult `json:"searches"` Aggregations []ProfileResult `json:"aggregations"` }
SearchProfileShardResult returns the profiling data for a single shard accessed during the search query or aggregation.
type SearchRequest ¶
type SearchRequest struct {
// contains filtered or unexported fields
}
SearchRequest combines a search request and its query details (see SearchSource). It is used in combination with MultiSearch.
func NewSearchRequest ¶
func NewSearchRequest() *SearchRequest
NewSearchRequest creates a new search request.
func (*SearchRequest) Aggregation ¶
func (r *SearchRequest) Aggregation(name string, aggregation Aggregation) *SearchRequest
Aggregation adds an aggreation to perform as part of the search.
func (*SearchRequest) AllowNoIndices ¶
func (s *SearchRequest) AllowNoIndices(allowNoIndices bool) *SearchRequest
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*SearchRequest) AllowPartialSearchResults ¶
func (r *SearchRequest) AllowPartialSearchResults(allow bool) *SearchRequest
AllowPartialSearchResults indicates if this request should allow partial results. (If method is not called, will default to the cluster level setting).
func (*SearchRequest) BatchedReduceSize ¶
func (r *SearchRequest) BatchedReduceSize(size int) *SearchRequest
BatchedReduceSize specifies the number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
func (*SearchRequest) Body ¶
func (r *SearchRequest) Body() (string, error)
Body allows to access the search body of the request, as generated by the DSL. Notice that Body is read-only. You must not change the request body.
Body is used e.g. by MultiSearch to get information about the search body of one SearchRequest. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-multi-search.html
func (*SearchRequest) ClearRescorers ¶
func (r *SearchRequest) ClearRescorers() *SearchRequest
ClearRescorers removes all rescorers from the search.
func (*SearchRequest) Collapse ¶
func (r *SearchRequest) Collapse(collapse *CollapseBuilder) *SearchRequest
Collapse adds field collapsing.
func (*SearchRequest) DocValueField ¶
func (r *SearchRequest) DocValueField(field string) *SearchRequest
DocValueField adds a docvalue based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFieldWithFormat ¶
func (r *SearchRequest) DocValueFieldWithFormat(field DocvalueField) *SearchRequest
DocValueFieldWithFormat adds a docvalue based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFields ¶
func (r *SearchRequest) DocValueFields(fields ...string) *SearchRequest
DocValueFields adds one or more docvalue based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) DocValueFieldsWithFormat ¶
func (r *SearchRequest) DocValueFieldsWithFormat(fields ...DocvalueField) *SearchRequest
DocValueFieldsWithFormat adds one or more docvalue based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) ExpandWildcards ¶
func (s *SearchRequest) ExpandWildcards(expandWildcards string) *SearchRequest
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*SearchRequest) Explain ¶
func (r *SearchRequest) Explain(explain bool) *SearchRequest
Explain indicates whether to return an explanation for each hit.
func (*SearchRequest) FetchSource ¶
func (r *SearchRequest) FetchSource(fetchSource bool) *SearchRequest
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchRequest) FetchSourceContext ¶
func (r *SearchRequest) FetchSourceContext(fsc *FetchSourceContext) *SearchRequest
FetchSourceContext indicates how the _source should be fetched.
func (*SearchRequest) FetchSourceIncludeExclude ¶
func (r *SearchRequest) FetchSourceIncludeExclude(include, exclude []string) *SearchRequest
FetchSourceIncludeExclude specifies that _source should be returned with each hit, where "include" and "exclude" serve as a simple wildcard matcher that gets applied to its fields (e.g. include := []string{"obj1.*","obj2.*"}, exclude := []string{"description.*"}).
func (*SearchRequest) From ¶
func (r *SearchRequest) From(from int) *SearchRequest
From index to start search from (default is 0).
func (*SearchRequest) HasIndices ¶
func (r *SearchRequest) HasIndices() bool
HasIndices returns true if there are indices used, false otherwise.
func (*SearchRequest) Highlight ¶
func (r *SearchRequest) Highlight(highlight *Highlight) *SearchRequest
Highlight adds highlighting to the search.
func (*SearchRequest) IgnoreUnavailable ¶
func (s *SearchRequest) IgnoreUnavailable(ignoreUnavailable bool) *SearchRequest
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*SearchRequest) Index ¶
func (r *SearchRequest) Index(indices ...string) *SearchRequest
Index specifies the indices to use in the request.
func (*SearchRequest) IndexBoost ¶
func (r *SearchRequest) IndexBoost(index string, boost float64) *SearchRequest
IndexBoost sets a boost a specific index will receive when the query is executed against it.
func (*SearchRequest) MaxConcurrentShardRequests ¶
func (r *SearchRequest) MaxConcurrentShardRequests(size int) *SearchRequest
MaxConcurrentShardRequests sets the number of shard requests that should be executed concurrently. This value should be used as a protection mechanism to reduce the number of shard requests fired per high level search request. Searches that hit the entire cluster can be throttled with this number to reduce the cluster load. The default grows with the number of nodes in the cluster but is at most 256.
func (*SearchRequest) MinScore ¶
func (r *SearchRequest) MinScore(minScore float64) *SearchRequest
MinScore below which documents are filtered out.
func (*SearchRequest) NoStoredFields ¶
func (r *SearchRequest) NoStoredFields() *SearchRequest
NoStoredFields indicates that no fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchRequest) PostFilter ¶
func (r *SearchRequest) PostFilter(filter Query) *SearchRequest
PostFilter is a filter that will be executed after the query has been executed and only has affect on the search hits (not aggregations). This filter is always executed as last filtering mechanism.
func (*SearchRequest) PreFilterShardSize ¶
func (r *SearchRequest) PreFilterShardSize(size int) *SearchRequest
PreFilterShardSize sets a threshold that enforces a pre-filter roundtrip to pre-filter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. The default is 128.
func (*SearchRequest) Preference ¶
func (r *SearchRequest) Preference(preference string) *SearchRequest
Preference to execute the search. Defaults to randomize across shards. Can be set to "_local" to prefer local shards, "_primary" to execute only on primary shards, or a custom value, which guarantees that the same order will be used across different requests.
func (*SearchRequest) Profile ¶
func (r *SearchRequest) Profile(profile bool) *SearchRequest
Profile specifies that this search source should activate the Profile API for queries made on it.
func (*SearchRequest) Query ¶
func (r *SearchRequest) Query(query Query) *SearchRequest
Query for the search.
func (*SearchRequest) RequestCache ¶
func (r *SearchRequest) RequestCache(requestCache bool) *SearchRequest
RequestCache specifies if this request should use the request cache or not, assuming that it can. By default, will default to the index level setting if request cache is enabled or not.
func (*SearchRequest) Rescorer ¶
func (r *SearchRequest) Rescorer(rescore *Rescore) *SearchRequest
Rescorer adds a rescorer to the search.
func (*SearchRequest) Routing ¶
func (r *SearchRequest) Routing(routing string) *SearchRequest
Routing specifies the routing parameter. It is a comma-separated list.
func (*SearchRequest) Routings ¶
func (r *SearchRequest) Routings(routings ...string) *SearchRequest
Routings to be used in the request.
func (*SearchRequest) ScriptField ¶
func (r *SearchRequest) ScriptField(field *ScriptField) *SearchRequest
ScriptField adds a script based field to load and return. The field does not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) ScriptFields ¶
func (r *SearchRequest) ScriptFields(fields ...*ScriptField) *SearchRequest
ScriptFields adds one or more script based field to load and return. The fields do not have to be stored, but it's recommended to use non analyzed or numeric fields.
func (*SearchRequest) Scroll ¶
func (r *SearchRequest) Scroll(scroll string) *SearchRequest
Scroll, if set, will enable scrolling of the search request. Pass a timeout value, e.g. "2m" or "30s" as a value.
func (*SearchRequest) SearchAfter ¶
func (r *SearchRequest) SearchAfter(sortValues ...interface{}) *SearchRequest
SearchAfter sets the sort values that indicates which docs this request should "search after".
func (*SearchRequest) SearchSource ¶
func (r *SearchRequest) SearchSource(searchSource *SearchSource) *SearchRequest
SearchSource allows passing your own SearchSource, overriding all values set on the request (except Source).
func (*SearchRequest) SearchType ¶
func (r *SearchRequest) SearchType(searchType string) *SearchRequest
SearchType must be one of "dfs_query_then_fetch", "dfs_query_and_fetch", "query_then_fetch", or "query_and_fetch".
func (*SearchRequest) SearchTypeDfsQueryThenFetch ¶
func (r *SearchRequest) SearchTypeDfsQueryThenFetch() *SearchRequest
SearchTypeDfsQueryThenFetch sets search type to "dfs_query_then_fetch".
func (*SearchRequest) SearchTypeQueryThenFetch ¶
func (r *SearchRequest) SearchTypeQueryThenFetch() *SearchRequest
SearchTypeQueryThenFetch sets search type to "query_then_fetch".
func (*SearchRequest) Size ¶
func (r *SearchRequest) Size(size int) *SearchRequest
Size is the number of search hits to return (default is 10).
func (*SearchRequest) Slice ¶
func (r *SearchRequest) Slice(sliceQuery Query) *SearchRequest
Slice allows partitioning the documents in multiple slices. It is e.g. used to slice a scroll operation, supported in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html#sliced-scroll for details.
func (*SearchRequest) Sort ¶
func (r *SearchRequest) Sort(field string, ascending bool) *SearchRequest
Sort adds a sort order.
func (*SearchRequest) SortBy ¶
func (r *SearchRequest) SortBy(sorter ...Sorter) *SearchRequest
SortBy adds a sort order.
func (*SearchRequest) SortWithInfo ¶
func (r *SearchRequest) SortWithInfo(info SortInfo) *SearchRequest
SortWithInfo adds a sort order.
func (*SearchRequest) Source ¶
func (r *SearchRequest) Source(source interface{}) *SearchRequest
Source allows passing your own request body. It will have preference over all other properties set on the request.
func (*SearchRequest) Stats ¶
func (r *SearchRequest) Stats(statsGroup ...string) *SearchRequest
Stats groups that this request will be aggregated under.
func (*SearchRequest) StoredField ¶
func (r *SearchRequest) StoredField(field string) *SearchRequest
StoredField adds a stored field to load and return (note, it must be stored) as part of the search request.
func (*SearchRequest) StoredFields ¶
func (r *SearchRequest) StoredFields(fields ...string) *SearchRequest
StoredFields adds one or more stored field to load and return (note, they must be stored) as part of the search request.
func (*SearchRequest) Suggester ¶
func (r *SearchRequest) Suggester(suggester Suggester) *SearchRequest
Suggester adds a suggester to the search.
func (*SearchRequest) TerminateAfter ¶
func (r *SearchRequest) TerminateAfter(docs int) *SearchRequest
TerminateAfter, when set, specifies an optional document count, upon collecting which the search query will terminate early.
func (*SearchRequest) Timeout ¶
func (r *SearchRequest) Timeout(timeout string) *SearchRequest
Timeout value for the request, e.g. "30s" or "2m".
func (*SearchRequest) TrackScores ¶
func (r *SearchRequest) TrackScores(trackScores bool) *SearchRequest
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchRequest) TrackTotalHits ¶
func (r *SearchRequest) TrackTotalHits(trackTotalHits bool) *SearchRequest
TrackTotalHits indicates if the total hit count for the query should be tracked. Defaults to true.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/index-modules-index-sorting.html#early-terminate for details.
func (*SearchRequest) Type ¶
func (r *SearchRequest) Type(types ...string) *SearchRequest
Type specifies one or more types to be used.
func (*SearchRequest) Version ¶
func (r *SearchRequest) Version(version bool) *SearchRequest
Version indicates whether each hit should be returned with its version.
type SearchResult ¶
type SearchResult struct { Header http.Header `json:"-"` TookInMillis int64 `json:"took,omitempty"` // search time in milliseconds TerminatedEarly bool `json:"terminated_early,omitempty"` // request terminated early NumReducePhases int `json:"num_reduce_phases,omitempty"` Clusters *SearchResultCluster `json:"_clusters,omitempty"` // 6.1.0+ ScrollId string `json:"_scroll_id,omitempty"` // only used with Scroll and Scan operations Hits *SearchHits `json:"hits,omitempty"` // the actual search hits Suggest SearchSuggest `json:"suggest,omitempty"` // results from suggesters Aggregations Aggregations `json:"aggregations,omitempty"` // results from aggregations TimedOut bool `json:"timed_out,omitempty"` // true if the search timed out Error *ErrorDetails `json:"error,omitempty"` // only used in MultiGet Profile *SearchProfile `json:"profile,omitempty"` // profiling results, if optional Profile API was active for this search Shards *ShardsInfo `json:"_shards,omitempty"` // shard information Status int `json:"status,omitempty"` // used in MultiSearch }
SearchResult is the result of a search in Elasticsearch.
Example ¶
package main import ( "context" "encoding/json" "fmt" "reflect" "time" "github.com/olivere/elastic" ) type Tweet struct { User string `json:"user"` Message string `json:"message"` Retweets int `json:"retweets"` Image string `json:"image,omitempty"` Created time.Time `json:"created,omitempty"` Tags []string `json:"tags,omitempty"` Location string `json:"location,omitempty"` Suggest *elastic.SuggestField `json:"suggest_field,omitempty"` } func main() { client, err := elastic.NewClient() if err != nil { panic(err) } // Do a search searchResult, err := client.Search().Index("twitter").Query(elastic.NewMatchAllQuery()).Do(context.Background()) if err != nil { 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 utility function that iterates over hits in a search result. // It makes sure you don't need to check for nil values in the response. // However, it ignores errors in serialization. If you want full control // over iterating the hits, see below. var ttyp Tweet for _, item := range searchResult.Each(reflect.TypeOf(ttyp)) { t := item.(Tweet) fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } fmt.Printf("Found a total of %d tweets\n", searchResult.TotalHits()) // Here's how you iterate hits with full control. if searchResult.Hits.TotalHits > 0 { fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits) // Iterate through results for _, hit := range searchResult.Hits.Hits { // hit.Index contains the name of the index // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}). var t Tweet err := json.Unmarshal(*hit.Source, &t) if err != nil { // Deserialization failed } // Work with tweet fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } } else { // No hits fmt.Print("Found no tweets\n") } }
Output:
func (*SearchResult) Each ¶
func (r *SearchResult) Each(typ reflect.Type) []interface{}
Each is a utility function to iterate over all hits. It saves you from checking for nil values. Notice that Each will ignore errors in serializing JSON and hits with empty/nil _source will get an empty value
func (*SearchResult) TotalHits ¶
func (r *SearchResult) TotalHits() int64
TotalHits is a convenience function to return the number of hits for a search result.
type SearchResultCluster ¶
type SearchResultCluster struct { Successful int `json:"successful,omitempty"` Total int `json:"total,omitempty"` Skipped int `json:"skipped,omitempty"` }
SearchResultCluster holds information about a search response from a cluster.
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
Search for documents in Elasticsearch.
Example ¶
package main import ( "context" "encoding/json" "fmt" "time" "github.com/olivere/elastic" ) type Tweet struct { User string `json:"user"` Message string `json:"message"` Retweets int `json:"retweets"` Image string `json:"image,omitempty"` Created time.Time `json:"created,omitempty"` Tags []string `json:"tags,omitempty"` Location string `json:"location,omitempty"` Suggest *elastic.SuggestField `json:"suggest_field,omitempty"` } func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() 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(context.Background()) // execute if err != nil { // Handle error panic(err) } // searchResult is of type SearchResult and returns hits, suggestions, // and all kinds of other information from Elasticsearch. fmt.Printf("Query took %d milliseconds\n", searchResult.TookInMillis) // Number of hits if searchResult.Hits.TotalHits > 0 { fmt.Printf("Found a total of %d tweets\n", searchResult.Hits.TotalHits) // Iterate through results for _, hit := range searchResult.Hits.Hits { // hit.Index contains the name of the index // Deserialize hit.Source into a Tweet (could also be just a map[string]interface{}). var t Tweet err := json.Unmarshal(*hit.Source, &t) if err != nil { // Deserialization failed } // Work with tweet fmt.Printf("Tweet by %s: %s\n", t.User, t.Message) } } else { // No hits fmt.Print("Found no tweets\n") } }
Output:
func NewSearchService ¶
func NewSearchService(client *Client) *SearchService
NewSearchService creates a new service for searching in Elasticsearch.
func (*SearchService) Aggregation ¶
func (s *SearchService) Aggregation(name string, aggregation Aggregation) *SearchService
Aggregation adds an aggreation to perform as part of the search.
func (*SearchService) AllowNoIndices ¶
func (s *SearchService) AllowNoIndices(allowNoIndices bool) *SearchService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*SearchService) AllowPartialSearchResults ¶
func (s *SearchService) AllowPartialSearchResults(enabled bool) *SearchService
AllowPartialSearchResults indicates if an error should be returned if there is a partial search failure or timeout.
func (*SearchService) BatchedReduceSize ¶
func (s *SearchService) BatchedReduceSize(size int) *SearchService
BatchedReduceSize specifies the number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
func (*SearchService) Collapse ¶
func (s *SearchService) Collapse(collapse *CollapseBuilder) *SearchService
Collapse adds field collapsing.
func (*SearchService) DefaultRescoreWindowSize ¶
func (s *SearchService) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchService
DefaultRescoreWindowSize sets the rescore window size for rescores that don't specify their window.
func (*SearchService) Do ¶
func (s *SearchService) Do(ctx context.Context) (*SearchResult, error)
Do executes the search and returns a SearchResult.
func (*SearchService) DocvalueField ¶
func (s *SearchService) DocvalueField(docvalueField string) *SearchService
DocvalueField adds a single field to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFieldWithFormat ¶
func (s *SearchService) DocvalueFieldWithFormat(docvalueField DocvalueField) *SearchService
DocvalueFieldWithFormat adds a single field to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFields ¶
func (s *SearchService) DocvalueFields(docvalueFields ...string) *SearchService
DocvalueFields adds one or more fields to load from the field data cache and return as part of the search.
func (*SearchService) DocvalueFieldsWithFormat ¶
func (s *SearchService) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchService
DocvalueFieldsWithFormat adds one or more fields to load from the field data cache and return as part of the search.
func (*SearchService) ErrorTrace ¶
func (s *SearchService) ErrorTrace(errorTrace bool) *SearchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SearchService) ExpandWildcards ¶
func (s *SearchService) ExpandWildcards(expandWildcards string) *SearchService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*SearchService) Explain ¶
func (s *SearchService) Explain(explain bool) *SearchService
Explain indicates whether each search hit should be returned with an explanation of the hit (ranking).
func (*SearchService) FetchSource ¶
func (s *SearchService) FetchSource(fetchSource bool) *SearchService
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchService) FetchSourceContext ¶
func (s *SearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchService
FetchSourceContext indicates how the _source should be fetched.
func (*SearchService) FilterPath ¶
func (s *SearchService) FilterPath(filterPath ...string) *SearchService
FilterPath specifies a list of filters used to reduce the response.
func (*SearchService) From ¶
func (s *SearchService) From(from int) *SearchService
From index to start the search from. Defaults to 0.
func (*SearchService) GlobalSuggestText ¶
func (s *SearchService) GlobalSuggestText(globalText string) *SearchService
GlobalSuggestText defines the global text to use with all suggesters. This avoids repetition.
func (*SearchService) Header ¶
func (s *SearchService) Header(name string, value string) *SearchService
Header adds a header to the request.
func (*SearchService) Headers ¶
func (s *SearchService) Headers(headers http.Header) *SearchService
Headers specifies the headers of the request.
func (*SearchService) Highlight ¶
func (s *SearchService) Highlight(highlight *Highlight) *SearchService
Highlight adds highlighting to the search.
func (*SearchService) Human ¶
func (s *SearchService) Human(human bool) *SearchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SearchService) IgnoreThrottled ¶
func (s *SearchService) IgnoreThrottled(ignoreThrottled bool) *SearchService
IgnoreThrottled indicates whether specified concrete, expanded or aliased indices should be ignored when throttled.
func (*SearchService) IgnoreUnavailable ¶
func (s *SearchService) IgnoreUnavailable(ignoreUnavailable bool) *SearchService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*SearchService) Index ¶
func (s *SearchService) Index(index ...string) *SearchService
Index sets the names of the indices to use for search.
func (*SearchService) Lenient ¶
func (s *SearchService) Lenient(lenient bool) *SearchService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*SearchService) MaxConcurrentShardRequests ¶
func (s *SearchService) MaxConcurrentShardRequests(max int) *SearchService
MaxConcurrentShardRequests specifies the number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.
func (*SearchService) MaxResponseSize ¶
func (s *SearchService) MaxResponseSize(maxResponseSize int64) *SearchService
MaxResponseSize sets an upper limit on the response body size that we accept, to guard against OOM situations.
func (*SearchService) MinScore ¶
func (s *SearchService) MinScore(minScore float64) *SearchService
MinScore sets the minimum score below which docs will be filtered out.
func (*SearchService) NoStoredFields ¶
func (s *SearchService) NoStoredFields() *SearchService
NoStoredFields indicates that no stored fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchService) PostFilter ¶
func (s *SearchService) PostFilter(postFilter Query) *SearchService
PostFilter will be executed after the query has been executed and only affects the search hits, not the aggregations. This filter is always executed as the last filtering mechanism.
func (*SearchService) PreFilterShardSize ¶
func (s *SearchService) PreFilterShardSize(threshold int) *SearchService
PreFilterShardSize specifies a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method i.e. if date filters are mandatory to match but the shard bounds and the query are disjoint.
func (*SearchService) Preference ¶
func (s *SearchService) Preference(preference string) *SearchService
Preference sets the preference to execute the search. Defaults to randomize across shards ("random"). Can be set to "_local" to prefer local shards, "_primary" to execute on primary shards only, or a custom value which guarantees that the same order will be used across different requests.
func (*SearchService) Pretty ¶
func (s *SearchService) Pretty(pretty bool) *SearchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SearchService) Profile ¶
func (s *SearchService) Profile(profile bool) *SearchService
Profile sets the Profile API flag on the search source. When enabled, a search executed by this service will return query profiling data.
func (*SearchService) Query ¶
func (s *SearchService) Query(query Query) *SearchService
Query sets the query to perform, e.g. MatchAllQuery.
func (*SearchService) RequestCache ¶
func (s *SearchService) RequestCache(requestCache bool) *SearchService
RequestCache indicates whether the cache should be used for this request or not, defaults to index level setting.
func (*SearchService) Rescorer ¶
func (s *SearchService) Rescorer(rescore *Rescore) *SearchService
Rescorer adds a rescorer to the search.
func (*SearchService) RestTotalHitsAsInt ¶
func (s *SearchService) RestTotalHitsAsInt(enabled bool) *SearchService
RestTotalHitsAsInt is a flag that is temporarily available for ES 7.x servers to return total hits as an int64 instead of a response structure.
Warning: Using it indicates that you are using elastic.v6 with ES 7.x, which is an unsupported scenario. Use at your own risk. This option will also be removed with ES 8.x. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#hits-total-now-object-search-response.
func (*SearchService) Routing ¶
func (s *SearchService) Routing(routings ...string) *SearchService
Routing is a list of specific routing values to control the shards the search will be executed on.
func (*SearchService) SearchAfter ¶
func (s *SearchService) SearchAfter(sortValues ...interface{}) *SearchService
SearchAfter allows a different form of pagination by using a live cursor, using the results of the previous page to help the retrieval of the next.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-search-after.html
func (*SearchService) SearchSource ¶
func (s *SearchService) SearchSource(searchSource *SearchSource) *SearchService
SearchSource sets the search source builder to use with this service.
func (*SearchService) SearchType ¶
func (s *SearchService) SearchType(searchType string) *SearchService
SearchType sets the search operation type. Valid values are: "dfs_query_then_fetch" and "query_then_fetch". See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-search-type.html for details.
func (*SearchService) SeqNoPrimaryTerm ¶
func (s *SearchService) SeqNoPrimaryTerm(enabled bool) *SearchService
SeqNoPrimaryTerm specifies whether to return sequence number and primary term of the last modification of each hit.
func (*SearchService) SetDumpConfig ¶
func (s *SearchService) SetDumpConfig(config DumpConfig) *SearchService
func (*SearchService) Size ¶
func (s *SearchService) Size(size int) *SearchService
Size is the number of search hits to return. Defaults to 10.
func (*SearchService) Sort ¶
func (s *SearchService) Sort(field string, ascending bool) *SearchService
Sort adds a sort order.
func (*SearchService) SortBy ¶
func (s *SearchService) SortBy(sorter ...Sorter) *SearchService
SortBy adds a sort order.
func (*SearchService) SortWithInfo ¶
func (s *SearchService) SortWithInfo(info SortInfo) *SearchService
SortWithInfo adds a sort order.
func (*SearchService) Source ¶
func (s *SearchService) Source(source interface{}) *SearchService
Source allows the user to set the request body manually without using any of the structs and interfaces in Elastic.
func (*SearchService) StoredField ¶
func (s *SearchService) StoredField(fieldName string) *SearchService
StoredField adds a single field to load and return (note, must be stored) as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchService) StoredFields ¶
func (s *SearchService) StoredFields(fields ...string) *SearchService
StoredFields sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchService) Suggester ¶
func (s *SearchService) Suggester(suggester Suggester) *SearchService
Suggester adds a suggester to the search.
func (*SearchService) TerminateAfter ¶
func (s *SearchService) TerminateAfter(terminateAfter int) *SearchService
TerminateAfter specifies the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*SearchService) Timeout ¶
func (s *SearchService) Timeout(timeout string) *SearchService
Timeout sets the timeout to use, e.g. "1s" or "1000ms".
func (*SearchService) TimeoutInMillis ¶
func (s *SearchService) TimeoutInMillis(timeoutInMillis int) *SearchService
TimeoutInMillis sets the timeout in milliseconds.
func (*SearchService) TrackScores ¶
func (s *SearchService) TrackScores(trackScores bool) *SearchService
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchService) TrackTotalHits ¶
func (s *SearchService) TrackTotalHits(trackTotalHits bool) *SearchService
TrackTotalHits controls if the total hit count for the query should be tracked.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-track-total-hits.html for details.
func (*SearchService) Type ¶
func (s *SearchService) Type(typ ...string) *SearchService
Types adds search restrictions for a list of types.
func (*SearchService) TypedKeys ¶
func (s *SearchService) TypedKeys(enabled bool) *SearchService
TypedKeys specifies whether aggregation and suggester names should be prefixed by their respective types in the response.
func (*SearchService) Validate ¶
func (s *SearchService) Validate() error
Validate checks if the operation is valid.
func (*SearchService) Version ¶
func (s *SearchService) Version(version bool) *SearchService
Version indicates whether each search hit should be returned with a version associated to it.
type SearchShardsResponse ¶
type SearchShardsResponse struct { Nodes map[string]interface{} `json:"nodes"` Indices map[string]interface{} `json:"indices"` Shards [][]*SearchShardsResponseShardsInfo `json:"shards"` }
SearchShardsResponse is the response of SearchShardsService.Do.
type SearchShardsResponseShardsInfo ¶
type SearchShardsResponseShardsInfo struct { Index string `json:"index"` Node string `json:"node"` Primary bool `json:"primary"` Shard uint `json:"shard"` State string `json:"state"` AllocationId *AllocationId `json:"allocation_id,omitempty"` RelocatingNode string `json:"relocating_node"` ExpectedShardSizeInBytes int64 `json:"expected_shard_size_in_bytes,omitempty"` RecoverySource *RecoverySource `json:"recovery_source,omitempty"` UnassignedInfo *UnassignedInfo `json:"unassigned_info,omitempty"` }
type SearchShardsService ¶
type SearchShardsService struct {
// contains filtered or unexported fields
}
SearchShardsService returns the indices and shards that a search request would be executed against. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-shards.html
func NewSearchShardsService ¶
func NewSearchShardsService(client *Client) *SearchShardsService
NewSearchShardsService creates a new SearchShardsService.
func (*SearchShardsService) AllowNoIndices ¶
func (s *SearchShardsService) AllowNoIndices(allowNoIndices bool) *SearchShardsService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*SearchShardsService) Do ¶
func (s *SearchShardsService) Do(ctx context.Context) (*SearchShardsResponse, error)
Do executes the operation.
func (*SearchShardsService) ErrorTrace ¶
func (s *SearchShardsService) ErrorTrace(errorTrace bool) *SearchShardsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SearchShardsService) ExpandWildcards ¶
func (s *SearchShardsService) ExpandWildcards(expandWildcards string) *SearchShardsService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*SearchShardsService) FilterPath ¶
func (s *SearchShardsService) FilterPath(filterPath ...string) *SearchShardsService
FilterPath specifies a list of filters used to reduce the response.
func (*SearchShardsService) Header ¶
func (s *SearchShardsService) Header(name string, value string) *SearchShardsService
Header adds a header to the request.
func (*SearchShardsService) Headers ¶
func (s *SearchShardsService) Headers(headers http.Header) *SearchShardsService
Headers specifies the headers of the request.
func (*SearchShardsService) Human ¶
func (s *SearchShardsService) Human(human bool) *SearchShardsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SearchShardsService) IgnoreUnavailable ¶
func (s *SearchShardsService) IgnoreUnavailable(ignoreUnavailable bool) *SearchShardsService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*SearchShardsService) Index ¶
func (s *SearchShardsService) Index(index ...string) *SearchShardsService
Index sets the names of the indices to restrict the results.
func (*SearchShardsService) Local ¶
func (s *SearchShardsService) Local(local bool) *SearchShardsService
A boolean value whether to read the cluster state locally in order to determine where shards are allocated instead of using the Master node’s cluster state.
func (*SearchShardsService) Preference ¶
func (s *SearchShardsService) Preference(preference string) *SearchShardsService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*SearchShardsService) Pretty ¶
func (s *SearchShardsService) Pretty(pretty bool) *SearchShardsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SearchShardsService) Routing ¶
func (s *SearchShardsService) Routing(routing string) *SearchShardsService
Routing sets a specific routing value.
func (*SearchShardsService) Validate ¶
func (s *SearchShardsService) Validate() error
Validate checks if the operation is valid.
type SearchSource ¶
type SearchSource struct {
// contains filtered or unexported fields
}
SearchSource enables users to build the search source. It resembles the SearchSourceBuilder in Elasticsearch.
func NewSearchSource ¶
func NewSearchSource() *SearchSource
NewSearchSource initializes a new SearchSource.
func (*SearchSource) Aggregation ¶
func (s *SearchSource) Aggregation(name string, aggregation Aggregation) *SearchSource
Aggregation adds an aggreation to perform as part of the search.
func (*SearchSource) ClearRescorers ¶
func (s *SearchSource) ClearRescorers() *SearchSource
ClearRescorers removes all rescorers from the search.
func (*SearchSource) Collapse ¶
func (s *SearchSource) Collapse(collapse *CollapseBuilder) *SearchSource
Collapse adds field collapsing.
func (*SearchSource) DefaultRescoreWindowSize ¶
func (s *SearchSource) DefaultRescoreWindowSize(defaultRescoreWindowSize int) *SearchSource
DefaultRescoreWindowSize sets the rescore window size for rescores that don't specify their window.
func (*SearchSource) DocvalueField ¶
func (s *SearchSource) DocvalueField(fieldDataField string) *SearchSource
DocvalueField adds a single field to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFieldWithFormat ¶
func (s *SearchSource) DocvalueFieldWithFormat(fieldDataFieldWithFormat DocvalueField) *SearchSource
DocvalueField adds a single docvalue field to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFields ¶
func (s *SearchSource) DocvalueFields(docvalueFields ...string) *SearchSource
DocvalueFields adds one or more fields to load from the field data cache and return as part of the search request.
func (*SearchSource) DocvalueFieldsWithFormat ¶
func (s *SearchSource) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *SearchSource
DocvalueFields adds one or more docvalue fields to load from the field data cache and return as part of the search request.
func (*SearchSource) Explain ¶
func (s *SearchSource) Explain(explain bool) *SearchSource
Explain indicates whether each search hit should be returned with an explanation of the hit (ranking).
func (*SearchSource) FetchSource ¶
func (s *SearchSource) FetchSource(fetchSource bool) *SearchSource
FetchSource indicates whether the response should contain the stored _source for every hit.
func (*SearchSource) FetchSourceContext ¶
func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource
FetchSourceContext indicates how the _source should be fetched.
func (*SearchSource) FetchSourceIncludeExclude ¶
func (s *SearchSource) FetchSourceIncludeExclude(include, exclude []string) *SearchSource
FetchSourceIncludeExclude specifies that _source should be returned with each hit, where "include" and "exclude" serve as a simple wildcard matcher that gets applied to its fields (e.g. include := []string{"obj1.*","obj2.*"}, exclude := []string{"description.*"}).
func (*SearchSource) From ¶
func (s *SearchSource) From(from int) *SearchSource
From index to start the search from. Defaults to 0.
func (*SearchSource) GlobalSuggestText ¶
func (s *SearchSource) GlobalSuggestText(text string) *SearchSource
GlobalSuggestText defines the global text to use with all suggesters. This avoids repetition.
func (*SearchSource) Highlight ¶
func (s *SearchSource) Highlight(highlight *Highlight) *SearchSource
Highlight adds highlighting to the search.
func (*SearchSource) Highlighter ¶
func (s *SearchSource) Highlighter() *Highlight
Highlighter returns the highlighter.
func (*SearchSource) IndexBoost ¶
func (s *SearchSource) IndexBoost(index string, boost float64) *SearchSource
IndexBoost sets the boost that a specific index will receive when the query is executed against it.
func (*SearchSource) InnerHit ¶
func (s *SearchSource) InnerHit(name string, innerHit *InnerHit) *SearchSource
InnerHit adds an inner hit to return with the result.
func (*SearchSource) MinScore ¶
func (s *SearchSource) MinScore(minScore float64) *SearchSource
MinScore sets the minimum score below which docs will be filtered out.
func (*SearchSource) NoStoredFields ¶
func (s *SearchSource) NoStoredFields() *SearchSource
NoStoredFields indicates that no fields should be loaded, resulting in only id and type to be returned per field.
func (*SearchSource) PostFilter ¶
func (s *SearchSource) PostFilter(postFilter Query) *SearchSource
PostFilter will be executed after the query has been executed and only affects the search hits, not the aggregations. This filter is always executed as the last filtering mechanism.
func (*SearchSource) Profile ¶
func (s *SearchSource) Profile(profile bool) *SearchSource
Profile specifies that this search source should activate the Profile API for queries made on it.
func (*SearchSource) Query ¶
func (s *SearchSource) Query(query Query) *SearchSource
Query sets the query to use with this search source.
func (*SearchSource) Rescorer ¶
func (s *SearchSource) Rescorer(rescore *Rescore) *SearchSource
Rescorer adds a rescorer to the search.
func (*SearchSource) ScriptField ¶
func (s *SearchSource) ScriptField(scriptField *ScriptField) *SearchSource
ScriptField adds a single script field with the provided script.
func (*SearchSource) ScriptFields ¶
func (s *SearchSource) ScriptFields(scriptFields ...*ScriptField) *SearchSource
ScriptFields adds one or more script fields with the provided scripts.
func (*SearchSource) SearchAfter ¶
func (s *SearchSource) SearchAfter(sortValues ...interface{}) *SearchSource
SearchAfter allows a different form of pagination by using a live cursor, using the results of the previous page to help the retrieval of the next.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-search-after.html
func (*SearchSource) SeqNoAndPrimaryTerm ¶
func (s *SearchSource) SeqNoAndPrimaryTerm(enabled bool) *SearchSource
SeqNoAndPrimaryTerm indicates whether SearchHits should be returned with the sequence number and primary term of the last modification of the document.
func (*SearchSource) Size ¶
func (s *SearchSource) Size(size int) *SearchSource
Size is the number of search hits to return. Defaults to 10.
func (*SearchSource) Slice ¶
func (s *SearchSource) Slice(sliceQuery Query) *SearchSource
Slice allows partitioning the documents in multiple slices. It is e.g. used to slice a scroll operation, supported in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html#sliced-scroll for details.
func (*SearchSource) Sort ¶
func (s *SearchSource) Sort(field string, ascending bool) *SearchSource
Sort adds a sort order.
func (*SearchSource) SortBy ¶
func (s *SearchSource) SortBy(sorter ...Sorter) *SearchSource
SortBy adds a sort order.
func (*SearchSource) SortWithInfo ¶
func (s *SearchSource) SortWithInfo(info SortInfo) *SearchSource
SortWithInfo adds a sort order.
func (*SearchSource) Source ¶
func (s *SearchSource) Source() (interface{}, error)
Source returns the serializable JSON for the source builder.
func (*SearchSource) Stats ¶
func (s *SearchSource) Stats(statsGroup ...string) *SearchSource
Stats group this request will be aggregated under.
func (*SearchSource) StoredField ¶
func (s *SearchSource) StoredField(storedFieldName string) *SearchSource
StoredField adds a single field to load and return (note, must be stored) as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchSource) StoredFields ¶
func (s *SearchSource) StoredFields(storedFieldNames ...string) *SearchSource
StoredFields sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
func (*SearchSource) Suggester ¶
func (s *SearchSource) Suggester(suggester Suggester) *SearchSource
Suggester adds a suggester to the search.
func (*SearchSource) TerminateAfter ¶
func (s *SearchSource) TerminateAfter(terminateAfter int) *SearchSource
TerminateAfter specifies the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*SearchSource) Timeout ¶
func (s *SearchSource) Timeout(timeout string) *SearchSource
Timeout controls how long a search is allowed to take, e.g. "1s" or "500ms".
func (*SearchSource) TimeoutInMillis ¶
func (s *SearchSource) TimeoutInMillis(timeoutInMillis int) *SearchSource
TimeoutInMillis controls how many milliseconds a search is allowed to take before it is canceled.
func (*SearchSource) TrackScores ¶
func (s *SearchSource) TrackScores(trackScores bool) *SearchSource
TrackScores is applied when sorting and controls if scores will be tracked as well. Defaults to false.
func (*SearchSource) TrackTotalHits ¶
func (s *SearchSource) TrackTotalHits(trackTotalHits bool) *SearchSource
TrackTotalHits indicates if the total hit count for the query should be tracked. Defaults to true.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/index-modules-index-sorting.html#early-terminate for details.
func (*SearchSource) Version ¶
func (s *SearchSource) Version(version bool) *SearchSource
Version indicates whether each search hit should be returned with a version associated to it.
type SearchSuggest ¶
type SearchSuggest map[string][]SearchSuggestion
SearchSuggest is a map of suggestions. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters.html.
type SearchSuggestion ¶
type SearchSuggestion struct { Text string `json:"text"` Offset int `json:"offset"` Length int `json:"length"` Options []SearchSuggestionOption `json:"options"` }
SearchSuggestion is a single search suggestion. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters.html.
type SearchSuggestionOption ¶
type SearchSuggestionOption struct { Text string `json:"text"` Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Score float64 `json:"score"` // term and phrase suggesters uses "score" as of 6.2.4 ScoreUnderscore float64 `json:"_score"` // completion and context suggesters uses "_score" as of 6.2.4 Highlighted string `json:"highlighted"` CollateMatch bool `json:"collate_match"` Freq int `json:"freq"` // from TermSuggestion.Option in Java API Source *json.RawMessage `json:"_source"` Contexts map[string][]string `json:"contexts,omitempty"` }
SearchSuggestionOption is an option of a SearchSuggestion. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters.html.
type SerialDiffAggregation ¶
type SerialDiffAggregation struct {
// contains filtered or unexported fields
}
SerialDiffAggregation implements serial differencing. Serial differencing is a technique where values in a time series are subtracted from itself at different time lags or periods.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-serialdiff-aggregation.html
func NewSerialDiffAggregation ¶
func NewSerialDiffAggregation() *SerialDiffAggregation
NewSerialDiffAggregation creates and initializes a new SerialDiffAggregation.
func (*SerialDiffAggregation) BucketsPath ¶
func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*SerialDiffAggregation) Format ¶
func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation
Format to use on the output of this aggregation.
func (*SerialDiffAggregation) GapInsertZeros ¶
func (a *SerialDiffAggregation) GapInsertZeros() *SerialDiffAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*SerialDiffAggregation) GapPolicy ¶
func (a *SerialDiffAggregation) GapPolicy(gapPolicy string) *SerialDiffAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*SerialDiffAggregation) GapSkip ¶
func (a *SerialDiffAggregation) GapSkip() *SerialDiffAggregation
GapSkip skips gaps in the series.
func (*SerialDiffAggregation) Lag ¶
func (a *SerialDiffAggregation) Lag(lag int) *SerialDiffAggregation
Lag specifies the historical bucket to subtract from the current value. E.g. a lag of 7 will subtract the current value from the value 7 buckets ago. Lag must be a positive, non-zero integer.
func (*SerialDiffAggregation) Meta ¶
func (a *SerialDiffAggregation) Meta(metaData map[string]interface{}) *SerialDiffAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SerialDiffAggregation) Source ¶
func (a *SerialDiffAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type ShardFailure ¶
type ShardFailure struct { Index string `json:"_index,omitempty"` Shard int `json:"_shard,omitempty"` Node string `json:"_node,omitempty"` Reason map[string]interface{} `json:"reason,omitempty"` Status string `json:"status,omitempty"` Primary bool `json:"primary,omitempty"` }
ShardFailure represents details about a failure.
type ShardsInfo ¶
type ShardsInfo struct { Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` Failures []*ShardFailure `json:"failures,omitempty"` Skipped int `json:"skipped,omitempty"` }
ShardsInfo represents information from a shard.
type SignificanceHeuristic ¶
type SignificantTermsAggregation ¶
type SignificantTermsAggregation struct {
// contains filtered or unexported fields
}
SignificantTermsAggregation is an aggregation that returns interesting or unusual occurrences of terms in a set. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significantterms-aggregation.html
func NewSignificantTermsAggregation ¶
func NewSignificantTermsAggregation() *SignificantTermsAggregation
func (*SignificantTermsAggregation) BackgroundFilter ¶
func (a *SignificantTermsAggregation) BackgroundFilter(filter Query) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Exclude ¶
func (a *SignificantTermsAggregation) Exclude(regexp string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ExcludeValues ¶
func (a *SignificantTermsAggregation) ExcludeValues(values ...interface{}) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ExecutionHint ¶
func (a *SignificantTermsAggregation) ExecutionHint(hint string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Field ¶
func (a *SignificantTermsAggregation) Field(field string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Include ¶
func (a *SignificantTermsAggregation) Include(regexp string) *SignificantTermsAggregation
func (*SignificantTermsAggregation) IncludeExclude ¶
func (a *SignificantTermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTermsAggregation
func (*SignificantTermsAggregation) IncludeValues ¶
func (a *SignificantTermsAggregation) IncludeValues(values ...interface{}) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Meta ¶
func (a *SignificantTermsAggregation) Meta(metaData map[string]interface{}) *SignificantTermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SignificantTermsAggregation) MinDocCount ¶
func (a *SignificantTermsAggregation) MinDocCount(minDocCount int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) NumPartitions ¶
func (a *SignificantTermsAggregation) NumPartitions(n int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Partition ¶
func (a *SignificantTermsAggregation) Partition(p int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) RequiredSize ¶
func (a *SignificantTermsAggregation) RequiredSize(requiredSize int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ShardMinDocCount ¶
func (a *SignificantTermsAggregation) ShardMinDocCount(shardMinDocCount int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) ShardSize ¶
func (a *SignificantTermsAggregation) ShardSize(shardSize int) *SignificantTermsAggregation
func (*SignificantTermsAggregation) SignificanceHeuristic ¶
func (a *SignificantTermsAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTermsAggregation
func (*SignificantTermsAggregation) Source ¶
func (a *SignificantTermsAggregation) Source() (interface{}, error)
func (*SignificantTermsAggregation) SubAggregation ¶
func (a *SignificantTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTermsAggregation
type SignificantTextAggregation ¶
type SignificantTextAggregation struct {
// contains filtered or unexported fields
}
SignificantTextAggregation returns interesting or unusual occurrences of free-text terms in a set. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-significanttext-aggregation.html
func NewSignificantTextAggregation ¶
func NewSignificantTextAggregation() *SignificantTextAggregation
func (*SignificantTextAggregation) BackgroundFilter ¶
func (a *SignificantTextAggregation) BackgroundFilter(filter Query) *SignificantTextAggregation
func (*SignificantTextAggregation) Exclude ¶
func (a *SignificantTextAggregation) Exclude(regexp string) *SignificantTextAggregation
func (*SignificantTextAggregation) ExcludeValues ¶
func (a *SignificantTextAggregation) ExcludeValues(values ...interface{}) *SignificantTextAggregation
func (*SignificantTextAggregation) Field ¶
func (a *SignificantTextAggregation) Field(field string) *SignificantTextAggregation
func (*SignificantTextAggregation) FilterDuplicateText ¶
func (a *SignificantTextAggregation) FilterDuplicateText(filter bool) *SignificantTextAggregation
func (*SignificantTextAggregation) Include ¶
func (a *SignificantTextAggregation) Include(regexp string) *SignificantTextAggregation
func (*SignificantTextAggregation) IncludeExclude ¶
func (a *SignificantTextAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *SignificantTextAggregation
func (*SignificantTextAggregation) IncludeValues ¶
func (a *SignificantTextAggregation) IncludeValues(values ...interface{}) *SignificantTextAggregation
func (*SignificantTextAggregation) Meta ¶
func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SignificantTextAggregation) MinDocCount ¶
func (a *SignificantTextAggregation) MinDocCount(minDocCount int64) *SignificantTextAggregation
func (*SignificantTextAggregation) NumPartitions ¶
func (a *SignificantTextAggregation) NumPartitions(n int) *SignificantTextAggregation
func (*SignificantTextAggregation) Partition ¶
func (a *SignificantTextAggregation) Partition(p int) *SignificantTextAggregation
func (*SignificantTextAggregation) ShardMinDocCount ¶
func (a *SignificantTextAggregation) ShardMinDocCount(shardMinDocCount int64) *SignificantTextAggregation
func (*SignificantTextAggregation) ShardSize ¶
func (a *SignificantTextAggregation) ShardSize(shardSize int) *SignificantTextAggregation
func (*SignificantTextAggregation) SignificanceHeuristic ¶
func (a *SignificantTextAggregation) SignificanceHeuristic(heuristic SignificanceHeuristic) *SignificantTextAggregation
func (*SignificantTextAggregation) Size ¶
func (a *SignificantTextAggregation) Size(size int) *SignificantTextAggregation
func (*SignificantTextAggregation) Source ¶
func (a *SignificantTextAggregation) Source() (interface{}, error)
func (*SignificantTextAggregation) SourceFieldNames ¶
func (a *SignificantTextAggregation) SourceFieldNames(names ...string) *SignificantTextAggregation
func (*SignificantTextAggregation) SubAggregation ¶
func (a *SignificantTextAggregation) SubAggregation(name string, subAggregation Aggregation) *SignificantTextAggregation
type SimpleBackoff ¶
SimpleBackoff takes a list of fixed values for backoff intervals. Each call to Next returns the next value from that fixed list. After each value is returned, subsequent calls to Next will only return the last element. The values are optionally "jittered" (off by default).
func NewSimpleBackoff ¶
func NewSimpleBackoff(ticks ...int) *SimpleBackoff
NewSimpleBackoff creates a SimpleBackoff algorithm with the specified list of fixed intervals in milliseconds.
func (*SimpleBackoff) Jitter ¶
func (b *SimpleBackoff) Jitter(flag bool) *SimpleBackoff
Jitter enables or disables jittering values.
type SimpleMovAvgModel ¶
type SimpleMovAvgModel struct { }
SimpleMovAvgModel calculates a simple unweighted (arithmetic) moving average.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-movavg-aggregation.html#_simple
func NewSimpleMovAvgModel ¶
func NewSimpleMovAvgModel() *SimpleMovAvgModel
NewSimpleMovAvgModel creates and initializes a new SimpleMovAvgModel.
func (*SimpleMovAvgModel) Settings ¶
func (m *SimpleMovAvgModel) Settings() map[string]interface{}
Settings of the model.
type SimpleQueryStringQuery ¶
type SimpleQueryStringQuery struct {
// contains filtered or unexported fields
}
SimpleQueryStringQuery is a query that uses the SimpleQueryParser to parse its context. Unlike the regular query_string query, the simple_query_string query will never throw an exception, and discards invalid parts of the query.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-simple-query-string-query.html
func NewSimpleQueryStringQuery ¶
func NewSimpleQueryStringQuery(text string) *SimpleQueryStringQuery
NewSimpleQueryStringQuery creates and initializes a new SimpleQueryStringQuery.
func (*SimpleQueryStringQuery) AnalyzeWildcard ¶
func (q *SimpleQueryStringQuery) AnalyzeWildcard(analyzeWildcard bool) *SimpleQueryStringQuery
AnalyzeWildcard indicates whether to enabled analysis on wildcard and prefix queries.
func (*SimpleQueryStringQuery) Analyzer ¶
func (q *SimpleQueryStringQuery) Analyzer(analyzer string) *SimpleQueryStringQuery
Analyzer specifies the analyzer to use for the query.
func (*SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery ¶
func (q *SimpleQueryStringQuery) AutoGenerateSynonymsPhraseQuery(enable bool) *SimpleQueryStringQuery
AutoGenerateSynonymsPhraseQuery indicates whether phrase queries should be automatically generated for multi terms synonyms. Defaults to true.
func (*SimpleQueryStringQuery) Boost ¶
func (q *SimpleQueryStringQuery) Boost(boost float64) *SimpleQueryStringQuery
Boost sets the boost for this query.
func (*SimpleQueryStringQuery) DefaultOperator ¶
func (q *SimpleQueryStringQuery) DefaultOperator(defaultOperator string) *SimpleQueryStringQuery
DefaultOperator specifies the default operator for the query.
func (*SimpleQueryStringQuery) Field ¶
func (q *SimpleQueryStringQuery) Field(field string) *SimpleQueryStringQuery
Field adds a field to run the query against.
func (*SimpleQueryStringQuery) FieldWithBoost ¶
func (q *SimpleQueryStringQuery) FieldWithBoost(field string, boost float64) *SimpleQueryStringQuery
Field adds a field to run the query against with a specific boost.
func (*SimpleQueryStringQuery) Flags ¶
func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery
Flags sets the flags for the query.
func (*SimpleQueryStringQuery) FuzzyMaxExpansions ¶
func (q *SimpleQueryStringQuery) FuzzyMaxExpansions(fuzzyMaxExpansions int) *SimpleQueryStringQuery
FuzzyMaxExpansions defines the number of terms fuzzy queries will expand to.
func (*SimpleQueryStringQuery) FuzzyPrefixLength ¶
func (q *SimpleQueryStringQuery) FuzzyPrefixLength(fuzzyPrefixLength int) *SimpleQueryStringQuery
FuzzyPrefixLength defines the prefix length in fuzzy queries.
func (*SimpleQueryStringQuery) FuzzyTranspositions ¶
func (q *SimpleQueryStringQuery) FuzzyTranspositions(fuzzyTranspositions bool) *SimpleQueryStringQuery
FuzzyTranspositions defines whether to use transpositions in fuzzy queries.
func (*SimpleQueryStringQuery) Lenient ¶
func (q *SimpleQueryStringQuery) Lenient(lenient bool) *SimpleQueryStringQuery
Lenient indicates whether the query string parser should be lenient when parsing field values. It defaults to the index setting and if not set, defaults to false.
func (*SimpleQueryStringQuery) Locale
deprecated
func (q *SimpleQueryStringQuery) Locale(locale string) *SimpleQueryStringQuery
Locale to be used in the query.
Deprecated: Decision is now made by the analyzer.
func (*SimpleQueryStringQuery) LowercaseExpandedTerms
deprecated
func (q *SimpleQueryStringQuery) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *SimpleQueryStringQuery
LowercaseExpandedTerms indicates whether terms of wildcard, prefix, fuzzy and range queries are automatically lower-cased or not. Default is true.
Deprecated: Decision is now made by the analyzer.
func (*SimpleQueryStringQuery) MinimumShouldMatch ¶
func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery
MinimumShouldMatch specifies the minimumShouldMatch to apply to the resulting query should that be a Boolean query.
func (*SimpleQueryStringQuery) QueryName ¶
func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SimpleQueryStringQuery) QuoteFieldSuffix ¶
func (q *SimpleQueryStringQuery) QuoteFieldSuffix(quoteFieldSuffix string) *SimpleQueryStringQuery
QuoteFieldSuffix is an optional field name suffix to automatically try and add to the field searched when using quoted text.
func (*SimpleQueryStringQuery) Source ¶
func (q *SimpleQueryStringQuery) Source() (interface{}, error)
Source returns JSON for the query.
type SliceQuery ¶
type SliceQuery struct {
// contains filtered or unexported fields
}
SliceQuery allows to partition the documents into several slices. It is used e.g. to slice scroll operations in Elasticsearch 5.0 or later. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html#sliced-scroll for details.
func (*SliceQuery) Field ¶
func (s *SliceQuery) Field(field string) *SliceQuery
Field is the name of the field to slice against (_uid by default).
func (*SliceQuery) Max ¶
func (s *SliceQuery) Max(max int) *SliceQuery
Max is the maximum number of slices.
func (*SliceQuery) Source ¶
func (s *SliceQuery) Source() (interface{}, error)
Source returns the JSON body.
type SmoothingModel ¶
type Snapshot ¶
type Snapshot struct { Snapshot string `json:"snapshot"` UUID string `json:"uuid"` VersionID int `json:"version_id"` Version string `json:"version"` Indices []string `json:"indices"` State string `json:"state"` Reason string `json:"reason"` StartTime time.Time `json:"start_time"` StartTimeInMillis int64 `json:"start_time_in_millis"` EndTime time.Time `json:"end_time"` EndTimeInMillis int64 `json:"end_time_in_millis"` DurationInMillis int64 `json:"duration_in_millis"` Failures []SnapshotShardFailure `json:"failures"` Shards *ShardsInfo `json:"shards"` }
Snapshot contains all information about a single snapshot
type SnapshotCreateRepositoryResponse ¶
type SnapshotCreateRepositoryResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
SnapshotCreateRepositoryResponse is the response of SnapshotCreateRepositoryService.Do.
type SnapshotCreateRepositoryService ¶
type SnapshotCreateRepositoryService struct {
// contains filtered or unexported fields
}
SnapshotCreateRepositoryService creates a snapshot repository. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
func NewSnapshotCreateRepositoryService ¶
func NewSnapshotCreateRepositoryService(client *Client) *SnapshotCreateRepositoryService
NewSnapshotCreateRepositoryService creates a new SnapshotCreateRepositoryService.
func (*SnapshotCreateRepositoryService) BodyJson ¶
func (s *SnapshotCreateRepositoryService) BodyJson(body interface{}) *SnapshotCreateRepositoryService
BodyJson is documented as: The repository definition.
func (*SnapshotCreateRepositoryService) BodyString ¶
func (s *SnapshotCreateRepositoryService) BodyString(body string) *SnapshotCreateRepositoryService
BodyString is documented as: The repository definition.
func (*SnapshotCreateRepositoryService) Do ¶
func (s *SnapshotCreateRepositoryService) Do(ctx context.Context) (*SnapshotCreateRepositoryResponse, error)
Do executes the operation.
func (*SnapshotCreateRepositoryService) ErrorTrace ¶
func (s *SnapshotCreateRepositoryService) ErrorTrace(errorTrace bool) *SnapshotCreateRepositoryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotCreateRepositoryService) FilterPath ¶
func (s *SnapshotCreateRepositoryService) FilterPath(filterPath ...string) *SnapshotCreateRepositoryService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotCreateRepositoryService) Header ¶
func (s *SnapshotCreateRepositoryService) Header(name string, value string) *SnapshotCreateRepositoryService
Header adds a header to the request.
func (*SnapshotCreateRepositoryService) Headers ¶
func (s *SnapshotCreateRepositoryService) Headers(headers http.Header) *SnapshotCreateRepositoryService
Headers specifies the headers of the request.
func (*SnapshotCreateRepositoryService) Human ¶
func (s *SnapshotCreateRepositoryService) Human(human bool) *SnapshotCreateRepositoryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotCreateRepositoryService) MasterTimeout ¶
func (s *SnapshotCreateRepositoryService) MasterTimeout(masterTimeout string) *SnapshotCreateRepositoryService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotCreateRepositoryService) Pretty ¶
func (s *SnapshotCreateRepositoryService) Pretty(pretty bool) *SnapshotCreateRepositoryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotCreateRepositoryService) Repository ¶
func (s *SnapshotCreateRepositoryService) Repository(repository string) *SnapshotCreateRepositoryService
Repository is the repository name.
func (*SnapshotCreateRepositoryService) Setting ¶
func (s *SnapshotCreateRepositoryService) Setting(name string, value interface{}) *SnapshotCreateRepositoryService
Setting sets a single settings of the snapshot repository.
func (*SnapshotCreateRepositoryService) Settings ¶
func (s *SnapshotCreateRepositoryService) Settings(settings map[string]interface{}) *SnapshotCreateRepositoryService
Settings sets all settings of the snapshot repository.
func (*SnapshotCreateRepositoryService) Timeout ¶
func (s *SnapshotCreateRepositoryService) Timeout(timeout string) *SnapshotCreateRepositoryService
Timeout is an explicit operation timeout.
func (*SnapshotCreateRepositoryService) Type ¶
func (s *SnapshotCreateRepositoryService) Type(typ string) *SnapshotCreateRepositoryService
Type sets the snapshot repository type, e.g. "fs".
func (*SnapshotCreateRepositoryService) Validate ¶
func (s *SnapshotCreateRepositoryService) Validate() error
Validate checks if the operation is valid.
func (*SnapshotCreateRepositoryService) Verify ¶
func (s *SnapshotCreateRepositoryService) Verify(verify bool) *SnapshotCreateRepositoryService
Verify indicates whether to verify the repository after creation.
type SnapshotCreateResponse ¶
type SnapshotCreateResponse struct { // Accepted indicates whether the request was accepted by elasticsearch. // It's available when waitForCompletion is false. Accepted *bool `json:"accepted"` // Snapshot is available when waitForCompletion is true. Snapshot *Snapshot `json:"snapshot"` }
SnapshotCreateResponse is the response of SnapshotCreateService.Do.
type SnapshotCreateService ¶
type SnapshotCreateService struct {
// contains filtered or unexported fields
}
SnapshotCreateService is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html.
func NewSnapshotCreateService ¶
func NewSnapshotCreateService(client *Client) *SnapshotCreateService
NewSnapshotCreateService creates a new SnapshotCreateService.
func (*SnapshotCreateService) BodyJson ¶
func (s *SnapshotCreateService) BodyJson(body interface{}) *SnapshotCreateService
BodyJson is documented as: The snapshot definition.
func (*SnapshotCreateService) BodyString ¶
func (s *SnapshotCreateService) BodyString(body string) *SnapshotCreateService
BodyString is documented as: The snapshot definition.
func (*SnapshotCreateService) Do ¶
func (s *SnapshotCreateService) Do(ctx context.Context) (*SnapshotCreateResponse, error)
Do executes the operation.
func (*SnapshotCreateService) ErrorTrace ¶
func (s *SnapshotCreateService) ErrorTrace(errorTrace bool) *SnapshotCreateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotCreateService) FilterPath ¶
func (s *SnapshotCreateService) FilterPath(filterPath ...string) *SnapshotCreateService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotCreateService) Header ¶
func (s *SnapshotCreateService) Header(name string, value string) *SnapshotCreateService
Header adds a header to the request.
func (*SnapshotCreateService) Headers ¶
func (s *SnapshotCreateService) Headers(headers http.Header) *SnapshotCreateService
Headers specifies the headers of the request.
func (*SnapshotCreateService) Human ¶
func (s *SnapshotCreateService) Human(human bool) *SnapshotCreateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotCreateService) MasterTimeout ¶
func (s *SnapshotCreateService) MasterTimeout(masterTimeout string) *SnapshotCreateService
MasterTimeout is documented as: Explicit operation timeout for connection to master node.
func (*SnapshotCreateService) Pretty ¶
func (s *SnapshotCreateService) Pretty(pretty bool) *SnapshotCreateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotCreateService) Repository ¶
func (s *SnapshotCreateService) Repository(repository string) *SnapshotCreateService
Repository is the repository name.
func (*SnapshotCreateService) Snapshot ¶
func (s *SnapshotCreateService) Snapshot(snapshot string) *SnapshotCreateService
Snapshot is the snapshot name.
func (*SnapshotCreateService) Validate ¶
func (s *SnapshotCreateService) Validate() error
Validate checks if the operation is valid.
func (*SnapshotCreateService) WaitForCompletion ¶
func (s *SnapshotCreateService) WaitForCompletion(waitForCompletion bool) *SnapshotCreateService
WaitForCompletion is documented as: Should this request wait until the operation has completed before returning.
type SnapshotDeleteRepositoryResponse ¶
type SnapshotDeleteRepositoryResponse struct { Acknowledged bool `json:"acknowledged"` ShardsAcknowledged bool `json:"shards_acknowledged"` Index string `json:"index,omitempty"` }
SnapshotDeleteRepositoryResponse is the response of SnapshotDeleteRepositoryService.Do.
type SnapshotDeleteRepositoryService ¶
type SnapshotDeleteRepositoryService struct {
// contains filtered or unexported fields
}
SnapshotDeleteRepositoryService deletes a snapshot repository. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
func NewSnapshotDeleteRepositoryService ¶
func NewSnapshotDeleteRepositoryService(client *Client) *SnapshotDeleteRepositoryService
NewSnapshotDeleteRepositoryService creates a new SnapshotDeleteRepositoryService.
func (*SnapshotDeleteRepositoryService) Do ¶
func (s *SnapshotDeleteRepositoryService) Do(ctx context.Context) (*SnapshotDeleteRepositoryResponse, error)
Do executes the operation.
func (*SnapshotDeleteRepositoryService) ErrorTrace ¶
func (s *SnapshotDeleteRepositoryService) ErrorTrace(errorTrace bool) *SnapshotDeleteRepositoryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotDeleteRepositoryService) FilterPath ¶
func (s *SnapshotDeleteRepositoryService) FilterPath(filterPath ...string) *SnapshotDeleteRepositoryService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotDeleteRepositoryService) Header ¶
func (s *SnapshotDeleteRepositoryService) Header(name string, value string) *SnapshotDeleteRepositoryService
Header adds a header to the request.
func (*SnapshotDeleteRepositoryService) Headers ¶
func (s *SnapshotDeleteRepositoryService) Headers(headers http.Header) *SnapshotDeleteRepositoryService
Headers specifies the headers of the request.
func (*SnapshotDeleteRepositoryService) Human ¶
func (s *SnapshotDeleteRepositoryService) Human(human bool) *SnapshotDeleteRepositoryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotDeleteRepositoryService) MasterTimeout ¶
func (s *SnapshotDeleteRepositoryService) MasterTimeout(masterTimeout string) *SnapshotDeleteRepositoryService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotDeleteRepositoryService) Pretty ¶
func (s *SnapshotDeleteRepositoryService) Pretty(pretty bool) *SnapshotDeleteRepositoryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotDeleteRepositoryService) Repository ¶
func (s *SnapshotDeleteRepositoryService) Repository(repositories ...string) *SnapshotDeleteRepositoryService
Repository is the list of repository names.
func (*SnapshotDeleteRepositoryService) Timeout ¶
func (s *SnapshotDeleteRepositoryService) Timeout(timeout string) *SnapshotDeleteRepositoryService
Timeout is an explicit operation timeout.
func (*SnapshotDeleteRepositoryService) Validate ¶
func (s *SnapshotDeleteRepositoryService) Validate() error
Validate checks if the operation is valid.
type SnapshotDeleteResponse ¶
type SnapshotDeleteResponse struct {
Acknowledged bool `json:"acknowledged"`
}
SnapshotDeleteResponse is the response of SnapshotDeleteService.Do.
type SnapshotDeleteService ¶
type SnapshotDeleteService struct {
// contains filtered or unexported fields
}
SnapshotDeleteService deletes a snapshot from a snapshot repository. It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html.
func NewSnapshotDeleteService ¶
func NewSnapshotDeleteService(client *Client) *SnapshotDeleteService
NewSnapshotDeleteService creates a new SnapshotDeleteService.
func (*SnapshotDeleteService) Do ¶
func (s *SnapshotDeleteService) Do(ctx context.Context) (*SnapshotDeleteResponse, error)
Do executes the operation.
func (*SnapshotDeleteService) ErrorTrace ¶
func (s *SnapshotDeleteService) ErrorTrace(errorTrace bool) *SnapshotDeleteService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotDeleteService) FilterPath ¶
func (s *SnapshotDeleteService) FilterPath(filterPath ...string) *SnapshotDeleteService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotDeleteService) Header ¶
func (s *SnapshotDeleteService) Header(name string, value string) *SnapshotDeleteService
Header adds a header to the request.
func (*SnapshotDeleteService) Headers ¶
func (s *SnapshotDeleteService) Headers(headers http.Header) *SnapshotDeleteService
Headers specifies the headers of the request.
func (*SnapshotDeleteService) Human ¶
func (s *SnapshotDeleteService) Human(human bool) *SnapshotDeleteService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotDeleteService) Pretty ¶
func (s *SnapshotDeleteService) Pretty(pretty bool) *SnapshotDeleteService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotDeleteService) Repository ¶
func (s *SnapshotDeleteService) Repository(repository string) *SnapshotDeleteService
Repository is the repository name.
func (*SnapshotDeleteService) Snapshot ¶
func (s *SnapshotDeleteService) Snapshot(snapshot string) *SnapshotDeleteService
Snapshot is the snapshot name.
func (*SnapshotDeleteService) Validate ¶
func (s *SnapshotDeleteService) Validate() error
Validate checks if the operation is valid.
type SnapshotGetRepositoryResponse ¶
type SnapshotGetRepositoryResponse map[string]*SnapshotRepositoryMetaData
SnapshotGetRepositoryResponse is the response of SnapshotGetRepositoryService.Do.
type SnapshotGetRepositoryService ¶
type SnapshotGetRepositoryService struct {
// contains filtered or unexported fields
}
SnapshotGetRepositoryService reads a snapshot repository. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
func NewSnapshotGetRepositoryService ¶
func NewSnapshotGetRepositoryService(client *Client) *SnapshotGetRepositoryService
NewSnapshotGetRepositoryService creates a new SnapshotGetRepositoryService.
func (*SnapshotGetRepositoryService) Do ¶
func (s *SnapshotGetRepositoryService) Do(ctx context.Context) (SnapshotGetRepositoryResponse, error)
Do executes the operation.
func (*SnapshotGetRepositoryService) ErrorTrace ¶
func (s *SnapshotGetRepositoryService) ErrorTrace(errorTrace bool) *SnapshotGetRepositoryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotGetRepositoryService) FilterPath ¶
func (s *SnapshotGetRepositoryService) FilterPath(filterPath ...string) *SnapshotGetRepositoryService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotGetRepositoryService) Header ¶
func (s *SnapshotGetRepositoryService) Header(name string, value string) *SnapshotGetRepositoryService
Header adds a header to the request.
func (*SnapshotGetRepositoryService) Headers ¶
func (s *SnapshotGetRepositoryService) Headers(headers http.Header) *SnapshotGetRepositoryService
Headers specifies the headers of the request.
func (*SnapshotGetRepositoryService) Human ¶
func (s *SnapshotGetRepositoryService) Human(human bool) *SnapshotGetRepositoryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotGetRepositoryService) Local ¶
func (s *SnapshotGetRepositoryService) Local(local bool) *SnapshotGetRepositoryService
Local indicates whether to return local information, i.e. do not retrieve the state from master node (default: false).
func (*SnapshotGetRepositoryService) MasterTimeout ¶
func (s *SnapshotGetRepositoryService) MasterTimeout(masterTimeout string) *SnapshotGetRepositoryService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotGetRepositoryService) Pretty ¶
func (s *SnapshotGetRepositoryService) Pretty(pretty bool) *SnapshotGetRepositoryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotGetRepositoryService) Repository ¶
func (s *SnapshotGetRepositoryService) Repository(repositories ...string) *SnapshotGetRepositoryService
Repository is the list of repository names.
func (*SnapshotGetRepositoryService) Validate ¶
func (s *SnapshotGetRepositoryService) Validate() error
Validate checks if the operation is valid.
type SnapshotGetResponse ¶
type SnapshotGetResponse struct {
Snapshots []*Snapshot `json:"snapshots"`
}
SnapshotGetResponse is the response of SnapshotGetService.Do.
type SnapshotGetService ¶
type SnapshotGetService struct {
// contains filtered or unexported fields
}
SnapshotGetService lists the snapshots on a repository See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
func NewSnapshotGetService ¶
func NewSnapshotGetService(client *Client) *SnapshotGetService
NewSnapshotGetService creates a new SnapshotGetService.
func (*SnapshotGetService) Do ¶
func (s *SnapshotGetService) Do(ctx context.Context) (*SnapshotGetResponse, error)
Do executes the operation.
func (*SnapshotGetService) ErrorTrace ¶
func (s *SnapshotGetService) ErrorTrace(errorTrace bool) *SnapshotGetService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotGetService) FilterPath ¶
func (s *SnapshotGetService) FilterPath(filterPath ...string) *SnapshotGetService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotGetService) Header ¶
func (s *SnapshotGetService) Header(name string, value string) *SnapshotGetService
Header adds a header to the request.
func (*SnapshotGetService) Headers ¶
func (s *SnapshotGetService) Headers(headers http.Header) *SnapshotGetService
Headers specifies the headers of the request.
func (*SnapshotGetService) Human ¶
func (s *SnapshotGetService) Human(human bool) *SnapshotGetService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotGetService) IgnoreUnavailable ¶
func (s *SnapshotGetService) IgnoreUnavailable(ignoreUnavailable bool) *SnapshotGetService
IgnoreUnavailable specifies whether to ignore unavailable snapshots, defaults to false
func (*SnapshotGetService) MasterTimeout ¶
func (s *SnapshotGetService) MasterTimeout(masterTimeout string) *SnapshotGetService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotGetService) Pretty ¶
func (s *SnapshotGetService) Pretty(pretty bool) *SnapshotGetService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotGetService) Repository ¶
func (s *SnapshotGetService) Repository(repository string) *SnapshotGetService
Repository is the repository name.
func (*SnapshotGetService) Snapshot ¶
func (s *SnapshotGetService) Snapshot(snapshots ...string) *SnapshotGetService
Snapshot is the list of snapshot names. If not set, defaults to all snapshots.
func (*SnapshotGetService) Validate ¶
func (s *SnapshotGetService) Validate() error
Validate checks if the operation is valid.
func (*SnapshotGetService) Verbose ¶
func (s *SnapshotGetService) Verbose(verbose bool) *SnapshotGetService
Verbose specifies whether to show verbose snapshot info or only show the basic info found in the repository index blob
type SnapshotIndexShardStatus ¶
type SnapshotIndexShardStatus struct { Stage string `json:"stage"` // initializing, started, finalize, done, or failed Stats SnapshotStats `json:"stats"` Node string `json:"node"` Reason string `json:"reason"` // reason for failure }
type SnapshotIndexStatus ¶
type SnapshotIndexStatus struct { ShardsStats SnapshotShardsStats `json:"shards_stats"` Stats SnapshotStats `json:"stats"` Shards map[string]SnapshotIndexShardStatus `json:"shards"` }
type SnapshotRepositoryMetaData ¶
type SnapshotRepositoryMetaData struct { Type string `json:"type"` Settings map[string]interface{} `json:"settings,omitempty"` }
SnapshotRepositoryMetaData contains all information about a single snapshot repository.
type SnapshotRestoreResponse ¶
type SnapshotRestoreResponse struct { // Accepted indicates whether the request was accepted by Elasticsearch. Accepted *bool `json:"accepted"` // Snapshot information. Snapshot *RestoreInfo `json:"snapshot"` }
SnapshotRestoreResponse represents the response for SnapshotRestoreService.Do
type SnapshotRestoreService ¶
type SnapshotRestoreService struct {
// contains filtered or unexported fields
}
SnapshotRestoreService restores a snapshot from a snapshot repository.
It is documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html#_restore.
func NewSnapshotRestoreService ¶
func NewSnapshotRestoreService(client *Client) *SnapshotRestoreService
NewSnapshotCreateService creates a new SnapshotRestoreService.
func (*SnapshotRestoreService) BodyString ¶
func (s *SnapshotRestoreService) BodyString(body string) *SnapshotRestoreService
BodyString allows the user to specify the body of the HTTP request manually.
func (*SnapshotRestoreService) Do ¶
func (s *SnapshotRestoreService) Do(ctx context.Context) (*SnapshotRestoreResponse, error)
Do executes the operation.
func (*SnapshotRestoreService) ErrorTrace ¶
func (s *SnapshotRestoreService) ErrorTrace(errorTrace bool) *SnapshotRestoreService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotRestoreService) FilterPath ¶
func (s *SnapshotRestoreService) FilterPath(filterPath ...string) *SnapshotRestoreService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotRestoreService) Header ¶
func (s *SnapshotRestoreService) Header(name string, value string) *SnapshotRestoreService
Header adds a header to the request.
func (*SnapshotRestoreService) Headers ¶
func (s *SnapshotRestoreService) Headers(headers http.Header) *SnapshotRestoreService
Headers specifies the headers of the request.
func (*SnapshotRestoreService) Human ¶
func (s *SnapshotRestoreService) Human(human bool) *SnapshotRestoreService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotRestoreService) IgnoreUnavailable ¶
func (s *SnapshotRestoreService) IgnoreUnavailable(ignoreUnavailable bool) *SnapshotRestoreService
IgnoreUnavailable specifies whether to ignore unavailable snapshots, defaults to false.
func (*SnapshotRestoreService) IncludeAliases ¶
func (s *SnapshotRestoreService) IncludeAliases(includeAliases bool) *SnapshotRestoreService
IncludeAliases flags whether indices should be restored with their respective aliases, defaults to false.
func (*SnapshotRestoreService) IncludeGlobalState ¶
func (s *SnapshotRestoreService) IncludeGlobalState(includeGlobalState bool) *SnapshotRestoreService
IncludeGlobalState allows the global cluster state to be restored, defaults to false.
func (*SnapshotRestoreService) IndexSettings ¶
func (s *SnapshotRestoreService) IndexSettings(indexSettings map[string]interface{}) *SnapshotRestoreService
IndexSettings sets the settings to be overwritten during the restore process
func (*SnapshotRestoreService) Indices ¶
func (s *SnapshotRestoreService) Indices(indices ...string) *SnapshotRestoreService
Indices sets the name of the indices that should be restored from the snapshot.
func (*SnapshotRestoreService) MasterTimeout ¶
func (s *SnapshotRestoreService) MasterTimeout(masterTimeout string) *SnapshotRestoreService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotRestoreService) Partial ¶
func (s *SnapshotRestoreService) Partial(partial bool) *SnapshotRestoreService
Partial indicates whether to restore indices that where partially snapshoted, defaults to false.
func (*SnapshotRestoreService) Pretty ¶
func (s *SnapshotRestoreService) Pretty(pretty bool) *SnapshotRestoreService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotRestoreService) RenamePattern ¶
func (s *SnapshotRestoreService) RenamePattern(renamePattern string) *SnapshotRestoreService
RenamePattern helps rename indices on restore using regular expressions.
func (*SnapshotRestoreService) RenameReplacement ¶
func (s *SnapshotRestoreService) RenameReplacement(renameReplacement string) *SnapshotRestoreService
RenameReplacement as RenamePattern, helps rename indices on restore using regular expressions.
func (*SnapshotRestoreService) Repository ¶
func (s *SnapshotRestoreService) Repository(repository string) *SnapshotRestoreService
Repository name.
func (*SnapshotRestoreService) Snapshot ¶
func (s *SnapshotRestoreService) Snapshot(snapshot string) *SnapshotRestoreService
Snapshot name.
func (*SnapshotRestoreService) Validate ¶
func (s *SnapshotRestoreService) Validate() error
Validate checks if the operation is valid.
func (*SnapshotRestoreService) WaitForCompletion ¶
func (s *SnapshotRestoreService) WaitForCompletion(waitForCompletion bool) *SnapshotRestoreService
WaitForCompletion indicates whether this request should wait until the operation has completed before returning.
type SnapshotShardFailure ¶
type SnapshotShardFailure struct { Index string `json:"index"` IndexUUID string `json:"index_uuid"` ShardID int `json:"shard_id"` Reason string `json:"reason"` NodeID string `json:"node_id"` Status string `json:"status"` }
SnapshotShardFailure stores information about failures that occurred during shard snapshotting process.
type SnapshotShardsStats ¶
type SnapshotStats ¶
type SnapshotStats struct { Incremental struct { FileCount int `json:"file_count"` Size string `json:"size"` SizeInBytes int64 `json:"size_in_bytes"` } `json:"incremental"` Processed struct { FileCount int `json:"file_count"` Size string `json:"size"` SizeInBytes int64 `json:"size_in_bytes"` } `json:"processed"` Total struct { FileCount int `json:"file_count"` Size string `json:"size"` SizeInBytes int64 `json:"size_in_bytes"` } `json:"total"` StartTime string `json:"start_time"` StartTimeInMillis int64 `json:"start_time_in_millis"` Time string `json:"time"` TimeInMillis int64 `json:"time_in_millis"` NumberOfFiles int `json:"number_of_files"` ProcessedFiles int `json:"processed_files"` TotalSize string `json:"total_size"` TotalSizeInBytes int64 `json:"total_size_in_bytes"` }
type SnapshotStatus ¶
type SnapshotStatus struct { Snapshot string `json:"snapshot"` Repository string `json:"repository"` UUID string `json:"uuid"` State string `json:"state"` IncludeGlobalState bool `json:"include_global_state"` ShardsStats SnapshotShardsStats `json:"shards_stats"` Stats SnapshotStats `json:"stats"` Indices map[string]SnapshotIndexStatus `json:"indices"` }
type SnapshotStatusResponse ¶
type SnapshotStatusResponse struct {
Snapshots []SnapshotStatus `json:"snapshots"`
}
type SnapshotStatusService ¶
type SnapshotStatusService struct {
// contains filtered or unexported fields
}
SnapshotStatusService returns information about the status of a snapshot.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html for details.
func NewSnapshotStatusService ¶
func NewSnapshotStatusService(client *Client) *SnapshotStatusService
NewSnapshotStatusService creates a new SnapshotStatusService.
func (*SnapshotStatusService) Do ¶
func (s *SnapshotStatusService) Do(ctx context.Context) (*SnapshotStatusResponse, error)
Do executes the operation.
func (*SnapshotStatusService) ErrorTrace ¶
func (s *SnapshotStatusService) ErrorTrace(errorTrace bool) *SnapshotStatusService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotStatusService) FilterPath ¶
func (s *SnapshotStatusService) FilterPath(filterPath ...string) *SnapshotStatusService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotStatusService) Header ¶
func (s *SnapshotStatusService) Header(name string, value string) *SnapshotStatusService
Header adds a header to the request.
func (*SnapshotStatusService) Headers ¶
func (s *SnapshotStatusService) Headers(headers http.Header) *SnapshotStatusService
Headers specifies the headers of the request.
func (*SnapshotStatusService) Human ¶
func (s *SnapshotStatusService) Human(human bool) *SnapshotStatusService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotStatusService) MasterTimeout ¶
func (s *SnapshotStatusService) MasterTimeout(masterTimeout string) *SnapshotStatusService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*SnapshotStatusService) Pretty ¶
func (s *SnapshotStatusService) Pretty(pretty bool) *SnapshotStatusService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotStatusService) Repository ¶
func (s *SnapshotStatusService) Repository(repository string) *SnapshotStatusService
Repository is the repository name.
func (*SnapshotStatusService) Snapshot ¶
func (s *SnapshotStatusService) Snapshot(snapshots ...string) *SnapshotStatusService
Snapshot is the list of snapshot names. If not set, defaults to all snapshots.
func (*SnapshotStatusService) Validate ¶
func (s *SnapshotStatusService) Validate() error
Validate checks if the operation is valid.
Validation only fails if snapshot names were provided but no repository was provided.
type SnapshotVerifyRepositoryNode ¶
type SnapshotVerifyRepositoryNode struct {
Name string `json:"name"`
}
type SnapshotVerifyRepositoryResponse ¶
type SnapshotVerifyRepositoryResponse struct {
Nodes map[string]*SnapshotVerifyRepositoryNode `json:"nodes"`
}
SnapshotVerifyRepositoryResponse is the response of SnapshotVerifyRepositoryService.Do.
type SnapshotVerifyRepositoryService ¶
type SnapshotVerifyRepositoryService struct {
// contains filtered or unexported fields
}
SnapshotVerifyRepositoryService verifies a snapshop repository. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html for details.
func NewSnapshotVerifyRepositoryService ¶
func NewSnapshotVerifyRepositoryService(client *Client) *SnapshotVerifyRepositoryService
NewSnapshotVerifyRepositoryService creates a new SnapshotVerifyRepositoryService.
func (*SnapshotVerifyRepositoryService) Do ¶
func (s *SnapshotVerifyRepositoryService) Do(ctx context.Context) (*SnapshotVerifyRepositoryResponse, error)
Do executes the operation.
func (*SnapshotVerifyRepositoryService) ErrorTrace ¶
func (s *SnapshotVerifyRepositoryService) ErrorTrace(errorTrace bool) *SnapshotVerifyRepositoryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*SnapshotVerifyRepositoryService) FilterPath ¶
func (s *SnapshotVerifyRepositoryService) FilterPath(filterPath ...string) *SnapshotVerifyRepositoryService
FilterPath specifies a list of filters used to reduce the response.
func (*SnapshotVerifyRepositoryService) Header ¶
func (s *SnapshotVerifyRepositoryService) Header(name string, value string) *SnapshotVerifyRepositoryService
Header adds a header to the request.
func (*SnapshotVerifyRepositoryService) Headers ¶
func (s *SnapshotVerifyRepositoryService) Headers(headers http.Header) *SnapshotVerifyRepositoryService
Headers specifies the headers of the request.
func (*SnapshotVerifyRepositoryService) Human ¶
func (s *SnapshotVerifyRepositoryService) Human(human bool) *SnapshotVerifyRepositoryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*SnapshotVerifyRepositoryService) MasterTimeout ¶
func (s *SnapshotVerifyRepositoryService) MasterTimeout(masterTimeout string) *SnapshotVerifyRepositoryService
MasterTimeout is the explicit operation timeout for connection to master node.
func (*SnapshotVerifyRepositoryService) Pretty ¶
func (s *SnapshotVerifyRepositoryService) Pretty(pretty bool) *SnapshotVerifyRepositoryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*SnapshotVerifyRepositoryService) Repository ¶
func (s *SnapshotVerifyRepositoryService) Repository(repository string) *SnapshotVerifyRepositoryService
Repository specifies the repository name.
func (*SnapshotVerifyRepositoryService) Timeout ¶
func (s *SnapshotVerifyRepositoryService) Timeout(timeout string) *SnapshotVerifyRepositoryService
Timeout is an explicit operation timeout.
func (*SnapshotVerifyRepositoryService) Validate ¶
func (s *SnapshotVerifyRepositoryService) Validate() error
Validate checks if the operation is valid.
type SnifferCallback ¶
type SnifferCallback func(*NodesInfoNode) bool
SnifferCallback defines the protocol for sniffing decisions.
type SortByDoc ¶
type SortByDoc struct {
Sorter
}
SortByDoc sorts by the "_doc" field, as described in https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-scroll.html.
Example:
ss := elastic.NewSearchSource() ss = ss.SortBy(elastic.SortByDoc{})
type SortInfo ¶
type SortInfo struct { Sorter Field string Ascending bool Missing interface{} IgnoreUnmapped *bool UnmappedType string SortMode string NestedFilter Query // deprecated in 6.1 and replaced by Filter Filter Query NestedPath string // deprecated in 6.1 and replaced by Path Path string NestedSort *NestedSort // deprecated in 6.1 and replaced by Nested Nested *NestedSort }
SortInfo contains information about sorting a field.
type Sorter ¶
type Sorter interface {
Source() (interface{}, error)
}
Sorter is an interface for sorting strategies, e.g. ScoreSort or FieldSort. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-sort.html.
type SpanFirstQuery ¶
type SpanFirstQuery struct {
// contains filtered or unexported fields
}
SpanFirstQuery spans near the beginning of a field. The span first query maps to Lucene SpanFirstQuery
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-span-first-query.html for details.
func NewSpanFirstQuery ¶
func NewSpanFirstQuery(query Query, end int) *SpanFirstQuery
NewSpanFirstQuery creates a new SpanFirstQuery.
func (*SpanFirstQuery) Boost ¶
func (q *SpanFirstQuery) Boost(boost float64) *SpanFirstQuery
Boost sets the boost for this query.
func (*SpanFirstQuery) End ¶
func (q *SpanFirstQuery) End(end int) *SpanFirstQuery
End specifies the maximum end position of the match, which needs to be positive.
func (*SpanFirstQuery) Match ¶
func (q *SpanFirstQuery) Match(query Query) *SpanFirstQuery
Match sets the query, e.g. a SpanTermQuery.
func (*SpanFirstQuery) QueryName ¶
func (q *SpanFirstQuery) QueryName(queryName string) *SpanFirstQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanFirstQuery) Source ¶
func (q *SpanFirstQuery) Source() (interface{}, error)
Source returns the JSON body.
type SpanNearQuery ¶
type SpanNearQuery struct {
// contains filtered or unexported fields
}
SpanNearQuery matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order. The span near query maps to Lucene SpanNearQuery.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-span-near-query.html for details.
func NewSpanNearQuery ¶
func NewSpanNearQuery(clauses ...Query) *SpanNearQuery
NewSpanNearQuery creates a new SpanNearQuery.
func (*SpanNearQuery) Add ¶
func (q *SpanNearQuery) Add(clauses ...Query) *SpanNearQuery
Add clauses to use in the query.
func (*SpanNearQuery) Boost ¶
func (q *SpanNearQuery) Boost(boost float64) *SpanNearQuery
Boost sets the boost for this query.
func (*SpanNearQuery) Clauses ¶
func (q *SpanNearQuery) Clauses(clauses ...Query) *SpanNearQuery
Clauses to use in the query.
func (*SpanNearQuery) InOrder ¶
func (q *SpanNearQuery) InOrder(inOrder bool) *SpanNearQuery
InOrder, when true, the spans from each clause must be in the same order as in Clauses and must be non-overlapping. Defaults to true.
func (*SpanNearQuery) QueryName ¶
func (q *SpanNearQuery) QueryName(queryName string) *SpanNearQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanNearQuery) Slop ¶
func (q *SpanNearQuery) Slop(slop int) *SpanNearQuery
Slop controls the maximum number of intervening unmatched positions permitted.
func (*SpanNearQuery) Source ¶
func (q *SpanNearQuery) Source() (interface{}, error)
Source returns the JSON body.
type SpanTermQuery ¶
type SpanTermQuery struct {
// contains filtered or unexported fields
}
SpanTermQuery matches spans containing a term. The span term query maps to Lucene SpanTermQuery.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-span-term-query.html for details.
func NewSpanTermQuery ¶
func NewSpanTermQuery(field string, value ...interface{}) *SpanTermQuery
NewSpanTermQuery creates a new SpanTermQuery. When passing values, the first one is used to initialize the value.
func (*SpanTermQuery) Boost ¶
func (q *SpanTermQuery) Boost(boost float64) *SpanTermQuery
Boost sets the boost for this query.
func (*SpanTermQuery) Field ¶
func (q *SpanTermQuery) Field(field string) *SpanTermQuery
Field name to match the term against.
func (*SpanTermQuery) QueryName ¶
func (q *SpanTermQuery) QueryName(queryName string) *SpanTermQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit.
func (*SpanTermQuery) Source ¶
func (q *SpanTermQuery) Source() (interface{}, error)
Source returns the JSON body.
func (*SpanTermQuery) Value ¶
func (q *SpanTermQuery) Value(value interface{}) *SpanTermQuery
Value of the term.
type StartTaskResult ¶
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.
type StatsAggregation ¶
type StatsAggregation struct {
// contains filtered or unexported fields
}
StatsAggregation is a multi-value metrics aggregation that computes stats over numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-stats-aggregation.html
func NewStatsAggregation ¶
func NewStatsAggregation() *StatsAggregation
func (*StatsAggregation) Field ¶
func (a *StatsAggregation) Field(field string) *StatsAggregation
func (*StatsAggregation) Format ¶
func (a *StatsAggregation) Format(format string) *StatsAggregation
func (*StatsAggregation) Meta ¶
func (a *StatsAggregation) Meta(metaData map[string]interface{}) *StatsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*StatsAggregation) Missing ¶
func (a *StatsAggregation) Missing(missing interface{}) *StatsAggregation
func (*StatsAggregation) Script ¶
func (a *StatsAggregation) Script(script *Script) *StatsAggregation
func (*StatsAggregation) Source ¶
func (a *StatsAggregation) Source() (interface{}, error)
func (*StatsAggregation) SubAggregation ¶
func (a *StatsAggregation) SubAggregation(name string, subAggregation Aggregation) *StatsAggregation
type StatsBucketAggregation ¶
type StatsBucketAggregation struct {
// contains filtered or unexported fields
}
StatsBucketAggregation is a sibling pipeline aggregation which calculates a variety of stats across all bucket of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-stats-bucket-aggregation.html
func NewStatsBucketAggregation ¶
func NewStatsBucketAggregation() *StatsBucketAggregation
NewStatsBucketAggregation creates and initializes a new StatsBucketAggregation.
func (*StatsBucketAggregation) BucketsPath ¶
func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*StatsBucketAggregation) Format ¶
func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation
Format to use on the output of this aggregation.
func (*StatsBucketAggregation) GapInsertZeros ¶
func (s *StatsBucketAggregation) GapInsertZeros() *StatsBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*StatsBucketAggregation) GapPolicy ¶
func (s *StatsBucketAggregation) GapPolicy(gapPolicy string) *StatsBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*StatsBucketAggregation) GapSkip ¶
func (s *StatsBucketAggregation) GapSkip() *StatsBucketAggregation
GapSkip skips gaps in the series.
func (*StatsBucketAggregation) Meta ¶
func (s *StatsBucketAggregation) Meta(metaData map[string]interface{}) *StatsBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*StatsBucketAggregation) Source ¶
func (s *StatsBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type StopBackoff ¶
type StopBackoff struct{}
StopBackoff is a fixed backoff policy that always returns false for Next(), meaning that the operation should never be retried.
type StopRetrier ¶
type StopRetrier struct { }
StopRetrier is an implementation that does no retries.
func NewStopRetrier ¶
func NewStopRetrier() *StopRetrier
NewStopRetrier returns a retrier that does no retries.
type StupidBackoffSmoothingModel ¶
type StupidBackoffSmoothingModel struct {
// contains filtered or unexported fields
}
StupidBackoffSmoothingModel implements a stupid backoff smoothing model. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html#_smoothing_models for details about smoothing models.
func NewStupidBackoffSmoothingModel ¶
func NewStupidBackoffSmoothingModel(discount float64) *StupidBackoffSmoothingModel
func (*StupidBackoffSmoothingModel) Source ¶
func (sm *StupidBackoffSmoothingModel) Source() (interface{}, error)
func (*StupidBackoffSmoothingModel) Type ¶
func (sm *StupidBackoffSmoothingModel) Type() string
type SuggestField ¶
type SuggestField struct {
// contains filtered or unexported fields
}
SuggestField can be used by the caller to specify a suggest field at index time. For a detailed example, see e.g. https://www.elastic.co/blog/you-complete-me.
func NewSuggestField ¶
func NewSuggestField(input ...string) *SuggestField
func (*SuggestField) ContextQuery ¶
func (f *SuggestField) ContextQuery(queries ...SuggesterContextQuery) *SuggestField
func (*SuggestField) Input ¶
func (f *SuggestField) Input(input ...string) *SuggestField
func (*SuggestField) MarshalJSON ¶
func (f *SuggestField) MarshalJSON() ([]byte, error)
MarshalJSON encodes SuggestField into JSON.
func (*SuggestField) Weight ¶
func (f *SuggestField) Weight(weight int) *SuggestField
type Suggester ¶
Represents the generic suggester interface. A suggester's only purpose is to return the source of the query as a JSON-serializable object. Returning a map[string]interface{} will do.
type SuggesterCategoryIndex ¶
type SuggesterCategoryIndex struct {
// contains filtered or unexported fields
}
func NewSuggesterCategoryIndex ¶
func NewSuggesterCategoryIndex(name string, values ...string) *SuggesterCategoryIndex
NewSuggesterCategoryIndex creates a new SuggesterCategoryIndex.
func (*SuggesterCategoryIndex) Source ¶
func (q *SuggesterCategoryIndex) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
func (*SuggesterCategoryIndex) Values ¶
func (q *SuggesterCategoryIndex) Values(values ...string) *SuggesterCategoryIndex
type SuggesterCategoryMapping ¶
type SuggesterCategoryMapping struct {
// contains filtered or unexported fields
}
SuggesterCategoryMapping provides a mapping for a category context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/suggester-context.html#_category_mapping.
func NewSuggesterCategoryMapping ¶
func NewSuggesterCategoryMapping(name string) *SuggesterCategoryMapping
NewSuggesterCategoryMapping creates a new SuggesterCategoryMapping.
func (*SuggesterCategoryMapping) DefaultValues ¶
func (q *SuggesterCategoryMapping) DefaultValues(values ...string) *SuggesterCategoryMapping
func (*SuggesterCategoryMapping) FieldName ¶
func (q *SuggesterCategoryMapping) FieldName(fieldName string) *SuggesterCategoryMapping
func (*SuggesterCategoryMapping) Source ¶
func (q *SuggesterCategoryMapping) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterCategoryQuery ¶
type SuggesterCategoryQuery struct {
// contains filtered or unexported fields
}
SuggesterCategoryQuery provides querying a category context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/suggester-context.html#_category_query.
func NewSuggesterCategoryQuery ¶
func NewSuggesterCategoryQuery(name string, values ...string) *SuggesterCategoryQuery
NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
func (*SuggesterCategoryQuery) Source ¶
func (q *SuggesterCategoryQuery) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
func (*SuggesterCategoryQuery) Value ¶
func (q *SuggesterCategoryQuery) Value(val string) *SuggesterCategoryQuery
func (*SuggesterCategoryQuery) ValueWithBoost ¶
func (q *SuggesterCategoryQuery) ValueWithBoost(val string, boost int) *SuggesterCategoryQuery
func (*SuggesterCategoryQuery) Values ¶
func (q *SuggesterCategoryQuery) Values(values ...string) *SuggesterCategoryQuery
type SuggesterContextQuery ¶
type SuggesterContextQuery interface {
Source() (interface{}, error)
}
SuggesterContextQuery is used to define context information within a suggestion request.
type SuggesterGeoIndex ¶
type SuggesterGeoIndex struct {
// contains filtered or unexported fields
}
func NewSuggesterGeoIndex ¶
func NewSuggesterGeoIndex(name string) *SuggesterGeoIndex
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
func (*SuggesterGeoIndex) Locations ¶
func (q *SuggesterGeoIndex) Locations(locations ...*GeoPoint) *SuggesterGeoIndex
func (*SuggesterGeoIndex) Source ¶
func (q *SuggesterGeoIndex) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterGeoMapping ¶
type SuggesterGeoMapping struct {
// contains filtered or unexported fields
}
SuggesterGeoMapping provides a mapping for a geolocation context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/suggester-context.html#_geo_location_mapping.
func NewSuggesterGeoMapping ¶
func NewSuggesterGeoMapping(name string) *SuggesterGeoMapping
NewSuggesterGeoMapping creates a new SuggesterGeoMapping.
func (*SuggesterGeoMapping) DefaultLocations ¶
func (q *SuggesterGeoMapping) DefaultLocations(locations ...*GeoPoint) *SuggesterGeoMapping
func (*SuggesterGeoMapping) FieldName ¶
func (q *SuggesterGeoMapping) FieldName(fieldName string) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Neighbors ¶
func (q *SuggesterGeoMapping) Neighbors(neighbors bool) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Precision ¶
func (q *SuggesterGeoMapping) Precision(precision ...string) *SuggesterGeoMapping
func (*SuggesterGeoMapping) Source ¶
func (q *SuggesterGeoMapping) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SuggesterGeoQuery ¶
type SuggesterGeoQuery struct {
// contains filtered or unexported fields
}
SuggesterGeoQuery provides querying a geolocation context in a suggester. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/suggester-context.html#_geo_location_query
func NewSuggesterGeoQuery ¶
func NewSuggesterGeoQuery(name string, location *GeoPoint) *SuggesterGeoQuery
NewSuggesterGeoQuery creates a new SuggesterGeoQuery.
func (*SuggesterGeoQuery) Boost ¶
func (q *SuggesterGeoQuery) Boost(boost int) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Neighbours ¶
func (q *SuggesterGeoQuery) Neighbours(neighbours ...string) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Precision ¶
func (q *SuggesterGeoQuery) Precision(precision string) *SuggesterGeoQuery
func (*SuggesterGeoQuery) Source ¶
func (q *SuggesterGeoQuery) Source() (interface{}, error)
Source returns a map that will be used to serialize the context query as JSON.
type SumAggregation ¶
type SumAggregation struct {
// contains filtered or unexported fields
}
SumAggregation is a single-value metrics aggregation that sums up numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-sum-aggregation.html
func NewSumAggregation ¶
func NewSumAggregation() *SumAggregation
func (*SumAggregation) Field ¶
func (a *SumAggregation) Field(field string) *SumAggregation
func (*SumAggregation) Format ¶
func (a *SumAggregation) Format(format string) *SumAggregation
func (*SumAggregation) Meta ¶
func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SumAggregation) Missing ¶
func (a *SumAggregation) Missing(missing interface{}) *SumAggregation
func (*SumAggregation) Script ¶
func (a *SumAggregation) Script(script *Script) *SumAggregation
func (*SumAggregation) Source ¶
func (a *SumAggregation) Source() (interface{}, error)
func (*SumAggregation) SubAggregation ¶
func (a *SumAggregation) SubAggregation(name string, subAggregation Aggregation) *SumAggregation
type SumBucketAggregation ¶
type SumBucketAggregation struct {
// contains filtered or unexported fields
}
SumBucketAggregation is a sibling pipeline aggregation which calculates the sum across all buckets of a specified metric in a sibling aggregation. The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-pipeline-sum-bucket-aggregation.html
func NewSumBucketAggregation ¶
func NewSumBucketAggregation() *SumBucketAggregation
NewSumBucketAggregation creates and initializes a new SumBucketAggregation.
func (*SumBucketAggregation) BucketsPath ¶
func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAggregation
BucketsPath sets the paths to the buckets to use for this pipeline aggregator.
func (*SumBucketAggregation) Format ¶
func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation
Format to use on the output of this aggregation.
func (*SumBucketAggregation) GapInsertZeros ¶
func (a *SumBucketAggregation) GapInsertZeros() *SumBucketAggregation
GapInsertZeros inserts zeros for gaps in the series.
func (*SumBucketAggregation) GapPolicy ¶
func (a *SumBucketAggregation) GapPolicy(gapPolicy string) *SumBucketAggregation
GapPolicy defines what should be done when a gap in the series is discovered. Valid values include "insert_zeros" or "skip". Default is "insert_zeros".
func (*SumBucketAggregation) GapSkip ¶
func (a *SumBucketAggregation) GapSkip() *SumBucketAggregation
GapSkip skips gaps in the series.
func (*SumBucketAggregation) Meta ¶
func (a *SumBucketAggregation) Meta(metaData map[string]interface{}) *SumBucketAggregation
Meta sets the meta data to be included in the aggregation response.
func (*SumBucketAggregation) Source ¶
func (a *SumBucketAggregation) Source() (interface{}, error)
Source returns the a JSON-serializable interface.
type TaskInfo ¶
type TaskInfo struct { Node string `json:"node"` Id int64 `json:"id"` // the task id (yes, this is a long in the Java source) Type string `json:"type"` Action string `json:"action"` Status interface{} `json:"status"` // has separate implementations of Task.Status in Java for reindexing, replication, and "RawTaskStatus" Description interface{} `json:"description"` // same as Status StartTime string `json:"start_time"` StartTimeInMillis int64 `json:"start_time_in_millis"` RunningTime string `json:"running_time"` RunningTimeInNanos int64 `json:"running_time_in_nanos"` Cancellable bool `json:"cancellable"` ParentTaskId string `json:"parent_task_id"` // like "YxJnVYjwSBm_AUbzddTajQ:12356" Headers map[string]string `json:"headers"` }
TaskInfo represents information about a currently running task.
type TaskOperationFailure ¶
type TaskOperationFailure struct { TaskId int64 `json:"task_id"` // this is a long in the Java source NodeId string `json:"node_id"` Status string `json:"status"` Reason *ErrorDetails `json:"reason"` }
type TasksCancelService ¶
type TasksCancelService struct {
// contains filtered or unexported fields
}
TasksCancelService can cancel long-running tasks. It is supported as of Elasticsearch 2.3.0.
See http://www.elastic.co/guide/en/elasticsearch/reference/5.2/tasks-cancel.html for details.
func NewTasksCancelService ¶
func NewTasksCancelService(client *Client) *TasksCancelService
NewTasksCancelService creates a new TasksCancelService.
func (*TasksCancelService) Actions ¶
func (s *TasksCancelService) Actions(actions ...string) *TasksCancelService
Actions is a list of actions that should be cancelled. Leave empty to cancel all.
func (*TasksCancelService) Do ¶
func (s *TasksCancelService) Do(ctx context.Context) (*TasksListResponse, error)
Do executes the operation.
func (*TasksCancelService) ErrorTrace ¶
func (s *TasksCancelService) ErrorTrace(errorTrace bool) *TasksCancelService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*TasksCancelService) FilterPath ¶
func (s *TasksCancelService) FilterPath(filterPath ...string) *TasksCancelService
FilterPath specifies a list of filters used to reduce the response.
func (*TasksCancelService) Header ¶
func (s *TasksCancelService) Header(name string, value string) *TasksCancelService
Header adds a header to the request.
func (*TasksCancelService) Headers ¶
func (s *TasksCancelService) Headers(headers http.Header) *TasksCancelService
Headers specifies the headers of the request.
func (*TasksCancelService) Human ¶
func (s *TasksCancelService) Human(human bool) *TasksCancelService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*TasksCancelService) NodeId ¶
func (s *TasksCancelService) NodeId(nodeId ...string) *TasksCancelService
NodeId is a list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
func (*TasksCancelService) ParentTaskId ¶
func (s *TasksCancelService) ParentTaskId(parentTaskId string) *TasksCancelService
ParentTaskId specifies to cancel tasks with specified parent task id. Notice that the caller is responsible for using the correct format, i.e. node_id:task_number, as specified in the REST API.
func (*TasksCancelService) ParentTaskIdFromNodeAndId ¶
func (s *TasksCancelService) ParentTaskIdFromNodeAndId(nodeId string, id int64) *TasksCancelService
ParentTaskIdFromNodeAndId specifies to cancel tasks with specified parent task id.
func (*TasksCancelService) Pretty ¶
func (s *TasksCancelService) Pretty(pretty bool) *TasksCancelService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*TasksCancelService) TaskId ¶
func (s *TasksCancelService) TaskId(taskId string) *TasksCancelService
TaskId specifies the task to cancel. Notice that the caller is responsible for using the correct format, i.e. node_id:task_number, as specified in the REST API.
func (*TasksCancelService) TaskIdFromNodeAndId ¶
func (s *TasksCancelService) TaskIdFromNodeAndId(nodeId string, id int64) *TasksCancelService
TaskIdFromNodeAndId specifies the task to cancel. Set id to -1 for all tasks.
func (*TasksCancelService) Validate ¶
func (s *TasksCancelService) Validate() error
Validate checks if the operation is valid.
type TasksGetTaskResponse ¶
type TasksGetTaskService ¶
type TasksGetTaskService struct {
// contains filtered or unexported fields
}
TasksGetTaskService retrieves the state of a task in the cluster. It is part of the Task Management API documented at http://www.elastic.co/guide/en/elasticsearch/reference/5.2/tasks-list.html.
It is supported as of Elasticsearch 2.3.0.
func NewTasksGetTaskService ¶
func NewTasksGetTaskService(client *Client) *TasksGetTaskService
NewTasksGetTaskService creates a new TasksGetTaskService.
func (*TasksGetTaskService) Do ¶
func (s *TasksGetTaskService) Do(ctx context.Context) (*TasksGetTaskResponse, error)
Do executes the operation.
func (*TasksGetTaskService) ErrorTrace ¶
func (s *TasksGetTaskService) ErrorTrace(errorTrace bool) *TasksGetTaskService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*TasksGetTaskService) FilterPath ¶
func (s *TasksGetTaskService) FilterPath(filterPath ...string) *TasksGetTaskService
FilterPath specifies a list of filters used to reduce the response.
func (*TasksGetTaskService) Header ¶
func (s *TasksGetTaskService) Header(name string, value string) *TasksGetTaskService
Header adds a header to the request.
func (*TasksGetTaskService) Headers ¶
func (s *TasksGetTaskService) Headers(headers http.Header) *TasksGetTaskService
Headers specifies the headers of the request.
func (*TasksGetTaskService) Human ¶
func (s *TasksGetTaskService) Human(human bool) *TasksGetTaskService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*TasksGetTaskService) Pretty ¶
func (s *TasksGetTaskService) Pretty(pretty bool) *TasksGetTaskService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*TasksGetTaskService) TaskId ¶
func (s *TasksGetTaskService) TaskId(taskId string) *TasksGetTaskService
TaskId specifies the task to return. Notice that the caller is responsible for using the correct format, i.e. node_id:task_number, as specified in the REST API.
func (*TasksGetTaskService) TaskIdFromNodeAndId ¶
func (s *TasksGetTaskService) TaskIdFromNodeAndId(nodeId string, id int64) *TasksGetTaskService
TaskIdFromNodeAndId indicates to return the task on the given node with specified id.
func (*TasksGetTaskService) Validate ¶
func (s *TasksGetTaskService) Validate() error
Validate checks if the operation is valid.
func (*TasksGetTaskService) WaitForCompletion ¶
func (s *TasksGetTaskService) WaitForCompletion(waitForCompletion bool) *TasksGetTaskService
WaitForCompletion indicates whether to wait for the matching tasks to complete (default: false).
type TasksListResponse ¶
type TasksListResponse struct { Header http.Header `json:"-"` TaskFailures []*TaskOperationFailure `json:"task_failures"` NodeFailures []*FailedNodeException `json:"node_failures"` // Nodes returns the tasks per node. The key is the node id. Nodes map[string]*DiscoveryNode `json:"nodes"` }
TasksListResponse is the response of TasksListService.Do.
type TasksListService ¶
type TasksListService struct {
// contains filtered or unexported fields
}
TasksListService retrieves the list of currently executing tasks on one ore more nodes in the cluster. It is part of the Task Management API documented at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/tasks.html.
It is supported as of Elasticsearch 2.3.0.
func NewTasksListService ¶
func NewTasksListService(client *Client) *TasksListService
NewTasksListService creates a new TasksListService.
func (*TasksListService) Actions ¶
func (s *TasksListService) Actions(actions ...string) *TasksListService
Actions is a list of actions that should be returned. Leave empty to return all.
func (*TasksListService) Detailed ¶
func (s *TasksListService) Detailed(detailed bool) *TasksListService
Detailed indicates whether to return detailed task information (default: false).
func (*TasksListService) Do ¶
func (s *TasksListService) Do(ctx context.Context) (*TasksListResponse, error)
Do executes the operation.
func (*TasksListService) ErrorTrace ¶
func (s *TasksListService) ErrorTrace(errorTrace bool) *TasksListService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*TasksListService) FilterPath ¶
func (s *TasksListService) FilterPath(filterPath ...string) *TasksListService
FilterPath specifies a list of filters used to reduce the response.
func (*TasksListService) GroupBy ¶
func (s *TasksListService) GroupBy(groupBy string) *TasksListService
GroupBy groups tasks by nodes or parent/child relationships. As of now, it can either be "nodes" (default) or "parents" or "none".
func (*TasksListService) Header ¶
func (s *TasksListService) Header(name string, value string) *TasksListService
Header adds a header to the request.
func (*TasksListService) Headers ¶
func (s *TasksListService) Headers(headers http.Header) *TasksListService
Headers specifies the headers of the request.
func (*TasksListService) Human ¶
func (s *TasksListService) Human(human bool) *TasksListService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*TasksListService) NodeId ¶
func (s *TasksListService) NodeId(nodeId ...string) *TasksListService
NodeId is a list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
func (*TasksListService) ParentTaskId ¶
func (s *TasksListService) ParentTaskId(parentTaskId string) *TasksListService
ParentTaskId returns tasks with specified parent task id. Notice that the caller is responsible for using the correct format, i.e. node_id:task_number, as specified in the REST API.
func (*TasksListService) Pretty ¶
func (s *TasksListService) Pretty(pretty bool) *TasksListService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*TasksListService) TaskId ¶
func (s *TasksListService) TaskId(taskId ...string) *TasksListService
TaskId indicates to returns the task(s) with specified id(s). Notice that the caller is responsible for using the correct format, i.e. node_id:task_number, as specified in the REST API.
func (*TasksListService) Validate ¶
func (s *TasksListService) Validate() error
Validate checks if the operation is valid.
func (*TasksListService) WaitForCompletion ¶
func (s *TasksListService) WaitForCompletion(waitForCompletion bool) *TasksListService
WaitForCompletion indicates whether to wait for the matching tasks to complete (default: false).
type TermQuery ¶
type TermQuery struct {
// contains filtered or unexported fields
}
TermQuery finds documents that contain the exact term specified in the inverted index.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-term-query.html
func NewTermQuery ¶
NewTermQuery creates and initializes a new TermQuery.
type TermSuggester ¶
type TermSuggester struct { Suggester // contains filtered or unexported fields }
TermSuggester suggests terms based on edit distance. For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-term.html.
func NewTermSuggester ¶
func NewTermSuggester(name string) *TermSuggester
NewTermSuggester creates a new TermSuggester.
func (*TermSuggester) Accuracy ¶
func (q *TermSuggester) Accuracy(accuracy float64) *TermSuggester
func (*TermSuggester) Analyzer ¶
func (q *TermSuggester) Analyzer(analyzer string) *TermSuggester
func (*TermSuggester) ContextQueries ¶
func (q *TermSuggester) ContextQueries(queries ...SuggesterContextQuery) *TermSuggester
func (*TermSuggester) ContextQuery ¶
func (q *TermSuggester) ContextQuery(query SuggesterContextQuery) *TermSuggester
func (*TermSuggester) Field ¶
func (q *TermSuggester) Field(field string) *TermSuggester
func (*TermSuggester) MaxEdits ¶
func (q *TermSuggester) MaxEdits(maxEdits int) *TermSuggester
func (*TermSuggester) MaxInspections ¶
func (q *TermSuggester) MaxInspections(maxInspections int) *TermSuggester
func (*TermSuggester) MaxTermFreq ¶
func (q *TermSuggester) MaxTermFreq(maxTermFreq float64) *TermSuggester
func (*TermSuggester) MinDocFreq ¶
func (q *TermSuggester) MinDocFreq(minDocFreq float64) *TermSuggester
func (*TermSuggester) MinWordLength ¶
func (q *TermSuggester) MinWordLength(minWordLength int) *TermSuggester
func (*TermSuggester) Name ¶
func (q *TermSuggester) Name() string
func (*TermSuggester) PrefixLength ¶
func (q *TermSuggester) PrefixLength(prefixLength int) *TermSuggester
func (*TermSuggester) ShardSize ¶
func (q *TermSuggester) ShardSize(shardSize int) *TermSuggester
func (*TermSuggester) Size ¶
func (q *TermSuggester) Size(size int) *TermSuggester
func (*TermSuggester) Sort ¶
func (q *TermSuggester) Sort(sort string) *TermSuggester
func (*TermSuggester) Source ¶
func (q *TermSuggester) Source(includeName bool) (interface{}, error)
Source generates the source for the term suggester.
func (*TermSuggester) StringDistance ¶
func (q *TermSuggester) StringDistance(stringDistance string) *TermSuggester
func (*TermSuggester) SuggestMode ¶
func (q *TermSuggester) SuggestMode(suggestMode string) *TermSuggester
func (*TermSuggester) Text ¶
func (q *TermSuggester) Text(text string) *TermSuggester
type TermVectorsFieldInfo ¶
type TermVectorsFieldInfo struct { FieldStatistics FieldStatistics `json:"field_statistics"` Terms map[string]TermsInfo `json:"terms"` }
type TermsAggregation ¶
type TermsAggregation struct {
// contains filtered or unexported fields
}
TermsAggregation is a multi-bucket value source based aggregation where buckets are dynamically built - one per unique value.
func NewTermsAggregation ¶
func NewTermsAggregation() *TermsAggregation
func (*TermsAggregation) CollectionMode ¶
func (a *TermsAggregation) CollectionMode(collectionMode string) *TermsAggregation
Collection mode can be depth_first or breadth_first as of 1.4.0.
func (*TermsAggregation) Exclude ¶
func (a *TermsAggregation) Exclude(regexp string) *TermsAggregation
func (*TermsAggregation) ExcludeValues ¶
func (a *TermsAggregation) ExcludeValues(values ...interface{}) *TermsAggregation
func (*TermsAggregation) ExecutionHint ¶
func (a *TermsAggregation) ExecutionHint(hint string) *TermsAggregation
func (*TermsAggregation) Field ¶
func (a *TermsAggregation) Field(field string) *TermsAggregation
func (*TermsAggregation) Include ¶
func (a *TermsAggregation) Include(regexp string) *TermsAggregation
func (*TermsAggregation) IncludeExclude ¶
func (a *TermsAggregation) IncludeExclude(includeExclude *TermsAggregationIncludeExclude) *TermsAggregation
func (*TermsAggregation) IncludeValues ¶
func (a *TermsAggregation) IncludeValues(values ...interface{}) *TermsAggregation
func (*TermsAggregation) Meta ¶
func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation
Meta sets the meta data to be included in the aggregation response.
func (*TermsAggregation) MinDocCount ¶
func (a *TermsAggregation) MinDocCount(minDocCount int) *TermsAggregation
func (*TermsAggregation) Missing ¶
func (a *TermsAggregation) Missing(missing interface{}) *TermsAggregation
Missing configures the value to use when documents miss a value.
func (*TermsAggregation) NumPartitions ¶
func (a *TermsAggregation) NumPartitions(n int) *TermsAggregation
func (*TermsAggregation) Order ¶
func (a *TermsAggregation) Order(order string, asc bool) *TermsAggregation
func (*TermsAggregation) OrderByAggregation ¶
func (a *TermsAggregation) OrderByAggregation(aggName string, asc bool) *TermsAggregation
OrderByAggregation creates a bucket ordering strategy which sorts buckets based on a single-valued calc get.
func (*TermsAggregation) OrderByAggregationAndMetric ¶
func (a *TermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *TermsAggregation
OrderByAggregationAndMetric creates a bucket ordering strategy which sorts buckets based on a multi-valued calc get.
func (*TermsAggregation) OrderByCount ¶
func (a *TermsAggregation) OrderByCount(asc bool) *TermsAggregation
func (*TermsAggregation) OrderByCountAsc ¶
func (a *TermsAggregation) OrderByCountAsc() *TermsAggregation
func (*TermsAggregation) OrderByCountDesc ¶
func (a *TermsAggregation) OrderByCountDesc() *TermsAggregation
func (*TermsAggregation) OrderByKey ¶
func (a *TermsAggregation) OrderByKey(asc bool) *TermsAggregation
func (*TermsAggregation) OrderByKeyAsc ¶
func (a *TermsAggregation) OrderByKeyAsc() *TermsAggregation
func (*TermsAggregation) OrderByKeyDesc ¶
func (a *TermsAggregation) OrderByKeyDesc() *TermsAggregation
func (*TermsAggregation) OrderByTerm
deprecated
func (a *TermsAggregation) OrderByTerm(asc bool) *TermsAggregation
Deprecated: Use OrderByKey instead.
func (*TermsAggregation) OrderByTermAsc
deprecated
func (a *TermsAggregation) OrderByTermAsc() *TermsAggregation
Deprecated: Use OrderByKeyAsc instead.
func (*TermsAggregation) OrderByTermDesc
deprecated
func (a *TermsAggregation) OrderByTermDesc() *TermsAggregation
Deprecated: Use OrderByKeyDesc instead.
func (*TermsAggregation) Partition ¶
func (a *TermsAggregation) Partition(p int) *TermsAggregation
func (*TermsAggregation) RequiredSize ¶
func (a *TermsAggregation) RequiredSize(requiredSize int) *TermsAggregation
func (*TermsAggregation) Script ¶
func (a *TermsAggregation) Script(script *Script) *TermsAggregation
func (*TermsAggregation) ShardMinDocCount ¶
func (a *TermsAggregation) ShardMinDocCount(shardMinDocCount int) *TermsAggregation
func (*TermsAggregation) ShardSize ¶
func (a *TermsAggregation) ShardSize(shardSize int) *TermsAggregation
func (*TermsAggregation) ShowTermDocCountError ¶
func (a *TermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *TermsAggregation
func (*TermsAggregation) Size ¶
func (a *TermsAggregation) Size(size int) *TermsAggregation
func (*TermsAggregation) Source ¶
func (a *TermsAggregation) Source() (interface{}, error)
func (*TermsAggregation) SubAggregation ¶
func (a *TermsAggregation) SubAggregation(name string, subAggregation Aggregation) *TermsAggregation
func (*TermsAggregation) ValueType ¶
func (a *TermsAggregation) ValueType(valueType string) *TermsAggregation
ValueType can be string, long, or double.
type TermsAggregationIncludeExclude ¶
type TermsAggregationIncludeExclude struct { Include string Exclude string IncludeValues []interface{} ExcludeValues []interface{} Partition int NumPartitions int }
TermsAggregationIncludeExclude allows for include/exclude in a TermsAggregation.
func (*TermsAggregationIncludeExclude) MergeInto ¶
func (ie *TermsAggregationIncludeExclude) MergeInto(source map[string]interface{}) error
MergeInto merges the values of the include/exclude options into source.
func (*TermsAggregationIncludeExclude) Source ¶
func (ie *TermsAggregationIncludeExclude) Source() (interface{}, error)
Source returns a JSON serializable struct.
type TermsLookup ¶
type TermsLookup struct {
// contains filtered or unexported fields
}
TermsLookup encapsulates the parameters needed to fetch terms.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-terms-query.html#query-dsl-terms-lookup.
func NewTermsLookup ¶
func NewTermsLookup() *TermsLookup
NewTermsLookup creates and initializes a new TermsLookup.
func (*TermsLookup) Path ¶
func (t *TermsLookup) Path(path string) *TermsLookup
Path to use for lookup.
func (*TermsLookup) Routing ¶
func (t *TermsLookup) Routing(routing string) *TermsLookup
Routing value.
func (*TermsLookup) Source ¶
func (t *TermsLookup) Source() (interface{}, error)
Source creates the JSON source of the builder.
type TermsOrder ¶
TermsOrder specifies a single order field for a terms aggregation.
func (*TermsOrder) Source ¶
func (order *TermsOrder) Source() (interface{}, error)
Source returns serializable JSON of the TermsOrder.
type TermsQuery ¶
type TermsQuery struct {
// contains filtered or unexported fields
}
TermsQuery filters documents that have fields that match any of the provided terms (not analyzed).
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-terms-query.html
func NewTermsQuery ¶
func NewTermsQuery(name string, values ...interface{}) *TermsQuery
NewTermsQuery creates and initializes a new TermsQuery.
func (*TermsQuery) Boost ¶
func (q *TermsQuery) Boost(boost float64) *TermsQuery
Boost sets the boost for this query.
func (*TermsQuery) QueryName ¶
func (q *TermsQuery) QueryName(queryName string) *TermsQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*TermsQuery) Source ¶
func (q *TermsQuery) Source() (interface{}, error)
Creates the query source for the term query.
func (*TermsQuery) TermsLookup ¶
func (q *TermsQuery) TermsLookup(lookup *TermsLookup) *TermsQuery
TermsLookup adds terms lookup details to the query.
type TermsSetQuery ¶
type TermsSetQuery struct {
// contains filtered or unexported fields
}
TermsSetQuery returns any documents that match with at least one or more of the provided terms. The terms are not analyzed and thus must match exactly. The number of terms that must match varies per document and is either controlled by a minimum should match field or computed per document in a minimum should match script.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-terms-set-query.html
func NewTermsSetQuery ¶
func NewTermsSetQuery(name string, values ...interface{}) *TermsSetQuery
NewTermsSetQuery creates and initializes a new TermsSetQuery.
func (*TermsSetQuery) Boost ¶
func (q *TermsSetQuery) Boost(boost float64) *TermsSetQuery
Boost sets the boost for this query.
func (*TermsSetQuery) MinimumShouldMatchField ¶
func (q *TermsSetQuery) MinimumShouldMatchField(minimumShouldMatchField string) *TermsSetQuery
MinimumShouldMatchField specifies the field to match.
func (*TermsSetQuery) MinimumShouldMatchScript ¶
func (q *TermsSetQuery) MinimumShouldMatchScript(minimumShouldMatchScript *Script) *TermsSetQuery
MinimumShouldMatchScript specifies the script to match.
func (*TermsSetQuery) QueryName ¶
func (q *TermsSetQuery) QueryName(queryName string) *TermsSetQuery
QueryName sets the query name for the filter that can be used when searching for matched_filters per hit
func (*TermsSetQuery) Source ¶
func (q *TermsSetQuery) Source() (interface{}, error)
Source creates the query source for the term query.
type TermvectorsFilterSettings ¶
type TermvectorsFilterSettings struct {
// contains filtered or unexported fields
}
TermvectorsFilterSettings adds additional filters to a Termsvector request. It allows to filter terms based on their tf-idf scores. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-termvectors.html#_terms_filtering for more information.
func NewTermvectorsFilterSettings ¶
func NewTermvectorsFilterSettings() *TermvectorsFilterSettings
NewTermvectorsFilterSettings creates and initializes a new TermvectorsFilterSettings struct.
func (*TermvectorsFilterSettings) MaxDocFreq ¶
func (fs *TermvectorsFilterSettings) MaxDocFreq(value int64) *TermvectorsFilterSettings
MaxDocFreq ignores terms which occur in more than this many docs.
func (*TermvectorsFilterSettings) MaxNumTerms ¶
func (fs *TermvectorsFilterSettings) MaxNumTerms(value int64) *TermvectorsFilterSettings
MaxNumTerms specifies the maximum number of terms the must be returned per field.
func (*TermvectorsFilterSettings) MaxTermFreq ¶
func (fs *TermvectorsFilterSettings) MaxTermFreq(value int64) *TermvectorsFilterSettings
MaxTermFreq ignores words with more than this frequency in the source doc.
func (*TermvectorsFilterSettings) MaxWordLength ¶
func (fs *TermvectorsFilterSettings) MaxWordLength(value int64) *TermvectorsFilterSettings
MaxWordLength specifies the maximum word length above which words will be ignored.
func (*TermvectorsFilterSettings) MinDocFreq ¶
func (fs *TermvectorsFilterSettings) MinDocFreq(value int64) *TermvectorsFilterSettings
MinDocFreq ignores terms which do not occur in at least this many docs.
func (*TermvectorsFilterSettings) MinTermFreq ¶
func (fs *TermvectorsFilterSettings) MinTermFreq(value int64) *TermvectorsFilterSettings
MinTermFreq ignores words with less than this frequency in the source doc.
func (*TermvectorsFilterSettings) MinWordLength ¶
func (fs *TermvectorsFilterSettings) MinWordLength(value int64) *TermvectorsFilterSettings
MinWordLength specifies the minimum word length below which words will be ignored.
func (*TermvectorsFilterSettings) Source ¶
func (fs *TermvectorsFilterSettings) Source() (interface{}, error)
Source returns JSON for the query.
type TermvectorsResponse ¶
type TermvectorsResponse struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id,omitempty"` Version int `json:"_version"` Found bool `json:"found"` Took int64 `json:"took"` TermVectors map[string]TermVectorsFieldInfo `json:"term_vectors"` }
TermvectorsResponse is the response of TermvectorsService.Do.
type TermvectorsService ¶
type TermvectorsService struct {
// contains filtered or unexported fields
}
TermvectorsService returns information and statistics on terms in the fields of a particular document. The document could be stored in the index or artificially provided by the user.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-termvectors.html for documentation.
func NewTermvectorsService ¶
func NewTermvectorsService(client *Client) *TermvectorsService
NewTermvectorsService creates a new TermvectorsService.
func (*TermvectorsService) BodyJson ¶
func (s *TermvectorsService) BodyJson(body interface{}) *TermvectorsService
BodyJson defines the body parameters. See documentation.
func (*TermvectorsService) BodyString ¶
func (s *TermvectorsService) BodyString(body string) *TermvectorsService
BodyString defines the body parameters as a string. See documentation.
func (*TermvectorsService) Dfs ¶
func (s *TermvectorsService) Dfs(dfs bool) *TermvectorsService
Dfs specifies if distributed frequencies should be returned instead shard frequencies.
func (*TermvectorsService) Do ¶
func (s *TermvectorsService) Do(ctx context.Context) (*TermvectorsResponse, error)
Do executes the operation.
func (*TermvectorsService) Doc ¶
func (s *TermvectorsService) Doc(doc interface{}) *TermvectorsService
Doc is the document to analyze.
func (*TermvectorsService) ErrorTrace ¶
func (s *TermvectorsService) ErrorTrace(errorTrace bool) *TermvectorsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*TermvectorsService) FieldStatistics ¶
func (s *TermvectorsService) FieldStatistics(fieldStatistics bool) *TermvectorsService
FieldStatistics specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
func (*TermvectorsService) Fields ¶
func (s *TermvectorsService) Fields(fields ...string) *TermvectorsService
Fields a list of fields to return.
func (*TermvectorsService) Filter ¶
func (s *TermvectorsService) Filter(filter *TermvectorsFilterSettings) *TermvectorsService
Filter adds terms filter settings.
func (*TermvectorsService) FilterPath ¶
func (s *TermvectorsService) FilterPath(filterPath ...string) *TermvectorsService
FilterPath specifies a list of filters used to reduce the response.
func (*TermvectorsService) Header ¶
func (s *TermvectorsService) Header(name string, value string) *TermvectorsService
Header adds a header to the request.
func (*TermvectorsService) Headers ¶
func (s *TermvectorsService) Headers(headers http.Header) *TermvectorsService
Headers specifies the headers of the request.
func (*TermvectorsService) Human ¶
func (s *TermvectorsService) Human(human bool) *TermvectorsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*TermvectorsService) Id ¶
func (s *TermvectorsService) Id(id string) *TermvectorsService
Id of the document.
func (*TermvectorsService) Index ¶
func (s *TermvectorsService) Index(index string) *TermvectorsService
Index in which the document resides.
func (*TermvectorsService) Offsets ¶
func (s *TermvectorsService) Offsets(offsets bool) *TermvectorsService
Offsets specifies if term offsets should be returned.
func (*TermvectorsService) Parent ¶
func (s *TermvectorsService) Parent(parent string) *TermvectorsService
Parent id of documents.
func (*TermvectorsService) Payloads ¶
func (s *TermvectorsService) Payloads(payloads bool) *TermvectorsService
Payloads specifies if term payloads should be returned.
func (*TermvectorsService) PerFieldAnalyzer ¶
func (s *TermvectorsService) PerFieldAnalyzer(perFieldAnalyzer map[string]string) *TermvectorsService
PerFieldAnalyzer allows to specify a different analyzer than the one at the field.
func (*TermvectorsService) Positions ¶
func (s *TermvectorsService) Positions(positions bool) *TermvectorsService
Positions specifies if term positions should be returned.
func (*TermvectorsService) Preference ¶
func (s *TermvectorsService) Preference(preference string) *TermvectorsService
Preference specify the node or shard the operation should be performed on (default: random).
func (*TermvectorsService) Pretty ¶
func (s *TermvectorsService) Pretty(pretty bool) *TermvectorsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*TermvectorsService) Realtime ¶
func (s *TermvectorsService) Realtime(realtime bool) *TermvectorsService
Realtime specifies if request is real-time as opposed to near-real-time (default: true).
func (*TermvectorsService) Routing ¶
func (s *TermvectorsService) Routing(routing string) *TermvectorsService
Routing is a specific routing value.
func (*TermvectorsService) TermStatistics ¶
func (s *TermvectorsService) TermStatistics(termStatistics bool) *TermvectorsService
TermStatistics specifies if total term frequency and document frequency should be returned.
func (*TermvectorsService) Type ¶
func (s *TermvectorsService) Type(typ string) *TermvectorsService
Type of the document.
func (*TermvectorsService) Validate ¶
func (s *TermvectorsService) Validate() error
Validate checks if the operation is valid.
func (*TermvectorsService) Version ¶
func (s *TermvectorsService) Version(version interface{}) *TermvectorsService
Version an explicit version number for concurrency control.
func (*TermvectorsService) VersionType ¶
func (s *TermvectorsService) VersionType(versionType string) *TermvectorsService
VersionType specifies a version type ("internal", "external", or "external_gte").
type TopHitsAggregation ¶
type TopHitsAggregation struct {
// contains filtered or unexported fields
}
TopHitsAggregation keeps track of the most relevant document being aggregated. This aggregator is intended to be used as a sub aggregator, so that the top matching documents can be aggregated per bucket.
It can effectively be used to group result sets by certain fields via a bucket aggregator. One or more bucket aggregators determines by which properties a result set get sliced into.
func NewTopHitsAggregation ¶
func NewTopHitsAggregation() *TopHitsAggregation
func (*TopHitsAggregation) DocvalueField ¶
func (a *TopHitsAggregation) DocvalueField(docvalueField string) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFieldWithFormat ¶
func (a *TopHitsAggregation) DocvalueFieldWithFormat(docvalueField DocvalueField) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFields ¶
func (a *TopHitsAggregation) DocvalueFields(docvalueFields ...string) *TopHitsAggregation
func (*TopHitsAggregation) DocvalueFieldsWithFormat ¶
func (a *TopHitsAggregation) DocvalueFieldsWithFormat(docvalueFields ...DocvalueField) *TopHitsAggregation
func (*TopHitsAggregation) Explain ¶
func (a *TopHitsAggregation) Explain(explain bool) *TopHitsAggregation
func (*TopHitsAggregation) FetchSource ¶
func (a *TopHitsAggregation) FetchSource(fetchSource bool) *TopHitsAggregation
func (*TopHitsAggregation) FetchSourceContext ¶
func (a *TopHitsAggregation) FetchSourceContext(fetchSourceContext *FetchSourceContext) *TopHitsAggregation
func (*TopHitsAggregation) From ¶
func (a *TopHitsAggregation) From(from int) *TopHitsAggregation
func (*TopHitsAggregation) Highlight ¶
func (a *TopHitsAggregation) Highlight(highlight *Highlight) *TopHitsAggregation
func (*TopHitsAggregation) Highlighter ¶
func (a *TopHitsAggregation) Highlighter() *Highlight
func (*TopHitsAggregation) NoStoredFields ¶
func (a *TopHitsAggregation) NoStoredFields() *TopHitsAggregation
func (*TopHitsAggregation) ScriptField ¶
func (a *TopHitsAggregation) ScriptField(scriptField *ScriptField) *TopHitsAggregation
func (*TopHitsAggregation) ScriptFields ¶
func (a *TopHitsAggregation) ScriptFields(scriptFields ...*ScriptField) *TopHitsAggregation
func (*TopHitsAggregation) SearchSource ¶
func (a *TopHitsAggregation) SearchSource(searchSource *SearchSource) *TopHitsAggregation
func (*TopHitsAggregation) Size ¶
func (a *TopHitsAggregation) Size(size int) *TopHitsAggregation
func (*TopHitsAggregation) Sort ¶
func (a *TopHitsAggregation) Sort(field string, ascending bool) *TopHitsAggregation
func (*TopHitsAggregation) SortBy ¶
func (a *TopHitsAggregation) SortBy(sorter ...Sorter) *TopHitsAggregation
func (*TopHitsAggregation) SortWithInfo ¶
func (a *TopHitsAggregation) SortWithInfo(info SortInfo) *TopHitsAggregation
func (*TopHitsAggregation) Source ¶
func (a *TopHitsAggregation) Source() (interface{}, error)
func (*TopHitsAggregation) TrackScores ¶
func (a *TopHitsAggregation) TrackScores(trackScores bool) *TopHitsAggregation
func (*TopHitsAggregation) Version ¶
func (a *TopHitsAggregation) Version(version bool) *TopHitsAggregation
type TypeQuery ¶
type TypeQuery struct {
// contains filtered or unexported fields
}
TypeQuery filters documents matching the provided document / mapping type.
For details, see: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-type-query.html
func NewTypeQuery ¶
type UnassignedInfo ¶
type UpdateByQueryService ¶
type UpdateByQueryService struct {
// contains filtered or unexported fields
}
UpdateByQueryService is documented at https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html.
func NewUpdateByQueryService ¶
func NewUpdateByQueryService(client *Client) *UpdateByQueryService
NewUpdateByQueryService creates a new UpdateByQueryService.
func (*UpdateByQueryService) AbortOnVersionConflict ¶
func (s *UpdateByQueryService) AbortOnVersionConflict() *UpdateByQueryService
AbortOnVersionConflict aborts the request on version conflicts. It is an alias to setting Conflicts("abort").
func (*UpdateByQueryService) AllowNoIndices ¶
func (s *UpdateByQueryService) AllowNoIndices(allowNoIndices bool) *UpdateByQueryService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*UpdateByQueryService) AnalyzeWildcard ¶
func (s *UpdateByQueryService) AnalyzeWildcard(analyzeWildcard bool) *UpdateByQueryService
AnalyzeWildcard specifies whether wildcard and prefix queries should be analyzed (default: false).
func (*UpdateByQueryService) Analyzer ¶
func (s *UpdateByQueryService) Analyzer(analyzer string) *UpdateByQueryService
Analyzer specifies the analyzer to use for the query string.
func (*UpdateByQueryService) Body ¶
func (s *UpdateByQueryService) Body(body string) *UpdateByQueryService
Body specifies the body of the request. It overrides data being specified via SearchService or Script.
func (*UpdateByQueryService) Conflicts ¶
func (s *UpdateByQueryService) Conflicts(conflicts string) *UpdateByQueryService
Conflicts indicates what to do when the process detects version conflicts. Possible values are "proceed" and "abort".
func (*UpdateByQueryService) DF ¶
func (s *UpdateByQueryService) DF(df string) *UpdateByQueryService
DF specifies the field to use as default where no field prefix is given in the query string.
func (*UpdateByQueryService) DefaultOperator ¶
func (s *UpdateByQueryService) DefaultOperator(defaultOperator string) *UpdateByQueryService
DefaultOperator is the default operator for query string query (AND or OR).
func (*UpdateByQueryService) Do ¶
func (s *UpdateByQueryService) Do(ctx context.Context) (*BulkIndexByScrollResponse, error)
Do executes the operation.
func (*UpdateByQueryService) DoAsync ¶
func (s *UpdateByQueryService) DoAsync(ctx context.Context) (*StartTaskResult, error)
DoAsync executes the update-by-query operation asynchronously by starting a new task. Callers need to use the Task Management API to watch the outcome of the reindexing operation.
func (*UpdateByQueryService) DocvalueFields ¶
func (s *UpdateByQueryService) DocvalueFields(docvalueFields ...string) *UpdateByQueryService
DocvalueFields specifies the list of fields to return as the docvalue representation of a field for each hit.
func (*UpdateByQueryService) ErrorTrace ¶
func (s *UpdateByQueryService) ErrorTrace(errorTrace bool) *UpdateByQueryService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*UpdateByQueryService) ExpandWildcards ¶
func (s *UpdateByQueryService) ExpandWildcards(expandWildcards string) *UpdateByQueryService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*UpdateByQueryService) Explain ¶
func (s *UpdateByQueryService) Explain(explain bool) *UpdateByQueryService
Explain specifies whether to return detailed information about score computation as part of a hit.
func (*UpdateByQueryService) FielddataFields ¶
func (s *UpdateByQueryService) FielddataFields(fielddataFields ...string) *UpdateByQueryService
FielddataFields is a list of fields to return as the field data representation of a field for each hit.
func (*UpdateByQueryService) FilterPath ¶
func (s *UpdateByQueryService) FilterPath(filterPath ...string) *UpdateByQueryService
FilterPath specifies a list of filters used to reduce the response.
func (*UpdateByQueryService) From ¶
func (s *UpdateByQueryService) From(from int) *UpdateByQueryService
From is the starting offset (default: 0).
func (*UpdateByQueryService) Header ¶
func (s *UpdateByQueryService) Header(name string, value string) *UpdateByQueryService
Header adds a header to the request.
func (*UpdateByQueryService) Headers ¶
func (s *UpdateByQueryService) Headers(headers http.Header) *UpdateByQueryService
Headers specifies the headers of the request.
func (*UpdateByQueryService) Human ¶
func (s *UpdateByQueryService) Human(human bool) *UpdateByQueryService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*UpdateByQueryService) IgnoreUnavailable ¶
func (s *UpdateByQueryService) IgnoreUnavailable(ignoreUnavailable bool) *UpdateByQueryService
IgnoreUnavailable indicates whether specified concrete indices should be ignored when unavailable (missing or closed).
func (*UpdateByQueryService) Index ¶
func (s *UpdateByQueryService) Index(index ...string) *UpdateByQueryService
Index is a list of index names to search; use `_all` or empty string to perform the operation on all indices.
func (*UpdateByQueryService) Lenient ¶
func (s *UpdateByQueryService) Lenient(lenient bool) *UpdateByQueryService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*UpdateByQueryService) LowercaseExpandedTerms ¶
func (s *UpdateByQueryService) LowercaseExpandedTerms(lowercaseExpandedTerms bool) *UpdateByQueryService
LowercaseExpandedTerms specifies whether query terms should be lowercased.
func (*UpdateByQueryService) Pipeline ¶
func (s *UpdateByQueryService) Pipeline(pipeline string) *UpdateByQueryService
Pipeline specifies the ingest pipeline to set on index requests made by this action (default: none).
func (*UpdateByQueryService) Preference ¶
func (s *UpdateByQueryService) Preference(preference string) *UpdateByQueryService
Preference specifies the node or shard the operation should be performed on (default: random).
func (*UpdateByQueryService) Pretty ¶
func (s *UpdateByQueryService) Pretty(pretty bool) *UpdateByQueryService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*UpdateByQueryService) ProceedOnVersionConflict ¶
func (s *UpdateByQueryService) ProceedOnVersionConflict() *UpdateByQueryService
ProceedOnVersionConflict won't abort the request on version conflicts. It is an alias to setting Conflicts("proceed").
func (*UpdateByQueryService) Q ¶
func (s *UpdateByQueryService) Q(q string) *UpdateByQueryService
Q specifies the query in the Lucene query string syntax.
func (*UpdateByQueryService) Query ¶
func (s *UpdateByQueryService) Query(query Query) *UpdateByQueryService
Query sets a query definition using the Query DSL.
func (*UpdateByQueryService) Refresh ¶
func (s *UpdateByQueryService) Refresh(refresh string) *UpdateByQueryService
Refresh indicates whether the effected indexes should be refreshed.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*UpdateByQueryService) RequestCache ¶
func (s *UpdateByQueryService) RequestCache(requestCache bool) *UpdateByQueryService
RequestCache specifies if request cache should be used for this request or not, defaults to index level setting.
func (*UpdateByQueryService) RequestsPerSecond ¶
func (s *UpdateByQueryService) RequestsPerSecond(requestsPerSecond int) *UpdateByQueryService
RequestsPerSecond sets the throttle on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
func (*UpdateByQueryService) Routing ¶
func (s *UpdateByQueryService) Routing(routing ...string) *UpdateByQueryService
Routing is a list of specific routing values.
func (*UpdateByQueryService) Script ¶
func (s *UpdateByQueryService) Script(script *Script) *UpdateByQueryService
Script sets an update script.
func (*UpdateByQueryService) Scroll ¶
func (s *UpdateByQueryService) Scroll(scroll string) *UpdateByQueryService
Scroll specifies how long a consistent view of the index should be maintained for scrolled search.
func (*UpdateByQueryService) ScrollSize ¶
func (s *UpdateByQueryService) ScrollSize(scrollSize int) *UpdateByQueryService
ScrollSize is the size on the scroll request powering the update_by_query.
func (*UpdateByQueryService) SearchTimeout ¶
func (s *UpdateByQueryService) SearchTimeout(searchTimeout string) *UpdateByQueryService
SearchTimeout defines an explicit timeout for each search request. Defaults to no timeout.
func (*UpdateByQueryService) SearchType ¶
func (s *UpdateByQueryService) SearchType(searchType string) *UpdateByQueryService
SearchType is the search operation type. Possible values are "query_then_fetch" and "dfs_query_then_fetch".
func (*UpdateByQueryService) Size ¶
func (s *UpdateByQueryService) Size(size int) *UpdateByQueryService
Size represents the number of hits to return (default: 10).
func (*UpdateByQueryService) Slices ¶
func (s *UpdateByQueryService) Slices(slices interface{}) *UpdateByQueryService
Slices represents the number of slices (default: 1). It used to be a number, but can be set to "auto" as of 6.7.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-update-by-query.html#docs-update-by-query-slice for details.
func (*UpdateByQueryService) Sort ¶
func (s *UpdateByQueryService) Sort(sort ...string) *UpdateByQueryService
Sort is a list of <field>:<direction> pairs.
func (*UpdateByQueryService) SortByField ¶
func (s *UpdateByQueryService) SortByField(field string, ascending bool) *UpdateByQueryService
SortByField adds a sort order.
func (*UpdateByQueryService) Stats ¶
func (s *UpdateByQueryService) Stats(stats ...string) *UpdateByQueryService
Stats specifies specific tag(s) of the request for logging and statistical purposes.
func (*UpdateByQueryService) StoredFields ¶
func (s *UpdateByQueryService) StoredFields(storedFields ...string) *UpdateByQueryService
StoredFields specifies the list of stored fields to return as part of a hit.
func (*UpdateByQueryService) SuggestField ¶
func (s *UpdateByQueryService) SuggestField(suggestField string) *UpdateByQueryService
SuggestField specifies which field to use for suggestions.
func (*UpdateByQueryService) SuggestMode ¶
func (s *UpdateByQueryService) SuggestMode(suggestMode string) *UpdateByQueryService
SuggestMode specifies the suggest mode. Possible values are "missing", "popular", and "always".
func (*UpdateByQueryService) SuggestSize ¶
func (s *UpdateByQueryService) SuggestSize(suggestSize int) *UpdateByQueryService
SuggestSize specifies how many suggestions to return in response.
func (*UpdateByQueryService) SuggestText ¶
func (s *UpdateByQueryService) SuggestText(suggestText string) *UpdateByQueryService
SuggestText specifies the source text for which the suggestions should be returned.
func (*UpdateByQueryService) TerminateAfter ¶
func (s *UpdateByQueryService) TerminateAfter(terminateAfter int) *UpdateByQueryService
TerminateAfter indicates the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
func (*UpdateByQueryService) Timeout ¶
func (s *UpdateByQueryService) Timeout(timeout string) *UpdateByQueryService
Timeout is the time each individual bulk request should wait for shards that are unavailable.
func (*UpdateByQueryService) TimeoutInMillis ¶
func (s *UpdateByQueryService) TimeoutInMillis(timeoutInMillis int) *UpdateByQueryService
TimeoutInMillis sets the timeout in milliseconds.
func (*UpdateByQueryService) TrackScores ¶
func (s *UpdateByQueryService) TrackScores(trackScores bool) *UpdateByQueryService
TrackScores indicates whether to calculate and return scores even if they are not used for sorting.
func (*UpdateByQueryService) Type ¶
func (s *UpdateByQueryService) Type(typ ...string) *UpdateByQueryService
Type is a list of document types to search; leave empty to perform the operation on all types.
func (*UpdateByQueryService) Validate ¶
func (s *UpdateByQueryService) Validate() error
Validate checks if the operation is valid.
func (*UpdateByQueryService) Version ¶
func (s *UpdateByQueryService) Version(version bool) *UpdateByQueryService
Version specifies whether to return document version as part of a hit.
func (*UpdateByQueryService) VersionType ¶
func (s *UpdateByQueryService) VersionType(versionType bool) *UpdateByQueryService
VersionType indicates if the document increment the version number (internal) on hit or not (reindex).
func (*UpdateByQueryService) WaitForActiveShards ¶
func (s *UpdateByQueryService) WaitForActiveShards(waitForActiveShards string) *UpdateByQueryService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
func (*UpdateByQueryService) WaitForCompletion ¶
func (s *UpdateByQueryService) WaitForCompletion(waitForCompletion bool) *UpdateByQueryService
WaitForCompletion indicates if the request should block until the reindex is complete.
func (*UpdateByQueryService) XSource ¶
func (s *UpdateByQueryService) XSource(xSource ...string) *UpdateByQueryService
XSource is true or false to return the _source field or not, or a list of fields to return.
func (*UpdateByQueryService) XSourceExclude ¶
func (s *UpdateByQueryService) XSourceExclude(xSourceExclude ...string) *UpdateByQueryService
XSourceExclude represents a list of fields to exclude from the returned _source field.
func (*UpdateByQueryService) XSourceInclude ¶
func (s *UpdateByQueryService) XSourceInclude(xSourceInclude ...string) *UpdateByQueryService
XSourceInclude represents a list of fields to extract and return from the _source field.
type UpdateResponse ¶
type UpdateResponse struct { Index string `json:"_index,omitempty"` Type string `json:"_type,omitempty"` Id string `json:"_id,omitempty"` Version int64 `json:"_version,omitempty"` Result string `json:"result,omitempty"` Shards *ShardsInfo `json:"_shards,omitempty"` SeqNo int64 `json:"_seq_no,omitempty"` PrimaryTerm int64 `json:"_primary_term,omitempty"` Status int `json:"status,omitempty"` ForcedRefresh bool `json:"forced_refresh,omitempty"` GetResult *GetResult `json:"get,omitempty"` }
UpdateResponse is the result of updating a document in Elasticsearch.
type UpdateService ¶
type UpdateService struct {
// contains filtered or unexported fields
}
UpdateService updates a document in Elasticsearch. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-update.html for details.
func NewUpdateService ¶
func NewUpdateService(client *Client) *UpdateService
NewUpdateService creates the service to update documents in Elasticsearch.
func (*UpdateService) DetectNoop ¶
func (s *UpdateService) DetectNoop(detectNoop bool) *UpdateService
DetectNoop will instruct Elasticsearch to check if changes will occur when updating via Doc. It there aren't any changes, the request will turn into a no-op.
func (*UpdateService) Do ¶
func (s *UpdateService) Do(ctx context.Context) (*UpdateResponse, error)
Do executes the update operation.
func (*UpdateService) Doc ¶
func (s *UpdateService) Doc(doc interface{}) *UpdateService
Doc allows for updating a partial document.
func (*UpdateService) DocAsUpsert ¶
func (s *UpdateService) DocAsUpsert(docAsUpsert bool) *UpdateService
DocAsUpsert can be used to insert the document if it doesn't already exist.
func (*UpdateService) ErrorTrace ¶
func (s *UpdateService) ErrorTrace(errorTrace bool) *UpdateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*UpdateService) FetchSource ¶
func (s *UpdateService) FetchSource(fetchSource bool) *UpdateService
FetchSource asks Elasticsearch to return the updated _source in the response.
func (*UpdateService) FetchSourceContext ¶
func (s *UpdateService) FetchSourceContext(fetchSourceContext *FetchSourceContext) *UpdateService
FetchSourceContext indicates that _source should be returned in the response, allowing wildcard patterns to be defined via FetchSourceContext.
func (*UpdateService) Fields ¶
func (s *UpdateService) Fields(fields ...string) *UpdateService
Fields is a list of fields to return in the response.
func (*UpdateService) FilterPath ¶
func (s *UpdateService) FilterPath(filterPath ...string) *UpdateService
FilterPath specifies a list of filters used to reduce the response.
func (*UpdateService) Header ¶
func (s *UpdateService) Header(name string, value string) *UpdateService
Header adds a header to the request.
func (*UpdateService) Headers ¶
func (s *UpdateService) Headers(headers http.Header) *UpdateService
Headers specifies the headers of the request.
func (*UpdateService) Human ¶
func (s *UpdateService) Human(human bool) *UpdateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*UpdateService) Id ¶
func (s *UpdateService) Id(id string) *UpdateService
Id is the identifier of the document to update (required).
func (*UpdateService) IfPrimaryTerm ¶
func (s *UpdateService) IfPrimaryTerm(primaryTerm int64) *UpdateService
IfPrimaryTerm indicates to only perform the update operation if the last operation that has changed the document has the specified primary term.
func (*UpdateService) IfSeqNo ¶
func (s *UpdateService) IfSeqNo(seqNo int64) *UpdateService
IfSeqNo indicates to only perform the update operation if the last operation that has changed the document has the specified sequence number.
func (*UpdateService) Index ¶
func (s *UpdateService) Index(name string) *UpdateService
Index is the name of the Elasticsearch index (required).
func (*UpdateService) Parent ¶
func (s *UpdateService) Parent(parent string) *UpdateService
Parent sets the id of the parent document.
func (*UpdateService) Pretty ¶
func (s *UpdateService) Pretty(pretty bool) *UpdateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*UpdateService) Refresh ¶
func (s *UpdateService) Refresh(refresh string) *UpdateService
Refresh the index after performing the update.
See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-refresh.html for details.
func (*UpdateService) RetryOnConflict ¶
func (s *UpdateService) RetryOnConflict(retryOnConflict int) *UpdateService
RetryOnConflict specifies how many times the operation should be retried when a conflict occurs (default: 0).
func (*UpdateService) Routing ¶
func (s *UpdateService) Routing(routing string) *UpdateService
Routing specifies a specific routing value.
func (*UpdateService) Script ¶
func (s *UpdateService) Script(script *Script) *UpdateService
Script is the script definition.
func (*UpdateService) ScriptedUpsert ¶
func (s *UpdateService) ScriptedUpsert(scriptedUpsert bool) *UpdateService
ScriptedUpsert should be set to true if the referenced script (defined in Script or ScriptId) should be called to perform an insert. The default is false.
func (*UpdateService) Timeout ¶
func (s *UpdateService) Timeout(timeout string) *UpdateService
Timeout is an explicit timeout for the operation, e.g. "1000", "1s" or "500ms".
func (*UpdateService) Type ¶
func (s *UpdateService) Type(typ string) *UpdateService
Type is the type of the document (required).
func (*UpdateService) Upsert ¶
func (s *UpdateService) Upsert(doc interface{}) *UpdateService
Upsert can be used to index the document when it doesn't exist yet. Use this e.g. to initialize a document with a default value.
func (*UpdateService) Version ¶
func (s *UpdateService) Version(version int64) *UpdateService
Version defines the explicit version number for concurrency control.
func (*UpdateService) VersionType ¶
func (s *UpdateService) VersionType(versionType string) *UpdateService
VersionType is e.g. "internal".
func (*UpdateService) WaitForActiveShards ¶
func (s *UpdateService) WaitForActiveShards(waitForActiveShards string) *UpdateService
WaitForActiveShards sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1).
type ValidateResponse ¶
type ValidateResponse struct { Valid bool `json:"valid"` Shards map[string]interface{} `json:"_shards"` Explanations []interface{} `json:"explanations"` }
ValidateResponse is the response of ValidateService.Do.
type ValidateService ¶
type ValidateService struct {
// contains filtered or unexported fields
}
ValidateService allows a user to validate a potentially expensive query without executing it. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-validate.html.
func NewValidateService ¶
func NewValidateService(client *Client) *ValidateService
NewValidateService creates a new ValidateService.
func (*ValidateService) AllShards ¶
func (s *ValidateService) AllShards(allShards *bool) *ValidateService
Execute validation on all shards instead of one random shard per index.
func (*ValidateService) AllowNoIndices ¶
func (s *ValidateService) AllowNoIndices(allowNoIndices bool) *ValidateService
AllowNoIndices indicates whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified).
func (*ValidateService) AnalyzeWildcard ¶
func (s *ValidateService) AnalyzeWildcard(analyzeWildcard bool) *ValidateService
AnalyzeWildcard specifies whether wildcards and prefix queries in the query string query should be analyzed (default: false).
func (*ValidateService) Analyzer ¶
func (s *ValidateService) Analyzer(analyzer string) *ValidateService
Analyzer is the analyzer for the query string query.
func (*ValidateService) BodyJson ¶
func (s *ValidateService) BodyJson(body interface{}) *ValidateService
BodyJson sets the query definition using the Query DSL.
func (*ValidateService) BodyString ¶
func (s *ValidateService) BodyString(body string) *ValidateService
BodyString sets the query definition using the Query DSL as a string.
func (*ValidateService) DefaultOperator ¶
func (s *ValidateService) DefaultOperator(defaultOperator string) *ValidateService
DefaultOperator is the default operator for query string query (AND or OR).
func (*ValidateService) Df ¶
func (s *ValidateService) Df(df string) *ValidateService
Df is the default field for query string query (default: _all).
func (*ValidateService) Do ¶
func (s *ValidateService) Do(ctx context.Context) (*ValidateResponse, error)
Do executes the operation.
func (*ValidateService) ErrorTrace ¶
func (s *ValidateService) ErrorTrace(errorTrace bool) *ValidateService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*ValidateService) ExpandWildcards ¶
func (s *ValidateService) ExpandWildcards(expandWildcards string) *ValidateService
ExpandWildcards indicates whether to expand wildcard expression to concrete indices that are open, closed or both.
func (*ValidateService) Explain ¶
func (s *ValidateService) Explain(explain *bool) *ValidateService
An explain parameter can be specified to get more detailed information about why a query failed.
func (*ValidateService) FilterPath ¶
func (s *ValidateService) FilterPath(filterPath ...string) *ValidateService
FilterPath specifies a list of filters used to reduce the response.
func (*ValidateService) Header ¶
func (s *ValidateService) Header(name string, value string) *ValidateService
Header adds a header to the request.
func (*ValidateService) Headers ¶
func (s *ValidateService) Headers(headers http.Header) *ValidateService
Headers specifies the headers of the request.
func (*ValidateService) Human ¶
func (s *ValidateService) Human(human bool) *ValidateService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*ValidateService) IgnoreUnavailable ¶
func (s *ValidateService) IgnoreUnavailable(ignoreUnavailable bool) *ValidateService
IgnoreUnavailable indicates whether the specified concrete indices should be ignored when unavailable (missing or closed).
func (*ValidateService) Index ¶
func (s *ValidateService) Index(index ...string) *ValidateService
Index sets the names of the indices to use for search.
func (*ValidateService) Lenient ¶
func (s *ValidateService) Lenient(lenient bool) *ValidateService
Lenient specifies whether format-based query failures (such as providing text to a numeric field) should be ignored.
func (*ValidateService) Pretty ¶
func (s *ValidateService) Pretty(pretty bool) *ValidateService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*ValidateService) Q ¶
func (s *ValidateService) Q(q string) *ValidateService
Query in the Lucene query string syntax.
func (*ValidateService) Query ¶
func (s *ValidateService) Query(query Query) *ValidateService
Query sets a query definition using the Query DSL.
func (*ValidateService) Rewrite ¶
func (s *ValidateService) Rewrite(rewrite *bool) *ValidateService
Provide a more detailed explanation showing the actual Lucene query that will be executed.
func (*ValidateService) Type ¶
func (s *ValidateService) Type(typ ...string) *ValidateService
Types adds search restrictions for a list of types.
func (*ValidateService) Validate ¶
func (s *ValidateService) Validate() error
Validate checks if the operation is valid.
type ValueCountAggregation ¶
type ValueCountAggregation struct {
// contains filtered or unexported fields
}
ValueCountAggregation is a single-value metrics aggregation that counts the number of values that are extracted from the aggregated documents. These values can be extracted either from specific fields in the documents, or be generated by a provided script. Typically, this aggregator will be used in conjunction with other single-value aggregations. For example, when computing the avg one might be interested in the number of values the average is computed over. See: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-metrics-valuecount-aggregation.html
func NewValueCountAggregation ¶
func NewValueCountAggregation() *ValueCountAggregation
func (*ValueCountAggregation) Field ¶
func (a *ValueCountAggregation) Field(field string) *ValueCountAggregation
func (*ValueCountAggregation) Format ¶
func (a *ValueCountAggregation) Format(format string) *ValueCountAggregation
func (*ValueCountAggregation) Meta ¶
func (a *ValueCountAggregation) Meta(metaData map[string]interface{}) *ValueCountAggregation
Meta sets the meta data to be included in the aggregation response.
func (*ValueCountAggregation) Script ¶
func (a *ValueCountAggregation) Script(script *Script) *ValueCountAggregation
func (*ValueCountAggregation) Source ¶
func (a *ValueCountAggregation) Source() (interface{}, error)
func (*ValueCountAggregation) SubAggregation ¶
func (a *ValueCountAggregation) SubAggregation(name string, subAggregation Aggregation) *ValueCountAggregation
type WeightFactorFunction ¶
type WeightFactorFunction struct {
// contains filtered or unexported fields
}
WeightFactorFunction builds a weight factor function that multiplies the weight to the score. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_weight for details.
func NewWeightFactorFunction ¶
func NewWeightFactorFunction(weight float64) *WeightFactorFunction
NewWeightFactorFunction initializes and returns a new WeightFactorFunction.
func (*WeightFactorFunction) GetWeight ¶
func (fn *WeightFactorFunction) GetWeight() *float64
GetWeight returns the adjusted score. It is part of the ScoreFunction interface. Returns nil if weight is not specified.
func (*WeightFactorFunction) Name ¶
func (fn *WeightFactorFunction) Name() string
Name represents the JSON field name under which the output of Source needs to be serialized by FunctionScoreQuery (see FunctionScoreQuery.Source).
func (*WeightFactorFunction) Source ¶
func (fn *WeightFactorFunction) Source() (interface{}, error)
Source returns the serializable JSON data of this score function.
func (*WeightFactorFunction) Weight ¶
func (fn *WeightFactorFunction) Weight(weight float64) *WeightFactorFunction
Weight adjusts the score of the score function. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-function-score-query.html#_using_function_score for details.
type WeightedAvgAggregation ¶
type WeightedAvgAggregation struct {
// contains filtered or unexported fields
}
WeightedAvgAggregation is a single-value metrics aggregation that computes the weighted average of numeric values that are extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents.
func NewWeightedAvgAggregation ¶
func NewWeightedAvgAggregation() *WeightedAvgAggregation
func (*WeightedAvgAggregation) Field ¶
func (a *WeightedAvgAggregation) Field(field string, config *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Format ¶
func (a *WeightedAvgAggregation) Format(format string) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Meta ¶
func (a *WeightedAvgAggregation) Meta(metaData map[string]interface{}) *WeightedAvgAggregation
Meta sets the meta data to be included in the aggregation response.
func (*WeightedAvgAggregation) Source ¶
func (a *WeightedAvgAggregation) Source() (interface{}, error)
func (*WeightedAvgAggregation) SubAggregation ¶
func (a *WeightedAvgAggregation) SubAggregation(name string, subAggregation Aggregation) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Value ¶
func (a *WeightedAvgAggregation) Value(value *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
func (*WeightedAvgAggregation) ValueType ¶
func (a *WeightedAvgAggregation) ValueType(valueType string) *WeightedAvgAggregation
func (*WeightedAvgAggregation) Weight ¶
func (a *WeightedAvgAggregation) Weight(weight *MultiValuesSourceFieldConfig) *WeightedAvgAggregation
type WildcardQuery ¶
type WildcardQuery struct {
// contains filtered or unexported fields
}
WildcardQuery matches documents that have fields matching a wildcard expression (not analyzed). Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow wildcard queries, a wildcard term should not start with one of the wildcards * or ?. The wildcard query maps to Lucene WildcardQuery.
For more details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-wildcard-query.html
Example ¶
package main import ( "context" "github.com/olivere/elastic" ) func main() { // Get a client to the local Elasticsearch instance. client, err := elastic.NewClient() if err != nil { // Handle error panic(err) } // Define wildcard query q := elastic.NewWildcardQuery("user", "oli*er?").Boost(1.2) searchResult, err := client.Search(). Index("twitter"). // search in index "twitter" Query(q). // use wildcard query defined above Do(context.TODO()) // execute if err != nil { // Handle error panic(err) } _ = searchResult }
Output:
func NewWildcardQuery ¶
func NewWildcardQuery(name, wildcard string) *WildcardQuery
NewWildcardQuery creates and initializes a new WildcardQuery.
func (*WildcardQuery) Boost ¶
func (q *WildcardQuery) Boost(boost float64) *WildcardQuery
Boost sets the boost for this query.
func (*WildcardQuery) QueryName ¶
func (q *WildcardQuery) QueryName(queryName string) *WildcardQuery
QueryName sets the name of this query.
func (*WildcardQuery) Rewrite ¶
func (q *WildcardQuery) Rewrite(rewrite string) *WildcardQuery
func (*WildcardQuery) Source ¶
func (q *WildcardQuery) Source() (interface{}, error)
Source returns the JSON serializable body of this query.
type WrapperQuery ¶
type WrapperQuery struct {
// contains filtered or unexported fields
}
WrapperQuery accepts any other query as base64 encoded string.
For details, see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-wrapper-query.html.
func NewWrapperQuery ¶
func NewWrapperQuery(source string) *WrapperQuery
NewWrapperQuery creates and initializes a new WrapperQuery.
func (*WrapperQuery) Source ¶
func (q *WrapperQuery) Source() (interface{}, error)
Source returns JSON for the query.
type XPackIlmDeleteLifecycleResponse ¶
type XPackIlmDeleteLifecycleResponse struct {
Acknowledged bool `json:"acknowledged"`
}
XPackIlmDeleteLifecycleResponse is the response of XPackIlmDeleteLifecycleService.Do.
type XPackIlmDeleteLifecycleService ¶
type XPackIlmDeleteLifecycleService struct {
// contains filtered or unexported fields
}
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-get-lifecycle.html.
func NewXPackIlmDeleteLifecycleService ¶
func NewXPackIlmDeleteLifecycleService(client *Client) *XPackIlmDeleteLifecycleService
NewXPackIlmDeleteLifecycleService creates a new XPackIlmDeleteLifecycleService.
func (*XPackIlmDeleteLifecycleService) Do ¶
func (s *XPackIlmDeleteLifecycleService) Do(ctx context.Context) (*XPackIlmDeleteLifecycleResponse, error)
Do executes the operation.
func (*XPackIlmDeleteLifecycleService) ErrorTrace ¶
func (s *XPackIlmDeleteLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmDeleteLifecycleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackIlmDeleteLifecycleService) FilterPath ¶
func (s *XPackIlmDeleteLifecycleService) FilterPath(filterPath ...string) *XPackIlmDeleteLifecycleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackIlmDeleteLifecycleService) FlatSettings ¶
func (s *XPackIlmDeleteLifecycleService) FlatSettings(flatSettings bool) *XPackIlmDeleteLifecycleService
FlatSettings is returns settings in flat format (default: false).
func (*XPackIlmDeleteLifecycleService) Header ¶
func (s *XPackIlmDeleteLifecycleService) Header(name string, value string) *XPackIlmDeleteLifecycleService
Header adds a header to the request.
func (*XPackIlmDeleteLifecycleService) Headers ¶
func (s *XPackIlmDeleteLifecycleService) Headers(headers http.Header) *XPackIlmDeleteLifecycleService
Headers specifies the headers of the request.
func (*XPackIlmDeleteLifecycleService) Human ¶
func (s *XPackIlmDeleteLifecycleService) Human(human bool) *XPackIlmDeleteLifecycleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackIlmDeleteLifecycleService) MasterTimeout ¶
func (s *XPackIlmDeleteLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmDeleteLifecycleService
MasterTimeout specifies the timeout for connection to master.
func (*XPackIlmDeleteLifecycleService) Policy ¶
func (s *XPackIlmDeleteLifecycleService) Policy(policy string) *XPackIlmDeleteLifecycleService
Policy is the name of the index lifecycle policy.
func (*XPackIlmDeleteLifecycleService) Pretty ¶
func (s *XPackIlmDeleteLifecycleService) Pretty(pretty bool) *XPackIlmDeleteLifecycleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackIlmDeleteLifecycleService) Timeout ¶
func (s *XPackIlmDeleteLifecycleService) Timeout(timeout string) *XPackIlmDeleteLifecycleService
Timeout is an explicit operation timeout.
func (*XPackIlmDeleteLifecycleService) Validate ¶
func (s *XPackIlmDeleteLifecycleService) Validate() error
Validate checks if the operation is valid.
type XPackIlmGetLifecycleResponse ¶
type XPackIlmGetLifecycleResponse struct { Version int `json:"version,omitempty"` ModifiedDate string `json:"modified_date,omitempty"` // e.g. "2019-10-03T17:43:42.720Z" Policy map[string]interface{} `json:"policy,omitempty"` }
XPackIlmGetLifecycleResponse is the response of XPackIlmGetLifecycleService.Do.
type XPackIlmGetLifecycleService ¶
type XPackIlmGetLifecycleService struct {
// contains filtered or unexported fields
}
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-get-lifecycle.html.
func NewXPackIlmGetLifecycleService ¶
func NewXPackIlmGetLifecycleService(client *Client) *XPackIlmGetLifecycleService
NewXPackIlmGetLifecycleService creates a new XPackIlmGetLifecycleService.
func (*XPackIlmGetLifecycleService) Do ¶
func (s *XPackIlmGetLifecycleService) Do(ctx context.Context) (map[string]*XPackIlmGetLifecycleResponse, error)
Do executes the operation.
func (*XPackIlmGetLifecycleService) ErrorTrace ¶
func (s *XPackIlmGetLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmGetLifecycleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackIlmGetLifecycleService) FilterPath ¶
func (s *XPackIlmGetLifecycleService) FilterPath(filterPath ...string) *XPackIlmGetLifecycleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackIlmGetLifecycleService) FlatSettings ¶
func (s *XPackIlmGetLifecycleService) FlatSettings(flatSettings bool) *XPackIlmGetLifecycleService
FlatSettings is returns settings in flat format (default: false).
func (*XPackIlmGetLifecycleService) Header ¶
func (s *XPackIlmGetLifecycleService) Header(name string, value string) *XPackIlmGetLifecycleService
Header adds a header to the request.
func (*XPackIlmGetLifecycleService) Headers ¶
func (s *XPackIlmGetLifecycleService) Headers(headers http.Header) *XPackIlmGetLifecycleService
Headers specifies the headers of the request.
func (*XPackIlmGetLifecycleService) Human ¶
func (s *XPackIlmGetLifecycleService) Human(human bool) *XPackIlmGetLifecycleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackIlmGetLifecycleService) MasterTimeout ¶
func (s *XPackIlmGetLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmGetLifecycleService
MasterTimeout specifies the timeout for connection to master.
func (*XPackIlmGetLifecycleService) Policy ¶
func (s *XPackIlmGetLifecycleService) Policy(policies ...string) *XPackIlmGetLifecycleService
Policy is the name of the index lifecycle policy.
func (*XPackIlmGetLifecycleService) Pretty ¶
func (s *XPackIlmGetLifecycleService) Pretty(pretty bool) *XPackIlmGetLifecycleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackIlmGetLifecycleService) Timeout ¶
func (s *XPackIlmGetLifecycleService) Timeout(timeout string) *XPackIlmGetLifecycleService
Timeout is an explicit operation timeout.
func (*XPackIlmGetLifecycleService) Validate ¶
func (s *XPackIlmGetLifecycleService) Validate() error
Validate checks if the operation is valid.
type XPackIlmPutLifecycleResponse ¶
type XPackIlmPutLifecycleResponse struct {
Acknowledged bool `json:"acknowledged"`
}
XPackIlmPutLifecycleSResponse is the response of XPackIlmPutLifecycleService.Do.
type XPackIlmPutLifecycleService ¶
type XPackIlmPutLifecycleService struct {
// contains filtered or unexported fields
}
See the documentation at https://www.elastic.co/guide/en/elasticsearch/reference/6.8/ilm-put-lifecycle.html
func NewXPackIlmPutLifecycleService ¶
func NewXPackIlmPutLifecycleService(client *Client) *XPackIlmPutLifecycleService
NewXPackIlmPutLifecycleService creates a new XPackIlmPutLifecycleService.
func (*XPackIlmPutLifecycleService) BodyJson ¶
func (s *XPackIlmPutLifecycleService) BodyJson(body interface{}) *XPackIlmPutLifecycleService
BodyJson is documented as: The template definition.
func (*XPackIlmPutLifecycleService) BodyString ¶
func (s *XPackIlmPutLifecycleService) BodyString(body string) *XPackIlmPutLifecycleService
BodyString is documented as: The template definition.
func (*XPackIlmPutLifecycleService) Do ¶
func (s *XPackIlmPutLifecycleService) Do(ctx context.Context) (*XPackIlmPutLifecycleResponse, error)
Do executes the operation.
func (*XPackIlmPutLifecycleService) ErrorTrace ¶
func (s *XPackIlmPutLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmPutLifecycleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackIlmPutLifecycleService) FilterPath ¶
func (s *XPackIlmPutLifecycleService) FilterPath(filterPath ...string) *XPackIlmPutLifecycleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackIlmPutLifecycleService) FlatSettings ¶
func (s *XPackIlmPutLifecycleService) FlatSettings(flatSettings bool) *XPackIlmPutLifecycleService
FlatSettings indicates whether to return settings in flat format (default: false).
func (*XPackIlmPutLifecycleService) Header ¶
func (s *XPackIlmPutLifecycleService) Header(name string, value string) *XPackIlmPutLifecycleService
Header adds a header to the request.
func (*XPackIlmPutLifecycleService) Headers ¶
func (s *XPackIlmPutLifecycleService) Headers(headers http.Header) *XPackIlmPutLifecycleService
Headers specifies the headers of the request.
func (*XPackIlmPutLifecycleService) Human ¶
func (s *XPackIlmPutLifecycleService) Human(human bool) *XPackIlmPutLifecycleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackIlmPutLifecycleService) MasterTimeout ¶
func (s *XPackIlmPutLifecycleService) MasterTimeout(masterTimeout string) *XPackIlmPutLifecycleService
MasterTimeout specifies the timeout for connection to master.
func (*XPackIlmPutLifecycleService) Policy ¶
func (s *XPackIlmPutLifecycleService) Policy(policy string) *XPackIlmPutLifecycleService
Policy is the name of the index lifecycle policy.
func (*XPackIlmPutLifecycleService) Pretty ¶
func (s *XPackIlmPutLifecycleService) Pretty(pretty bool) *XPackIlmPutLifecycleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackIlmPutLifecycleService) Timeout ¶
func (s *XPackIlmPutLifecycleService) Timeout(timeout string) *XPackIlmPutLifecycleService
Timeout is an explicit operation timeout.
func (*XPackIlmPutLifecycleService) Validate ¶
func (s *XPackIlmPutLifecycleService) Validate() error
Validate checks if the operation is valid.
type XPackInfoBuild ¶
XPackInfoBuild is the xpack build info
type XPackInfoFeatures ¶
type XPackInfoFeatures struct { Graph XPackInfoGraph `json:"graph"` Logstash XPackInfoLogstash `json:"logstash"` MachineLearning XPackInfoML `json:"ml"` Monitoring XPackInfoMonitoring `json:"monitoring"` Rollup XPackInfoRollup `json:"rollup"` Security XPackInfoSecurity `json:"security"` Watcher XPackInfoWatcher `json:"watcher"` }
XPackInfoFeatures is the xpack feature info object
type XPackInfoGraph ¶
type XPackInfoGraph struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoGraph is the xpack graph plugin info
type XPackInfoLicense ¶
type XPackInfoLicense struct { UID string `json:"uid"` Type string `json:"type"` Mode string `json:"mode"` Status string `json:"status"` ExpiryMilis int `json:"expiry_date_in_millis"` }
XPackInfoLicense is the xpack license info
type XPackInfoLogstash ¶
type XPackInfoLogstash struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoLogstash is the xpack logstash plugin info
type XPackInfoML ¶
type XPackInfoML struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` NativeCodeInfo map[string]string `json:"native_code_info"` }
XPackInfoML is the xpack machine learning plugin info
type XPackInfoMonitoring ¶
type XPackInfoMonitoring struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoMonitoring is the xpack monitoring plugin info
type XPackInfoRollup ¶
type XPackInfoRollup struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoRollup is the xpack rollup plugin info
type XPackInfoSecurity ¶
type XPackInfoSecurity struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoSecurity is the xpack security plugin info
type XPackInfoService ¶
type XPackInfoService struct {
// contains filtered or unexported fields
}
XPackInfoService retrieves xpack info. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/info-api.html.
func NewXPackInfoService ¶
func NewXPackInfoService(client *Client) *XPackInfoService
NewXPackInfoService creates a new XPackInfoService.
func (*XPackInfoService) Do ¶
func (s *XPackInfoService) Do(ctx context.Context) (*XPackInfoServiceResponse, error)
Do executes the operation.
func (*XPackInfoService) ErrorTrace ¶
func (s *XPackInfoService) ErrorTrace(errorTrace bool) *XPackInfoService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackInfoService) FilterPath ¶
func (s *XPackInfoService) FilterPath(filterPath ...string) *XPackInfoService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackInfoService) Header ¶
func (s *XPackInfoService) Header(name string, value string) *XPackInfoService
Header adds a header to the request.
func (*XPackInfoService) Headers ¶
func (s *XPackInfoService) Headers(headers http.Header) *XPackInfoService
Headers specifies the headers of the request.
func (*XPackInfoService) Human ¶
func (s *XPackInfoService) Human(human bool) *XPackInfoService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackInfoService) Pretty ¶
func (s *XPackInfoService) Pretty(pretty bool) *XPackInfoService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackInfoService) Validate ¶
func (s *XPackInfoService) Validate() error
Validate checks if the operation is valid.
type XPackInfoServiceResponse ¶
type XPackInfoServiceResponse struct { Build XPackInfoBuild `json:"build"` License XPackInfoLicense `json:"license"` Features XPackInfoFeatures `json:"features"` Tagline string `json:"tagline"` }
XPackInfoServiceResponse is the response of XPackInfoService.Do.
type XPackInfoWatcher ¶
type XPackInfoWatcher struct { Description string `json:"description"` Available bool `json:"available"` Enabled bool `json:"enabled"` }
XPackInfoWatcher is the xpack watcher plugin info
type XPackSecurityApplicationPrivileges ¶
type XPackSecurityApplicationPrivileges struct { Application string `json:"application"` Privileges []string `json:"privileges"` Ressources []string `json:"resources"` }
XPackSecurityApplicationPrivileges is the application privileges object
type XPackSecurityDeleteRoleMappingResponse ¶
type XPackSecurityDeleteRoleMappingResponse struct {
Found bool `json:"found"`
}
XPackSecurityDeleteRoleMappingResponse is the response of XPackSecurityDeleteRoleMappingService.Do.
type XPackSecurityDeleteRoleMappingService ¶
type XPackSecurityDeleteRoleMappingService struct {
// contains filtered or unexported fields
}
XPackSecurityDeleteRoleMappingService delete a role mapping by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-delete-role-mapping.html.
func NewXPackSecurityDeleteRoleMappingService ¶
func NewXPackSecurityDeleteRoleMappingService(client *Client) *XPackSecurityDeleteRoleMappingService
NewXPackSecurityDeleteRoleMappingService creates a new XPackSecurityDeleteRoleMappingService.
func (*XPackSecurityDeleteRoleMappingService) Do ¶
func (s *XPackSecurityDeleteRoleMappingService) Do(ctx context.Context) (*XPackSecurityDeleteRoleMappingResponse, error)
Do executes the operation.
func (*XPackSecurityDeleteRoleMappingService) ErrorTrace ¶
func (s *XPackSecurityDeleteRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteRoleMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityDeleteRoleMappingService) FilterPath ¶
func (s *XPackSecurityDeleteRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityDeleteRoleMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityDeleteRoleMappingService) Header ¶
func (s *XPackSecurityDeleteRoleMappingService) Header(name string, value string) *XPackSecurityDeleteRoleMappingService
Header adds a header to the request.
func (*XPackSecurityDeleteRoleMappingService) Headers ¶
func (s *XPackSecurityDeleteRoleMappingService) Headers(headers http.Header) *XPackSecurityDeleteRoleMappingService
Headers specifies the headers of the request.
func (*XPackSecurityDeleteRoleMappingService) Human ¶
func (s *XPackSecurityDeleteRoleMappingService) Human(human bool) *XPackSecurityDeleteRoleMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityDeleteRoleMappingService) Name ¶
func (s *XPackSecurityDeleteRoleMappingService) Name(name string) *XPackSecurityDeleteRoleMappingService
Name is name of the role mapping to delete.
func (*XPackSecurityDeleteRoleMappingService) Pretty ¶
func (s *XPackSecurityDeleteRoleMappingService) Pretty(pretty bool) *XPackSecurityDeleteRoleMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityDeleteRoleMappingService) Validate ¶
func (s *XPackSecurityDeleteRoleMappingService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityDeleteRoleResponse ¶
type XPackSecurityDeleteRoleResponse struct {
Found bool `json:"found"`
}
XPackSecurityDeleteRoleResponse is the response of XPackSecurityDeleteRoleService.Do.
type XPackSecurityDeleteRoleService ¶
type XPackSecurityDeleteRoleService struct {
// contains filtered or unexported fields
}
XPackSecurityDeleteRoleService delete a role by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-delete-role.html.
func NewXPackSecurityDeleteRoleService ¶
func NewXPackSecurityDeleteRoleService(client *Client) *XPackSecurityDeleteRoleService
NewXPackSecurityDeleteRoleService creates a new XPackSecurityDeleteRoleService.
func (*XPackSecurityDeleteRoleService) Do ¶
func (s *XPackSecurityDeleteRoleService) Do(ctx context.Context) (*XPackSecurityDeleteRoleResponse, error)
Do executes the operation.
func (*XPackSecurityDeleteRoleService) ErrorTrace ¶
func (s *XPackSecurityDeleteRoleService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteRoleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityDeleteRoleService) FilterPath ¶
func (s *XPackSecurityDeleteRoleService) FilterPath(filterPath ...string) *XPackSecurityDeleteRoleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityDeleteRoleService) Header ¶
func (s *XPackSecurityDeleteRoleService) Header(name string, value string) *XPackSecurityDeleteRoleService
Header adds a header to the request.
func (*XPackSecurityDeleteRoleService) Headers ¶
func (s *XPackSecurityDeleteRoleService) Headers(headers http.Header) *XPackSecurityDeleteRoleService
Headers specifies the headers of the request.
func (*XPackSecurityDeleteRoleService) Human ¶
func (s *XPackSecurityDeleteRoleService) Human(human bool) *XPackSecurityDeleteRoleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityDeleteRoleService) Name ¶
func (s *XPackSecurityDeleteRoleService) Name(name string) *XPackSecurityDeleteRoleService
Name is name of the role to delete.
func (*XPackSecurityDeleteRoleService) Pretty ¶
func (s *XPackSecurityDeleteRoleService) Pretty(pretty bool) *XPackSecurityDeleteRoleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityDeleteRoleService) Validate ¶
func (s *XPackSecurityDeleteRoleService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityDeleteUserResponse ¶
type XPackSecurityDeleteUserResponse struct {
Found bool `json:"found"`
}
XPackSecurityDeleteUserResponse is the response of XPackSecurityDeleteUserService.Do.
type XPackSecurityDeleteUserService ¶
type XPackSecurityDeleteUserService struct {
// contains filtered or unexported fields
}
XPackSecurityDeleteUserService delete a user by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/7.4/security-api-delete-user.html.
func NewXPackSecurityDeleteUserService ¶
func NewXPackSecurityDeleteUserService(client *Client) *XPackSecurityDeleteUserService
NewXPackSecurityDeleteUserService creates a new XPackSecurityDeleteUserService.
func (*XPackSecurityDeleteUserService) Do ¶
func (s *XPackSecurityDeleteUserService) Do(ctx context.Context) (*XPackSecurityDeleteUserResponse, error)
Do executes the operation.
func (*XPackSecurityDeleteUserService) ErrorTrace ¶
func (s *XPackSecurityDeleteUserService) ErrorTrace(errorTrace bool) *XPackSecurityDeleteUserService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityDeleteUserService) FilterPath ¶
func (s *XPackSecurityDeleteUserService) FilterPath(filterPath ...string) *XPackSecurityDeleteUserService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityDeleteUserService) Header ¶
func (s *XPackSecurityDeleteUserService) Header(name string, value string) *XPackSecurityDeleteUserService
Header adds a header to the request.
func (*XPackSecurityDeleteUserService) Headers ¶
func (s *XPackSecurityDeleteUserService) Headers(headers http.Header) *XPackSecurityDeleteUserService
Headers specifies the headers of the request.
func (*XPackSecurityDeleteUserService) Human ¶
func (s *XPackSecurityDeleteUserService) Human(human bool) *XPackSecurityDeleteUserService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityDeleteUserService) Pretty ¶
func (s *XPackSecurityDeleteUserService) Pretty(pretty bool) *XPackSecurityDeleteUserService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityDeleteUserService) Refresh ¶
func (s *XPackSecurityDeleteUserService) Refresh(refresh string) *XPackSecurityDeleteUserService
Refresh specifies if and how to wait for refreshing the shards after the request. Possible values are "true" (default), "false" and "wait_for", all of type string.
func (*XPackSecurityDeleteUserService) Username ¶
func (s *XPackSecurityDeleteUserService) Username(username string) *XPackSecurityDeleteUserService
Username is name of the user to delete.
func (*XPackSecurityDeleteUserService) Validate ¶
func (s *XPackSecurityDeleteUserService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityGetRoleMappingResponse ¶
type XPackSecurityGetRoleMappingResponse map[string]XPackSecurityRoleMapping
XPackSecurityGetRoleMappingResponse is the response of XPackSecurityGetRoleMappingService.Do.
type XPackSecurityGetRoleMappingService ¶
type XPackSecurityGetRoleMappingService struct {
// contains filtered or unexported fields
}
XPackSecurityGetRoleMappingService retrieves a role mapping by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-get-role-mapping.html.
func NewXPackSecurityGetRoleMappingService ¶
func NewXPackSecurityGetRoleMappingService(client *Client) *XPackSecurityGetRoleMappingService
NewXPackSecurityGetRoleMappingService creates a new XPackSecurityGetRoleMappingService.
func (*XPackSecurityGetRoleMappingService) Do ¶
func (s *XPackSecurityGetRoleMappingService) Do(ctx context.Context) (*XPackSecurityGetRoleMappingResponse, error)
Do executes the operation.
func (*XPackSecurityGetRoleMappingService) ErrorTrace ¶
func (s *XPackSecurityGetRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityGetRoleMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityGetRoleMappingService) FilterPath ¶
func (s *XPackSecurityGetRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityGetRoleMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityGetRoleMappingService) Header ¶
func (s *XPackSecurityGetRoleMappingService) Header(name string, value string) *XPackSecurityGetRoleMappingService
Header adds a header to the request.
func (*XPackSecurityGetRoleMappingService) Headers ¶
func (s *XPackSecurityGetRoleMappingService) Headers(headers http.Header) *XPackSecurityGetRoleMappingService
Headers specifies the headers of the request.
func (*XPackSecurityGetRoleMappingService) Human ¶
func (s *XPackSecurityGetRoleMappingService) Human(human bool) *XPackSecurityGetRoleMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityGetRoleMappingService) Name ¶
func (s *XPackSecurityGetRoleMappingService) Name(name string) *XPackSecurityGetRoleMappingService
Name is name of the role mapping to retrieve.
func (*XPackSecurityGetRoleMappingService) Pretty ¶
func (s *XPackSecurityGetRoleMappingService) Pretty(pretty bool) *XPackSecurityGetRoleMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityGetRoleMappingService) Validate ¶
func (s *XPackSecurityGetRoleMappingService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityGetRoleResponse ¶
type XPackSecurityGetRoleResponse map[string]XPackSecurityRole
XPackSecurityGetRoleResponse is the response of XPackSecurityGetRoleService.Do.
type XPackSecurityGetRoleService ¶
type XPackSecurityGetRoleService struct {
// contains filtered or unexported fields
}
XPackSecurityGetRoleService retrieves a role by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-get-role.html.
func NewXPackSecurityGetRoleService ¶
func NewXPackSecurityGetRoleService(client *Client) *XPackSecurityGetRoleService
NewXPackSecurityGetRoleService creates a new XPackSecurityGetRoleService.
func (*XPackSecurityGetRoleService) Do ¶
func (s *XPackSecurityGetRoleService) Do(ctx context.Context) (*XPackSecurityGetRoleResponse, error)
Do executes the operation.
func (*XPackSecurityGetRoleService) ErrorTrace ¶
func (s *XPackSecurityGetRoleService) ErrorTrace(errorTrace bool) *XPackSecurityGetRoleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityGetRoleService) FilterPath ¶
func (s *XPackSecurityGetRoleService) FilterPath(filterPath ...string) *XPackSecurityGetRoleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityGetRoleService) Header ¶
func (s *XPackSecurityGetRoleService) Header(name string, value string) *XPackSecurityGetRoleService
Header adds a header to the request.
func (*XPackSecurityGetRoleService) Headers ¶
func (s *XPackSecurityGetRoleService) Headers(headers http.Header) *XPackSecurityGetRoleService
Headers specifies the headers of the request.
func (*XPackSecurityGetRoleService) Human ¶
func (s *XPackSecurityGetRoleService) Human(human bool) *XPackSecurityGetRoleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityGetRoleService) Name ¶
func (s *XPackSecurityGetRoleService) Name(name string) *XPackSecurityGetRoleService
Name is name of the role to retrieve.
func (*XPackSecurityGetRoleService) Pretty ¶
func (s *XPackSecurityGetRoleService) Pretty(pretty bool) *XPackSecurityGetRoleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityGetRoleService) Validate ¶
func (s *XPackSecurityGetRoleService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityGetUserResponse ¶
type XPackSecurityGetUserResponse map[string]XPackSecurityUser
XPackSecurityGetUserResponse is the response of XPackSecurityGetUserService.Do.
type XPackSecurityGetUserService ¶
type XPackSecurityGetUserService struct {
// contains filtered or unexported fields
}
XPackSecurityGetUserService retrieves a user by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/security-api-get-user.html.
func NewXPackSecurityGetUserService ¶
func NewXPackSecurityGetUserService(client *Client) *XPackSecurityGetUserService
NewXPackSecurityGetUserService creates a new XPackSecurityGetUserService.
func (*XPackSecurityGetUserService) Do ¶
func (s *XPackSecurityGetUserService) Do(ctx context.Context) (*XPackSecurityGetUserResponse, error)
Do executes the operation.
func (*XPackSecurityGetUserService) ErrorTrace ¶
func (s *XPackSecurityGetUserService) ErrorTrace(errorTrace bool) *XPackSecurityGetUserService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityGetUserService) FilterPath ¶
func (s *XPackSecurityGetUserService) FilterPath(filterPath ...string) *XPackSecurityGetUserService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityGetUserService) Header ¶
func (s *XPackSecurityGetUserService) Header(name string, value string) *XPackSecurityGetUserService
Header adds a header to the request.
func (*XPackSecurityGetUserService) Headers ¶
func (s *XPackSecurityGetUserService) Headers(headers http.Header) *XPackSecurityGetUserService
Headers specifies the headers of the request.
func (*XPackSecurityGetUserService) Human ¶
func (s *XPackSecurityGetUserService) Human(human bool) *XPackSecurityGetUserService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityGetUserService) Pretty ¶
func (s *XPackSecurityGetUserService) Pretty(pretty bool) *XPackSecurityGetUserService
Pretty indicates that the JSON response be indented and human readable.
func (*XPackSecurityGetUserService) Usernames ¶
func (s *XPackSecurityGetUserService) Usernames(usernames ...string) *XPackSecurityGetUserService
Usernames are the names of one or more users to retrieve.
func (*XPackSecurityGetUserService) Validate ¶
func (s *XPackSecurityGetUserService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityIndicesPermissions ¶
type XPackSecurityIndicesPermissions struct { Names []string `json:"names"` Privileges []string `json:"privileges"` FieldSecurity interface{} `json:"field_security"` Query string `json:"query"` }
XPackSecurityIndicesPermissions is the indices permission object
type XPackSecurityPutRole ¶
type XPackSecurityPutRole struct {
Created bool `json:"created"`
}
type XPackSecurityPutRoleMapping ¶
type XPackSecurityPutRoleMapping struct {
Created bool `json:"created"`
}
type XPackSecurityPutRoleMappingResponse ¶
type XPackSecurityPutRoleMappingResponse struct {
Role_Mapping XPackSecurityPutRoleMapping
}
XPackSecurityPutRoleMappingResponse is the response of XPackSecurityPutRoleMappingService.Do.
type XPackSecurityPutRoleMappingService ¶
type XPackSecurityPutRoleMappingService struct {
// contains filtered or unexported fields
}
XPackSecurityPutRoleMappingService create or update a role mapping by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-put-role-mapping.html.
func NewXPackSecurityPutRoleMappingService ¶
func NewXPackSecurityPutRoleMappingService(client *Client) *XPackSecurityPutRoleMappingService
NewXPackSecurityPutRoleMappingService creates a new XPackSecurityPutRoleMappingService.
func (*XPackSecurityPutRoleMappingService) Body ¶
func (s *XPackSecurityPutRoleMappingService) Body(body interface{}) *XPackSecurityPutRoleMappingService
Body specifies the role mapping. Use a string or a type that will get serialized as JSON.
func (*XPackSecurityPutRoleMappingService) Do ¶
func (s *XPackSecurityPutRoleMappingService) Do(ctx context.Context) (*XPackSecurityPutRoleMappingResponse, error)
Do executes the operation.
func (*XPackSecurityPutRoleMappingService) ErrorTrace ¶
func (s *XPackSecurityPutRoleMappingService) ErrorTrace(errorTrace bool) *XPackSecurityPutRoleMappingService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityPutRoleMappingService) FilterPath ¶
func (s *XPackSecurityPutRoleMappingService) FilterPath(filterPath ...string) *XPackSecurityPutRoleMappingService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityPutRoleMappingService) Header ¶
func (s *XPackSecurityPutRoleMappingService) Header(name string, value string) *XPackSecurityPutRoleMappingService
Header adds a header to the request.
func (*XPackSecurityPutRoleMappingService) Headers ¶
func (s *XPackSecurityPutRoleMappingService) Headers(headers http.Header) *XPackSecurityPutRoleMappingService
Headers specifies the headers of the request.
func (*XPackSecurityPutRoleMappingService) Human ¶
func (s *XPackSecurityPutRoleMappingService) Human(human bool) *XPackSecurityPutRoleMappingService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityPutRoleMappingService) Name ¶
func (s *XPackSecurityPutRoleMappingService) Name(name string) *XPackSecurityPutRoleMappingService
Name is name of the role mapping to create/update.
func (*XPackSecurityPutRoleMappingService) Pretty ¶
func (s *XPackSecurityPutRoleMappingService) Pretty(pretty bool) *XPackSecurityPutRoleMappingService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityPutRoleMappingService) Validate ¶
func (s *XPackSecurityPutRoleMappingService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityPutRoleResponse ¶
type XPackSecurityPutRoleResponse struct {
Role XPackSecurityPutRole
}
XPackSecurityPutRoleResponse is the response of XPackSecurityPutRoleService.Do.
type XPackSecurityPutRoleService ¶
type XPackSecurityPutRoleService struct {
// contains filtered or unexported fields
}
XPackSecurityPutRoleService retrieves a role by its name. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-put-role.html.
func NewXPackSecurityPutRoleService ¶
func NewXPackSecurityPutRoleService(client *Client) *XPackSecurityPutRoleService
NewXPackSecurityPutRoleService creates a new XPackSecurityPutRoleService.
func (*XPackSecurityPutRoleService) Body ¶
func (s *XPackSecurityPutRoleService) Body(body interface{}) *XPackSecurityPutRoleService
Body specifies the role. Use a string or a type that will get serialized as JSON.
func (*XPackSecurityPutRoleService) Do ¶
func (s *XPackSecurityPutRoleService) Do(ctx context.Context) (*XPackSecurityPutRoleResponse, error)
Do executes the operation.
func (*XPackSecurityPutRoleService) ErrorTrace ¶
func (s *XPackSecurityPutRoleService) ErrorTrace(errorTrace bool) *XPackSecurityPutRoleService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityPutRoleService) FilterPath ¶
func (s *XPackSecurityPutRoleService) FilterPath(filterPath ...string) *XPackSecurityPutRoleService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityPutRoleService) Header ¶
func (s *XPackSecurityPutRoleService) Header(name string, value string) *XPackSecurityPutRoleService
Header adds a header to the request.
func (*XPackSecurityPutRoleService) Headers ¶
func (s *XPackSecurityPutRoleService) Headers(headers http.Header) *XPackSecurityPutRoleService
Headers specifies the headers of the request.
func (*XPackSecurityPutRoleService) Human ¶
func (s *XPackSecurityPutRoleService) Human(human bool) *XPackSecurityPutRoleService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityPutRoleService) Name ¶
func (s *XPackSecurityPutRoleService) Name(name string) *XPackSecurityPutRoleService
Name is name of the role to create.
func (*XPackSecurityPutRoleService) Pretty ¶
func (s *XPackSecurityPutRoleService) Pretty(pretty bool) *XPackSecurityPutRoleService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityPutRoleService) Validate ¶
func (s *XPackSecurityPutRoleService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityPutUserRequest ¶
type XPackSecurityPutUserRequest struct { Enabled bool `json:"enabled"` Email string `json:"email,omitempty"` FullName string `json:"full_name,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Password string `json:"password,omitempty"` PasswordHash string `json:"password_hash,omitempty"` Roles []string `json:"roles"` }
XPackSecurityPutUserRequest specifies the data required/allowed to add a new user.
type XPackSecurityPutUserResponse ¶
type XPackSecurityPutUserResponse struct {
Created bool `json:"created"`
}
XPackSecurityPutUserResponse is the response of XPackSecurityPutUserService.Do.
type XPackSecurityPutUserService ¶
type XPackSecurityPutUserService struct {
// contains filtered or unexported fields
}
func NewXPackSecurityPutUserService ¶
func NewXPackSecurityPutUserService(client *Client) *XPackSecurityPutUserService
NewXPackSecurityPutUserService creates a new XPackSecurityPutUserService.
func (*XPackSecurityPutUserService) Body ¶
func (s *XPackSecurityPutUserService) Body(body interface{}) *XPackSecurityPutUserService
Body specifies the user. Use a string or a type that will get serialized as JSON.
func (*XPackSecurityPutUserService) Do ¶
func (s *XPackSecurityPutUserService) Do(ctx context.Context) (*XPackSecurityPutUserResponse, error)
Do executes the operation.
func (*XPackSecurityPutUserService) ErrorTrace ¶
func (s *XPackSecurityPutUserService) ErrorTrace(errorTrace bool) *XPackSecurityPutUserService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackSecurityPutUserService) FilterPath ¶
func (s *XPackSecurityPutUserService) FilterPath(filterPath ...string) *XPackSecurityPutUserService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackSecurityPutUserService) Header ¶
func (s *XPackSecurityPutUserService) Header(name string, value string) *XPackSecurityPutUserService
Header adds a header to the request.
func (*XPackSecurityPutUserService) Headers ¶
func (s *XPackSecurityPutUserService) Headers(headers http.Header) *XPackSecurityPutUserService
Headers specifies the headers of the request.
func (*XPackSecurityPutUserService) Human ¶
func (s *XPackSecurityPutUserService) Human(human bool) *XPackSecurityPutUserService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackSecurityPutUserService) Pretty ¶
func (s *XPackSecurityPutUserService) Pretty(pretty bool) *XPackSecurityPutUserService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackSecurityPutUserService) Refresh ¶
func (s *XPackSecurityPutUserService) Refresh(refresh string) *XPackSecurityPutUserService
Refresh specifies if and how to wait for refreshing the shards after the request. Possible values are "true" (default), "false" and "wait_for", all of type string.
func (*XPackSecurityPutUserService) User ¶
func (s *XPackSecurityPutUserService) User(user *XPackSecurityPutUserRequest) *XPackSecurityPutUserService
User specifies the data of the new user.
See https://www.elastic.co/guide/en/elasticsearch/reference/7.4/security-api-put-user.html for details.
func (*XPackSecurityPutUserService) Username ¶
func (s *XPackSecurityPutUserService) Username(username string) *XPackSecurityPutUserService
Username is the name of the user to add.
func (*XPackSecurityPutUserService) Validate ¶
func (s *XPackSecurityPutUserService) Validate() error
Validate checks if the operation is valid.
type XPackSecurityRole ¶
type XPackSecurityRole struct { Cluster []string `json:"cluster"` Indices []XPackSecurityIndicesPermissions `json:"indices"` Applications []XPackSecurityApplicationPrivileges `json:"applications"` RunAs []string `json:"run_as"` Global map[string]interface{} `json:"global"` Metadata map[string]interface{} `json:"metadata"` TransientMetadata map[string]interface{} `json:"transient_metadata"` }
XPackSecurityRole is the role object.
The Java source for this struct is defined here: https://github.com/elastic/elasticsearch/blob/6.7/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java
type XPackSecurityRoleMapping ¶
type XPackSecurityRoleMapping struct { Enabled bool `json:"enabled"` Roles []string `json:"roles"` Rules map[string]interface{} `json:"rules"` Metadata interface{} `json:"metadata"` }
XPackSecurityRoleMapping is the role mapping object
type XPackSecurityUser ¶
type XPackSecurityUser struct { Username string `json:"username"` Roles []string `json:"roles"` Fullname string `json:"full_name"` Email string `json:"email"` Metadata map[string]interface{} `json:"metadata"` Enabled bool `json:"enabled"` }
XPackSecurityUser is the user object.
The Java source for this struct is defined here:
type XPackWatch ¶
type XPackWatch struct { Trigger map[string]map[string]interface{} `json:"trigger"` Input map[string]map[string]interface{} `json:"input"` Condition map[string]map[string]interface{} `json:"condition"` Transform map[string]interface{} `json:"transform,omitempty"` ThrottlePeriod string `json:"throttle_period,omitempty"` ThrottlePeriodInMillis int64 `json:"throttle_period_in_millis,omitempty"` Actions map[string]map[string]interface{} `json:"actions"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *XPackWatchStatus `json:"status,omitempty"` }
type XPackWatchActionStatus ¶
type XPackWatchActionStatus struct { AckStatus *XPackWatchActionAckStatus `json:"ack"` LastExecution *time.Time `json:"last_execution,omitempty"` LastSuccessfulExecution *time.Time `json:"last_successful_execution,omitempty"` LastThrottle *XPackWatchActionThrottle `json:"last_throttle,omitempty"` }
type XPackWatchRecord ¶
type XPackWatchRecord struct { WatchId string `json:"watch_id"` Node string `json:"node"` Messages []string `json:"messages"` State string `json:"state"` Status *XPackWatchRecordStatus `json:"status"` Input map[string]map[string]interface{} `json:"input"` Condition map[string]map[string]interface{} `json:"condition"` Result map[string]interface{} `json:"Result"` }
type XPackWatchRecordStatus ¶
type XPackWatchRecordStatus struct { Version int `json:"version"` State map[string]interface{} `json:"state"` LastChecked string `json:"last_checked"` LastMetCondition string `json:"last_met_condition"` Actions map[string]map[string]interface{} `json:"actions"` ExecutionState string `json:"execution_state"` }
type XPackWatchStatus ¶
type XPackWatchStatus struct { State *XPackWatchExecutionState `json:"state,omitempty"` LastChecked *time.Time `json:"last_checked,omitempty"` LastMetCondition *time.Time `json:"last_met_condition,omitempty"` Actions map[string]*XPackWatchActionStatus `json:"actions,omitempty"` ExecutionState *XPackWatchActionExecutionState `json:"execution_state,omitempty"` Headers map[string]string `json:"headers,omitempty"` Version int64 `json:"version"` }
type XPackWatcherAckWatchResponse ¶
type XPackWatcherAckWatchResponse struct {
Status *XPackWatcherAckWatchStatus `json:"status"`
}
XPackWatcherAckWatchResponse is the response of XPackWatcherAckWatchService.Do.
type XPackWatcherAckWatchService ¶
type XPackWatcherAckWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherAckWatchService enables you to manually throttle execution of the watch’s actions. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-ack-watch.html.
func NewXPackWatcherAckWatchService ¶
func NewXPackWatcherAckWatchService(client *Client) *XPackWatcherAckWatchService
NewXPackWatcherAckWatchService creates a new XPackWatcherAckWatchService.
func (*XPackWatcherAckWatchService) ActionId ¶
func (s *XPackWatcherAckWatchService) ActionId(actionId ...string) *XPackWatcherAckWatchService
ActionId is a slice of action ids to be acked.
func (*XPackWatcherAckWatchService) Do ¶
func (s *XPackWatcherAckWatchService) Do(ctx context.Context) (*XPackWatcherAckWatchResponse, error)
Do executes the operation.
func (*XPackWatcherAckWatchService) ErrorTrace ¶
func (s *XPackWatcherAckWatchService) ErrorTrace(errorTrace bool) *XPackWatcherAckWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherAckWatchService) FilterPath ¶
func (s *XPackWatcherAckWatchService) FilterPath(filterPath ...string) *XPackWatcherAckWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherAckWatchService) Header ¶
func (s *XPackWatcherAckWatchService) Header(name string, value string) *XPackWatcherAckWatchService
Header adds a header to the request.
func (*XPackWatcherAckWatchService) Headers ¶
func (s *XPackWatcherAckWatchService) Headers(headers http.Header) *XPackWatcherAckWatchService
Headers specifies the headers of the request.
func (*XPackWatcherAckWatchService) Human ¶
func (s *XPackWatcherAckWatchService) Human(human bool) *XPackWatcherAckWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherAckWatchService) MasterTimeout ¶
func (s *XPackWatcherAckWatchService) MasterTimeout(masterTimeout string) *XPackWatcherAckWatchService
MasterTimeout indicates an explicit operation timeout for connection to master node.
func (*XPackWatcherAckWatchService) Pretty ¶
func (s *XPackWatcherAckWatchService) Pretty(pretty bool) *XPackWatcherAckWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherAckWatchService) Validate ¶
func (s *XPackWatcherAckWatchService) Validate() error
Validate checks if the operation is valid.
func (*XPackWatcherAckWatchService) WatchId ¶
func (s *XPackWatcherAckWatchService) WatchId(watchId string) *XPackWatcherAckWatchService
WatchId is the unique ID of the watch.
type XPackWatcherAckWatchStatus ¶
type XPackWatcherAckWatchStatus struct { State map[string]interface{} `json:"state"` LastChecked string `json:"last_checked"` LastMetCondition string `json:"last_met_condition"` Actions map[string]map[string]interface{} `json:"actions"` ExecutionState string `json:"execution_state"` Version int `json:"version"` }
XPackWatcherAckWatchStatus is the status of a XPackWatcherAckWatchResponse.
type XPackWatcherActivateWatchResponse ¶
type XPackWatcherActivateWatchResponse struct {
Status *XPackWatchStatus `json:"status"`
}
XPackWatcherActivateWatchResponse is the response of XPackWatcherActivateWatchService.Do.
type XPackWatcherActivateWatchService ¶
type XPackWatcherActivateWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherActivateWatchService enables you to activate a currently inactive watch. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-activate-watch.html.
func NewXPackWatcherActivateWatchService ¶
func NewXPackWatcherActivateWatchService(client *Client) *XPackWatcherActivateWatchService
NewXPackWatcherActivateWatchService creates a new XPackWatcherActivateWatchService.
func (*XPackWatcherActivateWatchService) Do ¶
func (s *XPackWatcherActivateWatchService) Do(ctx context.Context) (*XPackWatcherActivateWatchResponse, error)
Do executes the operation.
func (*XPackWatcherActivateWatchService) ErrorTrace ¶
func (s *XPackWatcherActivateWatchService) ErrorTrace(errorTrace bool) *XPackWatcherActivateWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherActivateWatchService) FilterPath ¶
func (s *XPackWatcherActivateWatchService) FilterPath(filterPath ...string) *XPackWatcherActivateWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherActivateWatchService) Header ¶
func (s *XPackWatcherActivateWatchService) Header(name string, value string) *XPackWatcherActivateWatchService
Header adds a header to the request.
func (*XPackWatcherActivateWatchService) Headers ¶
func (s *XPackWatcherActivateWatchService) Headers(headers http.Header) *XPackWatcherActivateWatchService
Headers specifies the headers of the request.
func (*XPackWatcherActivateWatchService) Human ¶
func (s *XPackWatcherActivateWatchService) Human(human bool) *XPackWatcherActivateWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherActivateWatchService) MasterTimeout ¶
func (s *XPackWatcherActivateWatchService) MasterTimeout(masterTimeout string) *XPackWatcherActivateWatchService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*XPackWatcherActivateWatchService) Pretty ¶
func (s *XPackWatcherActivateWatchService) Pretty(pretty bool) *XPackWatcherActivateWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherActivateWatchService) Validate ¶
func (s *XPackWatcherActivateWatchService) Validate() error
Validate checks if the operation is valid.
func (*XPackWatcherActivateWatchService) WatchId ¶
func (s *XPackWatcherActivateWatchService) WatchId(watchId string) *XPackWatcherActivateWatchService
WatchId is the ID of the watch to activate.
type XPackWatcherDeactivateWatchResponse ¶
type XPackWatcherDeactivateWatchResponse struct {
Status *XPackWatchStatus `json:"status"`
}
XPackWatcherDeactivateWatchResponse is the response of XPackWatcherDeactivateWatchService.Do.
type XPackWatcherDeactivateWatchService ¶
type XPackWatcherDeactivateWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherDeactivateWatchService enables you to deactivate a currently active watch. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-deactivate-watch.html.
func NewXPackWatcherDeactivateWatchService ¶
func NewXPackWatcherDeactivateWatchService(client *Client) *XPackWatcherDeactivateWatchService
NewXPackWatcherDeactivateWatchService creates a new XPackWatcherDeactivateWatchService.
func (*XPackWatcherDeactivateWatchService) Do ¶
func (s *XPackWatcherDeactivateWatchService) Do(ctx context.Context) (*XPackWatcherDeactivateWatchResponse, error)
Do executes the operation.
func (*XPackWatcherDeactivateWatchService) ErrorTrace ¶
func (s *XPackWatcherDeactivateWatchService) ErrorTrace(errorTrace bool) *XPackWatcherDeactivateWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherDeactivateWatchService) FilterPath ¶
func (s *XPackWatcherDeactivateWatchService) FilterPath(filterPath ...string) *XPackWatcherDeactivateWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherDeactivateWatchService) Header ¶
func (s *XPackWatcherDeactivateWatchService) Header(name string, value string) *XPackWatcherDeactivateWatchService
Header adds a header to the request.
func (*XPackWatcherDeactivateWatchService) Headers ¶
func (s *XPackWatcherDeactivateWatchService) Headers(headers http.Header) *XPackWatcherDeactivateWatchService
Headers specifies the headers of the request.
func (*XPackWatcherDeactivateWatchService) Human ¶
func (s *XPackWatcherDeactivateWatchService) Human(human bool) *XPackWatcherDeactivateWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherDeactivateWatchService) MasterTimeout ¶
func (s *XPackWatcherDeactivateWatchService) MasterTimeout(masterTimeout string) *XPackWatcherDeactivateWatchService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*XPackWatcherDeactivateWatchService) Pretty ¶
func (s *XPackWatcherDeactivateWatchService) Pretty(pretty bool) *XPackWatcherDeactivateWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherDeactivateWatchService) Validate ¶
func (s *XPackWatcherDeactivateWatchService) Validate() error
Validate checks if the operation is valid.
func (*XPackWatcherDeactivateWatchService) WatchId ¶
func (s *XPackWatcherDeactivateWatchService) WatchId(watchId string) *XPackWatcherDeactivateWatchService
WatchId is the ID of the watch to deactivate.
type XPackWatcherDeleteWatchResponse ¶
type XPackWatcherDeleteWatchResponse struct { Found bool `json:"found"` Id string `json:"_id"` Version int `json:"_version"` }
XPackWatcherDeleteWatchResponse is the response of XPackWatcherDeleteWatchService.Do.
type XPackWatcherDeleteWatchService ¶
type XPackWatcherDeleteWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherDeleteWatchService removes a watch. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-delete-watch.html.
func NewXPackWatcherDeleteWatchService ¶
func NewXPackWatcherDeleteWatchService(client *Client) *XPackWatcherDeleteWatchService
NewXPackWatcherDeleteWatchService creates a new XPackWatcherDeleteWatchService.
func (*XPackWatcherDeleteWatchService) Do ¶
func (s *XPackWatcherDeleteWatchService) Do(ctx context.Context) (*XPackWatcherDeleteWatchResponse, error)
Do executes the operation.
func (*XPackWatcherDeleteWatchService) ErrorTrace ¶
func (s *XPackWatcherDeleteWatchService) ErrorTrace(errorTrace bool) *XPackWatcherDeleteWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherDeleteWatchService) FilterPath ¶
func (s *XPackWatcherDeleteWatchService) FilterPath(filterPath ...string) *XPackWatcherDeleteWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherDeleteWatchService) Header ¶
func (s *XPackWatcherDeleteWatchService) Header(name string, value string) *XPackWatcherDeleteWatchService
Header adds a header to the request.
func (*XPackWatcherDeleteWatchService) Headers ¶
func (s *XPackWatcherDeleteWatchService) Headers(headers http.Header) *XPackWatcherDeleteWatchService
Headers specifies the headers of the request.
func (*XPackWatcherDeleteWatchService) Human ¶
func (s *XPackWatcherDeleteWatchService) Human(human bool) *XPackWatcherDeleteWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherDeleteWatchService) Id ¶
func (s *XPackWatcherDeleteWatchService) Id(id string) *XPackWatcherDeleteWatchService
Id of the watch to delete.
func (*XPackWatcherDeleteWatchService) MasterTimeout ¶
func (s *XPackWatcherDeleteWatchService) MasterTimeout(masterTimeout string) *XPackWatcherDeleteWatchService
MasterTimeout specifies an explicit operation timeout for connection to master node.
func (*XPackWatcherDeleteWatchService) Pretty ¶
func (s *XPackWatcherDeleteWatchService) Pretty(pretty bool) *XPackWatcherDeleteWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherDeleteWatchService) Validate ¶
func (s *XPackWatcherDeleteWatchService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherExecuteWatchResponse ¶
type XPackWatcherExecuteWatchResponse struct { Id string `json:"_id"` WatchRecord *XPackWatchRecord `json:"watch_record"` }
XPackWatcherExecuteWatchResponse is the response of XPackWatcherExecuteWatchService.Do.
type XPackWatcherExecuteWatchService ¶
type XPackWatcherExecuteWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherExecuteWatchService forces the execution of a stored watch. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-execute-watch.html.
func NewXPackWatcherExecuteWatchService ¶
func NewXPackWatcherExecuteWatchService(client *Client) *XPackWatcherExecuteWatchService
NewXPackWatcherExecuteWatchService creates a new XPackWatcherExecuteWatchService.
func (*XPackWatcherExecuteWatchService) BodyJson ¶
func (s *XPackWatcherExecuteWatchService) BodyJson(body interface{}) *XPackWatcherExecuteWatchService
BodyJson is documented as: Execution control.
func (*XPackWatcherExecuteWatchService) BodyString ¶
func (s *XPackWatcherExecuteWatchService) BodyString(body string) *XPackWatcherExecuteWatchService
BodyString is documented as: Execution control.
func (*XPackWatcherExecuteWatchService) Debug ¶
func (s *XPackWatcherExecuteWatchService) Debug(debug bool) *XPackWatcherExecuteWatchService
Debug indicates whether the watch should execute in debug mode.
func (*XPackWatcherExecuteWatchService) Do ¶
func (s *XPackWatcherExecuteWatchService) Do(ctx context.Context) (*XPackWatcherExecuteWatchResponse, error)
Do executes the operation.
func (*XPackWatcherExecuteWatchService) ErrorTrace ¶
func (s *XPackWatcherExecuteWatchService) ErrorTrace(errorTrace bool) *XPackWatcherExecuteWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherExecuteWatchService) FilterPath ¶
func (s *XPackWatcherExecuteWatchService) FilterPath(filterPath ...string) *XPackWatcherExecuteWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherExecuteWatchService) Header ¶
func (s *XPackWatcherExecuteWatchService) Header(name string, value string) *XPackWatcherExecuteWatchService
Header adds a header to the request.
func (*XPackWatcherExecuteWatchService) Headers ¶
func (s *XPackWatcherExecuteWatchService) Headers(headers http.Header) *XPackWatcherExecuteWatchService
Headers specifies the headers of the request.
func (*XPackWatcherExecuteWatchService) Human ¶
func (s *XPackWatcherExecuteWatchService) Human(human bool) *XPackWatcherExecuteWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherExecuteWatchService) Id ¶
func (s *XPackWatcherExecuteWatchService) Id(id string) *XPackWatcherExecuteWatchService
Id of the watch to execute on.
func (*XPackWatcherExecuteWatchService) Pretty ¶
func (s *XPackWatcherExecuteWatchService) Pretty(pretty bool) *XPackWatcherExecuteWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherExecuteWatchService) Validate ¶
func (s *XPackWatcherExecuteWatchService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherGetWatchResponse ¶
type XPackWatcherGetWatchResponse struct { Found bool `json:"found"` Id string `json:"_id"` Version int64 `json:"_version,omitempty"` Status *XPackWatchStatus `json:"status,omitempty"` Watch *XPackWatch `json:"watch,omitempty"` }
XPackWatcherGetWatchResponse is the response of XPackWatcherGetWatchService.Do.
type XPackWatcherGetWatchService ¶
type XPackWatcherGetWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherGetWatchService retrieves a watch by its ID. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-get-watch.html.
func NewXPackWatcherGetWatchService ¶
func NewXPackWatcherGetWatchService(client *Client) *XPackWatcherGetWatchService
NewXPackWatcherGetWatchService creates a new XPackWatcherGetWatchService.
func (*XPackWatcherGetWatchService) Do ¶
func (s *XPackWatcherGetWatchService) Do(ctx context.Context) (*XPackWatcherGetWatchResponse, error)
Do executes the operation.
func (*XPackWatcherGetWatchService) ErrorTrace ¶
func (s *XPackWatcherGetWatchService) ErrorTrace(errorTrace bool) *XPackWatcherGetWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherGetWatchService) FilterPath ¶
func (s *XPackWatcherGetWatchService) FilterPath(filterPath ...string) *XPackWatcherGetWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherGetWatchService) Header ¶
func (s *XPackWatcherGetWatchService) Header(name string, value string) *XPackWatcherGetWatchService
Header adds a header to the request.
func (*XPackWatcherGetWatchService) Headers ¶
func (s *XPackWatcherGetWatchService) Headers(headers http.Header) *XPackWatcherGetWatchService
Headers specifies the headers of the request.
func (*XPackWatcherGetWatchService) Human ¶
func (s *XPackWatcherGetWatchService) Human(human bool) *XPackWatcherGetWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherGetWatchService) Id ¶
func (s *XPackWatcherGetWatchService) Id(id string) *XPackWatcherGetWatchService
Id is ID of the watch to retrieve.
func (*XPackWatcherGetWatchService) Pretty ¶
func (s *XPackWatcherGetWatchService) Pretty(pretty bool) *XPackWatcherGetWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherGetWatchService) Validate ¶
func (s *XPackWatcherGetWatchService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherPutWatchResponse ¶
type XPackWatcherPutWatchResponse struct { }
XPackWatcherPutWatchResponse is the response of XPackWatcherPutWatchService.Do.
type XPackWatcherPutWatchService ¶
type XPackWatcherPutWatchService struct {
// contains filtered or unexported fields
}
XPackWatcherPutWatchService either registers a new watch in Watcher or update an existing one. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-put-watch.html.
func NewXPackWatcherPutWatchService ¶
func NewXPackWatcherPutWatchService(client *Client) *XPackWatcherPutWatchService
NewXPackWatcherPutWatchService creates a new XPackWatcherPutWatchService.
func (*XPackWatcherPutWatchService) Active ¶
func (s *XPackWatcherPutWatchService) Active(active bool) *XPackWatcherPutWatchService
Active specifies whether the watch is in/active by default.
func (*XPackWatcherPutWatchService) Body ¶
func (s *XPackWatcherPutWatchService) Body(body interface{}) *XPackWatcherPutWatchService
Body specifies the watch. Use a string or a type that will get serialized as JSON.
func (*XPackWatcherPutWatchService) Do ¶
func (s *XPackWatcherPutWatchService) Do(ctx context.Context) (*XPackWatcherPutWatchResponse, error)
Do executes the operation.
func (*XPackWatcherPutWatchService) ErrorTrace ¶
func (s *XPackWatcherPutWatchService) ErrorTrace(errorTrace bool) *XPackWatcherPutWatchService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherPutWatchService) FilterPath ¶
func (s *XPackWatcherPutWatchService) FilterPath(filterPath ...string) *XPackWatcherPutWatchService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherPutWatchService) Header ¶
func (s *XPackWatcherPutWatchService) Header(name string, value string) *XPackWatcherPutWatchService
Header adds a header to the request.
func (*XPackWatcherPutWatchService) Headers ¶
func (s *XPackWatcherPutWatchService) Headers(headers http.Header) *XPackWatcherPutWatchService
Headers specifies the headers of the request.
func (*XPackWatcherPutWatchService) Human ¶
func (s *XPackWatcherPutWatchService) Human(human bool) *XPackWatcherPutWatchService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherPutWatchService) Id ¶
func (s *XPackWatcherPutWatchService) Id(id string) *XPackWatcherPutWatchService
Id of the watch to upsert.
func (*XPackWatcherPutWatchService) IfPrimaryTerm ¶
func (s *XPackWatcherPutWatchService) IfPrimaryTerm(primaryTerm int64) *XPackWatcherPutWatchService
IfPrimaryTerm indicates to update the watch only if the last operation that has changed the watch has the specified primary term.
func (*XPackWatcherPutWatchService) IfSeqNo ¶
func (s *XPackWatcherPutWatchService) IfSeqNo(seqNo int64) *XPackWatcherPutWatchService
IfSeqNo indicates to update the watch only if the last operation that has changed the watch has the specified sequence number.
func (*XPackWatcherPutWatchService) MasterTimeout ¶
func (s *XPackWatcherPutWatchService) MasterTimeout(masterTimeout string) *XPackWatcherPutWatchService
MasterTimeout is an explicit operation timeout for connection to master node.
func (*XPackWatcherPutWatchService) Pretty ¶
func (s *XPackWatcherPutWatchService) Pretty(pretty bool) *XPackWatcherPutWatchService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherPutWatchService) Validate ¶
func (s *XPackWatcherPutWatchService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherRestartResponse ¶
type XPackWatcherRestartResponse struct {
Acknowledged bool `json:"acknowledged"`
}
XPackWatcherRestartResponse is the response of XPackWatcherRestartService.Do.
type XPackWatcherRestartService ¶
type XPackWatcherRestartService struct {
// contains filtered or unexported fields
}
XPackWatcherRestartService stops the starts the watcher service. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-restart.html.
func NewXPackWatcherRestartService ¶
func NewXPackWatcherRestartService(client *Client) *XPackWatcherRestartService
NewXPackWatcherRestartService creates a new XPackWatcherRestartService.
func (*XPackWatcherRestartService) Do ¶
func (s *XPackWatcherRestartService) Do(ctx context.Context) (*XPackWatcherRestartResponse, error)
Do executes the operation.
func (*XPackWatcherRestartService) ErrorTrace ¶
func (s *XPackWatcherRestartService) ErrorTrace(errorTrace bool) *XPackWatcherRestartService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherRestartService) FilterPath ¶
func (s *XPackWatcherRestartService) FilterPath(filterPath ...string) *XPackWatcherRestartService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherRestartService) Header ¶
func (s *XPackWatcherRestartService) Header(name string, value string) *XPackWatcherRestartService
Header adds a header to the request.
func (*XPackWatcherRestartService) Headers ¶
func (s *XPackWatcherRestartService) Headers(headers http.Header) *XPackWatcherRestartService
Headers specifies the headers of the request.
func (*XPackWatcherRestartService) Human ¶
func (s *XPackWatcherRestartService) Human(human bool) *XPackWatcherRestartService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherRestartService) Pretty ¶
func (s *XPackWatcherRestartService) Pretty(pretty bool) *XPackWatcherRestartService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherRestartService) Validate ¶
func (s *XPackWatcherRestartService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherStartResponse ¶
type XPackWatcherStartResponse struct {
Acknowledged bool `json:"acknowledged"`
}
XPackWatcherStartResponse is the response of XPackWatcherStartService.Do.
type XPackWatcherStartService ¶
type XPackWatcherStartService struct {
// contains filtered or unexported fields
}
XPackWatcherStartService starts the watcher service if it is not already running. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-start.html.
func NewXPackWatcherStartService ¶
func NewXPackWatcherStartService(client *Client) *XPackWatcherStartService
NewXPackWatcherStartService creates a new XPackWatcherStartService.
func (*XPackWatcherStartService) Do ¶
func (s *XPackWatcherStartService) Do(ctx context.Context) (*XPackWatcherStartResponse, error)
Do executes the operation.
func (*XPackWatcherStartService) ErrorTrace ¶
func (s *XPackWatcherStartService) ErrorTrace(errorTrace bool) *XPackWatcherStartService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherStartService) FilterPath ¶
func (s *XPackWatcherStartService) FilterPath(filterPath ...string) *XPackWatcherStartService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherStartService) Header ¶
func (s *XPackWatcherStartService) Header(name string, value string) *XPackWatcherStartService
Header adds a header to the request.
func (*XPackWatcherStartService) Headers ¶
func (s *XPackWatcherStartService) Headers(headers http.Header) *XPackWatcherStartService
Headers specifies the headers of the request.
func (*XPackWatcherStartService) Human ¶
func (s *XPackWatcherStartService) Human(human bool) *XPackWatcherStartService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherStartService) Pretty ¶
func (s *XPackWatcherStartService) Pretty(pretty bool) *XPackWatcherStartService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherStartService) Validate ¶
func (s *XPackWatcherStartService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherStats ¶
type XPackWatcherStats struct { WatcherState string `json:"watcher_state"` WatchCount int `json:"watch_count"` ExecutionThreadPool map[string]interface{} `json:"execution_thread_pool"` }
XPackWatcherStats represents the stats used in XPackWatcherStatsResponse.
type XPackWatcherStatsResponse ¶
type XPackWatcherStatsResponse struct {
Stats []XPackWatcherStats `json:"stats"`
}
XPackWatcherStatsResponse is the response of XPackWatcherStatsService.Do.
type XPackWatcherStatsService ¶
type XPackWatcherStatsService struct {
// contains filtered or unexported fields
}
XPackWatcherStatsService returns the current watcher metrics. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-stats.html.
func NewXPackWatcherStatsService ¶
func NewXPackWatcherStatsService(client *Client) *XPackWatcherStatsService
NewXPackWatcherStatsService creates a new XPackWatcherStatsService.
func (*XPackWatcherStatsService) Do ¶
func (s *XPackWatcherStatsService) Do(ctx context.Context) (*XPackWatcherStatsResponse, error)
Do executes the operation.
func (*XPackWatcherStatsService) EmitStacktraces ¶
func (s *XPackWatcherStatsService) EmitStacktraces(emitStacktraces bool) *XPackWatcherStatsService
EmitStacktraces, if enabled, emits stack traces of currently running watches.
func (*XPackWatcherStatsService) ErrorTrace ¶
func (s *XPackWatcherStatsService) ErrorTrace(errorTrace bool) *XPackWatcherStatsService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherStatsService) FilterPath ¶
func (s *XPackWatcherStatsService) FilterPath(filterPath ...string) *XPackWatcherStatsService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherStatsService) Header ¶
func (s *XPackWatcherStatsService) Header(name string, value string) *XPackWatcherStatsService
Header adds a header to the request.
func (*XPackWatcherStatsService) Headers ¶
func (s *XPackWatcherStatsService) Headers(headers http.Header) *XPackWatcherStatsService
Headers specifies the headers of the request.
func (*XPackWatcherStatsService) Human ¶
func (s *XPackWatcherStatsService) Human(human bool) *XPackWatcherStatsService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherStatsService) Metric ¶
func (s *XPackWatcherStatsService) Metric(metric string) *XPackWatcherStatsService
Metric controls what additional stat metrics should be include in the response.
func (*XPackWatcherStatsService) Pretty ¶
func (s *XPackWatcherStatsService) Pretty(pretty bool) *XPackWatcherStatsService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherStatsService) Validate ¶
func (s *XPackWatcherStatsService) Validate() error
Validate checks if the operation is valid.
type XPackWatcherStopResponse ¶
type XPackWatcherStopResponse struct {
Acknowledged bool `json:"acknowledged"`
}
XPackWatcherStopResponse is the response of XPackWatcherStopService.Do.
type XPackWatcherStopService ¶
type XPackWatcherStopService struct {
// contains filtered or unexported fields
}
XPackWatcherStopService stops the watcher service if it is running. See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/watcher-api-stop.html.
func NewXPackWatcherStopService ¶
func NewXPackWatcherStopService(client *Client) *XPackWatcherStopService
NewXPackWatcherStopService creates a new XPackWatcherStopService.
func (*XPackWatcherStopService) Do ¶
func (s *XPackWatcherStopService) Do(ctx context.Context) (*XPackWatcherStopResponse, error)
Do executes the operation.
func (*XPackWatcherStopService) ErrorTrace ¶
func (s *XPackWatcherStopService) ErrorTrace(errorTrace bool) *XPackWatcherStopService
ErrorTrace specifies whether to include the stack trace of returned errors.
func (*XPackWatcherStopService) FilterPath ¶
func (s *XPackWatcherStopService) FilterPath(filterPath ...string) *XPackWatcherStopService
FilterPath specifies a list of filters used to reduce the response.
func (*XPackWatcherStopService) Header ¶
func (s *XPackWatcherStopService) Header(name string, value string) *XPackWatcherStopService
Header adds a header to the request.
func (*XPackWatcherStopService) Headers ¶
func (s *XPackWatcherStopService) Headers(headers http.Header) *XPackWatcherStopService
Headers specifies the headers of the request.
func (*XPackWatcherStopService) Human ¶
func (s *XPackWatcherStopService) Human(human bool) *XPackWatcherStopService
Human specifies whether human readable values should be returned in the JSON response, e.g. "7.5mb".
func (*XPackWatcherStopService) Pretty ¶
func (s *XPackWatcherStopService) Pretty(pretty bool) *XPackWatcherStopService
Pretty tells Elasticsearch whether to return a formatted JSON response.
func (*XPackWatcherStopService) Validate ¶
func (s *XPackWatcherStopService) Validate() error
Validate checks if the operation is valid.
type ZeroBackoff ¶
type ZeroBackoff struct{}
ZeroBackoff is a fixed backoff policy whose backoff time is always zero, meaning that the operation is retried immediately without waiting, indefinitely.
Source Files ¶
- acknowledged_response.go
- backoff.go
- bulk.go
- bulk_delete_request.go
- bulk_delete_request_easyjson.go
- bulk_index_request.go
- bulk_index_request_easyjson.go
- bulk_processor.go
- bulk_request.go
- bulk_update_request.go
- bulk_update_request_easyjson.go
- canonicalize.go
- cat_aliases.go
- cat_allocation.go
- cat_count.go
- cat_health.go
- cat_indices.go
- cat_shards.go
- clear_scroll.go
- client.go
- cluster_health.go
- cluster_reroute.go
- cluster_state.go
- cluster_stats.go
- connection.go
- count.go
- decoder.go
- delete.go
- delete_by_query.go
- doc.go
- docvalue_field.go
- errors.go
- exists.go
- explain.go
- fetch_source_context.go
- field_caps.go
- geo_point.go
- get.go
- highlight.go
- index.go
- indices_analyze.go
- indices_clear_cache.go
- indices_close.go
- indices_create.go
- indices_delete.go
- indices_delete_template.go
- indices_exists.go
- indices_exists_template.go
- indices_exists_type.go
- indices_flush.go
- indices_flush_synced.go
- indices_forcemerge.go
- indices_get.go
- indices_get_aliases.go
- indices_get_field_mapping.go
- indices_get_mapping.go
- indices_get_settings.go
- indices_get_template.go
- indices_open.go
- indices_put_alias.go
- indices_put_mapping.go
- indices_put_settings.go
- indices_put_template.go
- indices_refresh.go
- indices_rollover.go
- indices_segments.go
- indices_shrink.go
- indices_stats.go
- ingest_delete_pipeline.go
- ingest_get_pipeline.go
- ingest_put_pipeline.go
- ingest_simulate_pipeline.go
- inner_hit.go
- logger.go
- mget.go
- msearch.go
- mtermvectors.go
- nodes_info.go
- nodes_stats.go
- ping.go
- plugins.go
- query.go
- reindex.go
- request.go
- rescore.go
- rescorer.go
- response.go
- retrier.go
- retry.go
- script.go
- script_delete.go
- script_get.go
- script_put.go
- scroll.go
- search.go
- search_aggs.go
- search_aggs_bucket_adjacency_matrix.go
- search_aggs_bucket_children.go
- search_aggs_bucket_composite.go
- search_aggs_bucket_count_thresholds.go
- search_aggs_bucket_date_histogram.go
- search_aggs_bucket_date_range.go
- search_aggs_bucket_diversified_sampler.go
- search_aggs_bucket_filter.go
- search_aggs_bucket_filters.go
- search_aggs_bucket_geo_distance.go
- search_aggs_bucket_geohash_grid.go
- search_aggs_bucket_global.go
- search_aggs_bucket_histogram.go
- search_aggs_bucket_ip_range.go
- search_aggs_bucket_missing.go
- search_aggs_bucket_nested.go
- search_aggs_bucket_range.go
- search_aggs_bucket_reverse_nested.go
- search_aggs_bucket_sampler.go
- search_aggs_bucket_significant_terms.go
- search_aggs_bucket_significant_text.go
- search_aggs_bucket_terms.go
- search_aggs_matrix_stats.go
- search_aggs_metrics_avg.go
- search_aggs_metrics_cardinality.go
- search_aggs_metrics_extended_stats.go
- search_aggs_metrics_geo_bounds.go
- search_aggs_metrics_geo_centroid.go
- search_aggs_metrics_max.go
- search_aggs_metrics_min.go
- search_aggs_metrics_percentile_ranks.go
- search_aggs_metrics_percentiles.go
- search_aggs_metrics_scripted_metric.go
- search_aggs_metrics_stats.go
- search_aggs_metrics_sum.go
- search_aggs_metrics_top_hits.go
- search_aggs_metrics_value_count.go
- search_aggs_metrics_weighted_avg.go
- search_aggs_pipeline_avg_bucket.go
- search_aggs_pipeline_bucket_script.go
- search_aggs_pipeline_bucket_selector.go
- search_aggs_pipeline_bucket_sort.go
- search_aggs_pipeline_cumulative_sum.go
- search_aggs_pipeline_derivative.go
- search_aggs_pipeline_extended_stats_bucket.go
- search_aggs_pipeline_max_bucket.go
- search_aggs_pipeline_min_bucket.go
- search_aggs_pipeline_mov_avg.go
- search_aggs_pipeline_mov_fn.go
- search_aggs_pipeline_percentiles_bucket.go
- search_aggs_pipeline_serial_diff.go
- search_aggs_pipeline_stats_bucket.go
- search_aggs_pipeline_sum_bucket.go
- search_collapse_builder.go
- search_queries_bool.go
- search_queries_boosting.go
- search_queries_common_terms.go
- search_queries_constant_score.go
- search_queries_dis_max.go
- search_queries_exists.go
- search_queries_fsq.go
- search_queries_fsq_score_funcs.go
- search_queries_fuzzy.go
- search_queries_geo_bounding_box.go
- search_queries_geo_distance.go
- search_queries_geo_polygon.go
- search_queries_has_child.go
- search_queries_has_parent.go
- search_queries_ids.go
- search_queries_match.go
- search_queries_match_all.go
- search_queries_match_none.go
- search_queries_match_phrase.go
- search_queries_match_phrase_prefix.go
- search_queries_more_like_this.go
- search_queries_multi_match.go
- search_queries_nested.go
- search_queries_parent_id.go
- search_queries_percolator.go
- search_queries_prefix.go
- search_queries_query_string.go
- search_queries_range.go
- search_queries_raw_string.go
- search_queries_regexp.go
- search_queries_script.go
- search_queries_simple_query_string.go
- search_queries_slice.go
- search_queries_span_first.go
- search_queries_span_near.go
- search_queries_span_term.go
- search_queries_term.go
- search_queries_terms.go
- search_queries_terms_set.go
- search_queries_type.go
- search_queries_wildcard.go
- search_queries_wrapper.go
- search_request.go
- search_shards.go
- search_source.go
- search_terms_lookup.go
- snapshot_create.go
- snapshot_create_repository.go
- snapshot_delete.go
- snapshot_delete_repository.go
- snapshot_get.go
- snapshot_get_repository.go
- snapshot_restore.go
- snapshot_status.go
- snapshot_verify_repository.go
- sort.go
- suggest_field.go
- suggester.go
- suggester_completion.go
- suggester_context.go
- suggester_context_category.go
- suggester_context_geo.go
- suggester_phrase.go
- suggester_term.go
- tasks_cancel.go
- tasks_get_task.go
- tasks_list.go
- termvectors.go
- update.go
- update_by_query.go
- validate.go
- xpack_ilm_delete_lifecycle.go
- xpack_ilm_get_lifecycle.go
- xpack_ilm_put_lifecycle.go
- xpack_info.go
- xpack_security_delete_role.go
- xpack_security_delete_role_mapping.go
- xpack_security_delete_user.go
- xpack_security_get_role.go
- xpack_security_get_role_mapping.go
- xpack_security_get_user.go
- xpack_security_put_role.go
- xpack_security_put_role_mapping.go
- xpack_security_put_user.go
- xpack_watcher_ack_watch.go
- xpack_watcher_activate_watch.go
- xpack_watcher_deactivate_watch.go
- xpack_watcher_delete_watch.go
- xpack_watcher_execute_watch.go
- xpack_watcher_get_watch.go
- xpack_watcher_put_watch.go
- xpack_watcher_restart.go
- xpack_watcher_start.go
- xpack_watcher_stats.go
- xpack_watcher_stop.go
Directories ¶
Path | Synopsis |
---|---|
Package config allows parsing a configuration for Elasticsearch from a URL.
|
Package config allows parsing a configuration for Elasticsearch from a URL. |
recipes
|
|
aws-connect
Connect simply connects to Elasticsearch Service on AWS.
|
Connect simply connects to Elasticsearch Service on AWS. |
aws-connect-v4
Connect simply connects to Elasticsearch Service on AWS.
|
Connect simply connects to Elasticsearch Service on AWS. |
aws-mapping-v4
Connect creates an index with a mapping with different data types.
|
Connect creates an index with a mapping with different data types. |
bulk_insert
BulkInsert illustrates how to bulk insert documents into Elasticsearch.
|
BulkInsert illustrates how to bulk insert documents into Elasticsearch. |
bulk_processor
BulkProcessor runs a bulk processing job that fills an index given certain criteria like flush interval etc.
|
BulkProcessor runs a bulk processing job that fills an index given certain criteria like flush interval etc. |
connect
Connect simply connects to Elasticsearch.
|
Connect simply connects to Elasticsearch. |
connect_with_config
Connect simply connects to Elasticsearch.
|
Connect simply connects to Elasticsearch. |
go-modules
Connect simply connects to Elasticsearch, but uses Go modules as introduced with Go 1.11.
|
Connect simply connects to Elasticsearch, but uses Go modules as introduced with Go 1.11. |
mapping
Connect creates an index with a mapping with different data types.
|
Connect creates an index with a mapping with different data types. |
scroll
Scroll illustrates scrolling through a set of documents.
|
Scroll illustrates scrolling through a set of documents. |
sliced_scroll
SlicedScroll illustrates scrolling through a set of documents in parallel.
|
SlicedScroll illustrates scrolling through a set of documents in parallel. |
suggesters/completion
Connect creates an index with a mapping with different data types.
|
Connect creates an index with a mapping with different data types. |
tracing
Tracing is the same as the bulk_insert recipe, but adds OpenTracing support.
|
Tracing is the same as the bulk_insert recipe, but adds OpenTracing support. |
trace
|
|
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
|
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570). |