Class MultiGetDescriptor
Descriptor for MultiGet
https://opensearch.org/docs/latest/api-reference/document-apis/multi-get/
Inheritance
MultiGetDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class MultiGetDescriptor : RequestDescriptorBase<MultiGetDescriptor, MultiGetRequestParameters, IMultiGetRequest>, IDescriptor, IMultiGetRequest, IRequest<MultiGetRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
MultiGetDescriptor()
Declaration
public MultiGetDescriptor()
|
Edit this page
View Source
MultiGetDescriptor(IndexName)
Declaration
public MultiGetDescriptor(IndexName index)
Parameters
Type |
Name |
Description |
IndexName |
index |
Optional, accepts null
|
Methods
|
Edit this page
View Source
GetMany<T>(IEnumerable<Id>, Func<MultiGetOperationDescriptor<T>, Id, IMultiGetOperation>)
Declaration
public MultiGetDescriptor GetMany<T>(IEnumerable<Id> ids, Func<MultiGetOperationDescriptor<T>, Id, IMultiGetOperation> getSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
GetMany<T>(IEnumerable<long>, Func<MultiGetOperationDescriptor<T>, long, IMultiGetOperation>)
Declaration
public MultiGetDescriptor GetMany<T>(IEnumerable<long> ids, Func<MultiGetOperationDescriptor<T>, long, IMultiGetOperation> getSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
GetMany<T>(IEnumerable<string>, Func<MultiGetOperationDescriptor<T>, string, IMultiGetOperation>)
Declaration
public MultiGetDescriptor GetMany<T>(IEnumerable<string> ids, Func<MultiGetOperationDescriptor<T>, string, IMultiGetOperation> getSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Get<T>(Func<MultiGetOperationDescriptor<T>, IMultiGetOperation>)
Declaration
public MultiGetDescriptor Get<T>(Func<MultiGetOperationDescriptor<T>, IMultiGetOperation> getSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Index(IndexName)
Name of the index to retrieve documents from when ids
are specified, or when a document in the docs
array does not specify an index.
Declaration
public MultiGetDescriptor Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public MultiGetDescriptor 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 MultiGetDescriptor 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 MultiGetDescriptor Realtime(bool? realtime = true)
Parameters
Type |
Name |
Description |
bool? |
realtime |
|
Returns
|
Edit this page
View Source
Refresh(Refresh?)
If true
, the request refreshes relevant shards before retrieving documents.
Declaration
public MultiGetDescriptor Refresh(Refresh? refresh)
Parameters
Type |
Name |
Description |
Refresh? |
refresh |
|
Returns
|
Edit this page
View Source
RequestDefaults(MultiGetRequestParameters)
Allows a request implementation to set certain request parameter defaults, use sparingly!
Declaration
protected override sealed void RequestDefaults(MultiGetRequestParameters parameters)
Parameters
Overrides
|
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 MultiGetDescriptor 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 MultiGetDescriptor 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 from the response. You can also use this parameter to exclude fields from the subset specified in _source_includes
query parameter.
Declaration
public MultiGetDescriptor SourceExcludes(Fields sourceexcludes)
Parameters
Type |
Name |
Description |
Fields |
sourceexcludes |
|
Returns
|
Edit this page
View Source
SourceExcludes<T>(params Expression<Func<T, object>>[])
A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in _source_includes
query parameter.
Declaration
public MultiGetDescriptor SourceExcludes<T>(params Expression<Func<T, object>>[] fields) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
SourceIncludes(Fields)
A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes
query parameter. If the _source
parameter is false
, this parameter is ignored.
Declaration
public MultiGetDescriptor SourceIncludes(Fields sourceincludes)
Parameters
Type |
Name |
Description |
Fields |
sourceincludes |
|
Returns
|
Edit this page
View Source
SourceIncludes<T>(params Expression<Func<T, object>>[])
A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes
query parameter. If the _source
parameter is false
, this parameter is ignored.
Declaration
public MultiGetDescriptor SourceIncludes<T>(params Expression<Func<T, object>>[] fields) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
StoredFields(Fields)
Default stored fields to load for each document.
Declaration
public MultiGetDescriptor StoredFields(Fields fields)
Parameters
Type |
Name |
Description |
Fields |
fields |
|
Returns
|
Edit this page
View Source
StoredFields<T>(Func<FieldsDescriptor<T>, IPromise<Fields>>)
Default stored fields to load for each document.
Declaration
public MultiGetDescriptor StoredFields<T>(Func<FieldsDescriptor<T>, IPromise<Fields>> fields) where T : class
Parameters
Returns
Type Parameters
Implements
Extension Methods