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.BuilderRequired - The name of the data stream, index, or alias you are copying from.final Source.BuilderRequired - The name of the data stream, index, or alias you are copying from.final Source.BuilderThe documents to reindex, which is defined with Query DSL.final Source.Builderquery(QueryVariant value) The documents to reindex, which is defined with Query DSL.final Source.BuilderThe documents to reindex, which is defined with Query DSL.final Source.Builderremote(RemoteSource value) A remote instance of Elasticsearch that you want to index from.final Source.BuilderA remote instance of Elasticsearch that you want to index from.final Source.BuilderruntimeMappings(String key, RuntimeField value) API name:runtime_mappingsfinal Source.BuilderAPI name:runtime_mappingsfinal Source.BuilderruntimeMappings(Map<String, RuntimeField> map) API name:runtime_mappingsprotected Source.Builderself()final Source.BuilderThe number of documents to index per batch.final Source.Builderslice(SlicedScroll value) Slice the reindex request manually using the provided slice ID and total number of slices.final Source.BuilderSlice the reindex request manually using the provided slice ID and total number of slices.final Source.Buildersort(SortOptions value, SortOptions... values) Deprecated.7.6.0final Source.BuilderDeprecated.7.6.0final Source.Buildersort(List<SortOptions> list) Deprecated.7.6.0final Source.BuildersourceFields(String value, String... values) Iftrue, reindex all source fields.final Source.BuildersourceFields(List<String> list) Iftrue, reindex all source fields.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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:
indexAdds all elements of
listtoindex. -
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:
indexAdds 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_docsto 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:
sortAdds all elements of
listtosort. -
sort
Deprecated.7.6.0A comma-separated list of<field>:<direction>pairs to sort by before indexing. Use it in conjunction withmax_docsto 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:
sortAdds 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_docsto 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:
sortAdds a value to
sortusing a builder lambda. -
sourceFields
Iftrue, reindex all source fields. Set it to a list to reindex select fields.API name:
_sourceAdds all elements of
listtosourceFields. -
sourceFields
Iftrue, reindex all source fields. Set it to a list to reindex select fields.API name:
_sourceAdds one or more values to
sourceFields. -
runtimeMappings
API name:runtime_mappingsAdds all entries of
maptoruntimeMappings. -
runtimeMappings
API name:runtime_mappingsAdds an entry to
runtimeMappings. -
runtimeMappings
public final Source.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) API name:runtime_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<Source.Builder>
-
build
Builds aSource.- Specified by:
buildin interfaceObjectBuilder<Source>- Throws:
NullPointerException- if some of the required fields are null.
-