Class Source.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.reindex.Source.Builder
- All Implemented Interfaces:
CopyableBuilder<Source.Builder,,Source> MutableBuilder<Source.Builder,,Source> ObjectBuilder<Source>
- Enclosing class:
Source
public static class Source.Builder
extends ObjectBuilderBase
implements CopyableBuilder<Source.Builder,Source>
Builder for
Source.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aSource.copy()Create a new builderCopyableBuilderthat is a copy of this one.final Source.BuilderRequired - API name:indexfinal Source.BuilderRequired - API name:indexfinal Source.BuilderAPI name:queryfinal Source.BuilderAPI name:queryfinal Source.BuilderAPI name:remotefinal Source.Builderremote(RemoteSource value) API name:remotefinal Source.BuilderThe number of documents to index per batch.final Source.BuilderAPI name:slicefinal Source.Builderslice(SlicedScroll value) API name:slicefinal Source.BuilderAPI name:sortfinal Source.Buildersort(List<SortOptions> list) API name:sortfinal Source.Buildersort(SortOptions value, SortOptions... values) API name:sortfinal Source.BuildersourceFields(String value, String... values) API name:_sourcefinal Source.BuildersourceFields(List<String> list) API name:_sourceMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<Source.Builder,Source> - Returns:
- a new builder instance.
-
index
Required - API name:indexAdds all elements of
listtoindex. -
index
Required - API name:indexAdds one or more values to
index. -
query
API name:query -
query
API name:query -
remote
API name:remote -
remote
@Nonnull public final Source.Builder remote(Function<RemoteSource.Builder, ObjectBuilder<RemoteSource>> fn) API name:remote -
size
The number of documents to index per batch. Use thesizesetting when indexing from a remote cluster. This ensures that batches fit in the on-heap buffer. The buffer defaults to a maximum size of100MB.API name:
size -
slice
API name:slice -
slice
@Nonnull public final Source.Builder slice(Function<SlicedScroll.Builder, ObjectBuilder<SlicedScroll>> fn) API name:slice -
sort
API name:sortAdds all elements of
listtosort. -
sort
API name:sortAdds one or more values to
sort. -
sort
@Nonnull public final Source.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) API name:sortAdds a value to
sortusing a builder lambda. -
sourceFields
API name:_sourceAdds all elements of
listtosourceFields. -
sourceFields
API name:_sourceAdds one or more values to
sourceFields. -
build
Builds aSource.- Specified by:
buildin interfaceObjectBuilder<Source>- Throws:
NullPointerException- if some of the required fields are null.
-