Class ChunkingSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ChunkingSettings.Builder>
co.elastic.clients.elasticsearch._types.mapping.ChunkingSettings.Builder
- All Implemented Interfaces:
WithJson<ChunkingSettings.Builder>,ObjectBuilder<ChunkingSettings>
- Enclosing class:
- ChunkingSettings
public static class ChunkingSettings.Builder
extends WithJsonObjectBuilderBase<ChunkingSettings.Builder>
implements ObjectBuilder<ChunkingSettings>
Builder for
ChunkingSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aChunkingSettings.final ChunkingSettings.BuildermaxChunkSize(int value) Required - The maximum size of a chunk in words.final ChunkingSettings.BuilderThe number of overlapping words for chunks.protected ChunkingSettings.Builderself()final ChunkingSettings.BuildersentenceOverlap(Integer value) The number of overlapping sentences for chunks.final ChunkingSettings.BuilderRequired - The chunking strategy:sentenceorword.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
-
strategy
Required - The chunking strategy:sentenceorword.API name:
strategy -
maxChunkSize
Required - The maximum size of a chunk in words. This value cannot be higher than300or lower than20(forsentencestrategy) or10(forwordstrategy).API name:
max_chunk_size -
overlap
The number of overlapping words for chunks. It is applicable only to awordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue.API name:
overlap -
sentenceOverlap
The number of overlapping sentences for chunks. It is applicable only for asentencechunking strategy. It can be either1or0.API name:
sentence_overlap -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ChunkingSettings.Builder>
-
build
Builds aChunkingSettings.- Specified by:
buildin interfaceObjectBuilder<ChunkingSettings>- Throws:
NullPointerException- if some of the required fields are null.
-