Interface IReindexRequest<TSource, TTarget>
A reindex implementation that uses ScrollAll() BulkAll() to compose a reindex pipeline.
This differs from ReindexOnServer() in that documents are fetched from OpenSearch, transformed on the client side, then sent back to OpenSearch.
This will create the target index if it doesn't exist already. If CreateIndexRequest is not specified and the source of the reindex points to a single index we try and reuse the settings from source. You can completely opt out of all of this using OmitIndexCreation
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IReindexRequest<TSource, TTarget> where TSource : class where TTarget : class
Type Parameters
Name | Description |
---|---|
TSource | |
TTarget |
Properties
| Edit this page View SourceBackPressureFactor
The scroll typically outperforms the bulk operations by a long shot. If we'd leave things unbounded you'd quickly have way too many pending scroll requests. What this property allows you to express is that for each bucket in the max concurrency of the minimum max concurrency between producer and consumer amply the maximum overal pending of the other side by this factor. Typically the concurrency of the consumer (bulkall) will be lower and with this factor we can dampen the overall pending scroll requests while we are still processing bulk requests.
defaults to 4 if not provided
Declaration
int? BackPressureFactor { get; set; }
Property Value
Type | Description |
---|---|
int? |
BulkAll
Provide a factory for the bulk all request, the first argument is the lazy collection of scroll results which is a mandatory argument to create BulkAllRequest<T> or BulkAllDescriptor<T>
Note that BufferToBulk is always overriden as well as BackPressure
Declaration
Func<IEnumerable<IHitMetadata<TTarget>>, IBulkAllRequest<IHitMetadata<TTarget>>> BulkAll { get; set; }
Property Value
Type | Description |
---|---|
Func<IEnumerable<IHitMetadata<TTarget>>, IBulkAllRequest<IHitMetadata<TTarget>>> |
CreateIndexRequest
Describe how the newly created index should be created. Remember you can also register Index Templates for more dynamic usecases.
Declaration
ICreateIndexRequest CreateIndexRequest { get; set; }
Property Value
Type | Description |
---|---|
ICreateIndexRequest |
Map
Declaration
Func<TSource, TTarget> Map { get; set; }
Property Value
Type | Description |
---|---|
Func<TSource, TTarget> |
OmitIndexCreation
Do not send a create index call on the target index, assume the index has been created outside of the reindex. Reindex will never create the index if it already exists however this will also omit the IndexExists call.
Declaration
bool OmitIndexCreation { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScrollAll
Describes the scroll operation where we need to fetch the documents from.
Note that BackPressure can be overriden by our own.
Declaration
IScrollAllRequest ScrollAll { get; set; }
Property Value
Type | Description |
---|---|
IScrollAllRequest |