Class UpdateByQueryRequest
Request for UpdateByQuery
https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/update-by-query/
Inheritance
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class UpdateByQueryRequest : PlainRequestBase<UpdateByQueryRequestParameters>, IUpdateByQueryRequest, IRequest<UpdateByQueryRequestParameters>, IRequest
Constructors
| Edit this page View SourceUpdateByQueryRequest()
Used for serialization purposes, making sure we have a parameterless constructor
Declaration
protected UpdateByQueryRequest()
UpdateByQueryRequest(Indices)
/{index}/_update_by_query
Declaration
public UpdateByQueryRequest(Indices index)
Parameters
Type | Name | Description |
---|---|---|
Indices | index | this parameter is required |
Properties
| Edit this page View SourceAllowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all
string or when no indices have
been specified)
Declaration
public bool? AllowNoIndices { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AnalyzeWildcard
Specify whether wildcard and prefix queries should be analyzed (default: false)
Declaration
public bool? AnalyzeWildcard { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Analyzer
The analyzer to use for the query string
Declaration
public string Analyzer { get; set; }
Property Value
Type | Description |
---|---|
string |
Conflicts
What to do when the update by query hits version conflicts?
Declaration
public Conflicts? Conflicts { get; set; }
Property Value
Type | Description |
---|---|
Conflicts? |
DefaultOperator
The default operator for query string query (AND or OR)
Declaration
public DefaultOperator? DefaultOperator { get; set; }
Property Value
Type | Description |
---|---|
DefaultOperator? |
Df
The field to use as default where no field prefix is given in the query string
Declaration
public string Df { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public ExpandWildcards? ExpandWildcards { get; set; }
Property Value
Type | Description |
---|---|
ExpandWildcards? |
From
Starting offset (default: 0)
Declaration
public long? From { get; set; }
Property Value
Type | Description |
---|---|
long? |
IgnoreUnavailable
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public bool? IgnoreUnavailable { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Lenient
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
Declaration
public bool? Lenient { get; set; }
Property Value
Type | Description |
---|---|
bool? |
MaximumDocuments
Limit the number of processed documents
Declaration
public long? MaximumDocuments { get; set; }
Property Value
Type | Description |
---|---|
long? |
Pipeline
Ingest pipeline to set on index requests made by this action. (default: none)
Declaration
public string Pipeline { get; set; }
Property Value
Type | Description |
---|---|
string |
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 |
Query
Query to select documents to update
Declaration
public QueryContainer Query { get; set; }
Property Value
Type | Description |
---|---|
QueryContainer |
QueryOnQueryString
Query in the Lucene query string syntax
Declaration
public string QueryOnQueryString { get; set; }
Property Value
Type | Description |
---|---|
string |
Refresh
Should the affected indexes be refreshed?
Declaration
public bool? Refresh { get; set; }
Property Value
Type | Description |
---|---|
bool? |
RequestCache
Specify if request cache should be used for this request or not, defaults to index level setting
Declaration
public bool? RequestCache { get; set; }
Property Value
Type | Description |
---|---|
bool? |
RequestsPerSecond
The throttle to set on this request in sub-requests per second. -1 means no throttle.
Declaration
public long? RequestsPerSecond { get; set; }
Property Value
Type | Description |
---|---|
long? |
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 |
Script
A script specifying the update to make
Declaration
public IScript Script { get; set; }
Property Value
Type | Description |
---|---|
IScript |
Scroll
Specify how long a consistent view of the index should be maintained for scrolled search
Declaration
public Time Scroll { get; set; }
Property Value
Type | Description |
---|---|
Time |
ScrollSize
Size on the scroll request powering the update by query
Declaration
public long? ScrollSize { get; set; }
Property Value
Type | Description |
---|---|
long? |
SearchTimeout
Explicit timeout for each search request. Defaults to no timeout.
Declaration
public Time SearchTimeout { get; set; }
Property Value
Type | Description |
---|---|
Time |
SearchType
Search operation type
Declaration
public SearchType? SearchType { get; set; }
Property Value
Type | Description |
---|---|
SearchType? |
Self
Declaration
protected IUpdateByQueryRequest Self { get; }
Property Value
Type | Description |
---|---|
IUpdateByQueryRequest |
Slice
Parallelize the update process by splitting a query into multiple slices.
Declaration
public ISlicedScroll Slice { get; set; }
Property Value
Type | Description |
---|---|
ISlicedScroll |
Slices
The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to auto
.
Declaration
public Slices Slices { get; set; }
Property Value
Type | Description |
---|---|
Slices |
Sort
A comma-separated list of <field>:<direction> pairs
Declaration
public string[] Sort { get; set; }
Property Value
Type | Description |
---|---|
string[] |
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 |
Stats
Specific 'tag' of the request for logging and statistical purposes
Declaration
public string[] Stats { get; set; }
Property Value
Type | Description |
---|---|
string[] |
TerminateAfter
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
Declaration
public long? TerminateAfter { get; set; }
Property Value
Type | Description |
---|---|
long? |
Timeout
Time each individual bulk request should wait for shards that are unavailable.
Declaration
public Time Timeout { get; set; }
Property Value
Type | Description |
---|---|
Time |
Version
Specify whether to return document version as part of a hit
Declaration
public bool? Version { get; set; }
Property Value
Type | Description |
---|---|
bool? |
VersionType
Should the document increment the version number (internal) on hit or not (reindex)
Declaration
public bool? VersionType { get; set; }
Property Value
Type | Description |
---|---|
bool? |
WaitForActiveShards
Sets the number of shard copies that must be active before proceeding with the update by query 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)
Declaration
public string WaitForActiveShards { get; set; }
Property Value
Type | Description |
---|---|
string |
WaitForCompletion
Should the request should block until the update by query operation is complete.
Declaration
public bool? WaitForCompletion { get; set; }
Property Value
Type | Description |
---|---|
bool? |