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 Details

    • Builder

      public Builder()
  • Method Details

    • index

      public SearchMvtRequest.Builder index​(java.util.List<java.lang.String> value)
      Required - Comma-separated list of data streams, indices, or aliases to search

      API name: index

    • index

      public SearchMvtRequest.Builder index​(java.lang.String... value)
      Required - Comma-separated list of data streams, indices, or aliases to search

      API name: index

    • addIndex

      public SearchMvtRequest.Builder addIndex​(java.lang.String value)
      Add a value to index(List), creating the list if needed.
    • field

      public SearchMvtRequest.Builder field​(java.lang.String value)
      Required - Field containing geospatial data to return

      API name: field

    • zoom

      public SearchMvtRequest.Builder zoom​(int value)
      Required - Zoom level for the vector tile to search

      API name: zoom

    • x

      public SearchMvtRequest.Builder x​(int value)
      Required - X coordinate for the vector tile to search

      API name: x

    • y

      public SearchMvtRequest.Builder y​(int value)
      Required - Y coordinate for the vector tile to search

      API name: y

    • aggs

      public SearchMvtRequest.Builder aggs​(@Nullable java.util.Map<java.lang.String,​Aggregation> value)
      Sub-aggregations for the geotile_grid.

      Supports the following aggregation types:

      • avg
      • cardinality
      • max
      • min
      • sum

      API name: aggs

    • putAggs

      public SearchMvtRequest.Builder putAggs​(java.lang.String key, Aggregation value)
      Add a key/value to aggs(Map), creating the map if needed.
    • aggs

      public SearchMvtRequest.Builder aggs​(java.lang.String key, java.util.function.Function<Aggregation.Builder,​ObjectBuilder<Aggregation>> fn)
      Set aggs(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 to aggs(Map), creating the map if needed.
    • exactBounds

      public SearchMvtRequest.Builder exactBounds​(@Nullable java.lang.Boolean value)
      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

      public SearchMvtRequest.Builder extent​(@Nullable java.lang.Integer value)
      Size, in pixels, of a side of the tile. Vector tiles are square with equal sides.

      API name: extent

    • fields

      public SearchMvtRequest.Builder fields​(@Nullable java.util.List<java.lang.String> value)
      Fields to return in the hits layer. Supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.

      API name: fields

    • fields

      public SearchMvtRequest.Builder fields​(java.lang.String... value)
      Fields to return in the hits layer. Supports wildcards (*). This parameter does not support fields with array values. Fields with array values may return inconsistent results.

      API name: fields

    • addFields

      public SearchMvtRequest.Builder addFields​(java.lang.String value)
      Add a value to fields(List), creating the list if needed.
    • gridPrecision

      public SearchMvtRequest.Builder gridPrecision​(@Nullable java.lang.Integer value)
      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

      public SearchMvtRequest.Builder gridType​(@Nullable GridType value)
      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

      public SearchMvtRequest.Builder query​(@Nullable Query value)
      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

      public SearchMvtRequest.Builder putRuntimeMappings​(java.lang.String key, RuntimeField value)
      Add a key/value to runtimeMappings(Map), creating the map if needed.
    • runtimeMappings

      public SearchMvtRequest.Builder runtimeMappings​(java.lang.String key, java.util.function.Function<RuntimeField.Builder,​ObjectBuilder<RuntimeField>> fn)
      Set runtimeMappings(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 to runtimeMappings(Map), creating the map if needed.
    • size

      public SearchMvtRequest.Builder size​(@Nullable java.lang.Integer value)
      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

      public SearchMvtRequest.Builder sort​(@Nullable java.util.List<jakarta.json.JsonValue> value)
      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

      public SearchMvtRequest.Builder sort​(jakarta.json.JsonValue... value)
      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

      public SearchMvtRequest.Builder addSort​(jakarta.json.JsonValue value)
      Add a value to sort(List), creating the list if needed.
    • build

      public SearchMvtRequest build()
      Specified by:
      build in interface ObjectBuilder<SearchMvtRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.