Documentation ¶
Overview ¶
Returns information about whether a document source exists in an index.
Index ¶
- Variables
- type ExistsSource
- func (r ExistsSource) Do(ctx context.Context) (bool, error)
- func (r *ExistsSource) Header(key, value string) *ExistsSource
- func (r *ExistsSource) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r ExistsSource) IsSuccess(providedCtx context.Context) (bool, error)
- func (r ExistsSource) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *ExistsSource) Preference(preference string) *ExistsSource
- func (r *ExistsSource) Realtime(realtime bool) *ExistsSource
- func (r *ExistsSource) Refresh(refresh bool) *ExistsSource
- func (r *ExistsSource) Routing(routing string) *ExistsSource
- func (r *ExistsSource) SourceExcludes_(fields ...string) *ExistsSource
- func (r *ExistsSource) SourceIncludes_(fields ...string) *ExistsSource
- func (r *ExistsSource) Source_(sourceconfigparam string) *ExistsSource
- func (r *ExistsSource) Version(versionnumber string) *ExistsSource
- func (r *ExistsSource) VersionType(versiontype versiontype.VersionType) *ExistsSource
- type NewExistsSource
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type ExistsSource ¶
type ExistsSource struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ExistsSource
Returns information about whether a document source exists in an index.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
func (ExistsSource) Do ¶
func (r ExistsSource) Do(ctx context.Context) (bool, error)
Do runs the request through the transport, handle the response and returns a existssource.Response
func (*ExistsSource) Header ¶
func (r *ExistsSource) Header(key, value string) *ExistsSource
Header set a key, value pair in the ExistsSource headers map.
func (*ExistsSource) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (ExistsSource) IsSuccess ¶
func (r ExistsSource) IsSuccess(providedCtx context.Context) (bool, error)
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (ExistsSource) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*ExistsSource) Preference ¶
func (r *ExistsSource) Preference(preference string) *ExistsSource
Preference Specifies the node or shard the operation should be performed on. Random by default. API name: preference
func (*ExistsSource) Realtime ¶
func (r *ExistsSource) Realtime(realtime bool) *ExistsSource
Realtime If true, the request is real-time as opposed to near-real-time. API name: realtime
func (*ExistsSource) Refresh ¶
func (r *ExistsSource) Refresh(refresh bool) *ExistsSource
Refresh If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. API name: refresh
func (*ExistsSource) Routing ¶
func (r *ExistsSource) Routing(routing string) *ExistsSource
Routing Target the specified primary shard. API name: routing
func (*ExistsSource) SourceExcludes_ ¶
func (r *ExistsSource) SourceExcludes_(fields ...string) *ExistsSource
SourceExcludes_ A comma-separated list of source fields to exclude in the response. API name: _source_excludes
func (*ExistsSource) SourceIncludes_ ¶
func (r *ExistsSource) SourceIncludes_(fields ...string) *ExistsSource
SourceIncludes_ A comma-separated list of source fields to include in the response. API name: _source_includes
func (*ExistsSource) Source_ ¶
func (r *ExistsSource) Source_(sourceconfigparam string) *ExistsSource
Source_ `true` or `false` to return the `_source` field or not, or a list of fields to return. API name: _source
func (*ExistsSource) Version ¶
func (r *ExistsSource) Version(versionnumber string) *ExistsSource
Version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. API name: version
func (*ExistsSource) VersionType ¶
func (r *ExistsSource) VersionType(versiontype versiontype.VersionType) *ExistsSource
VersionType Specific version type: `external`, `external_gte`. API name: version_type
type NewExistsSource ¶
type NewExistsSource func(index, id string) *ExistsSource
NewExistsSource type alias for index.
func NewExistsSourceFunc ¶
func NewExistsSourceFunc(tp elastictransport.Interface) NewExistsSource
NewExistsSourceFunc returns a new instance of ExistsSource with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.