Class ElasticsearchJson


  • final class ElasticsearchJson
    extends java.lang.Object
    Internal objects (and deserializers) used to parse Elasticsearch results (which are in JSON format).

    Since we're using basic row-level rest client http response has to be processed manually using JSON (jackson) library.

    • Constructor Detail

      • ElasticsearchJson

        private ElasticsearchJson()
    • Method Detail

      • visitValueNodes

        static void visitValueNodes​(ElasticsearchJson.Aggregations aggregations,
                                    java.util.function.Consumer<java.util.Map<java.lang.String,​java.lang.Object>> consumer)
        Visits leaves of the aggregation where all values are stored.
      • visitMappingProperties

        static void visitMappingProperties​(com.fasterxml.jackson.databind.node.ObjectNode mapping,
                                           java.util.function.BiConsumer<java.lang.String,​java.lang.String> consumer)
        Visits Elasticsearch mapping properties and calls consumer for each field / type pair. Nested fields are represented as foo.bar.qux.
      • visitMappingProperties

        private static void visitMappingProperties​(java.util.Deque<java.lang.String> path,
                                                   com.fasterxml.jackson.databind.node.ObjectNode mapping,
                                                   java.util.function.BiConsumer<java.lang.String,​java.lang.String> consumer)