Class MapperServiceTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.index.mapper.MapperServiceTestCase
Direct Known Subclasses:
MapperTestCase

public abstract class MapperServiceTestCase
extends ESTestCase
  • Field Details

    • SETTINGS

      protected static final org.elasticsearch.common.settings.Settings SETTINGS
    • INCLUDE_DEFAULTS

      protected static final org.elasticsearch.common.xcontent.ToXContent.Params INCLUDE_DEFAULTS
  • Constructor Details

  • Method Details

    • getPlugins

      protected java.util.Collection<? extends org.elasticsearch.plugins.Plugin> getPlugins()
    • getIndexSettings

      protected org.elasticsearch.common.settings.Settings getIndexSettings()
    • createIndexAnalyzers

      protected org.elasticsearch.index.analysis.IndexAnalyzers createIndexAnalyzers​(org.elasticsearch.index.IndexSettings indexSettings)
    • randomIndexOptions

      protected final java.lang.String randomIndexOptions()
    • createDocumentMapper

      protected final org.elasticsearch.index.mapper.DocumentMapper createDocumentMapper​(org.elasticsearch.common.xcontent.XContentBuilder mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • createDocumentMapper

      protected final org.elasticsearch.index.mapper.DocumentMapper createDocumentMapper​(org.elasticsearch.Version version, org.elasticsearch.common.xcontent.XContentBuilder mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • createDocumentMapper

      protected final org.elasticsearch.index.mapper.DocumentMapper createDocumentMapper​(java.lang.String type, java.lang.String mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • createMapperService

      protected org.elasticsearch.index.mapper.MapperService createMapperService​(org.elasticsearch.common.xcontent.XContentBuilder mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • createMapperService

      protected final org.elasticsearch.index.mapper.MapperService createMapperService​(java.lang.String type, java.lang.String mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • createMapperService

      protected final org.elasticsearch.index.mapper.MapperService createMapperService​(org.elasticsearch.Version version, org.elasticsearch.common.xcontent.XContentBuilder mapping) throws java.io.IOException
      Create a MapperService like we would for an index.
      Throws:
      java.io.IOException
    • withLuceneIndex

      protected final void withLuceneIndex​(org.elasticsearch.index.mapper.MapperService mapperService, org.elasticsearch.common.CheckedConsumer<org.apache.lucene.index.RandomIndexWriter,​java.io.IOException> builder, org.elasticsearch.common.CheckedConsumer<org.apache.lucene.index.IndexReader,​java.io.IOException> test) throws java.io.IOException
      Throws:
      java.io.IOException
    • source

      protected final org.elasticsearch.index.mapper.SourceToParse source​(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,​java.io.IOException> build) throws java.io.IOException
      Throws:
      java.io.IOException
    • source

      protected final org.elasticsearch.index.mapper.SourceToParse source​(java.lang.String source)
    • merge

      protected final void merge​(org.elasticsearch.index.mapper.MapperService mapperService, org.elasticsearch.common.xcontent.XContentBuilder mapping) throws java.io.IOException
      Merge a new mapping into the one in the provided MapperService.
      Throws:
      java.io.IOException
    • merge

      protected final void merge​(java.lang.String type, org.elasticsearch.index.mapper.MapperService mapperService, java.lang.String mapping) throws java.io.IOException
      Merge a new mapping into the one in the provided MapperService.
      Throws:
      java.io.IOException
    • merge

      protected final void merge​(org.elasticsearch.index.mapper.MapperService mapperService, org.elasticsearch.index.mapper.MapperService.MergeReason reason, org.elasticsearch.common.xcontent.XContentBuilder mapping) throws java.io.IOException
      Merge a new mapping into the one in the provided MapperService with a specific MergeReason
      Throws:
      java.io.IOException
    • topMapping

      protected final org.elasticsearch.common.xcontent.XContentBuilder topMapping​(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,​java.io.IOException> buildFields) throws java.io.IOException
      Throws:
      java.io.IOException
    • mapping

      protected final org.elasticsearch.common.xcontent.XContentBuilder mapping​(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,​java.io.IOException> buildFields) throws java.io.IOException
      Throws:
      java.io.IOException
    • dynamicMapping

      protected final org.elasticsearch.common.xcontent.XContentBuilder dynamicMapping​(org.elasticsearch.index.mapper.Mapping dynamicMapping) throws java.io.IOException
      Throws:
      java.io.IOException
    • fieldMapping

      protected final org.elasticsearch.common.xcontent.XContentBuilder fieldMapping​(org.elasticsearch.common.CheckedConsumer<org.elasticsearch.common.xcontent.XContentBuilder,​java.io.IOException> buildField) throws java.io.IOException
      Throws:
      java.io.IOException