Class Source.Builder
- All Implemented Interfaces:
WithJson<Source.Builder>
,ObjectBuilder<Source>
- Enclosing class:
- Source
Source
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aSource
.final Source.Builder
Required - The name of the data stream, index, or alias you are copying from.final Source.Builder
Required - The name of the data stream, index, or alias you are copying from.final Source.Builder
The documents to reindex, which is defined with Query DSL.final Source.Builder
query
(QueryVariant value) The documents to reindex, which is defined with Query DSL.final Source.Builder
The documents to reindex, which is defined with Query DSL.final Source.Builder
remote
(RemoteSource value) A remote instance of Elasticsearch that you want to index from.final Source.Builder
A remote instance of Elasticsearch that you want to index from.final Source.Builder
runtimeMappings
(String key, RuntimeField value) API name:runtime_mappings
final Source.Builder
API name:runtime_mappings
final Source.Builder
runtimeMappings
(Map<String, RuntimeField> map) API name:runtime_mappings
protected Source.Builder
self()
final Source.Builder
The number of documents to index per batch.final Source.Builder
slice
(SlicedScroll value) Slice the reindex request manually using the provided slice ID and total number of slices.final Source.Builder
Slice the reindex request manually using the provided slice ID and total number of slices.final Source.Builder
sort
(SortOptions value, SortOptions... values) Deprecated.7.6.0final Source.Builder
Deprecated.7.6.0final Source.Builder
sort
(List<SortOptions> list) Deprecated.7.6.0final Source.Builder
sourceFields
(String value, String... values) Iftrue
, reindex all source fields.final Source.Builder
sourceFields
(List<String> list) Iftrue
, reindex all source fields.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
Required - The name of the data stream, index, or alias you are copying from. It accepts a comma-separated list to reindex from multiple sources.API name:
index
Adds all elements of
list
toindex
. -
index
Required - The name of the data stream, index, or alias you are copying from. It accepts a comma-separated list to reindex from multiple sources.API name:
index
Adds one or more values to
index
. -
query
The documents to reindex, which is defined with Query DSL.API name:
query
-
query
The documents to reindex, which is defined with Query DSL.API name:
query
-
query
The documents to reindex, which is defined with Query DSL.API name:
query
-
remote
A remote instance of Elasticsearch that you want to index from.API name:
remote
-
remote
A remote instance of Elasticsearch that you want to index from.API name:
remote
-
size
The number of documents to index per batch. Use it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.API name:
size
-
slice
Slice the reindex request manually using the provided slice ID and total number of slices.API name:
slice
-
slice
Slice the reindex request manually using the provided slice ID and total number of slices.API name:
slice
-
sort
Deprecated.7.6.0A comma-separated list of<field>:<direction>
pairs to sort by before indexing. Use it in conjunction withmax_docs
to control what documents are reindexed.WARNING: Sort in reindex is deprecated. Sorting in reindex was never guaranteed to index documents in order and prevents further development of reindex such as resilience and performance improvements. If used in combination with
max_docs
, consider using a query filter instead.API name:
sort
Adds all elements of
list
tosort
. -
sort
Deprecated.7.6.0A comma-separated list of<field>:<direction>
pairs to sort by before indexing. Use it in conjunction withmax_docs
to control what documents are reindexed.WARNING: Sort in reindex is deprecated. Sorting in reindex was never guaranteed to index documents in order and prevents further development of reindex such as resilience and performance improvements. If used in combination with
max_docs
, consider using a query filter instead.API name:
sort
Adds one or more values to
sort
. -
sort
@Deprecated public final Source.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) Deprecated.7.6.0A comma-separated list of<field>:<direction>
pairs to sort by before indexing. Use it in conjunction withmax_docs
to control what documents are reindexed.WARNING: Sort in reindex is deprecated. Sorting in reindex was never guaranteed to index documents in order and prevents further development of reindex such as resilience and performance improvements. If used in combination with
max_docs
, consider using a query filter instead.API name:
sort
Adds a value to
sort
using a builder lambda. -
sourceFields
Iftrue
, reindex all source fields. Set it to a list to reindex select fields.API name:
_source
Adds all elements of
list
tosourceFields
. -
sourceFields
Iftrue
, reindex all source fields. Set it to a list to reindex select fields.API name:
_source
Adds one or more values to
sourceFields
. -
runtimeMappings
API name:runtime_mappings
Adds all entries of
map
toruntimeMappings
. -
runtimeMappings
API name:runtime_mappings
Adds an entry to
runtimeMappings
. -
runtimeMappings
public final Source.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) API name:runtime_mappings
Adds an entry to
runtimeMappings
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<Source.Builder>
-
build
Builds aSource
.- Specified by:
build
in interfaceObjectBuilder<Source>
- Throws:
NullPointerException
- if some of the required fields are null.
-