Class CreateIndexDescriptor
Descriptor for Create
https://opensearch.org/docs/latest/api-reference/index-apis/create-index/
Inheritance
CreateIndexDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class CreateIndexDescriptor : RequestDescriptorBase<CreateIndexDescriptor, CreateIndexRequestParameters, ICreateIndexRequest>, IDescriptor, ICreateIndexRequest, IIndexState, IRequest<CreateIndexRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
CreateIndexDescriptor()
Used for serialization purposes, making sure we have a parameterless constructor
Declaration
protected CreateIndexDescriptor()
|
Edit this page
View Source
CreateIndexDescriptor(IndexName)
Declaration
public CreateIndexDescriptor(IndexName index)
Parameters
Type |
Name |
Description |
IndexName |
index |
this parameter is required
|
Methods
|
Edit this page
View Source
Aliases(Func<AliasesDescriptor, IPromise<IAliases>>)
Declaration
public CreateIndexDescriptor Aliases(Func<AliasesDescriptor, IPromise<IAliases>> selector)
Parameters
Returns
|
Edit this page
View Source
ClusterManagerTimeout(Time)
Operation timeout for connection to cluster-manager node.
Declaration
public CreateIndexDescriptor ClusterManagerTimeout(Time clustermanagertimeout)
Parameters
Type |
Name |
Description |
Time |
clustermanagertimeout |
|
Returns
|
Edit this page
View Source
IncludeTypeName(bool?)
Whether a type should be expected in the body of the mappings.
Declaration
public CreateIndexDescriptor IncludeTypeName(bool? includetypename = true)
Parameters
Type |
Name |
Description |
bool? |
includetypename |
|
Returns
|
Edit this page
View Source
Index(IndexName)
Name of the index you wish to create.
Declaration
public CreateIndexDescriptor Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public CreateIndexDescriptor Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
InitializeUsing(IIndexState)
Declaration
public CreateIndexDescriptor InitializeUsing(IIndexState indexSettings)
Parameters
Returns
|
Edit this page
View Source
Map(Func<TypeMappingDescriptor<object>, ITypeMapping>)
Declaration
public CreateIndexDescriptor Map(Func<TypeMappingDescriptor<object>, ITypeMapping> selector)
Parameters
Returns
|
Edit this page
View Source
Map<T>(Func<TypeMappingDescriptor<T>, ITypeMapping>)
Declaration
public CreateIndexDescriptor Map<T>(Func<TypeMappingDescriptor<T>, ITypeMapping> selector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Mappings(Func<MappingsDescriptor, ITypeMapping>)
Declaration
[Obsolete("Mappings is no longer a dictionary, please use the simplified Map() method on this descriptor instead")]
public CreateIndexDescriptor Mappings(Func<MappingsDescriptor, ITypeMapping> selector)
Parameters
Returns
|
Edit this page
View Source
MasterTimeout(Time)
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Declaration
[Obsolete("Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead.")]
public CreateIndexDescriptor MasterTimeout(Time mastertimeout)
Parameters
Type |
Name |
Description |
Time |
mastertimeout |
|
Returns
|
Edit this page
View Source
Settings(Func<IndexSettingsDescriptor, IPromise<IIndexSettings>>)
Declaration
public CreateIndexDescriptor Settings(Func<IndexSettingsDescriptor, IPromise<IIndexSettings>> selector)
Parameters
Returns
|
Edit this page
View Source
Timeout(Time)
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Declaration
public CreateIndexDescriptor Timeout(Time timeout)
Parameters
Type |
Name |
Description |
Time |
timeout |
|
Returns
|
Edit this page
View Source
WaitForActiveShards(string)
The number of shard copies that must be active before proceeding with the operation. Set to all
or any positive integer up to the total number of shards in the index (number_of_replicas+1
).
Declaration
public CreateIndexDescriptor WaitForActiveShards(string waitforactiveshards)
Parameters
Type |
Name |
Description |
string |
waitforactiveshards |
|
Returns
Implements
Extension Methods