Class ExploreControls.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ExploreControls.Builder>
co.elastic.clients.elasticsearch.graph.ExploreControls.Builder
- All Implemented Interfaces:
WithJson<ExploreControls.Builder>
,ObjectBuilder<ExploreControls>
- Enclosing class:
- ExploreControls
public static class ExploreControls.Builder
extends WithJsonObjectBuilderBase<ExploreControls.Builder>
implements ObjectBuilder<ExploreControls>
Builder for
ExploreControls
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aExploreControls
.final ExploreControls.Builder
sampleDiversity
(SampleDiversity value) To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample.final ExploreControls.Builder
To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample.final ExploreControls.Builder
sampleSize
(Integer value) Each hop considers a sample of the best-matching documents on each shard.protected ExploreControls.Builder
self()
final ExploreControls.Builder
The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned.final ExploreControls.Builder
The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned.final ExploreControls.Builder
useSignificance
(boolean value) Required - Filters associated terms so only those that are significantly associated with your query are included.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
-
sampleDiversity
To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample. You can do this by selecting a single-value field and setting a maximum number of documents per value for that field.API name:
sample_diversity
-
sampleDiversity
public final ExploreControls.Builder sampleDiversity(Function<SampleDiversity.Builder, ObjectBuilder<SampleDiversity>> fn) To avoid the top-matching documents sample being dominated by a single source of results, it is sometimes necessary to request diversity in the sample. You can do this by selecting a single-value field and setting a maximum number of documents per value for that field.API name:
sample_diversity
-
sampleSize
Each hop considers a sample of the best-matching documents on each shard. Using samples improves the speed of execution and keeps exploration focused on meaningfully-connected terms. Very small values (less than 50) might not provide sufficient weight-of-evidence to identify significant connections between terms. Very large sample sizes can dilute the quality of the results and increase execution times.API name:
sample_size
-
timeout
The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned. This timeout is honored on a best-effort basis. Execution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field.API name:
timeout
-
timeout
The length of time in milliseconds after which exploration will be halted and the results gathered so far are returned. This timeout is honored on a best-effort basis. Execution might overrun this timeout if, for example, a long pause is encountered while FieldData is loaded for a field.API name:
timeout
-
useSignificance
Required - Filters associated terms so only those that are significantly associated with your query are included.API name:
use_significance
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<ExploreControls.Builder>
-
build
Builds aExploreControls
.- Specified by:
build
in interfaceObjectBuilder<ExploreControls>
- Throws:
NullPointerException
- if some of the required fields are null.
-