Class MultiGetRequest
Request for MultiGet
https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/
Inheritance
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class MultiGetRequest : PlainRequestBase<MultiGetRequestParameters>, IMultiGetRequest, IRequest<MultiGetRequestParameters>, IRequest
Constructors
| Edit this page View SourceMultiGetRequest()
/_mget
Declaration
public MultiGetRequest()
MultiGetRequest(IndexName)
/{index}/_mget
Declaration
public MultiGetRequest(IndexName index)
Parameters
Type | Name | Description |
---|---|---|
IndexName | index | Optional, accepts null |
Properties
| Edit this page View SourceDocuments
Declaration
public IEnumerable<IMultiGetOperation> Documents { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<IMultiGetOperation> |
Preference
Specify the node or shard the operation should be performed on (default: random)
Declaration
public string Preference { get; set; }
Property Value
Type | Description |
---|---|
string |
Realtime
Specify whether to perform the operation in realtime or search mode
Declaration
public bool? Realtime { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Refresh
Refresh the shard containing the document before performing the operation
Declaration
public bool? Refresh { get; set; }
Property Value
Type | Description |
---|---|
bool? |
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 OSC 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 Routing Routing { get; set; }
Property Value
Type | Description |
---|---|
Routing |
Self
Declaration
protected IMultiGetRequest Self { get; }
Property Value
Type | Description |
---|---|
IMultiGetRequest |
SourceEnabled
Whether the _source should be included in the response.
Declaration
public bool? SourceEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? |
SourceExcludes
A list of fields to exclude from the returned _source field
Declaration
public Fields SourceExcludes { get; set; }
Property Value
Type | Description |
---|---|
Fields |
SourceIncludes
A list of fields to extract and return from the _source field
Declaration
public Fields SourceIncludes { get; set; }
Property Value
Type | Description |
---|---|
Fields |
StoredFields
Declaration
public Fields StoredFields { get; set; }
Property Value
Type | Description |
---|---|
Fields |
Methods
| Edit this page View SourceRequestDefaults(MultiGetRequestParameters)
Allows a request implementation to set certain request parameter defaults, use sparingly!
Declaration
protected override sealed void RequestDefaults(MultiGetRequestParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
MultiGetRequestParameters | parameters |