Documentation ¶
Overview ¶
Returns information about whether a document exists in an index.
Index ¶
- Variables
- type Exists
- func (r Exists) Do(ctx context.Context) (bool, error)
- func (r *Exists) Header(key, value string) *Exists
- func (r *Exists) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r Exists) IsSuccess(providedCtx context.Context) (bool, error)
- func (r Exists) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Exists) Preference(preference string) *Exists
- func (r *Exists) Realtime(realtime bool) *Exists
- func (r *Exists) Refresh(refresh bool) *Exists
- func (r *Exists) Routing(routing string) *Exists
- func (r *Exists) SourceExcludes_(fields ...string) *Exists
- func (r *Exists) SourceIncludes_(fields ...string) *Exists
- func (r *Exists) Source_(sourceconfigparam string) *Exists
- func (r *Exists) StoredFields(fields ...string) *Exists
- func (r *Exists) Version(versionnumber string) *Exists
- func (r *Exists) VersionType(versiontype versiontype.VersionType) *Exists
- type NewExists
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 Exists ¶
type Exists struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Exists
Returns information about whether a document exists in an index.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
func (Exists) Do ¶
Do runs the request through the transport, handle the response and returns a exists.Response
func (*Exists) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (Exists) IsSuccess ¶
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 (Exists) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Exists) Preference ¶
Preference Specifies the node or shard the operation should be performed on. Random by default. API name: preference
func (*Exists) Realtime ¶
Realtime If `true`, the request is real-time as opposed to near-real-time. API name: realtime
func (*Exists) Refresh ¶
Refresh If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes. API name: refresh
func (*Exists) SourceExcludes_ ¶
SourceExcludes_ A comma-separated list of source fields to exclude in the response. API name: _source_excludes
func (*Exists) SourceIncludes_ ¶
SourceIncludes_ A comma-separated list of source fields to include in the response. API name: _source_includes
func (*Exists) Source_ ¶
Source_ `true` or `false` to return the `_source` field or not, or a list of fields to return. API name: _source
func (*Exists) StoredFields ¶
StoredFields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. API name: stored_fields
func (*Exists) Version ¶
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 (*Exists) VersionType ¶
func (r *Exists) VersionType(versiontype versiontype.VersionType) *Exists
VersionType Specific version type: `external`, `external_gte`. API name: version_type
type NewExists ¶
NewExists type alias for index.
func NewExistsFunc ¶
func NewExistsFunc(tp elastictransport.Interface) NewExists
NewExistsFunc returns a new instance of Exists with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.