NEST by Elastic and contributors

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

.NET API 5,346,304 bytes

 IndexDescriptor<TDocument>

descriptor for Index http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
public IndexDescriptor(IndexName index, TypeName type)

/{index}/{type}

public IndexDescriptor(DocumentPath<TDocument> document)

/{index}/{type}

public IndexDescriptor<TDocument> Id(Id id)

Document ID

public IndexDescriptor<TDocument> IfPrimaryTerm(long? ifPrimaryTerm)

only perform the index operation if the last operation that has changed the document has the specified primary term

public IndexDescriptor<TDocument> IfSeqNo(long? ifSeqNo)

only perform the index operation if the last operation that has changed the document has the specified sequence number

public IndexDescriptor<TDocument> Index(IndexName index)

The name of the index

public IndexDescriptor<TDocument> Index<TOther>()

a shortcut into calling Index(typeof(TOther))

public IndexDescriptor<TDocument> OpType(OpType? opType)

Explicit operation type

public IndexDescriptor<TDocument> Parent(string parent)

ID of the parent document

public IndexDescriptor<TDocument> Pipeline(string pipeline)

The pipeline id to preprocess incoming documents with

public IndexDescriptor<TDocument> Refresh(Refresh? refresh)

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.

public IndexDescriptor<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 IndexDescriptor<TDocument> Timeout(Time timeout)

Explicit operation timeout

public IndexDescriptor<TDocument> Type(TypeName type)

The type of the document

public IndexDescriptor<TDocument> Type<TOther>()

a shortcut into calling Type(typeof(TOther))

public IndexDescriptor<TDocument> Version(long? version)

Explicit version number for concurrency control

public IndexDescriptor<TDocument> VersionType(VersionType? versionType)

Specific version type

public IndexDescriptor<TDocument> WaitForActiveShards(string waitForActiveShards)

Sets the number of shard copies that must be active before proceeding with the index 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)