NEST by Elastic and contributors

<PackageReference Include="NEST" Version="7.8.2" />

.NET API 4,648,448 bytes

 SourceDescriptor<TDocument>

Descriptor for Source

https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html

public SourceDescriptor(IndexName index, Id id)

/{index}/_source/{id}

public SourceDescriptor(Id id)

/{index}/_source/{id}

public SourceDescriptor(TDocument documentWithId, IndexName index = null, Id id = null)

/{index}/_source/{id}

protected SourceDescriptor()

Used for serialization purposes, making sure we have a parameterless constructor

public SourceDescriptor<TDocument> Index(IndexName index)

The name of the index

public SourceDescriptor<TDocument> Index<TOther>()

a shortcut into calling Index(typeof(TOther))

public SourceDescriptor<TDocument> Preference(string preference)

Specify the node or shard the operation should be performed on (default: random)

public SourceDescriptor<TDocument> Realtime(bool? realtime = true)

Specify whether to perform the operation in realtime or search mode

public SourceDescriptor<TDocument> Refresh(bool? refresh = true)

Refresh the shard containing the document before performing the operation

public SourceDescriptor<TDocument> Routing(Routing routing)

A document is routed to a particular shard in an index using the following formula

shard_num = hash(_routing) % num_primary_shards

Elasticsearch will use the document id if not provided.

For requests that are constructed from/for a document NEST will automatically infer the routing key if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings

public SourceDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true)

Whether the _source should be included in the response.

public SourceDescriptor<TDocument> SourceExcludes(Fields sourceexcludes)

A list of fields to exclude from the returned _source field

public SourceDescriptor<TDocument> SourceExcludes(Expression<Func<TDocument, object>>[] fields)

A list of fields to exclude from the returned _source field

public SourceDescriptor<TDocument> SourceIncludes(Fields sourceincludes)

A list of fields to extract and return from the _source field

public SourceDescriptor<TDocument> SourceIncludes(Expression<Func<TDocument, object>>[] fields)

A list of fields to extract and return from the _source field

public SourceDescriptor<TDocument> Version(long? version)

Explicit version number for concurrency control

public SourceDescriptor<TDocument> VersionType(VersionType? versiontype)

Specific version type