go-elasticsearch: github.com/elastic/go-elasticsearch/esapi Index | Examples | Files

package esapi

import "github.com/elastic/go-elasticsearch/esapi"

Package esapi provides the Go API for Elasticsearch.

It is automatically included in the client provided by the github.com/elastic/go-elasticsearch package:

es, _ := elasticsearch.NewDefaultClient()
res, _ := es.Info()
log.Println(res)

For each Elasticsearch API, such as "Index", the package exports two corresponding types: a function and a struct.

The function type allows you to call the Elasticsearch API as a method on the client, passing the parameters as arguments:

res, err := es.Index(
	"test",                                  // Index name
	strings.NewReader(`{"title" : "Test"}`), // Document body
	es.Index.WithDocumentID("1"),            // Document ID
	es.Index.WithRefresh("true"),            // Refresh
)
if err != nil {
	log.Fatalf("ERROR: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [201 Created] {"_index":"test","_type":"_doc","_id":"1" ...

The struct type allows for a more hands-on approach, where you create a new struct, with the request configuration as fields, and call the Do() method with a context and the client as arguments:

req := esapi.IndexRequest{
	Index:      "test",                                  // Index name
	Body:       strings.NewReader(`{"title" : "Test"}`), // Document body
	DocumentID: "1",                                     // Document ID
	Refresh:    "true",                                  // Refresh
}

res, err := req.Do(context.Background(), es)
if err != nil {
	log.Fatalf("Error getting response: %s", err)
}
defer res.Body.Close()

log.Println(res)

// => [200 OK] {"_index":"test","_type":"_doc","_id":"1","_version":2 ...

The function type is a wrapper around the struct, and allows to configure and perform the request in a more expressive way. It has a minor overhead compared to using a struct directly; refer to the esapi_benchmark_test.go suite for concrete numbers.

See the documentation for each API function or struct at https://godoc.org/github.com/elastic/go-elasticsearch, or locally by:

go doc github.com/elastic/go-elasticsearch/v8/esapi Index
go doc github.com/elastic/go-elasticsearch/v8/esapi IndexRequest

Response

The esapi.Response type is a lightweight wrapper around http.Response.

The res.Body field is an io.ReadCloser, leaving the JSON parsing to the calling code, in the interest of performance and flexibility (eg. to allow using a custom JSON parser).

It is imperative to close the response body for a non-nil response.

The Response type implements a couple of convenience methods for accessing the status, checking an error status code or printing the response body for debugging purposes.

Additional Information

See the Elasticsearch documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/api-conventions.html for detailed information about the API endpoints and parameters.

The Go API is generated from the Elasticsearch JSON specification at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api by the internal package available at https://github.com/elastic/go-elasticsearch/tree/master/internal/cmd/generate/commands/gensource.

The API is tested by integration tests common to all Elasticsearch official clients, generated from the source at https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test. The generator is provided by the internal package available at internal/cmd/generate/commands/gentests.

Index

Examples

Package Files

api._.go api.bulk.go api.cat.aliases.go api.cat.allocation.go api.cat.count.go api.cat.fielddata.go api.cat.health.go api.cat.help.go api.cat.indices.go api.cat.master.go api.cat.nodeattrs.go api.cat.nodes.go api.cat.pending_tasks.go api.cat.plugins.go api.cat.recovery.go api.cat.repositories.go api.cat.segments.go api.cat.shards.go api.cat.snapshots.go api.cat.tasks.go api.cat.templates.go api.cat.thread_pool.go api.clear_scroll.go api.cluster.allocation_explain.go api.cluster.delete_component_template.go api.cluster.delete_voting_config_exclusions.go api.cluster.exists_component_template.go api.cluster.get_component_template.go api.cluster.get_settings.go api.cluster.health.go api.cluster.pending_tasks.go api.cluster.post_voting_config_exclusions.go api.cluster.put_component_template.go api.cluster.put_settings.go api.cluster.remote_info.go api.cluster.reroute.go api.cluster.state.go api.cluster.stats.go api.count.go api.create.go api.dangling_indices.delete_dangling_index.go api.dangling_indices.import_dangling_index.go api.dangling_indices.list_dangling_indices.go api.delete.go api.delete_by_query.go api.delete_by_query_rethrottle.go api.delete_script.go api.exists.go api.exists_source.go api.explain.go api.field_caps.go api.get.go api.get_script.go api.get_script_context.go api.get_script_languages.go api.get_source.go api.index.go api.indices.add_block.go api.indices.analyze.go api.indices.clear_cache.go api.indices.clone.go api.indices.close.go api.indices.create.go api.indices.delete.go api.indices.delete_alias.go api.indices.delete_index_template.go api.indices.delete_template.go api.indices.exists.go api.indices.exists_alias.go api.indices.exists_index_template.go api.indices.exists_template.go api.indices.exists_type.go api.indices.flush.go api.indices.forcemerge.go api.indices.get.go api.indices.get_alias.go api.indices.get_field_mapping.go api.indices.get_index_template.go api.indices.get_mapping.go api.indices.get_settings.go api.indices.get_template.go api.indices.get_upgrade.go api.indices.open.go api.indices.put_alias.go api.indices.put_index_template.go api.indices.put_mapping.go api.indices.put_settings.go api.indices.put_template.go api.indices.recovery.go api.indices.refresh.go api.indices.resolve_index.go api.indices.rollover.go api.indices.segments.go api.indices.shard_stores.go api.indices.shrink.go api.indices.simulate_index_template.go api.indices.simulate_template.go api.indices.split.go api.indices.stats.go api.indices.update_aliases.go api.indices.upgrade.go api.indices.validate_query.go api.info.go api.ingest.delete_pipeline.go api.ingest.get_pipeline.go api.ingest.processor_grok.go api.ingest.put_pipeline.go api.ingest.simulate.go api.mget.go api.msearch.go api.msearch_template.go api.mtermvectors.go api.nodes.hot_threads.go api.nodes.info.go api.nodes.reload_secure_settings.go api.nodes.stats.go api.nodes.usage.go api.ping.go api.put_script.go api.rank_eval.go api.reindex.go api.reindex_rethrottle.go api.render_search_template.go api.scripts_painless_execute.go api.scroll.go api.search.go api.search_shards.go api.search_template.go api.snapshot.cleanup_repository.go api.snapshot.clone.go api.snapshot.create.go api.snapshot.create_repository.go api.snapshot.delete.go api.snapshot.delete_repository.go api.snapshot.get.go api.snapshot.get_repository.go api.snapshot.restore.go api.snapshot.status.go api.snapshot.verify_repository.go api.tasks.cancel.go api.tasks.get.go api.tasks.list.go api.termvectors.go api.update.go api.update_by_query.go api.update_by_query_rethrottle.go api.xpack.async_search.delete.go api.xpack.async_search.get.go api.xpack.async_search.submit.go api.xpack.autoscaling.delete_autoscaling_policy.go api.xpack.autoscaling.get_autoscaling_capacity.go api.xpack.autoscaling.get_autoscaling_decision.go api.xpack.autoscaling.get_autoscaling_policy.go api.xpack.autoscaling.put_autoscaling_policy.go api.xpack.cat.ml_data_frame_analytics.go api.xpack.cat.ml_datafeeds.go api.xpack.cat.ml_jobs.go api.xpack.cat.ml_trained_models.go api.xpack.cat.transforms.go api.xpack.ccr.delete_auto_follow_pattern.go api.xpack.ccr.follow.go api.xpack.ccr.follow_info.go api.xpack.ccr.follow_stats.go api.xpack.ccr.forget_follower.go api.xpack.ccr.get_auto_follow_pattern.go api.xpack.ccr.pause_auto_follow_pattern.go api.xpack.ccr.pause_follow.go api.xpack.ccr.put_auto_follow_pattern.go api.xpack.ccr.resume_auto_follow_pattern.go api.xpack.ccr.resume_follow.go api.xpack.ccr.stats.go api.xpack.ccr.unfollow.go api.xpack.close_point_in_time.go api.xpack.data_frame_transform_deprecated.delete_transform.go api.xpack.data_frame_transform_deprecated.get_transform.go api.xpack.data_frame_transform_deprecated.get_transform_stats.go api.xpack.data_frame_transform_deprecated.preview_transform.go api.xpack.data_frame_transform_deprecated.put_transform.go api.xpack.data_frame_transform_deprecated.start_transform.go api.xpack.data_frame_transform_deprecated.stop_transform.go api.xpack.data_frame_transform_deprecated.update_transform.go api.xpack.enrich.delete_policy.go api.xpack.enrich.execute_policy.go api.xpack.enrich.get_policy.go api.xpack.enrich.put_policy.go api.xpack.enrich.stats.go api.xpack.eql.delete.go api.xpack.eql.get.go api.xpack.eql.search.go api.xpack.graph.explore.go api.xpack.ilm.delete_lifecycle.go api.xpack.ilm.explain_lifecycle.go api.xpack.ilm.get_lifecycle.go api.xpack.ilm.get_status.go api.xpack.ilm.move_to_step.go api.xpack.ilm.put_lifecycle.go api.xpack.ilm.remove_policy.go api.xpack.ilm.retry.go api.xpack.ilm.start.go api.xpack.ilm.stop.go api.xpack.indices.create_data_stream.go api.xpack.indices.data_streams_stats.go api.xpack.indices.delete_data_stream.go api.xpack.indices.freeze.go api.xpack.indices.get_data_stream.go api.xpack.indices.reload_search_analyzers.go api.xpack.indices.unfreeze.go api.xpack.license.delete.go api.xpack.license.get.go api.xpack.license.get_basic_status.go api.xpack.license.get_trial_status.go api.xpack.license.post.go api.xpack.license.post_start_basic.go api.xpack.license.post_start_trial.go api.xpack.migration.deprecations.go api.xpack.ml.close_job.go api.xpack.ml.delete_calendar.go api.xpack.ml.delete_calendar_event.go api.xpack.ml.delete_calendar_job.go api.xpack.ml.delete_data_frame_analytics.go api.xpack.ml.delete_datafeed.go api.xpack.ml.delete_expired_data.go api.xpack.ml.delete_filter.go api.xpack.ml.delete_forecast.go api.xpack.ml.delete_job.go api.xpack.ml.delete_model_snapshot.go api.xpack.ml.delete_trained_model.go api.xpack.ml.estimate_model_memory.go api.xpack.ml.evaluate_data_frame.go api.xpack.ml.explain_data_frame_analytics.go api.xpack.ml.find_file_structure.go api.xpack.ml.flush_job.go api.xpack.ml.forecast.go api.xpack.ml.get_buckets.go api.xpack.ml.get_calendar_events.go api.xpack.ml.get_calendars.go api.xpack.ml.get_categories.go api.xpack.ml.get_data_frame_analytics.go api.xpack.ml.get_data_frame_analytics_stats.go api.xpack.ml.get_datafeed_stats.go api.xpack.ml.get_datafeeds.go api.xpack.ml.get_filters.go api.xpack.ml.get_influencers.go api.xpack.ml.get_job_stats.go api.xpack.ml.get_jobs.go api.xpack.ml.get_model_snapshots.go api.xpack.ml.get_overall_buckets.go api.xpack.ml.get_records.go api.xpack.ml.get_trained_models.go api.xpack.ml.get_trained_models_stats.go api.xpack.ml.info.go api.xpack.ml.open_job.go api.xpack.ml.post_calendar_events.go api.xpack.ml.post_data.go api.xpack.ml.preview_datafeed.go api.xpack.ml.put_calendar.go api.xpack.ml.put_calendar_job.go api.xpack.ml.put_data_frame_analytics.go api.xpack.ml.put_datafeed.go api.xpack.ml.put_filter.go api.xpack.ml.put_job.go api.xpack.ml.put_trained_model.go api.xpack.ml.revert_model_snapshot.go api.xpack.ml.set_upgrade_mode.go api.xpack.ml.start_data_frame_analytics.go api.xpack.ml.start_datafeed.go api.xpack.ml.stop_data_frame_analytics.go api.xpack.ml.stop_datafeed.go api.xpack.ml.update_data_frame_analytics.go api.xpack.ml.update_datafeed.go api.xpack.ml.update_filter.go api.xpack.ml.update_job.go api.xpack.ml.update_model_snapshot.go api.xpack.ml.validate.go api.xpack.ml.validate_detector.go api.xpack.monitoring.bulk.go api.xpack.open_point_in_time.go api.xpack.rollup.delete_job.go api.xpack.rollup.get_jobs.go api.xpack.rollup.get_rollup_caps.go api.xpack.rollup.get_rollup_index_caps.go api.xpack.rollup.put_job.go api.xpack.rollup.rollup_search.go api.xpack.rollup.start_job.go api.xpack.rollup.stop_job.go api.xpack.searchable_snapshots.clear_cache.go api.xpack.searchable_snapshots.mount.go api.xpack.searchable_snapshots.repository_stats.go api.xpack.searchable_snapshots.stats.go api.xpack.security.authenticate.go api.xpack.security.change_password.go api.xpack.security.clear_api_key_cache.go api.xpack.security.clear_cached_privileges.go api.xpack.security.clear_cached_realms.go api.xpack.security.clear_cached_roles.go api.xpack.security.create_api_key.go api.xpack.security.delete_privileges.go api.xpack.security.delete_role.go api.xpack.security.delete_role_mapping.go api.xpack.security.delete_user.go api.xpack.security.disable_user.go api.xpack.security.enable_user.go api.xpack.security.get_api_key.go api.xpack.security.get_builtin_privileges.go api.xpack.security.get_privileges.go api.xpack.security.get_role.go api.xpack.security.get_role_mapping.go api.xpack.security.get_token.go api.xpack.security.get_user.go api.xpack.security.get_user_privileges.go api.xpack.security.grant_api_key.go api.xpack.security.has_privileges.go api.xpack.security.invalidate_api_key.go api.xpack.security.invalidate_token.go api.xpack.security.put_privileges.go api.xpack.security.put_role.go api.xpack.security.put_role_mapping.go api.xpack.security.put_user.go api.xpack.slm.delete_lifecycle.go api.xpack.slm.execute_lifecycle.go api.xpack.slm.execute_retention.go api.xpack.slm.get_lifecycle.go api.xpack.slm.get_stats.go api.xpack.slm.get_status.go api.xpack.slm.put_lifecycle.go api.xpack.slm.start.go api.xpack.slm.stop.go api.xpack.sql.clear_cursor.go api.xpack.sql.query.go api.xpack.sql.translate.go api.xpack.ssl.certificates.go api.xpack.transform.delete_transform.go api.xpack.transform.get_transform.go api.xpack.transform.get_transform_stats.go api.xpack.transform.preview_transform.go api.xpack.transform.put_transform.go api.xpack.transform.start_transform.go api.xpack.transform.stop_transform.go api.xpack.transform.update_transform.go api.xpack.watcher.ack_watch.go api.xpack.watcher.activate_watch.go api.xpack.watcher.deactivate_watch.go api.xpack.watcher.delete_watch.go api.xpack.watcher.execute_watch.go api.xpack.watcher.get_watch.go api.xpack.watcher.put_watch.go api.xpack.watcher.start.go api.xpack.watcher.stats.go api.xpack.watcher.stop.go api.xpack.xpack.info.go api.xpack.xpack.usage.go doc.go esapi.go esapi.request.go esapi.response.go

Constants

const Version = version.Client

Version returns the package version as a string.

func BoolPtr Uses

func BoolPtr(v bool) *bool

BoolPtr returns a pointer to v.

It is used as a convenience function for converting a bool value into a pointer when passing the value to a function or struct field which expects a pointer.

func IntPtr Uses

func IntPtr(v int) *int

IntPtr returns a pointer to v.

It is used as a convenience function for converting an int value into a pointer when passing the value to a function or struct field which expects a pointer.

type API Uses

type API struct {
    Cat         *Cat
    Cluster     *Cluster
    Indices     *Indices
    Ingest      *Ingest
    Nodes       *Nodes
    Remote      *Remote
    Snapshot    *Snapshot
    Tasks       *Tasks
    AsyncSearch *AsyncSearch
    CCR         *CCR
    ILM         *ILM
    License     *License
    Migration   *Migration
    ML          *ML
    Monitoring  *Monitoring
    Rollup      *Rollup
    Security    *Security
    SQL         *SQL
    SSL         *SSL
    Watcher     *Watcher
    XPack       *XPack

    AutoscalingDeleteAutoscalingPolicy            AutoscalingDeleteAutoscalingPolicy
    AutoscalingGetAutoscalingCapacity             AutoscalingGetAutoscalingCapacity
    AutoscalingGetAutoscalingDecision             AutoscalingGetAutoscalingDecision
    AutoscalingGetAutoscalingPolicy               AutoscalingGetAutoscalingPolicy
    AutoscalingPutAutoscalingPolicy               AutoscalingPutAutoscalingPolicy
    Bulk                                          Bulk
    ClearScroll                                   ClearScroll
    ClosePointInTime                              ClosePointInTime
    Count                                         Count
    Create                                        Create
    DanglingIndicesDeleteDanglingIndex            DanglingIndicesDeleteDanglingIndex
    DanglingIndicesImportDanglingIndex            DanglingIndicesImportDanglingIndex
    DanglingIndicesListDanglingIndices            DanglingIndicesListDanglingIndices
    DataFrameTransformDeprecatedDeleteTransform   DataFrameTransformDeprecatedDeleteTransform
    DataFrameTransformDeprecatedGetTransform      DataFrameTransformDeprecatedGetTransform
    DataFrameTransformDeprecatedGetTransformStats DataFrameTransformDeprecatedGetTransformStats
    DataFrameTransformDeprecatedPreviewTransform  DataFrameTransformDeprecatedPreviewTransform
    DataFrameTransformDeprecatedPutTransform      DataFrameTransformDeprecatedPutTransform
    DataFrameTransformDeprecatedStartTransform    DataFrameTransformDeprecatedStartTransform
    DataFrameTransformDeprecatedStopTransform     DataFrameTransformDeprecatedStopTransform
    DataFrameTransformDeprecatedUpdateTransform   DataFrameTransformDeprecatedUpdateTransform
    DeleteByQuery                                 DeleteByQuery
    DeleteByQueryRethrottle                       DeleteByQueryRethrottle
    Delete                                        Delete
    DeleteScript                                  DeleteScript
    EnrichDeletePolicy                            EnrichDeletePolicy
    EnrichExecutePolicy                           EnrichExecutePolicy
    EnrichGetPolicy                               EnrichGetPolicy
    EnrichPutPolicy                               EnrichPutPolicy
    EnrichStats                                   EnrichStats
    EqlDelete                                     EqlDelete
    EqlGet                                        EqlGet
    EqlSearch                                     EqlSearch
    Exists                                        Exists
    ExistsSource                                  ExistsSource
    Explain                                       Explain
    FieldCaps                                     FieldCaps
    Get                                           Get
    GetScriptContext                              GetScriptContext
    GetScriptLanguages                            GetScriptLanguages
    GetScript                                     GetScript
    GetSource                                     GetSource
    GraphExplore                                  GraphExplore
    Index                                         Index
    Info                                          Info
    Mget                                          Mget
    Msearch                                       Msearch
    MsearchTemplate                               MsearchTemplate
    Mtermvectors                                  Mtermvectors
    OpenPointInTime                               OpenPointInTime
    Ping                                          Ping
    PutScript                                     PutScript
    RankEval                                      RankEval
    Reindex                                       Reindex
    ReindexRethrottle                             ReindexRethrottle
    RenderSearchTemplate                          RenderSearchTemplate
    ScriptsPainlessExecute                        ScriptsPainlessExecute
    Scroll                                        Scroll
    Search                                        Search
    SearchShards                                  SearchShards
    SearchTemplate                                SearchTemplate
    SearchableSnapshotsClearCache                 SearchableSnapshotsClearCache
    SearchableSnapshotsMount                      SearchableSnapshotsMount
    SearchableSnapshotsRepositoryStats            SearchableSnapshotsRepositoryStats
    SearchableSnapshotsStats                      SearchableSnapshotsStats
    SlmDeleteLifecycle                            SlmDeleteLifecycle
    SlmExecuteLifecycle                           SlmExecuteLifecycle
    SlmExecuteRetention                           SlmExecuteRetention
    SlmGetLifecycle                               SlmGetLifecycle
    SlmGetStats                                   SlmGetStats
    SlmGetStatus                                  SlmGetStatus
    SlmPutLifecycle                               SlmPutLifecycle
    SlmStart                                      SlmStart
    SlmStop                                       SlmStop
    Termvectors                                   Termvectors
    TransformDeleteTransform                      TransformDeleteTransform
    TransformGetTransform                         TransformGetTransform
    TransformGetTransformStats                    TransformGetTransformStats
    TransformPreviewTransform                     TransformPreviewTransform
    TransformPutTransform                         TransformPutTransform
    TransformStartTransform                       TransformStartTransform
    TransformStopTransform                        TransformStopTransform
    TransformUpdateTransform                      TransformUpdateTransform
    UpdateByQuery                                 UpdateByQuery
    UpdateByQueryRethrottle                       UpdateByQueryRethrottle
    Update                                        Update
}

API contains the Elasticsearch APIs

func New Uses

func New(t Transport) *API

New creates new API

type AsyncSearch Uses

type AsyncSearch struct {
    Delete AsyncSearchDelete
    Get    AsyncSearchGet
    Submit AsyncSearchSubmit
}

AsyncSearch contains the AsyncSearch APIs

type AsyncSearchDelete Uses

type AsyncSearchDelete func(id string, o ...func(*AsyncSearchDeleteRequest)) (*Response, error)

AsyncSearchDelete - Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html.

func (AsyncSearchDelete) WithContext Uses

func (f AsyncSearchDelete) WithContext(v context.Context) func(*AsyncSearchDeleteRequest)

WithContext sets the request context.

func (AsyncSearchDelete) WithErrorTrace Uses

func (f AsyncSearchDelete) WithErrorTrace() func(*AsyncSearchDeleteRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AsyncSearchDelete) WithFilterPath Uses

func (f AsyncSearchDelete) WithFilterPath(v ...string) func(*AsyncSearchDeleteRequest)

WithFilterPath filters the properties of the response body.

func (AsyncSearchDelete) WithHeader Uses

func (f AsyncSearchDelete) WithHeader(h map[string]string) func(*AsyncSearchDeleteRequest)

WithHeader adds the headers to the HTTP request.

func (AsyncSearchDelete) WithHuman Uses

func (f AsyncSearchDelete) WithHuman() func(*AsyncSearchDeleteRequest)

WithHuman makes statistical values human-readable.

func (AsyncSearchDelete) WithOpaqueID Uses

func (f AsyncSearchDelete) WithOpaqueID(s string) func(*AsyncSearchDeleteRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AsyncSearchDelete) WithPretty Uses

func (f AsyncSearchDelete) WithPretty() func(*AsyncSearchDeleteRequest)

WithPretty makes the response body pretty-printed.

type AsyncSearchDeleteRequest Uses

type AsyncSearchDeleteRequest struct {
    DocumentID string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AsyncSearchDeleteRequest configures the Async Search Delete API request.

func (AsyncSearchDeleteRequest) Do Uses

func (r AsyncSearchDeleteRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AsyncSearchGet Uses

type AsyncSearchGet func(id string, o ...func(*AsyncSearchGetRequest)) (*Response, error)

AsyncSearchGet - Retrieves the results of a previously submitted async search request given its ID.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html.

func (AsyncSearchGet) WithContext Uses

func (f AsyncSearchGet) WithContext(v context.Context) func(*AsyncSearchGetRequest)

WithContext sets the request context.

func (AsyncSearchGet) WithErrorTrace Uses

func (f AsyncSearchGet) WithErrorTrace() func(*AsyncSearchGetRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AsyncSearchGet) WithFilterPath Uses

func (f AsyncSearchGet) WithFilterPath(v ...string) func(*AsyncSearchGetRequest)

WithFilterPath filters the properties of the response body.

func (AsyncSearchGet) WithHeader Uses

func (f AsyncSearchGet) WithHeader(h map[string]string) func(*AsyncSearchGetRequest)

WithHeader adds the headers to the HTTP request.

func (AsyncSearchGet) WithHuman Uses

func (f AsyncSearchGet) WithHuman() func(*AsyncSearchGetRequest)

WithHuman makes statistical values human-readable.

func (AsyncSearchGet) WithKeepAlive Uses

func (f AsyncSearchGet) WithKeepAlive(v time.Duration) func(*AsyncSearchGetRequest)

WithKeepAlive - specify the time interval in which the results (partial or final) for this search will be available.

func (AsyncSearchGet) WithOpaqueID Uses

func (f AsyncSearchGet) WithOpaqueID(s string) func(*AsyncSearchGetRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AsyncSearchGet) WithPretty Uses

func (f AsyncSearchGet) WithPretty() func(*AsyncSearchGetRequest)

WithPretty makes the response body pretty-printed.

func (AsyncSearchGet) WithTypedKeys Uses

func (f AsyncSearchGet) WithTypedKeys(v bool) func(*AsyncSearchGetRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

func (AsyncSearchGet) WithWaitForCompletionTimeout Uses

func (f AsyncSearchGet) WithWaitForCompletionTimeout(v time.Duration) func(*AsyncSearchGetRequest)

WithWaitForCompletionTimeout - specify the time that the request should block waiting for the final response.

type AsyncSearchGetRequest Uses

type AsyncSearchGetRequest struct {
    DocumentID string

    KeepAlive                time.Duration
    TypedKeys                *bool
    WaitForCompletionTimeout time.Duration

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AsyncSearchGetRequest configures the Async Search Get API request.

func (AsyncSearchGetRequest) Do Uses

func (r AsyncSearchGetRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AsyncSearchSubmit Uses

type AsyncSearchSubmit func(o ...func(*AsyncSearchSubmitRequest)) (*Response, error)

AsyncSearchSubmit - Executes a search request asynchronously.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html.

func (AsyncSearchSubmit) WithAllowNoIndices Uses

func (f AsyncSearchSubmit) WithAllowNoIndices(v bool) func(*AsyncSearchSubmitRequest)

WithAllowNoIndices - 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 (AsyncSearchSubmit) WithAllowPartialSearchResults Uses

func (f AsyncSearchSubmit) WithAllowPartialSearchResults(v bool) func(*AsyncSearchSubmitRequest)

WithAllowPartialSearchResults - indicate if an error should be returned if there is a partial search failure or timeout.

func (AsyncSearchSubmit) WithAnalyzeWildcard Uses

func (f AsyncSearchSubmit) WithAnalyzeWildcard(v bool) func(*AsyncSearchSubmitRequest)

WithAnalyzeWildcard - specify whether wildcard and prefix queries should be analyzed (default: false).

func (AsyncSearchSubmit) WithAnalyzer Uses

func (f AsyncSearchSubmit) WithAnalyzer(v string) func(*AsyncSearchSubmitRequest)

WithAnalyzer - the analyzer to use for the query string.

func (AsyncSearchSubmit) WithBatchedReduceSize Uses

func (f AsyncSearchSubmit) WithBatchedReduceSize(v int) func(*AsyncSearchSubmitRequest)

WithBatchedReduceSize - the number of shard results that should be reduced at once on the coordinating node. this value should be used as the granularity at which progress results will be made available..

func (AsyncSearchSubmit) WithBody Uses

func (f AsyncSearchSubmit) WithBody(v io.Reader) func(*AsyncSearchSubmitRequest)

WithBody - The search definition using the Query DSL.

func (AsyncSearchSubmit) WithContext Uses

func (f AsyncSearchSubmit) WithContext(v context.Context) func(*AsyncSearchSubmitRequest)

WithContext sets the request context.

func (AsyncSearchSubmit) WithDefaultOperator Uses

func (f AsyncSearchSubmit) WithDefaultOperator(v string) func(*AsyncSearchSubmitRequest)

WithDefaultOperator - the default operator for query string query (and or or).

func (AsyncSearchSubmit) WithDf Uses

func (f AsyncSearchSubmit) WithDf(v string) func(*AsyncSearchSubmitRequest)

WithDf - the field to use as default where no field prefix is given in the query string.

func (AsyncSearchSubmit) WithDocvalueFields Uses

func (f AsyncSearchSubmit) WithDocvalueFields(v ...string) func(*AsyncSearchSubmitRequest)

WithDocvalueFields - a list of fields to return as the docvalue representation of a field for each hit.

func (AsyncSearchSubmit) WithErrorTrace Uses

func (f AsyncSearchSubmit) WithErrorTrace() func(*AsyncSearchSubmitRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AsyncSearchSubmit) WithExpandWildcards Uses

func (f AsyncSearchSubmit) WithExpandWildcards(v string) func(*AsyncSearchSubmitRequest)

WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both..

func (AsyncSearchSubmit) WithExplain Uses

func (f AsyncSearchSubmit) WithExplain(v bool) func(*AsyncSearchSubmitRequest)

WithExplain - specify whether to return detailed information about score computation as part of a hit.

func (AsyncSearchSubmit) WithFilterPath Uses

func (f AsyncSearchSubmit) WithFilterPath(v ...string) func(*AsyncSearchSubmitRequest)

WithFilterPath filters the properties of the response body.

func (AsyncSearchSubmit) WithFrom Uses

func (f AsyncSearchSubmit) WithFrom(v int) func(*AsyncSearchSubmitRequest)

WithFrom - starting offset (default: 0).

func (AsyncSearchSubmit) WithHeader Uses

func (f AsyncSearchSubmit) WithHeader(h map[string]string) func(*AsyncSearchSubmitRequest)

WithHeader adds the headers to the HTTP request.

func (AsyncSearchSubmit) WithHuman Uses

func (f AsyncSearchSubmit) WithHuman() func(*AsyncSearchSubmitRequest)

WithHuman makes statistical values human-readable.

func (AsyncSearchSubmit) WithIgnoreThrottled Uses

func (f AsyncSearchSubmit) WithIgnoreThrottled(v bool) func(*AsyncSearchSubmitRequest)

WithIgnoreThrottled - whether specified concrete, expanded or aliased indices should be ignored when throttled.

func (AsyncSearchSubmit) WithIgnoreUnavailable Uses

func (f AsyncSearchSubmit) WithIgnoreUnavailable(v bool) func(*AsyncSearchSubmitRequest)

WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed).

func (AsyncSearchSubmit) WithIndex Uses

func (f AsyncSearchSubmit) WithIndex(v ...string) func(*AsyncSearchSubmitRequest)

WithIndex - a list of index names to search; use _all to perform the operation on all indices.

func (AsyncSearchSubmit) WithKeepAlive Uses

func (f AsyncSearchSubmit) WithKeepAlive(v time.Duration) func(*AsyncSearchSubmitRequest)

WithKeepAlive - update the time interval in which the results (partial or final) for this search will be available.

func (AsyncSearchSubmit) WithKeepOnCompletion Uses

func (f AsyncSearchSubmit) WithKeepOnCompletion(v bool) func(*AsyncSearchSubmitRequest)

WithKeepOnCompletion - control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false).

func (AsyncSearchSubmit) WithLenient Uses

func (f AsyncSearchSubmit) WithLenient(v bool) func(*AsyncSearchSubmitRequest)

WithLenient - specify whether format-based query failures (such as providing text to a numeric field) should be ignored.

func (AsyncSearchSubmit) WithMaxConcurrentShardRequests Uses

func (f AsyncSearchSubmit) WithMaxConcurrentShardRequests(v int) func(*AsyncSearchSubmitRequest)

WithMaxConcurrentShardRequests - the number of concurrent shard requests per node 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 (AsyncSearchSubmit) WithOpaqueID Uses

func (f AsyncSearchSubmit) WithOpaqueID(s string) func(*AsyncSearchSubmitRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AsyncSearchSubmit) WithPreference Uses

func (f AsyncSearchSubmit) WithPreference(v string) func(*AsyncSearchSubmitRequest)

WithPreference - specify the node or shard the operation should be performed on (default: random).

func (AsyncSearchSubmit) WithPretty Uses

func (f AsyncSearchSubmit) WithPretty() func(*AsyncSearchSubmitRequest)

WithPretty makes the response body pretty-printed.

func (AsyncSearchSubmit) WithQuery Uses

func (f AsyncSearchSubmit) WithQuery(v string) func(*AsyncSearchSubmitRequest)

WithQuery - query in the lucene query string syntax.

func (AsyncSearchSubmit) WithRequestCache Uses

func (f AsyncSearchSubmit) WithRequestCache(v bool) func(*AsyncSearchSubmitRequest)

WithRequestCache - specify if request cache should be used for this request or not, defaults to true.

func (AsyncSearchSubmit) WithRouting Uses

func (f AsyncSearchSubmit) WithRouting(v ...string) func(*AsyncSearchSubmitRequest)

WithRouting - a list of specific routing values.

func (AsyncSearchSubmit) WithSearchType Uses

func (f AsyncSearchSubmit) WithSearchType(v string) func(*AsyncSearchSubmitRequest)

WithSearchType - search operation type.

func (AsyncSearchSubmit) WithSeqNoPrimaryTerm Uses

func (f AsyncSearchSubmit) WithSeqNoPrimaryTerm(v bool) func(*AsyncSearchSubmitRequest)

WithSeqNoPrimaryTerm - specify whether to return sequence number and primary term of the last modification of each hit.

func (AsyncSearchSubmit) WithSize Uses

func (f AsyncSearchSubmit) WithSize(v int) func(*AsyncSearchSubmitRequest)

WithSize - number of hits to return (default: 10).

func (AsyncSearchSubmit) WithSort Uses

func (f AsyncSearchSubmit) WithSort(v ...string) func(*AsyncSearchSubmitRequest)

WithSort - a list of <field>:<direction> pairs.

func (AsyncSearchSubmit) WithSource Uses

func (f AsyncSearchSubmit) WithSource(v ...string) func(*AsyncSearchSubmitRequest)

WithSource - true or false to return the _source field or not, or a list of fields to return.

func (AsyncSearchSubmit) WithSourceExcludes Uses

func (f AsyncSearchSubmit) WithSourceExcludes(v ...string) func(*AsyncSearchSubmitRequest)

WithSourceExcludes - a list of fields to exclude from the returned _source field.

func (AsyncSearchSubmit) WithSourceIncludes Uses

func (f AsyncSearchSubmit) WithSourceIncludes(v ...string) func(*AsyncSearchSubmitRequest)

WithSourceIncludes - a list of fields to extract and return from the _source field.

func (AsyncSearchSubmit) WithStats Uses

func (f AsyncSearchSubmit) WithStats(v ...string) func(*AsyncSearchSubmitRequest)

WithStats - specific 'tag' of the request for logging and statistical purposes.

func (AsyncSearchSubmit) WithStoredFields Uses

func (f AsyncSearchSubmit) WithStoredFields(v ...string) func(*AsyncSearchSubmitRequest)

WithStoredFields - a list of stored fields to return as part of a hit.

func (AsyncSearchSubmit) WithSuggestField Uses

func (f AsyncSearchSubmit) WithSuggestField(v string) func(*AsyncSearchSubmitRequest)

WithSuggestField - specify which field to use for suggestions.

func (AsyncSearchSubmit) WithSuggestMode Uses

func (f AsyncSearchSubmit) WithSuggestMode(v string) func(*AsyncSearchSubmitRequest)

WithSuggestMode - specify suggest mode.

func (AsyncSearchSubmit) WithSuggestSize Uses

func (f AsyncSearchSubmit) WithSuggestSize(v int) func(*AsyncSearchSubmitRequest)

WithSuggestSize - how many suggestions to return in response.

func (AsyncSearchSubmit) WithSuggestText Uses

func (f AsyncSearchSubmit) WithSuggestText(v string) func(*AsyncSearchSubmitRequest)

WithSuggestText - the source text for which the suggestions should be returned.

func (AsyncSearchSubmit) WithTerminateAfter Uses

func (f AsyncSearchSubmit) WithTerminateAfter(v int) func(*AsyncSearchSubmitRequest)

WithTerminateAfter - the maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early..

func (AsyncSearchSubmit) WithTimeout Uses

func (f AsyncSearchSubmit) WithTimeout(v time.Duration) func(*AsyncSearchSubmitRequest)

WithTimeout - explicit operation timeout.

func (AsyncSearchSubmit) WithTrackScores Uses

func (f AsyncSearchSubmit) WithTrackScores(v bool) func(*AsyncSearchSubmitRequest)

WithTrackScores - whether to calculate and return scores even if they are not used for sorting.

func (AsyncSearchSubmit) WithTrackTotalHits Uses

func (f AsyncSearchSubmit) WithTrackTotalHits(v interface{}) func(*AsyncSearchSubmitRequest)

WithTrackTotalHits - indicate if the number of documents that match the query should be tracked. a number can also be specified, to accurately track the total hit count up to the number..

func (AsyncSearchSubmit) WithTypedKeys Uses

func (f AsyncSearchSubmit) WithTypedKeys(v bool) func(*AsyncSearchSubmitRequest)

WithTypedKeys - specify whether aggregation and suggester names should be prefixed by their respective types in the response.

func (AsyncSearchSubmit) WithVersion Uses

func (f AsyncSearchSubmit) WithVersion(v bool) func(*AsyncSearchSubmitRequest)

WithVersion - specify whether to return document version as part of a hit.

func (AsyncSearchSubmit) WithWaitForCompletionTimeout Uses

func (f AsyncSearchSubmit) WithWaitForCompletionTimeout(v time.Duration) func(*AsyncSearchSubmitRequest)

WithWaitForCompletionTimeout - specify the time that the request should block waiting for the final response.

type AsyncSearchSubmitRequest Uses

type AsyncSearchSubmitRequest struct {
    Index []string

    Body io.Reader

    AllowNoIndices             *bool
    AllowPartialSearchResults  *bool
    Analyzer                   string
    AnalyzeWildcard            *bool
    BatchedReduceSize          *int
    DefaultOperator            string
    Df                         string
    DocvalueFields             []string
    ExpandWildcards            string
    Explain                    *bool
    From                       *int
    IgnoreThrottled            *bool
    IgnoreUnavailable          *bool
    KeepAlive                  time.Duration
    KeepOnCompletion           *bool
    Lenient                    *bool
    MaxConcurrentShardRequests *int
    Preference                 string
    Query                      string
    RequestCache               *bool
    Routing                    []string
    SearchType                 string
    SeqNoPrimaryTerm           *bool
    Size                       *int
    Sort                       []string
    Source                     []string
    SourceExcludes             []string
    SourceIncludes             []string
    Stats                      []string
    StoredFields               []string
    SuggestField               string
    SuggestMode                string
    SuggestSize                *int
    SuggestText                string
    TerminateAfter             *int
    Timeout                    time.Duration
    TrackScores                *bool
    TrackTotalHits             interface{}
    TypedKeys                  *bool
    Version                    *bool
    WaitForCompletionTimeout   time.Duration

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AsyncSearchSubmitRequest configures the Async Search Submit API request.

func (AsyncSearchSubmitRequest) Do Uses

func (r AsyncSearchSubmitRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AutoscalingDeleteAutoscalingPolicy Uses

type AutoscalingDeleteAutoscalingPolicy func(name string, o ...func(*AutoscalingDeleteAutoscalingPolicyRequest)) (*Response, error)

AutoscalingDeleteAutoscalingPolicy - Deletes an autoscaling policy.

This API is experimental.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html.

func (AutoscalingDeleteAutoscalingPolicy) WithContext Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithContext(v context.Context) func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithContext sets the request context.

func (AutoscalingDeleteAutoscalingPolicy) WithErrorTrace Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithErrorTrace() func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AutoscalingDeleteAutoscalingPolicy) WithFilterPath Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithFilterPath(v ...string) func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithFilterPath filters the properties of the response body.

func (AutoscalingDeleteAutoscalingPolicy) WithHeader Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithHeader(h map[string]string) func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithHeader adds the headers to the HTTP request.

func (AutoscalingDeleteAutoscalingPolicy) WithHuman Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithHuman() func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithHuman makes statistical values human-readable.

func (AutoscalingDeleteAutoscalingPolicy) WithOpaqueID Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithOpaqueID(s string) func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AutoscalingDeleteAutoscalingPolicy) WithPretty Uses

func (f AutoscalingDeleteAutoscalingPolicy) WithPretty() func(*AutoscalingDeleteAutoscalingPolicyRequest)

WithPretty makes the response body pretty-printed.

type AutoscalingDeleteAutoscalingPolicyRequest Uses

type AutoscalingDeleteAutoscalingPolicyRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AutoscalingDeleteAutoscalingPolicyRequest configures the Autoscaling Delete Autoscaling Policy API request.

func (AutoscalingDeleteAutoscalingPolicyRequest) Do Uses

func (r AutoscalingDeleteAutoscalingPolicyRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AutoscalingGetAutoscalingCapacity Uses

type AutoscalingGetAutoscalingCapacity func(o ...func(*AutoscalingGetAutoscalingCapacityRequest)) (*Response, error)

AutoscalingGetAutoscalingCapacity - Gets the current autoscaling capacity based on the configured autoscaling policy.

This API is experimental.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html.

func (AutoscalingGetAutoscalingCapacity) WithContext Uses

func (f AutoscalingGetAutoscalingCapacity) WithContext(v context.Context) func(*AutoscalingGetAutoscalingCapacityRequest)

WithContext sets the request context.

func (AutoscalingGetAutoscalingCapacity) WithErrorTrace Uses

func (f AutoscalingGetAutoscalingCapacity) WithErrorTrace() func(*AutoscalingGetAutoscalingCapacityRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AutoscalingGetAutoscalingCapacity) WithFilterPath Uses

func (f AutoscalingGetAutoscalingCapacity) WithFilterPath(v ...string) func(*AutoscalingGetAutoscalingCapacityRequest)

WithFilterPath filters the properties of the response body.

func (AutoscalingGetAutoscalingCapacity) WithHeader Uses

func (f AutoscalingGetAutoscalingCapacity) WithHeader(h map[string]string) func(*AutoscalingGetAutoscalingCapacityRequest)

WithHeader adds the headers to the HTTP request.

func (AutoscalingGetAutoscalingCapacity) WithHuman Uses

func (f AutoscalingGetAutoscalingCapacity) WithHuman() func(*AutoscalingGetAutoscalingCapacityRequest)

WithHuman makes statistical values human-readable.

func (AutoscalingGetAutoscalingCapacity) WithOpaqueID Uses

func (f AutoscalingGetAutoscalingCapacity) WithOpaqueID(s string) func(*AutoscalingGetAutoscalingCapacityRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AutoscalingGetAutoscalingCapacity) WithPretty Uses

func (f AutoscalingGetAutoscalingCapacity) WithPretty() func(*AutoscalingGetAutoscalingCapacityRequest)

WithPretty makes the response body pretty-printed.

type AutoscalingGetAutoscalingCapacityRequest Uses

type AutoscalingGetAutoscalingCapacityRequest struct {
    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AutoscalingGetAutoscalingCapacityRequest configures the Autoscaling Get Autoscaling Capacity API request.

func (AutoscalingGetAutoscalingCapacityRequest) Do Uses

func (r AutoscalingGetAutoscalingCapacityRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AutoscalingGetAutoscalingDecision Uses

type AutoscalingGetAutoscalingDecision func(o ...func(*AutoscalingGetAutoscalingDecisionRequest)) (*Response, error)

AutoscalingGetAutoscalingDecision - Gets the current autoscaling decision based on the configured autoscaling policy, indicating whether or not autoscaling is needed.

This API is experimental.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-decision.html.

func (AutoscalingGetAutoscalingDecision) WithContext Uses

func (f AutoscalingGetAutoscalingDecision) WithContext(v context.Context) func(*AutoscalingGetAutoscalingDecisionRequest)

WithContext sets the request context.

func (AutoscalingGetAutoscalingDecision) WithErrorTrace Uses

func (f AutoscalingGetAutoscalingDecision) WithErrorTrace() func(*AutoscalingGetAutoscalingDecisionRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AutoscalingGetAutoscalingDecision) WithFilterPath Uses

func (f AutoscalingGetAutoscalingDecision) WithFilterPath(v ...string) func(*AutoscalingGetAutoscalingDecisionRequest)

WithFilterPath filters the properties of the response body.

func (AutoscalingGetAutoscalingDecision) WithHeader Uses

func (f AutoscalingGetAutoscalingDecision) WithHeader(h map[string]string) func(*AutoscalingGetAutoscalingDecisionRequest)

WithHeader adds the headers to the HTTP request.

func (AutoscalingGetAutoscalingDecision) WithHuman Uses

func (f AutoscalingGetAutoscalingDecision) WithHuman() func(*AutoscalingGetAutoscalingDecisionRequest)

WithHuman makes statistical values human-readable.

func (AutoscalingGetAutoscalingDecision) WithOpaqueID Uses

func (f AutoscalingGetAutoscalingDecision) WithOpaqueID(s string) func(*AutoscalingGetAutoscalingDecisionRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AutoscalingGetAutoscalingDecision) WithPretty Uses

func (f AutoscalingGetAutoscalingDecision) WithPretty() func(*AutoscalingGetAutoscalingDecisionRequest)

WithPretty makes the response body pretty-printed.

type AutoscalingGetAutoscalingDecisionRequest Uses

type AutoscalingGetAutoscalingDecisionRequest struct {
    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AutoscalingGetAutoscalingDecisionRequest configures the Autoscaling Get Autoscaling Decision API request.

func (AutoscalingGetAutoscalingDecisionRequest) Do Uses

func (r AutoscalingGetAutoscalingDecisionRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AutoscalingGetAutoscalingPolicy Uses

type AutoscalingGetAutoscalingPolicy func(name string, o ...func(*AutoscalingGetAutoscalingPolicyRequest)) (*Response, error)

AutoscalingGetAutoscalingPolicy - Retrieves an autoscaling policy.

This API is experimental.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html.

func (AutoscalingGetAutoscalingPolicy) WithContext Uses

func (f AutoscalingGetAutoscalingPolicy) WithContext(v context.Context) func(*AutoscalingGetAutoscalingPolicyRequest)

WithContext sets the request context.

func (AutoscalingGetAutoscalingPolicy) WithErrorTrace Uses

func (f AutoscalingGetAutoscalingPolicy) WithErrorTrace() func(*AutoscalingGetAutoscalingPolicyRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AutoscalingGetAutoscalingPolicy) WithFilterPath Uses

func (f AutoscalingGetAutoscalingPolicy) WithFilterPath(v ...string) func(*AutoscalingGetAutoscalingPolicyRequest)

WithFilterPath filters the properties of the response body.

func (AutoscalingGetAutoscalingPolicy) WithHeader Uses

func (f AutoscalingGetAutoscalingPolicy) WithHeader(h map[string]string) func(*AutoscalingGetAutoscalingPolicyRequest)

WithHeader adds the headers to the HTTP request.

func (AutoscalingGetAutoscalingPolicy) WithHuman Uses

func (f AutoscalingGetAutoscalingPolicy) WithHuman() func(*AutoscalingGetAutoscalingPolicyRequest)

WithHuman makes statistical values human-readable.

func (AutoscalingGetAutoscalingPolicy) WithOpaqueID Uses

func (f AutoscalingGetAutoscalingPolicy) WithOpaqueID(s string) func(*AutoscalingGetAutoscalingPolicyRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AutoscalingGetAutoscalingPolicy) WithPretty Uses

func (f AutoscalingGetAutoscalingPolicy) WithPretty() func(*AutoscalingGetAutoscalingPolicyRequest)

WithPretty makes the response body pretty-printed.

type AutoscalingGetAutoscalingPolicyRequest Uses

type AutoscalingGetAutoscalingPolicyRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AutoscalingGetAutoscalingPolicyRequest configures the Autoscaling Get Autoscaling Policy API request.

func (AutoscalingGetAutoscalingPolicyRequest) Do Uses

func (r AutoscalingGetAutoscalingPolicyRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type AutoscalingPutAutoscalingPolicy Uses

type AutoscalingPutAutoscalingPolicy func(name string, body io.Reader, o ...func(*AutoscalingPutAutoscalingPolicyRequest)) (*Response, error)

AutoscalingPutAutoscalingPolicy - Creates a new autoscaling policy.

This API is experimental.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html.

func (AutoscalingPutAutoscalingPolicy) WithContext Uses

func (f AutoscalingPutAutoscalingPolicy) WithContext(v context.Context) func(*AutoscalingPutAutoscalingPolicyRequest)

WithContext sets the request context.

func (AutoscalingPutAutoscalingPolicy) WithErrorTrace Uses

func (f AutoscalingPutAutoscalingPolicy) WithErrorTrace() func(*AutoscalingPutAutoscalingPolicyRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (AutoscalingPutAutoscalingPolicy) WithFilterPath Uses

func (f AutoscalingPutAutoscalingPolicy) WithFilterPath(v ...string) func(*AutoscalingPutAutoscalingPolicyRequest)

WithFilterPath filters the properties of the response body.

func (AutoscalingPutAutoscalingPolicy) WithHeader Uses

func (f AutoscalingPutAutoscalingPolicy) WithHeader(h map[string]string) func(*AutoscalingPutAutoscalingPolicyRequest)

WithHeader adds the headers to the HTTP request.

func (AutoscalingPutAutoscalingPolicy) WithHuman Uses

func (f AutoscalingPutAutoscalingPolicy) WithHuman() func(*AutoscalingPutAutoscalingPolicyRequest)

WithHuman makes statistical values human-readable.

func (AutoscalingPutAutoscalingPolicy) WithOpaqueID Uses

func (f AutoscalingPutAutoscalingPolicy) WithOpaqueID(s string) func(*AutoscalingPutAutoscalingPolicyRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (AutoscalingPutAutoscalingPolicy) WithPretty Uses

func (f AutoscalingPutAutoscalingPolicy) WithPretty() func(*AutoscalingPutAutoscalingPolicyRequest)

WithPretty makes the response body pretty-printed.

type AutoscalingPutAutoscalingPolicyRequest Uses

type AutoscalingPutAutoscalingPolicyRequest struct {
    Body io.Reader

    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

AutoscalingPutAutoscalingPolicyRequest configures the Autoscaling Put Autoscaling Policy API request.

func (AutoscalingPutAutoscalingPolicyRequest) Do Uses

func (r AutoscalingPutAutoscalingPolicyRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type Bulk Uses

type Bulk func(body io.Reader, o ...func(*BulkRequest)) (*Response, error)

Bulk allows to perform multiple index/update/delete operations in a single request.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html.

func (Bulk) WithContext Uses

func (f Bulk) WithContext(v context.Context) func(*BulkRequest)

WithContext sets the request context.

func (Bulk) WithDocumentType Uses

func (f Bulk) WithDocumentType(v string) func(*BulkRequest)

WithDocumentType - default document type for items which don't provide one.

func (Bulk) WithErrorTrace Uses

func (f Bulk) WithErrorTrace() func(*BulkRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (Bulk) WithFilterPath Uses

func (f Bulk) WithFilterPath(v ...string) func(*BulkRequest)

WithFilterPath filters the properties of the response body.

func (Bulk) WithHeader Uses

func (f Bulk) WithHeader(h map[string]string) func(*BulkRequest)

WithHeader adds the headers to the HTTP request.

func (Bulk) WithHuman Uses

func (f Bulk) WithHuman() func(*BulkRequest)

WithHuman makes statistical values human-readable.

func (Bulk) WithIndex Uses

func (f Bulk) WithIndex(v string) func(*BulkRequest)

WithIndex - default index for items which don't provide one.

func (Bulk) WithOpaqueID Uses

func (f Bulk) WithOpaqueID(s string) func(*BulkRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (Bulk) WithPipeline Uses

func (f Bulk) WithPipeline(v string) func(*BulkRequest)

WithPipeline - the pipeline ID to preprocess incoming documents with.

func (Bulk) WithPretty Uses

func (f Bulk) WithPretty() func(*BulkRequest)

WithPretty makes the response body pretty-printed.

func (Bulk) WithRefresh Uses

func (f Bulk) WithRefresh(v string) func(*BulkRequest)

WithRefresh - if `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes..

func (Bulk) WithRequireAlias Uses

func (f Bulk) WithRequireAlias(v bool) func(*BulkRequest)

WithRequireAlias - sets require_alias for all incoming documents. defaults to unset (false).

func (Bulk) WithRouting Uses

func (f Bulk) WithRouting(v string) func(*BulkRequest)

WithRouting - specific routing value.

func (Bulk) WithSource Uses

func (f Bulk) WithSource(v ...string) func(*BulkRequest)

WithSource - true or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request.

func (Bulk) WithSourceExcludes Uses

func (f Bulk) WithSourceExcludes(v ...string) func(*BulkRequest)

WithSourceExcludes - default list of fields to exclude from the returned _source field, can be overridden on each sub-request.

func (Bulk) WithSourceIncludes Uses

func (f Bulk) WithSourceIncludes(v ...string) func(*BulkRequest)

WithSourceIncludes - default list of fields to extract and return from the _source field, can be overridden on each sub-request.

func (Bulk) WithTimeout Uses

func (f Bulk) WithTimeout(v time.Duration) func(*BulkRequest)

WithTimeout - explicit operation timeout.

func (Bulk) WithWaitForActiveShards Uses

func (f Bulk) WithWaitForActiveShards(v string) func(*BulkRequest)

WithWaitForActiveShards - 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 BulkRequest Uses

type BulkRequest struct {
    Index string

    Body io.Reader

    DocumentType string

    Pipeline            string
    Refresh             string
    RequireAlias        *bool
    Routing             string
    Source              []string
    SourceExcludes      []string
    SourceIncludes      []string
    Timeout             time.Duration
    WaitForActiveShards string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

BulkRequest configures the Bulk API request.

func (BulkRequest) Do Uses

func (r BulkRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCR Uses

type CCR struct {
    DeleteAutoFollowPattern CCRDeleteAutoFollowPattern
    FollowInfo              CCRFollowInfo
    Follow                  CCRFollow
    FollowStats             CCRFollowStats
    ForgetFollower          CCRForgetFollower
    GetAutoFollowPattern    CCRGetAutoFollowPattern
    PauseAutoFollowPattern  CCRPauseAutoFollowPattern
    PauseFollow             CCRPauseFollow
    PutAutoFollowPattern    CCRPutAutoFollowPattern
    ResumeAutoFollowPattern CCRResumeAutoFollowPattern
    ResumeFollow            CCRResumeFollow
    Stats                   CCRStats
    Unfollow                CCRUnfollow
}

CCR contains the CCR APIs

type CCRDeleteAutoFollowPattern Uses

type CCRDeleteAutoFollowPattern func(name string, o ...func(*CCRDeleteAutoFollowPatternRequest)) (*Response, error)

CCRDeleteAutoFollowPattern - Deletes auto-follow patterns.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html.

func (CCRDeleteAutoFollowPattern) WithContext Uses

func (f CCRDeleteAutoFollowPattern) WithContext(v context.Context) func(*CCRDeleteAutoFollowPatternRequest)

WithContext sets the request context.

func (CCRDeleteAutoFollowPattern) WithErrorTrace Uses

func (f CCRDeleteAutoFollowPattern) WithErrorTrace() func(*CCRDeleteAutoFollowPatternRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRDeleteAutoFollowPattern) WithFilterPath Uses

func (f CCRDeleteAutoFollowPattern) WithFilterPath(v ...string) func(*CCRDeleteAutoFollowPatternRequest)

WithFilterPath filters the properties of the response body.

func (CCRDeleteAutoFollowPattern) WithHeader Uses

func (f CCRDeleteAutoFollowPattern) WithHeader(h map[string]string) func(*CCRDeleteAutoFollowPatternRequest)

WithHeader adds the headers to the HTTP request.

func (CCRDeleteAutoFollowPattern) WithHuman Uses

func (f CCRDeleteAutoFollowPattern) WithHuman() func(*CCRDeleteAutoFollowPatternRequest)

WithHuman makes statistical values human-readable.

func (CCRDeleteAutoFollowPattern) WithOpaqueID Uses

func (f CCRDeleteAutoFollowPattern) WithOpaqueID(s string) func(*CCRDeleteAutoFollowPatternRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRDeleteAutoFollowPattern) WithPretty Uses

func (f CCRDeleteAutoFollowPattern) WithPretty() func(*CCRDeleteAutoFollowPatternRequest)

WithPretty makes the response body pretty-printed.

type CCRDeleteAutoFollowPatternRequest Uses

type CCRDeleteAutoFollowPatternRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRDeleteAutoFollowPatternRequest configures the CCR Delete Auto Follow Pattern API request.

func (CCRDeleteAutoFollowPatternRequest) Do Uses

func (r CCRDeleteAutoFollowPatternRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRFollow Uses

type CCRFollow func(index string, body io.Reader, o ...func(*CCRFollowRequest)) (*Response, error)

CCRFollow - Creates a new follower index configured to follow the referenced leader index.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html.

func (CCRFollow) WithContext Uses

func (f CCRFollow) WithContext(v context.Context) func(*CCRFollowRequest)

WithContext sets the request context.

func (CCRFollow) WithErrorTrace Uses

func (f CCRFollow) WithErrorTrace() func(*CCRFollowRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRFollow) WithFilterPath Uses

func (f CCRFollow) WithFilterPath(v ...string) func(*CCRFollowRequest)

WithFilterPath filters the properties of the response body.

func (CCRFollow) WithHeader Uses

func (f CCRFollow) WithHeader(h map[string]string) func(*CCRFollowRequest)

WithHeader adds the headers to the HTTP request.

func (CCRFollow) WithHuman Uses

func (f CCRFollow) WithHuman() func(*CCRFollowRequest)

WithHuman makes statistical values human-readable.

func (CCRFollow) WithOpaqueID Uses

func (f CCRFollow) WithOpaqueID(s string) func(*CCRFollowRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRFollow) WithPretty Uses

func (f CCRFollow) WithPretty() func(*CCRFollowRequest)

WithPretty makes the response body pretty-printed.

func (CCRFollow) WithWaitForActiveShards Uses

func (f CCRFollow) WithWaitForActiveShards(v string) func(*CCRFollowRequest)

WithWaitForActiveShards - sets the number of shard copies that must be active before returning. defaults to 0. 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 CCRFollowInfo Uses

type CCRFollowInfo func(index []string, o ...func(*CCRFollowInfoRequest)) (*Response, error)

CCRFollowInfo - Retrieves information about all follower indices, including parameters and status for each follower index

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html.

func (CCRFollowInfo) WithContext Uses

func (f CCRFollowInfo) WithContext(v context.Context) func(*CCRFollowInfoRequest)

WithContext sets the request context.

func (CCRFollowInfo) WithErrorTrace Uses

func (f CCRFollowInfo) WithErrorTrace() func(*CCRFollowInfoRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRFollowInfo) WithFilterPath Uses

func (f CCRFollowInfo) WithFilterPath(v ...string) func(*CCRFollowInfoRequest)

WithFilterPath filters the properties of the response body.

func (CCRFollowInfo) WithHeader Uses

func (f CCRFollowInfo) WithHeader(h map[string]string) func(*CCRFollowInfoRequest)

WithHeader adds the headers to the HTTP request.

func (CCRFollowInfo) WithHuman Uses

func (f CCRFollowInfo) WithHuman() func(*CCRFollowInfoRequest)

WithHuman makes statistical values human-readable.

func (CCRFollowInfo) WithOpaqueID Uses

func (f CCRFollowInfo) WithOpaqueID(s string) func(*CCRFollowInfoRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRFollowInfo) WithPretty Uses

func (f CCRFollowInfo) WithPretty() func(*CCRFollowInfoRequest)

WithPretty makes the response body pretty-printed.

type CCRFollowInfoRequest Uses

type CCRFollowInfoRequest struct {
    Index []string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRFollowInfoRequest configures the CCR Follow Info API request.

func (CCRFollowInfoRequest) Do Uses

func (r CCRFollowInfoRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRFollowRequest Uses

type CCRFollowRequest struct {
    Index string

    Body io.Reader

    WaitForActiveShards string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRFollowRequest configures the CCR Follow API request.

func (CCRFollowRequest) Do Uses

func (r CCRFollowRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRFollowStats Uses

type CCRFollowStats func(index []string, o ...func(*CCRFollowStatsRequest)) (*Response, error)

CCRFollowStats - Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html.

func (CCRFollowStats) WithContext Uses

func (f CCRFollowStats) WithContext(v context.Context) func(*CCRFollowStatsRequest)

WithContext sets the request context.

func (CCRFollowStats) WithErrorTrace Uses

func (f CCRFollowStats) WithErrorTrace() func(*CCRFollowStatsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRFollowStats) WithFilterPath Uses

func (f CCRFollowStats) WithFilterPath(v ...string) func(*CCRFollowStatsRequest)

WithFilterPath filters the properties of the response body.

func (CCRFollowStats) WithHeader Uses

func (f CCRFollowStats) WithHeader(h map[string]string) func(*CCRFollowStatsRequest)

WithHeader adds the headers to the HTTP request.

func (CCRFollowStats) WithHuman Uses

func (f CCRFollowStats) WithHuman() func(*CCRFollowStatsRequest)

WithHuman makes statistical values human-readable.

func (CCRFollowStats) WithOpaqueID Uses

func (f CCRFollowStats) WithOpaqueID(s string) func(*CCRFollowStatsRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRFollowStats) WithPretty Uses

func (f CCRFollowStats) WithPretty() func(*CCRFollowStatsRequest)

WithPretty makes the response body pretty-printed.

type CCRFollowStatsRequest Uses

type CCRFollowStatsRequest struct {
    Index []string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRFollowStatsRequest configures the CCR Follow Stats API request.

func (CCRFollowStatsRequest) Do Uses

func (r CCRFollowStatsRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRForgetFollower Uses

type CCRForgetFollower func(index string, body io.Reader, o ...func(*CCRForgetFollowerRequest)) (*Response, error)

CCRForgetFollower - Removes the follower retention leases from the leader.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html.

func (CCRForgetFollower) WithContext Uses

func (f CCRForgetFollower) WithContext(v context.Context) func(*CCRForgetFollowerRequest)

WithContext sets the request context.

func (CCRForgetFollower) WithErrorTrace Uses

func (f CCRForgetFollower) WithErrorTrace() func(*CCRForgetFollowerRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRForgetFollower) WithFilterPath Uses

func (f CCRForgetFollower) WithFilterPath(v ...string) func(*CCRForgetFollowerRequest)

WithFilterPath filters the properties of the response body.

func (CCRForgetFollower) WithHeader Uses

func (f CCRForgetFollower) WithHeader(h map[string]string) func(*CCRForgetFollowerRequest)

WithHeader adds the headers to the HTTP request.

func (CCRForgetFollower) WithHuman Uses

func (f CCRForgetFollower) WithHuman() func(*CCRForgetFollowerRequest)

WithHuman makes statistical values human-readable.

func (CCRForgetFollower) WithOpaqueID Uses

func (f CCRForgetFollower) WithOpaqueID(s string) func(*CCRForgetFollowerRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRForgetFollower) WithPretty Uses

func (f CCRForgetFollower) WithPretty() func(*CCRForgetFollowerRequest)

WithPretty makes the response body pretty-printed.

type CCRForgetFollowerRequest Uses

type CCRForgetFollowerRequest struct {
    Index string

    Body io.Reader

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRForgetFollowerRequest configures the CCR Forget Follower API request.

func (CCRForgetFollowerRequest) Do Uses

func (r CCRForgetFollowerRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRGetAutoFollowPattern Uses

type CCRGetAutoFollowPattern func(o ...func(*CCRGetAutoFollowPatternRequest)) (*Response, error)

CCRGetAutoFollowPattern - Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html.

func (CCRGetAutoFollowPattern) WithContext Uses

func (f CCRGetAutoFollowPattern) WithContext(v context.Context) func(*CCRGetAutoFollowPatternRequest)

WithContext sets the request context.

func (CCRGetAutoFollowPattern) WithErrorTrace Uses

func (f CCRGetAutoFollowPattern) WithErrorTrace() func(*CCRGetAutoFollowPatternRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRGetAutoFollowPattern) WithFilterPath Uses

func (f CCRGetAutoFollowPattern) WithFilterPath(v ...string) func(*CCRGetAutoFollowPatternRequest)

WithFilterPath filters the properties of the response body.

func (CCRGetAutoFollowPattern) WithHeader Uses

func (f CCRGetAutoFollowPattern) WithHeader(h map[string]string) func(*CCRGetAutoFollowPatternRequest)

WithHeader adds the headers to the HTTP request.

func (CCRGetAutoFollowPattern) WithHuman Uses

func (f CCRGetAutoFollowPattern) WithHuman() func(*CCRGetAutoFollowPatternRequest)

WithHuman makes statistical values human-readable.

func (CCRGetAutoFollowPattern) WithName Uses

func (f CCRGetAutoFollowPattern) WithName(v string) func(*CCRGetAutoFollowPatternRequest)

WithName - the name of the auto follow pattern..

func (CCRGetAutoFollowPattern) WithOpaqueID Uses

func (f CCRGetAutoFollowPattern) WithOpaqueID(s string) func(*CCRGetAutoFollowPatternRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRGetAutoFollowPattern) WithPretty Uses

func (f CCRGetAutoFollowPattern) WithPretty() func(*CCRGetAutoFollowPatternRequest)

WithPretty makes the response body pretty-printed.

type CCRGetAutoFollowPatternRequest Uses

type CCRGetAutoFollowPatternRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRGetAutoFollowPatternRequest configures the CCR Get Auto Follow Pattern API request.

func (CCRGetAutoFollowPatternRequest) Do Uses

func (r CCRGetAutoFollowPatternRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRPauseAutoFollowPattern Uses

type CCRPauseAutoFollowPattern func(name string, o ...func(*CCRPauseAutoFollowPatternRequest)) (*Response, error)

CCRPauseAutoFollowPattern - Pauses an auto-follow pattern

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html.

func (CCRPauseAutoFollowPattern) WithContext Uses

func (f CCRPauseAutoFollowPattern) WithContext(v context.Context) func(*CCRPauseAutoFollowPatternRequest)

WithContext sets the request context.

func (CCRPauseAutoFollowPattern) WithErrorTrace Uses

func (f CCRPauseAutoFollowPattern) WithErrorTrace() func(*CCRPauseAutoFollowPatternRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRPauseAutoFollowPattern) WithFilterPath Uses

func (f CCRPauseAutoFollowPattern) WithFilterPath(v ...string) func(*CCRPauseAutoFollowPatternRequest)

WithFilterPath filters the properties of the response body.

func (CCRPauseAutoFollowPattern) WithHeader Uses

func (f CCRPauseAutoFollowPattern) WithHeader(h map[string]string) func(*CCRPauseAutoFollowPatternRequest)

WithHeader adds the headers to the HTTP request.

func (CCRPauseAutoFollowPattern) WithHuman Uses

func (f CCRPauseAutoFollowPattern) WithHuman() func(*CCRPauseAutoFollowPatternRequest)

WithHuman makes statistical values human-readable.

func (CCRPauseAutoFollowPattern) WithOpaqueID Uses

func (f CCRPauseAutoFollowPattern) WithOpaqueID(s string) func(*CCRPauseAutoFollowPatternRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRPauseAutoFollowPattern) WithPretty Uses

func (f CCRPauseAutoFollowPattern) WithPretty() func(*CCRPauseAutoFollowPatternRequest)

WithPretty makes the response body pretty-printed.

type CCRPauseAutoFollowPatternRequest Uses

type CCRPauseAutoFollowPatternRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRPauseAutoFollowPatternRequest configures the CCR Pause Auto Follow Pattern API request.

func (CCRPauseAutoFollowPatternRequest) Do Uses

func (r CCRPauseAutoFollowPatternRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRPauseFollow Uses

type CCRPauseFollow func(index string, o ...func(*CCRPauseFollowRequest)) (*Response, error)

CCRPauseFollow - Pauses a follower index. The follower index will not fetch any additional operations from the leader index.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html.

func (CCRPauseFollow) WithContext Uses

func (f CCRPauseFollow) WithContext(v context.Context) func(*CCRPauseFollowRequest)

WithContext sets the request context.

func (CCRPauseFollow) WithErrorTrace Uses

func (f CCRPauseFollow) WithErrorTrace() func(*CCRPauseFollowRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRPauseFollow) WithFilterPath Uses

func (f CCRPauseFollow) WithFilterPath(v ...string) func(*CCRPauseFollowRequest)

WithFilterPath filters the properties of the response body.

func (CCRPauseFollow) WithHeader Uses

func (f CCRPauseFollow) WithHeader(h map[string]string) func(*CCRPauseFollowRequest)

WithHeader adds the headers to the HTTP request.

func (CCRPauseFollow) WithHuman Uses

func (f CCRPauseFollow) WithHuman() func(*CCRPauseFollowRequest)

WithHuman makes statistical values human-readable.

func (CCRPauseFollow) WithOpaqueID Uses

func (f CCRPauseFollow) WithOpaqueID(s string) func(*CCRPauseFollowRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRPauseFollow) WithPretty Uses

func (f CCRPauseFollow) WithPretty() func(*CCRPauseFollowRequest)

WithPretty makes the response body pretty-printed.

type CCRPauseFollowRequest Uses

type CCRPauseFollowRequest struct {
    Index string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRPauseFollowRequest configures the CCR Pause Follow API request.

func (CCRPauseFollowRequest) Do Uses

func (r CCRPauseFollowRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRPutAutoFollowPattern Uses

type CCRPutAutoFollowPattern func(name string, body io.Reader, o ...func(*CCRPutAutoFollowPatternRequest)) (*Response, error)

CCRPutAutoFollowPattern - Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html.

func (CCRPutAutoFollowPattern) WithContext Uses

func (f CCRPutAutoFollowPattern) WithContext(v context.Context) func(*CCRPutAutoFollowPatternRequest)

WithContext sets the request context.

func (CCRPutAutoFollowPattern) WithErrorTrace Uses

func (f CCRPutAutoFollowPattern) WithErrorTrace() func(*CCRPutAutoFollowPatternRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRPutAutoFollowPattern) WithFilterPath Uses

func (f CCRPutAutoFollowPattern) WithFilterPath(v ...string) func(*CCRPutAutoFollowPatternRequest)

WithFilterPath filters the properties of the response body.

func (CCRPutAutoFollowPattern) WithHeader Uses

func (f CCRPutAutoFollowPattern) WithHeader(h map[string]string) func(*CCRPutAutoFollowPatternRequest)

WithHeader adds the headers to the HTTP request.

func (CCRPutAutoFollowPattern) WithHuman Uses

func (f CCRPutAutoFollowPattern) WithHuman() func(*CCRPutAutoFollowPatternRequest)

WithHuman makes statistical values human-readable.

func (CCRPutAutoFollowPattern) WithOpaqueID Uses

func (f CCRPutAutoFollowPattern) WithOpaqueID(s string) func(*CCRPutAutoFollowPatternRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRPutAutoFollowPattern) WithPretty Uses

func (f CCRPutAutoFollowPattern) WithPretty() func(*CCRPutAutoFollowPatternRequest)

WithPretty makes the response body pretty-printed.

type CCRPutAutoFollowPatternRequest Uses

type CCRPutAutoFollowPatternRequest struct {
    Body io.Reader

    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRPutAutoFollowPatternRequest configures the CCR Put Auto Follow Pattern API request.

func (CCRPutAutoFollowPatternRequest) Do Uses

func (r CCRPutAutoFollowPatternRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRResumeAutoFollowPattern Uses

type CCRResumeAutoFollowPattern func(name string, o ...func(*CCRResumeAutoFollowPatternRequest)) (*Response, error)

CCRResumeAutoFollowPattern - Resumes an auto-follow pattern that has been paused

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html.

func (CCRResumeAutoFollowPattern) WithContext Uses

func (f CCRResumeAutoFollowPattern) WithContext(v context.Context) func(*CCRResumeAutoFollowPatternRequest)

WithContext sets the request context.

func (CCRResumeAutoFollowPattern) WithErrorTrace Uses

func (f CCRResumeAutoFollowPattern) WithErrorTrace() func(*CCRResumeAutoFollowPatternRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRResumeAutoFollowPattern) WithFilterPath Uses

func (f CCRResumeAutoFollowPattern) WithFilterPath(v ...string) func(*CCRResumeAutoFollowPatternRequest)

WithFilterPath filters the properties of the response body.

func (CCRResumeAutoFollowPattern) WithHeader Uses

func (f CCRResumeAutoFollowPattern) WithHeader(h map[string]string) func(*CCRResumeAutoFollowPatternRequest)

WithHeader adds the headers to the HTTP request.

func (CCRResumeAutoFollowPattern) WithHuman Uses

func (f CCRResumeAutoFollowPattern) WithHuman() func(*CCRResumeAutoFollowPatternRequest)

WithHuman makes statistical values human-readable.

func (CCRResumeAutoFollowPattern) WithOpaqueID Uses

func (f CCRResumeAutoFollowPattern) WithOpaqueID(s string) func(*CCRResumeAutoFollowPatternRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRResumeAutoFollowPattern) WithPretty Uses

func (f CCRResumeAutoFollowPattern) WithPretty() func(*CCRResumeAutoFollowPatternRequest)

WithPretty makes the response body pretty-printed.

type CCRResumeAutoFollowPatternRequest Uses

type CCRResumeAutoFollowPatternRequest struct {
    Name string

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRResumeAutoFollowPatternRequest configures the CCR Resume Auto Follow Pattern API request.

func (CCRResumeAutoFollowPatternRequest) Do Uses

func (r CCRResumeAutoFollowPatternRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRResumeFollow Uses

type CCRResumeFollow func(index string, o ...func(*CCRResumeFollowRequest)) (*Response, error)

CCRResumeFollow - Resumes a follower index that has been paused

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html.

func (CCRResumeFollow) WithBody Uses

func (f CCRResumeFollow) WithBody(v io.Reader) func(*CCRResumeFollowRequest)

WithBody - The name of the leader index and other optional ccr related parameters.

func (CCRResumeFollow) WithContext Uses

func (f CCRResumeFollow) WithContext(v context.Context) func(*CCRResumeFollowRequest)

WithContext sets the request context.

func (CCRResumeFollow) WithErrorTrace Uses

func (f CCRResumeFollow) WithErrorTrace() func(*CCRResumeFollowRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRResumeFollow) WithFilterPath Uses

func (f CCRResumeFollow) WithFilterPath(v ...string) func(*CCRResumeFollowRequest)

WithFilterPath filters the properties of the response body.

func (CCRResumeFollow) WithHeader Uses

func (f CCRResumeFollow) WithHeader(h map[string]string) func(*CCRResumeFollowRequest)

WithHeader adds the headers to the HTTP request.

func (CCRResumeFollow) WithHuman Uses

func (f CCRResumeFollow) WithHuman() func(*CCRResumeFollowRequest)

WithHuman makes statistical values human-readable.

func (CCRResumeFollow) WithOpaqueID Uses

func (f CCRResumeFollow) WithOpaqueID(s string) func(*CCRResumeFollowRequest)

WithOpaqueID adds the X-Opaque-Id header to the HTTP request.

func (CCRResumeFollow) WithPretty Uses

func (f CCRResumeFollow) WithPretty() func(*CCRResumeFollowRequest)

WithPretty makes the response body pretty-printed.

type CCRResumeFollowRequest Uses

type CCRResumeFollowRequest struct {
    Index string

    Body io.Reader

    Pretty     bool
    Human      bool
    ErrorTrace bool
    FilterPath []string

    Header http.Header
    // contains filtered or unexported fields
}

CCRResumeFollowRequest configures the CCR Resume Follow API request.

func (CCRResumeFollowRequest) Do Uses

func (r CCRResumeFollowRequest) Do(ctx context.Context, transport Transport) (*Response, error)

Do executes the request and returns response or error.

type CCRStats Uses

type CCRStats func(o ...func(*CCRStatsRequest)) (*Response, error)

CCRStats - Gets all stats related to cross-cluster replication.

See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html.

func (CCRStats) WithContext Uses

func (f CCRStats) WithContext(v context.Context) func(*CCRStatsRequest)

WithContext sets the request context.

func (CCRStats) WithErrorTrace Uses

func (f CCRStats) WithErrorTrace() func(*CCRStatsRequest)

WithErrorTrace includes the stack trace for errors in the response body.

func (CCRStats) WithFilterPath Uses

func (f CCRStats) WithFilterPath(v ...string) func(*CCRStatsRequest)

WithFilterPath filters the properties of the response body.

func (CCRStats) WithHeader Uses

func (f CCRStats) WithHeader(h map[string]string) func(*CCRStatsRequest)

WithHeader adds the headers to the HTTP request.