Class SearchMvtRequest.Builder
- All Implemented Interfaces:
WithJson<SearchMvtRequest.Builder>,ObjectBuilder<SearchMvtRequest>
- Enclosing class:
- SearchMvtRequest
SearchMvtRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal SearchMvtRequest.Builderaggs(String key, Aggregation value) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builderaggs(String key, AggregationVariant value) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builderaggs(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Sub-aggregations for the geotile_grid.final SearchMvtRequest.Builderaggs(Map<String, Aggregation> map) Sub-aggregations for the geotile_grid.final SearchMvtRequest.BuilderThe size, in pixels, of a clipping buffer outside the tile.build()Builds aSearchMvtRequest.final SearchMvtRequest.BuilderexactBounds(Boolean value) Iffalse, the meta layer's feature is the bounding box of the tile.final SearchMvtRequest.BuilderThe size, in pixels, of a side of the tile.final SearchMvtRequest.BuilderRequired - Field containing geospatial data to returnfinal SearchMvtRequest.BuilderThe fields to return in thehitslayer.final SearchMvtRequest.BuilderThe fields to return in thehitslayer.final SearchMvtRequest.BuildergridAgg(GridAggregationType value) The aggregation used to create a grid for thefield.final SearchMvtRequest.BuildergridPrecision(Integer value) Additional zoom levels available through the aggs layer.final SearchMvtRequest.BuilderDetermines the geometry type for features in the aggs layer.final SearchMvtRequest.BuilderRequired - Comma-separated list of data streams, indices, or aliases to searchfinal SearchMvtRequest.BuilderRequired - Comma-separated list of data streams, indices, or aliases to searchfinal SearchMvtRequest.BuilderprojectRouting(String value) Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax.final SearchMvtRequest.BuilderThe query DSL used to filter documents for the search.final SearchMvtRequest.Builderquery(QueryVariant value) The query DSL used to filter documents for the search.final SearchMvtRequest.BuilderThe query DSL used to filter documents for the search.final SearchMvtRequest.BuilderruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.final SearchMvtRequest.BuilderDefines one or more runtime fields in the search request.final SearchMvtRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.protected SearchMvtRequest.Builderself()final SearchMvtRequest.BuilderThe maximum number of features to return in the hits layer.final SearchMvtRequest.Buildersort(SortOptions value, SortOptions... values) Sort the features in the hits layer.final SearchMvtRequest.BuilderSort the features in the hits layer.final SearchMvtRequest.Buildersort(List<SortOptions> list) Sort the features in the hits layer.final SearchMvtRequest.BuildertrackTotalHits(TrackHits value) The number of hits matching the query to count accurately.final SearchMvtRequest.BuilderThe number of hits matching the query to count accurately.final SearchMvtRequest.BuilderwithLabels(Boolean value) Iftrue, the hits and aggs layers will contain additional point features representing suggested label positions for the original features.final SearchMvtRequest.Builderx(int value) Required - X coordinate for the vector tile to searchfinal SearchMvtRequest.Buildery(int value) Required - Y coordinate for the vector tile to searchfinal SearchMvtRequest.Builderzoom(int value) Required - Zoom level for the vector tile to searchMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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.It supports the following aggregation types:
avgboxplotcardinalityextended statsmaxmedian absolute deviationminpercentilepercentile-rankstatssumvalue count
The aggregation names can't start with
_mvt_. The_mvt_prefix is reserved for internal aggregations.API name:
aggsAdds all entries of
maptoaggs. -
aggs
Sub-aggregations for the geotile_grid.It supports the following aggregation types:
avgboxplotcardinalityextended statsmaxmedian absolute deviationminpercentilepercentile-rankstatssumvalue count
The aggregation names can't start with
_mvt_. The_mvt_prefix is reserved for internal aggregations.API name:
aggsAdds an entry to
aggs. -
aggs
Sub-aggregations for the geotile_grid.It supports the following aggregation types:
avgboxplotcardinalityextended statsmaxmedian absolute deviationminpercentilepercentile-rankstatssumvalue count
The aggregation names can't start with
_mvt_. The_mvt_prefix is reserved for internal aggregations.API name:
aggsAdds an entry to
aggs. -
aggs
public final SearchMvtRequest.Builder aggs(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) Sub-aggregations for the geotile_grid.It supports the following aggregation types:
avgboxplotcardinalityextended statsmaxmedian absolute deviationminpercentilepercentile-rankstatssumvalue count
The aggregation names can't start with
_mvt_. The_mvt_prefix is reserved for internal aggregations.API name:
aggsAdds an entry to
aggsusing a builder lambda. -
buffer
The 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
Iffalse, the meta layer's feature is the bounding box of the tile. Iftrue, the meta layer's feature is a bounding box resulting from ageo_boundsaggregation. The aggregation runs on <field> values that intersect the<zoom>/<x>/<y>tile withwrap_longitudeset tofalse. The resulting bounding box may be larger than the vector tile.API name:
exact_bounds -
extent
The 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
The fields to return in thehitslayer. It supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.API name:
fieldsAdds all elements of
listtofields. -
fields
The fields to return in thehitslayer. It supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.API name:
fieldsAdds one or more values to
fields. -
gridAgg
The 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>is7andgrid_precisionis8, 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 ageotile_gridcell. Ifgrid, each feature is a polygon of the cells bounding box. Ifpoint`, 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:
indexAdds all elements of
listtoindex. -
index
Required - Comma-separated list of data streams, indices, or aliases to searchAPI name:
indexAdds one or more values to
index. -
projectRouting
Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project _alias:_origin _alias:pr Supported in serverless only.API name:
project_routing -
query
The query DSL used to filter documents for the search.API name:
query -
query
The query DSL used to filter documents for the search.API name:
query -
query
The 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_mappingsAdds all entries of
maptoruntimeMappings. -
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_mappingsAdds 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_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
size
The 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
Sort the 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:
sortAdds all elements of
listtosort. -
sort
Sort the 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:
sortAdds one or more values to
sort. -
sort
public final SearchMvtRequest.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) Sort the 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:
sortAdds a value to
sortusing a builder lambda. -
trackTotalHits
The 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) The 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.PointandMultiPointfeatures will have one of the points selected.PolygonandMultiPolygonfeatures will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.LineStringfeatures will likewise provide a roughly central point selected from the triangle-tree.- The aggregation results will provide one central point for each aggregation bucket.
All attributes from the original features will also be copied to the new label features. In addition, the new features will be distinguishable using the tag
_mvt_label_position.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:
selfin classRequestBase.AbstractBuilder<SearchMvtRequest.Builder>
-
build
Builds aSearchMvtRequest.- Specified by:
buildin interfaceObjectBuilder<SearchMvtRequest>- Throws:
NullPointerException- if some of the required fields are null.
-