Class FieldCapsRequest.Builder
- All Implemented Interfaces:
WithJson<FieldCapsRequest.Builder>,ObjectBuilder<FieldCapsRequest>
- Enclosing class:
- FieldCapsRequest
FieldCapsRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal FieldCapsRequest.BuilderallowNoIndices(Boolean value) A setting that does two separate checks on the index expression.build()Builds aFieldCapsRequest.final FieldCapsRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values) The type of index that wildcard patterns can match.final FieldCapsRequest.BuilderexpandWildcards(List<ExpandWildcard> list) The type of index that wildcard patterns can match.final FieldCapsRequest.BuilderA list of fields to retrieve capabilities for.final FieldCapsRequest.BuilderA list of fields to retrieve capabilities for.final FieldCapsRequest.BuilderA comma-separated list of filters to apply to the response.final FieldCapsRequest.BuilderA comma-separated list of filters to apply to the response.final FieldCapsRequest.BuilderignoreUnavailable(Boolean value) Iffalse, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable.final FieldCapsRequest.BuilderincludeEmptyFields(Boolean value) If false, empty fields are not included in the response.final FieldCapsRequest.BuilderincludeUnmapped(Boolean value) If true, unmapped fields are included in the response.final FieldCapsRequest.BuilderA comma-separated list of data streams, indices, and aliases used to limit the request.final FieldCapsRequest.BuilderA comma-separated list of data streams, indices, and aliases used to limit the request.final FieldCapsRequest.BuilderindexFilter(Query value) Filter indices if the provided query rewrites tomatch_noneon every shard.final FieldCapsRequest.BuilderindexFilter(QueryVariant value) Filter indices if the provided query rewrites tomatch_noneon every shard.final FieldCapsRequest.BuilderFilter indices if the provided query rewrites tomatch_noneon every shard.final FieldCapsRequest.BuilderprojectRouting(String value) Specifies a subset of projects to target for the field-caps query using project metadata tags in a subset of Lucene query syntax.final FieldCapsRequest.BuilderruntimeMappings(String key, RuntimeField value) Define ad-hoc runtime fields in the request similar to the way it is done in search requests.final FieldCapsRequest.BuilderDefine ad-hoc runtime fields in the request similar to the way it is done in search requests.final FieldCapsRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) Define ad-hoc runtime fields in the request similar to the way it is done in search requests.protected FieldCapsRequest.Builderself()final FieldCapsRequest.BuilderA comma-separated list of field types to include.final FieldCapsRequest.BuilderA comma-separated list of field types to include.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
-
allowNoIndices
A setting that does two separate checks on the index expression. Iffalse, the request returns an error (1) if any wildcard expression (including_alland*) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. Iftrue, index expressions that resolve to no indices are allowed and the request returns an empty result.API name:
allow_no_indices -
expandWildcards
The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
public final FieldCapsRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
fields
A list of fields to retrieve capabilities for. Wildcard (*) expressions are supported.API name:
fieldsAdds all elements of
listtofields. -
fields
A list of fields to retrieve capabilities for. Wildcard (*) expressions are supported.API name:
fieldsAdds one or more values to
fields. -
filters
A comma-separated list of filters to apply to the response.API name:
filtersAdds all elements of
listtofilters. -
filters
A comma-separated list of filters to apply to the response.API name:
filtersAdds one or more values to
filters. -
includeEmptyFields
If false, empty fields are not included in the response.API name:
include_empty_fields -
includeUnmapped
If true, unmapped fields are included in the response.API name:
include_unmapped -
index
A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.API name:
indexAdds all elements of
listtoindex. -
index
A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.API name:
indexAdds one or more values to
index. -
indexFilter
Filter indices if the provided query rewrites tomatch_noneon every shard.IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to
match_noneinstead of fully running the request. For instance a range query over a date field can rewrite tomatch_noneif all documents within a shard (including deleted documents) are outside of the provided range. However, not all queries can rewrite tomatch_noneso this API may return an index even if the provided filter matches no document.API name:
index_filter -
indexFilter
Filter indices if the provided query rewrites tomatch_noneon every shard.IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to
match_noneinstead of fully running the request. For instance a range query over a date field can rewrite tomatch_noneif all documents within a shard (including deleted documents) are outside of the provided range. However, not all queries can rewrite tomatch_noneso this API may return an index even if the provided filter matches no document.API name:
index_filter -
indexFilter
Filter indices if the provided query rewrites tomatch_noneon every shard.IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to
match_noneinstead of fully running the request. For instance a range query over a date field can rewrite tomatch_noneif all documents within a shard (including deleted documents) are outside of the provided range. However, not all queries can rewrite tomatch_noneso this API may return an index even if the provided filter matches no document.API name:
index_filter -
projectRouting
Specifies a subset of projects to target for the field-caps query using project metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project _alias:_origin _alias:pr Supported in serverless only.API name:
project_routing -
runtimeMappings
Define ad-hoc runtime fields in the request similar to the way it is done in search requests. These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.API name:
runtime_mappingsAdds all entries of
maptoruntimeMappings. -
runtimeMappings
Define ad-hoc runtime fields in the request similar to the way it is done in search requests. These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.API name:
runtime_mappingsAdds an entry to
runtimeMappings. -
runtimeMappings
public final FieldCapsRequest.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) Define ad-hoc runtime fields in the request similar to the way it is done in search requests. These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.API name:
runtime_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
types
A comma-separated list of field types to include. Any fields that do not match one of these types will be excluded from the results. It defaults to empty, meaning that all field types are returned.API name:
typesAdds all elements of
listtotypes. -
types
A comma-separated list of field types to include. Any fields that do not match one of these types will be excluded from the results. It defaults to empty, meaning that all field types are returned.API name:
typesAdds one or more values to
types. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<FieldCapsRequest.Builder>
-
build
Builds aFieldCapsRequest.- Specified by:
buildin interfaceObjectBuilder<FieldCapsRequest>- Throws:
NullPointerException- if some of the required fields are null.
-