Class QueryRuleActions.Builder

All Implemented Interfaces:
WithJson<QueryRuleActions.Builder>, ObjectBuilder<QueryRuleActions>
Enclosing class:
QueryRuleActions

public static class QueryRuleActions.Builder extends WithJsonObjectBuilderBase<QueryRuleActions.Builder> implements ObjectBuilder<QueryRuleActions>
Builder for QueryRuleActions.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • ids

      public final QueryRuleActions.Builder ids(List<String> list)
      The unique document IDs of the documents to apply the rule to. Only one of ids or docs may be specified and at least one must be specified.

      API name: ids

      Adds all elements of list to ids.

    • ids

      public final QueryRuleActions.Builder ids(String value, String... values)
      The unique document IDs of the documents to apply the rule to. Only one of ids or docs may be specified and at least one must be specified.

      API name: ids

      Adds one or more values to ids.

    • docs

      public final QueryRuleActions.Builder docs(List<PinnedDoc> list)
      The documents to apply the rule to. Only one of ids or docs may be specified and at least one must be specified. There is a maximum value of 100 documents in a rule. You can specify the following attributes for each document:
      • _index: The index of the document to pin.
      • _id: The unique document ID.

      API name: docs

      Adds all elements of list to docs.

    • docs

      public final QueryRuleActions.Builder docs(PinnedDoc value, PinnedDoc... values)
      The documents to apply the rule to. Only one of ids or docs may be specified and at least one must be specified. There is a maximum value of 100 documents in a rule. You can specify the following attributes for each document:
      • _index: The index of the document to pin.
      • _id: The unique document ID.

      API name: docs

      Adds one or more values to docs.

    • docs

      The documents to apply the rule to. Only one of ids or docs may be specified and at least one must be specified. There is a maximum value of 100 documents in a rule. You can specify the following attributes for each document:
      • _index: The index of the document to pin.
      • _id: The unique document ID.

      API name: docs

      Adds a value to docs using a builder lambda.

    • self

      protected QueryRuleActions.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<QueryRuleActions.Builder>
    • build

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