Class SearchMvtRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.SearchMvtRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<SearchMvtRequest>
- Enclosing class:
- SearchMvtRequest
public static class SearchMvtRequest.Builder extends java.lang.Object implements ObjectBuilder<SearchMvtRequest>
Builder for
SearchMvtRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description SearchMvtRequest.Builder
addFields(java.lang.String value)
Add a value tofields(List)
, creating the list if needed.SearchMvtRequest.Builder
addIndex(java.lang.String value)
Add a value toindex(List)
, creating the list if needed.SearchMvtRequest.Builder
addSort(jakarta.json.JsonValue value)
Add a value tosort(List)
, creating the list if needed.SearchMvtRequest.Builder
aggs(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)
Setaggs(Map)
to a singleton map.SearchMvtRequest.Builder
aggs(java.util.Map<java.lang.String,Aggregation> value)
Sub-aggregations for the geotile_grid.SearchMvtRequest
build()
Builds aSearchMvtRequest
.SearchMvtRequest.Builder
exactBounds(java.lang.Boolean value)
If false, the meta layer’s feature is the bounding box of the tile.SearchMvtRequest.Builder
extent(java.lang.Integer value)
Size, in pixels, of a side of the tile.SearchMvtRequest.Builder
field(java.lang.String value)
Required - Field containing geospatial data to returnSearchMvtRequest.Builder
fields(java.lang.String... value)
Fields to return in thehits
layer.SearchMvtRequest.Builder
fields(java.util.List<java.lang.String> value)
Fields to return in thehits
layer.SearchMvtRequest.Builder
gridPrecision(java.lang.Integer value)
Additional zoom levels available through the aggs layer.SearchMvtRequest.Builder
gridType(GridType value)
Determines the geometry type for features in the aggs layer.SearchMvtRequest.Builder
index(java.lang.String... value)
Required - Comma-separated list of data streams, indices, or aliases to searchSearchMvtRequest.Builder
index(java.util.List<java.lang.String> value)
Required - Comma-separated list of data streams, indices, or aliases to searchSearchMvtRequest.Builder
putAggs(java.lang.String key, Aggregation value)
Add a key/value toaggs(Map)
, creating the map if needed.SearchMvtRequest.Builder
putAggs(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)
Add a key/value toaggs(Map)
, creating the map if needed.SearchMvtRequest.Builder
putRuntimeMappings(java.lang.String key, RuntimeField value)
Add a key/value toruntimeMappings(Map)
, creating the map if needed.SearchMvtRequest.Builder
putRuntimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)
Add a key/value toruntimeMappings(Map)
, creating the map if needed.SearchMvtRequest.Builder
query(Query value)
Query DSL used to filter documents for the search.SearchMvtRequest.Builder
query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
Query DSL used to filter documents for the search.SearchMvtRequest.Builder
runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)
SetruntimeMappings(Map)
to a singleton map.SearchMvtRequest.Builder
runtimeMappings(java.util.Map<java.lang.String,RuntimeField> value)
Defines one or more runtime fields in the search request.SearchMvtRequest.Builder
size(java.lang.Integer value)
Maximum number of features to return in the hits layer.SearchMvtRequest.Builder
sort(jakarta.json.JsonValue... value)
Sorts features in the hits layer.SearchMvtRequest.Builder
sort(java.util.List<jakarta.json.JsonValue> value)
Sorts features in the hits layer.SearchMvtRequest.Builder
x(int value)
Required - X coordinate for the vector tile to searchSearchMvtRequest.Builder
y(int value)
Required - Y coordinate for the vector tile to searchSearchMvtRequest.Builder
zoom(int value)
Required - Zoom level for the vector tile to searchMethods 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 - Comma-separated list of data streams, indices, or aliases to searchAPI name:
index
-
index
Required - Comma-separated list of data streams, indices, or aliases to searchAPI name:
index
-
addIndex
Add a value toindex(List)
, creating the list if needed. -
field
Required - Field containing geospatial data to returnAPI name:
field
-
zoom
Required - Zoom level for the vector tile to searchAPI name:
zoom
-
x
Required - X coordinate for the vector tile to searchAPI name:
x
-
y
Required - Y coordinate for the vector tile to searchAPI name:
y
-
aggs
Sub-aggregations for the geotile_grid.Supports the following aggregation types:
- avg
- cardinality
- max
- min
- sum
API name:
aggs
-
putAggs
Add a key/value toaggs(Map)
, creating the map if needed. -
aggs
public SearchMvtRequest.Builder aggs(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)Setaggs(Map)
to a singleton map. -
putAggs
public SearchMvtRequest.Builder putAggs(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)Add a key/value toaggs(Map)
, creating the map if needed. -
exactBounds
If false, the meta layer’s feature is the bounding box of the tile. If true, the meta layer’s feature is a bounding box resulting from a geo_bounds aggregation. The aggregation runs on <field> values that intersect the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting bounding box may be larger than the vector tile.API name:
exact_bounds
-
extent
Size, in pixels, of a side of the tile. Vector tiles are square with equal sides.API name:
extent
-
fields
Fields to return in thehits
layer. Supports wildcards (*
). This parameter does not support fields with array values. Fields with array values may return inconsistent results.API name:
fields
-
fields
Fields to return in thehits
layer. Supports wildcards (*
). This parameter does not support fields with array values. Fields with array values may return inconsistent results.API name:
fields
-
addFields
Add a value tofields(List)
, creating the list if needed. -
gridPrecision
Additional zoom levels available through the aggs layer. For example, if <zoom> is 7 and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results don’t include the aggs layer.API name:
grid_precision
-
gridType
Determines the geometry type for features in the aggs layer. In the aggs layer, each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon of the cells bounding box. If 'point' each feature is a Point that is the centroid of the cell.API name:
grid_type
-
query
Query DSL used to filter documents for the search.API name:
query
-
query
public SearchMvtRequest.Builder query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)Query DSL used to filter documents for the search.API name:
query
-
runtimeMappings
public SearchMvtRequest.Builder runtimeMappings(@Nullable java.util.Map<java.lang.String,RuntimeField> value)Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappings
-
putRuntimeMappings
Add a key/value toruntimeMappings(Map)
, creating the map if needed. -
runtimeMappings
public SearchMvtRequest.Builder runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)SetruntimeMappings(Map)
to a singleton map. -
putRuntimeMappings
public SearchMvtRequest.Builder putRuntimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)Add a key/value toruntimeMappings(Map)
, creating the map if needed. -
size
Maximum number of features to return in the hits layer. Accepts 0-10000. If 0, results don’t include the hits layer.API name:
size
-
sort
Sorts features in the hits layer. By default, the API calculates a bounding box for each feature. It sorts features based on this box’s diagonal length, from longest to shortest.API name:
sort
-
sort
Sorts features in the hits layer. By default, the API calculates a bounding box for each feature. It sorts features based on this box’s diagonal length, from longest to shortest.API name:
sort
-
addSort
Add a value tosort(List)
, creating the list if needed. -
build
Builds aSearchMvtRequest
.- Specified by:
build
in interfaceObjectBuilder<SearchMvtRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-