Class ElasticSearchIndex

java.lang.Object
nl.vpro.elasticsearch.ElasticSearchIndex

public class ElasticSearchIndex extends Object
Since:
2.9
Author:
Michiel Meeuwissen
  • Field Details

    • DEFAULT_MAPPER

      public static final BiConsumer<Distribution,com.fasterxml.jackson.databind.node.ObjectNode> DEFAULT_MAPPER
  • Constructor Details

    • ElasticSearchIndex

      protected ElasticSearchIndex(String indexName, String mappingResource, String... aliases)
    • ElasticSearchIndex

      protected ElasticSearchIndex(String indexName, String settingsResource, String mappingResource, List<String> aliases, BiConsumer<Distribution,com.fasterxml.jackson.databind.node.ObjectNode> mappingsProcessor)
  • Method Details

    • settings

      public Supplier<com.fasterxml.jackson.databind.node.ObjectNode> settings()
    • mapping

      public Supplier<com.fasterxml.jackson.databind.node.ObjectNode> mapping()
    • withoutExperimental

      public ElasticSearchIndex withoutExperimental()
    • thenWithMappingsProcessor

      public ElasticSearchIndex thenWithMappingsProcessor(BiConsumer<Distribution,com.fasterxml.jackson.databind.JsonNode> mappingsProcessor)
      Registers a mapping processor while leaving the existing one intact.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • resourceToString

      public static String resourceToString(String name)
    • resourceToJson

      public static com.fasterxml.jackson.databind.JsonNode resourceToJson(String name)
    • resourceToObjectNode

      public static com.fasterxml.jackson.databind.node.ObjectNode resourceToObjectNode(String name)
    • builder

      public static ElasticSearchIndex.Builder builder()
    • getIndexName

      public String getIndexName()
    • getSettingsResource

      public String getSettingsResource()
    • getMappingResource

      public String getMappingResource()
    • getAliases

      public List<String> getAliases()
    • getMappingsProcessor

      public @NonNull BiConsumer<Distribution,com.fasterxml.jackson.databind.node.ObjectNode> getMappingsProcessor()
    • withMappingsProcessor

      public ElasticSearchIndex withMappingsProcessor(@NonNull BiConsumer<Distribution,com.fasterxml.jackson.databind.node.ObjectNode> mappingsProcessor)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).