Class DocumentExistsDescriptor<TDocument>
Descriptor for DocumentExists
https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/
Inheritance
DocumentExistsDescriptor<TDocument>
Assembly: OpenSearch.Client.dll
Syntax
public class DocumentExistsDescriptor<TDocument> : RequestDescriptorBase<DocumentExistsDescriptor<TDocument>, DocumentExistsRequestParameters, IDocumentExistsRequest<TDocument>>, IDescriptor, IDocumentExistsRequest<TDocument>, IDocumentExistsRequest, IRequest<DocumentExistsRequestParameters>, IRequest where TDocument : class
Type Parameters
Name |
Description |
TDocument |
|
Constructors
|
Edit this page
View Source
DocumentExistsDescriptor()
Used for serialization purposes, making sure we have a parameterless constructor
Declaration
protected DocumentExistsDescriptor()
|
Edit this page
View Source
DocumentExistsDescriptor(Id)
Declaration
public DocumentExistsDescriptor(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
this parameter is required
|
|
Edit this page
View Source
DocumentExistsDescriptor(IndexName, Id)
Declaration
public DocumentExistsDescriptor(IndexName index, Id id)
Parameters
Type |
Name |
Description |
IndexName |
index |
this parameter is required
|
Id |
id |
this parameter is required
|
|
Edit this page
View Source
DocumentExistsDescriptor(TDocument, IndexName, Id)
Declaration
public DocumentExistsDescriptor(TDocument documentWithId, IndexName index = null, Id id = null)
Parameters
Type |
Name |
Description |
TDocument |
documentWithId |
|
IndexName |
index |
|
Id |
id |
The document used to resolve the path from
|
Methods
|
Edit this page
View Source
Index(IndexName)
Comma-separated list of data streams, indexes, and aliases. Supports wildcards (*
).
Declaration
public DocumentExistsDescriptor<TDocument> Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public DocumentExistsDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Preference(string)
Specifies the node or shard the operation should be performed on. Random by default.
Declaration
public DocumentExistsDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
Edit this page
View Source
Realtime(bool?)
If true
, the request is real-time as opposed to near-real-time.
Declaration
public DocumentExistsDescriptor<TDocument> Realtime(bool? realtime = true)
Parameters
Type |
Name |
Description |
bool? |
realtime |
|
Returns
|
Edit this page
View Source
Refresh(Refresh?)
If true
, OpenSearch refreshes all shards involved in the delete by query after the request completes.
Declaration
public DocumentExistsDescriptor<TDocument> Refresh(Refresh? refresh)
Parameters
Type |
Name |
Description |
Refresh? |
refresh |
|
Returns
|
Edit this page
View Source
Routing(Routing)
A document is routed to a particular shard in an index using the following formula
shard_num = hash(_routing) % num_primary_shards
OpenSearch will use the document id if not provided.
For requests that are constructed from/for a document OpenSearch.Client will automatically infer the routing key
if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings
Declaration
public DocumentExistsDescriptor<TDocument> Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
|
Edit this page
View Source
SourceEnabled(bool?)
Whether the _source should be included in the response.
Declaration
public DocumentExistsDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true)
Parameters
Type |
Name |
Description |
bool? |
sourceenabled |
|
Returns
|
Edit this page
View Source
SourceExcludes(Fields)
A comma-separated list of source fields to exclude in the response.
Declaration
public DocumentExistsDescriptor<TDocument> SourceExcludes(Fields sourceexcludes)
Parameters
Type |
Name |
Description |
Fields |
sourceexcludes |
|
Returns
|
Edit this page
View Source
SourceExcludes(params Expression<Func<TDocument, object>>[])
A comma-separated list of source fields to exclude in the response.
Declaration
public DocumentExistsDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
SourceIncludes(Fields)
A comma-separated list of source fields to include in the response.
Declaration
public DocumentExistsDescriptor<TDocument> SourceIncludes(Fields sourceincludes)
Parameters
Type |
Name |
Description |
Fields |
sourceincludes |
|
Returns
|
Edit this page
View Source
SourceIncludes(params Expression<Func<TDocument, object>>[])
A comma-separated list of source fields to include in the response.
Declaration
public DocumentExistsDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
StoredFields(Fields)
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.
Declaration
public DocumentExistsDescriptor<TDocument> StoredFields(Fields storedfields)
Parameters
Type |
Name |
Description |
Fields |
storedfields |
|
Returns
|
Edit this page
View Source
StoredFields(params Expression<Func<TDocument, object>>[])
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.
Declaration
public DocumentExistsDescriptor<TDocument> StoredFields(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
Version(long?)
Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
Declaration
public DocumentExistsDescriptor<TDocument> Version(long? version)
Parameters
Type |
Name |
Description |
long? |
version |
|
Returns
|
Edit this page
View Source
VersionType(VersionType?)
Specific version type: external
, external_gte
.
Declaration
public DocumentExistsDescriptor<TDocument> VersionType(VersionType? versiontype)
Parameters
Returns
Implements
Extension Methods