Class Hit.Builder<TDocument>

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • index

        public final Hit.Builder<TDocument> index​(@Nullable
                                                  java.lang.String value)
        Required - API name: _index
      • score

        public final Hit.Builder<TDocument> score​(@Nullable
                                                  java.lang.Double value)
        API name: _score
      • fields

        public final Hit.Builder<TDocument> fields​(java.util.Map<java.lang.String,​JsonData> map)
        API name: fields

        Adds all entries of map to fields.

      • highlight

        public final Hit.Builder<TDocument> highlight​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> map)
        API name: highlight

        Adds all entries of map to highlight.

      • highlight

        public final Hit.Builder<TDocument> highlight​(java.lang.String key,
                                                      java.util.List<java.lang.String> value)
        API name: highlight

        Adds an entry to highlight.

      • innerHits

        public final Hit.Builder<TDocument> innerHits​(java.util.Map<java.lang.String,​InnerHitsResult> map)
        API name: inner_hits

        Adds all entries of map to innerHits.

      • matchedQueries

        public final Hit.Builder<TDocument> matchedQueries​(java.util.List<java.lang.String> list)
        API name: matched_queries

        Adds all elements of list to matchedQueries.

      • matchedQueries

        public final Hit.Builder<TDocument> matchedQueries​(java.lang.String value,
                                                           java.lang.String... values)
        API name: matched_queries

        Adds one or more values to matchedQueries.

      • ignored

        public final Hit.Builder<TDocument> ignored​(java.util.List<java.lang.String> list)
        API name: _ignored

        Adds all elements of list to ignored.

      • ignored

        public final Hit.Builder<TDocument> ignored​(java.lang.String value,
                                                    java.lang.String... values)
        API name: _ignored

        Adds one or more values to ignored.

      • shard

        public final Hit.Builder<TDocument> shard​(@Nullable
                                                  java.lang.String value)
        API name: _shard
      • node

        public final Hit.Builder<TDocument> node​(@Nullable
                                                 java.lang.String value)
        API name: _node
      • routing

        public final Hit.Builder<TDocument> routing​(@Nullable
                                                    java.lang.String value)
        API name: _routing
      • seqNo

        public final Hit.Builder<TDocument> seqNo​(@Nullable
                                                  java.lang.Long value)
        API name: _seq_no
      • primaryTerm

        public final Hit.Builder<TDocument> primaryTerm​(@Nullable
                                                        java.lang.Long value)
        API name: _primary_term
      • version

        public final Hit.Builder<TDocument> version​(@Nullable
                                                    java.lang.Long value)
        API name: _version
      • sort

        public final Hit.Builder<TDocument> sort​(java.util.List<java.lang.String> list)
        API name: sort

        Adds all elements of list to sort.

        NOTE: In version 3.0.0 of opensearch-java, this method will instead accept a List<FieldValue>.

      • sort

        public final Hit.Builder<TDocument> sort​(java.lang.String value,
                                                 java.lang.String... values)
        API name: sort

        Adds one or more values to sort.

        NOTE: In version 3.0.0 of opensearch-java, this method will instead accept a List<FieldValue>.

      • sortVals

        public final Hit.Builder<TDocument> sortVals​(java.util.List<FieldValue> list)
        API name: sort

        Adds all elements of list to sort.

        NOTE: In version 3.0.0 of opensearch-java, this method will be renamed to replace sort(List).

      • tDocumentSerializer

        public final Hit.Builder<TDocument> tDocumentSerializer​(@Nullable
                                                                JsonpSerializer<TDocument> value)
        Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context.