Class ExistsRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.ExistsRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<ExistsRequest>
- Enclosing class:
- ExistsRequest
public static class ExistsRequest.Builder extends java.lang.Object implements ObjectBuilder<ExistsRequest>
Builder for
ExistsRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ExistsRequest.Builder
addSourceExcludes(java.lang.String value)
Add a value tosourceExcludes(List)
, creating the list if needed.ExistsRequest.Builder
addSourceIncludes(java.lang.String value)
Add a value tosourceIncludes(List)
, creating the list if needed.ExistsRequest.Builder
addStoredFields(java.lang.String value)
Add a value tostoredFields(List)
, creating the list if needed.ExistsRequest
build()
Builds aExistsRequest
.ExistsRequest.Builder
id(java.lang.String value)
Required - The document IDExistsRequest.Builder
index(java.lang.String value)
Required - The name of the indexExistsRequest.Builder
preference(java.lang.String value)
Specify the node or shard the operation should be performed on (default: random)ExistsRequest.Builder
realtime(java.lang.Boolean value)
Specify whether to perform the operation in realtime or search modeExistsRequest.Builder
refresh(java.lang.Boolean value)
Refresh the shard containing the document before performing the operationExistsRequest.Builder
routing(java.lang.String value)
Specific routing valueExistsRequest.Builder
source(jakarta.json.JsonValue value)
True or false to return the _source field or not, or a list of fields to returnExistsRequest.Builder
sourceExcludes(java.lang.String... value)
A list of fields to exclude from the returned _source fieldExistsRequest.Builder
sourceExcludes(java.util.List<java.lang.String> value)
A list of fields to exclude from the returned _source fieldExistsRequest.Builder
sourceIncludes(java.lang.String... value)
A list of fields to extract and return from the _source fieldExistsRequest.Builder
sourceIncludes(java.util.List<java.lang.String> value)
A list of fields to extract and return from the _source fieldExistsRequest.Builder
storedFields(java.lang.String... value)
A comma-separated list of stored fields to return in the responseExistsRequest.Builder
storedFields(java.util.List<java.lang.String> value)
A comma-separated list of stored fields to return in the responseExistsRequest.Builder
type(java.lang.String value)
The type of the document (use_all
to fetch the first document matching the ID across all types)ExistsRequest.Builder
version(java.lang.Long value)
Explicit version number for concurrency controlExistsRequest.Builder
versionType(VersionType value)
Specific version typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Required - The document IDAPI name:
id
-
index
Required - The name of the indexAPI name:
index
-
type
The type of the document (use_all
to fetch the first document matching the ID across all types)API name:
type
-
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
realtime
Specify whether to perform the operation in realtime or search modeAPI name:
realtime
-
refresh
Refresh the shard containing the document before performing the operationAPI name:
refresh
-
routing
Specific routing valueAPI name:
routing
-
source
True or false to return the _source field or not, or a list of fields to returnAPI name:
_source
-
sourceExcludes
A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
sourceExcludes
A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
addSourceExcludes
Add a value tosourceExcludes(List)
, creating the list if needed. -
sourceIncludes
A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
sourceIncludes
A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
addSourceIncludes
Add a value tosourceIncludes(List)
, creating the list if needed. -
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
-
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
-
addStoredFields
Add a value tostoredFields(List)
, creating the list if needed. -
version
Explicit version number for concurrency controlAPI name:
version
-
versionType
Specific version typeAPI name:
version_type
-
build
Builds aExistsRequest
.- Specified by:
build
in interfaceObjectBuilder<ExistsRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-