Class ElasticsearchChecker


  • public class ElasticsearchChecker
    extends java.lang.Object
    Internal util methods for ElasticSearch tests
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static com.fasterxml.jackson.databind.ObjectMapper MAPPER  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.function.Consumer<java.util.List> elasticsearchChecker​(java.lang.String... strings)
      Returns a function that checks that a particular Elasticsearch pipeline is generated to implement a query.
      private static <T extends com.fasterxml.jackson.databind.JsonNode>
      T
      expandDots​(T parent)
      Expands attributes with dots (.) into sub-nodes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAPPER

        private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
    • Constructor Detail

      • ElasticsearchChecker

        private ElasticsearchChecker()
    • Method Detail

      • elasticsearchChecker

        public static java.util.function.Consumer<java.util.List> elasticsearchChecker​(java.lang.String... strings)
        Returns a function that checks that a particular Elasticsearch pipeline is generated to implement a query.
        Parameters:
        strings - expected expressions
        Returns:
        validation function
      • expandDots

        private static <T extends com.fasterxml.jackson.databind.JsonNode> T expandDots​(T parent)
        Expands attributes with dots (.) into sub-nodes. Use for more friendly JSON format:
           {'a.b.c': 1}
           expanded to
           {a: { b: {c: 1}}}}
         
        Type Parameters:
        T - type of node (usually JsonNode).
        Parameters:
        parent - current node
        Returns:
        copy of existing node with field a.b.c expanded.