Class FieldCapsRequest.Builder
- All Implemented Interfaces:
WithJson<FieldCapsRequest.Builder>
,ObjectBuilder<FieldCapsRequest>
- Enclosing class:
- FieldCapsRequest
public static class FieldCapsRequest.Builder extends RequestBase.AbstractBuilder<FieldCapsRequest.Builder> implements ObjectBuilder<FieldCapsRequest>
FieldCapsRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description FieldCapsRequest.Builder
allowNoIndices(java.lang.Boolean value)
If false, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices.FieldCapsRequest
build()
Builds aFieldCapsRequest
.FieldCapsRequest.Builder
expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Type of index that wildcard patterns can match.FieldCapsRequest.Builder
expandWildcards(java.util.List<ExpandWildcard> list)
Type of index that wildcard patterns can match.FieldCapsRequest.Builder
fields(java.lang.String value, java.lang.String... values)
List of fields to retrieve capabilities for.FieldCapsRequest.Builder
fields(java.util.List<java.lang.String> list)
List of fields to retrieve capabilities for.FieldCapsRequest.Builder
filters(java.lang.String value)
An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parentFieldCapsRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
Iftrue
, missing or closed indices are not included in the response.FieldCapsRequest.Builder
includeUnmapped(java.lang.Boolean value)
If true, unmapped fields are included in the response.FieldCapsRequest.Builder
index(java.lang.String value, java.lang.String... values)
Comma-separated list of data streams, indices, and aliases used to limit the request.FieldCapsRequest.Builder
index(java.util.List<java.lang.String> list)
Comma-separated list of data streams, indices, and aliases used to limit the request.FieldCapsRequest.Builder
indexFilter(Query value)
Allows to filter indices if the provided query rewrites to match_none on every shard.FieldCapsRequest.Builder
indexFilter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
Allows to filter indices if the provided query rewrites to match_none on every shard.FieldCapsRequest.Builder
runtimeMappings(java.lang.String key, RuntimeField value)
Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.FieldCapsRequest.Builder
runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)
Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.FieldCapsRequest.Builder
runtimeMappings(java.util.Map<java.lang.String,RuntimeField> map)
Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.protected FieldCapsRequest.Builder
self()
FieldCapsRequest.Builder
types(java.lang.String value, java.lang.String... values)
Only return results for fields that have one of the types in the listFieldCapsRequest.Builder
types(java.util.List<java.lang.String> list)
Only return results for fields that have one of the types in the listMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowNoIndices
If false, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts with foo but no index starts with bar.API name:
allow_no_indices
-
expandWildcards
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_wildcards
Adds all elements of
list
toexpandWildcards
. -
expandWildcards
public final FieldCapsRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)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_wildcards
Adds one or more values to
expandWildcards
. -
fields
List of fields to retrieve capabilities for. Wildcard (*
) expressions are supported.API name:
fields
Adds all elements of
list
tofields
. -
fields
List of fields to retrieve capabilities for. Wildcard (*
) expressions are supported.API name:
fields
Adds one or more values to
fields
. -
filters
An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parentAPI name:
filters
-
includeUnmapped
If true, unmapped fields are included in the response.API name:
include_unmapped
-
index
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:
index
Adds all elements of
list
toindex
. -
index
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:
index
Adds one or more values to
index
. -
indexFilter
Allows to filter indices if the provided query rewrites to match_none on every shard.API name:
index_filter
-
indexFilter
public final FieldCapsRequest.Builder indexFilter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)Allows to filter indices if the provided query rewrites to match_none on every shard.API name:
index_filter
-
runtimeMappings
public final FieldCapsRequest.Builder runtimeMappings(java.util.Map<java.lang.String,RuntimeField> map)Defines 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_mappings
Adds all entries of
map
toruntimeMappings
. -
runtimeMappings
Defines 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_mappings
Adds an entry to
runtimeMappings
. -
runtimeMappings
public final FieldCapsRequest.Builder runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)Defines 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_mappings
Adds an entry to
runtimeMappings
using a builder lambda. -
types
Only return results for fields that have one of the types in the listAPI name:
types
Adds all elements of
list
totypes
. -
types
Only return results for fields that have one of the types in the listAPI name:
types
Adds one or more values to
types
. -
self
- Specified by:
self
in classRequestBase.AbstractBuilder<FieldCapsRequest.Builder>
-
build
Builds aFieldCapsRequest
.- Specified by:
build
in interfaceObjectBuilder<FieldCapsRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-