Class SearchMvtRequest.Builder
- All Implemented Interfaces:
WithJson<SearchMvtRequest.Builder>
,ObjectBuilder<SearchMvtRequest>
- Enclosing class:
- SearchMvtRequest
SearchMvtRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal SearchMvtRequest.Builder
aggs
(String key, Aggregation value) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builder
aggs
(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builder
aggs
(Map<String, Aggregation> map) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builder
Size, in pixels, of a clipping buffer outside the tile.build()
Builds aSearchMvtRequest
.final SearchMvtRequest.Builder
exactBounds
(Boolean value) If false, the meta layer’s feature is the bounding box of the tile.final SearchMvtRequest.Builder
Size, in pixels, of a side of the tile.final SearchMvtRequest.Builder
Required - Field containing geospatial data to returnfinal SearchMvtRequest.Builder
Fields to return in thehits
layer.final SearchMvtRequest.Builder
Fields to return in thehits
layer.final SearchMvtRequest.Builder
gridAgg
(GridAggregationType value) Aggregation used to create a grid for thefield
.final SearchMvtRequest.Builder
gridPrecision
(Integer value) Additional zoom levels available through the aggs layer.final SearchMvtRequest.Builder
Determines the geometry type for features in the aggs layer.final SearchMvtRequest.Builder
Required - Comma-separated list of data streams, indices, or aliases to searchfinal SearchMvtRequest.Builder
Required - Comma-separated list of data streams, indices, or aliases to searchfinal SearchMvtRequest.Builder
Query DSL used to filter documents for the search.final SearchMvtRequest.Builder
Query DSL used to filter documents for the search.final SearchMvtRequest.Builder
runtimeMappings
(String key, RuntimeField value) Defines one or more runtime fields in the search request.final SearchMvtRequest.Builder
Defines one or more runtime fields in the search request.final SearchMvtRequest.Builder
runtimeMappings
(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.protected SearchMvtRequest.Builder
self()
final SearchMvtRequest.Builder
Maximum number of features to return in the hits layer.final SearchMvtRequest.Builder
sort
(SortOptions value, SortOptions... values) Sorts features in the hits layer.final SearchMvtRequest.Builder
Sorts features in the hits layer.final SearchMvtRequest.Builder
sort
(List<SortOptions> list) Sorts features in the hits layer.final SearchMvtRequest.Builder
trackTotalHits
(TrackHits value) Number of hits matching the query to count accurately.final SearchMvtRequest.Builder
Number of hits matching the query to count accurately.final SearchMvtRequest.Builder
withLabels
(Boolean value) Iftrue
, the hits and aggs layers will contain additional point features representing suggested label positions for the original features.final SearchMvtRequest.Builder
x
(int value) Required - X coordinate for the vector tile to searchfinal SearchMvtRequest.Builder
y
(int value) Required - Y coordinate for the vector tile to searchfinal SearchMvtRequest.Builder
zoom
(int value) Required - Zoom level for the vector tile to searchMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggs
Sub-aggregations for the geotile_grid.Supports the following aggregation types:
- avg
- cardinality
- max
- min
- sum
API name:
aggs
Adds all entries of
map
toaggs
. -
aggs
Sub-aggregations for the geotile_grid.Supports the following aggregation types:
- avg
- cardinality
- max
- min
- sum
API name:
aggs
Adds an entry to
aggs
. -
aggs
public final SearchMvtRequest.Builder aggs(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Sub-aggregations for the geotile_grid.Supports the following aggregation types:
- avg
- cardinality
- max
- min
- sum
API name:
aggs
Adds an entry to
aggs
using a builder lambda. -
buffer
Size, in pixels, of a clipping buffer outside the tile. This allows renderers to avoid outline artifacts from geometries that extend past the extent of the tile.API name:
buffer
-
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
-
field
Required - Field containing geospatial data to returnAPI name:
field
-
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
Adds all elements of
list
tofields
. -
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
Adds one or more values to
fields
. -
gridAgg
Aggregation used to create a grid for thefield
.API name:
grid_agg
-
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
-
index
Required - Comma-separated list of data streams, indices, or aliases to searchAPI name:
index
Adds all elements of
list
toindex
. -
index
Required - Comma-separated list of data streams, indices, or aliases to searchAPI name:
index
Adds one or more values to
index
. -
query
Query DSL used to filter documents for the search.API name:
query
-
query
Query DSL used to filter documents for the search.API name:
query
-
runtimeMappings
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
Adds all entries of
map
toruntimeMappings
. -
runtimeMappings
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
Adds an entry to
runtimeMappings
. -
runtimeMappings
public final SearchMvtRequest.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) 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
Adds an entry to
runtimeMappings
using a builder lambda. -
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
Adds all elements of
list
tosort
. -
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
Adds one or more values to
sort
. -
sort
public final SearchMvtRequest.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) 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
Adds a value to
sort
using a builder lambda. -
trackTotalHits
Number of hits matching the query to count accurately. Iftrue
, the exact number of hits is returned at the cost of some performance. Iffalse
, the response does not include the total number of hits matching the query.API name:
track_total_hits
-
trackTotalHits
public final SearchMvtRequest.Builder trackTotalHits(Function<TrackHits.Builder, ObjectBuilder<TrackHits>> fn) Number of hits matching the query to count accurately. Iftrue
, the exact number of hits is returned at the cost of some performance. Iffalse
, the response does not include the total number of hits matching the query.API name:
track_total_hits
-
withLabels
Iftrue
, the hits and aggs layers will contain additional point features representing suggested label positions for the original features.API name:
with_labels
-
x
Required - X coordinate for the vector tile to searchAPI name:
x
-
y
Required - Y coordinate for the vector tile to searchAPI name:
y
-
zoom
Required - Zoom level for the vector tile to searchAPI name:
zoom
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<SearchMvtRequest.Builder>
-
build
Builds aSearchMvtRequest
.- Specified by:
build
in interfaceObjectBuilder<SearchMvtRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-