Class SearchRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.eql.SearchRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<SearchRequest>
- Enclosing class:
- SearchRequest
public static class SearchRequest.Builder extends java.lang.Object implements ObjectBuilder<SearchRequest>
Builder for
SearchRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description SearchRequest.Builder
addExpandWildcards(ExpandWildcardOptions value)
Add a value toexpandWildcards(List)
, creating the list if needed.SearchRequest.Builder
addFields(jakarta.json.JsonValue value)
Add a value tofields(List)
, creating the list if needed.SearchRequest.Builder
addFilter(Query value)
Add a value tofilter(List)
, creating the list if needed.SearchRequest.Builder
addFilter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
Add a value tofilter(List)
, creating the list if needed.SearchRequest.Builder
allowNoIndices(java.lang.Boolean value)
API name:allow_no_indices
SearchRequest
build()
Builds aSearchRequest
.SearchRequest.Builder
caseSensitive(java.lang.Boolean value)
API name:case_sensitive
SearchRequest.Builder
eventCategoryField(java.lang.String value)
Field containing the event classification, such as process, file, or network.SearchRequest.Builder
expandWildcards(ExpandWildcardOptions... value)
API name:expand_wildcards
SearchRequest.Builder
expandWildcards(java.util.List<ExpandWildcardOptions> value)
API name:expand_wildcards
SearchRequest.Builder
fetchSize(java.lang.Number value)
Maximum number of events to search at a time for sequence queries.SearchRequest.Builder
fields(jakarta.json.JsonValue... value)
Array of wildcard (*) patterns.SearchRequest.Builder
fields(java.util.List<jakarta.json.JsonValue> value)
Array of wildcard (*) patterns.SearchRequest.Builder
filter(Query... value)
Query, written in Query DSL, used to filter the events on which the EQL query runs.SearchRequest.Builder
filter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
Setfilter(List)
to a singleton list.SearchRequest.Builder
filter(java.util.List<Query> value)
Query, written in Query DSL, used to filter the events on which the EQL query runs.SearchRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
If true, missing or closed indices are not included in the response.SearchRequest.Builder
index(java.lang.String value)
Required - The name of the index to scope the operationSearchRequest.Builder
keepAlive(java.lang.String value)
API name:keep_alive
SearchRequest.Builder
keepOnCompletion(java.lang.Boolean value)
API name:keep_on_completion
SearchRequest.Builder
query(java.lang.String value)
Required - EQL query you wish to run.SearchRequest.Builder
resultPosition(ResultPosition value)
API name:result_position
SearchRequest.Builder
size(jakarta.json.JsonValue value)
For basic queries, the maximum number of matching events to return.SearchRequest.Builder
tiebreakerField(java.lang.String value)
Field used to sort hits with the same timestamp in ascending orderSearchRequest.Builder
timestampField(java.lang.String value)
Field containing event timestamp.SearchRequest.Builder
waitForCompletionTimeout(java.lang.String value)
API name:wait_for_completion_timeout
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
-
index
Required - The name of the index to scope the operationAPI name:
index
-
allowNoIndices
API name:allow_no_indices
-
expandWildcards
public SearchRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcardOptions> value)API name:expand_wildcards
-
expandWildcards
API name:expand_wildcards
-
addExpandWildcards
Add a value toexpandWildcards(List)
, creating the list if needed. -
query
Required - EQL query you wish to run.API name:
query
-
caseSensitive
API name:case_sensitive
-
eventCategoryField
Field containing the event classification, such as process, file, or network.API name:
event_category_field
-
tiebreakerField
Field used to sort hits with the same timestamp in ascending orderAPI name:
tiebreaker_field
-
timestampField
Field containing event timestamp. Default "@timestamp"API name:
timestamp_field
-
fetchSize
Maximum number of events to search at a time for sequence queries.API name:
fetch_size
-
filter
Query, written in Query DSL, used to filter the events on which the EQL query runs.API name:
filter
-
filter
Query, written in Query DSL, used to filter the events on which the EQL query runs.API name:
filter
-
addFilter
Add a value tofilter(List)
, creating the list if needed. -
filter
public SearchRequest.Builder filter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)Setfilter(List)
to a singleton list. -
addFilter
public SearchRequest.Builder addFilter(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)Add a value tofilter(List)
, creating the list if needed. -
keepAlive
API name:keep_alive
-
keepOnCompletion
API name:keep_on_completion
-
waitForCompletionTimeout
API name:wait_for_completion_timeout
-
size
For basic queries, the maximum number of matching events to return. Defaults to 10API name:
size
-
fields
Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.API name:
fields
-
fields
Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit.API name:
fields
-
addFields
Add a value tofields(List)
, creating the list if needed. -
resultPosition
API name:result_position
-
build
Builds aSearchRequest
.- Specified by:
build
in interfaceObjectBuilder<SearchRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-