Class CountRequest.Builder

java.lang.Object
co.elastic.clients.elasticsearch._core.CountRequest.Builder
All Implemented Interfaces:
ObjectBuilder<CountRequest>
Enclosing class:
CountRequest

public static class CountRequest.Builder
extends java.lang.Object
implements ObjectBuilder<CountRequest>
Builder for CountRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • index

      public CountRequest.Builder index​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of indices to restrict the results

      API name: index

    • index

      public CountRequest.Builder index​(java.lang.String... value)
      A comma-separated list of indices to restrict the results

      API name: index

    • addIndex

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

      public CountRequest.Builder type​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of types to restrict the results

      API name: type

    • type

      public CountRequest.Builder type​(java.lang.String... value)
      A comma-separated list of types to restrict the results

      API name: type

    • addType

      public CountRequest.Builder addType​(java.lang.String value)
      Add a value to type(List), creating the list if needed.
    • allowNoIndices

      public CountRequest.Builder allowNoIndices​(@Nullable java.lang.Boolean value)
      Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

      API name: allow_no_indices

    • analyzer

      public CountRequest.Builder analyzer​(@Nullable java.lang.String value)
      The analyzer to use for the query string

      API name: analyzer

    • analyzeWildcard

      public CountRequest.Builder analyzeWildcard​(@Nullable java.lang.Boolean value)
      Specify whether wildcard and prefix queries should be analyzed (default: false)

      API name: analyze_wildcard

    • defaultOperator

      public CountRequest.Builder defaultOperator​(@Nullable DefaultOperator value)
      The default operator for query string query (AND or OR)

      API name: default_operator

    • df

      public CountRequest.Builder df​(@Nullable java.lang.String value)
      The field to use as default where no field prefix is given in the query string

      API name: df

    • expandWildcards

      public CountRequest.Builder expandWildcards​(@Nullable java.util.List<ExpandWildcardOptions> value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • expandWildcards

      public CountRequest.Builder expandWildcards​(ExpandWildcardOptions... value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • addExpandWildcards

      public CountRequest.Builder addExpandWildcards​(ExpandWildcardOptions value)
      Add a value to expandWildcards(List), creating the list if needed.
    • ignoreThrottled

      public CountRequest.Builder ignoreThrottled​(@Nullable java.lang.Boolean value)
      Whether specified concrete, expanded or aliased indices should be ignored when throttled

      API name: ignore_throttled

    • ignoreUnavailable

      public CountRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • lenient

      public CountRequest.Builder lenient​(@Nullable java.lang.Boolean value)
      Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

      API name: lenient

    • minScore

      public CountRequest.Builder minScore​(@Nullable java.lang.Double value)
      Include only documents with a specific _score value in the result

      API name: min_score

    • preference

      public CountRequest.Builder preference​(@Nullable java.lang.String value)
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • routing

      public CountRequest.Builder routing​(@Nullable java.lang.String value)
      A comma-separated list of specific routing values

      API name: routing

    • terminateAfter

      public CountRequest.Builder terminateAfter​(@Nullable java.lang.Long value)
      The maximum count for each shard, upon reaching which the query execution will terminate early

      API name: terminate_after

    • q

      public CountRequest.Builder q​(@Nullable java.lang.String value)
      Query in the Lucene query string syntax

      API name: q

    • query

      public CountRequest.Builder query​(@Nullable Query value)
      API name: query
    • query

      public CountRequest.Builder query​(java.util.function.Function<Query.Builder,​ObjectBuilder<Query>> fn)
      API name: query
    • build

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