Class AbstractBuilderTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.AbstractBuilderTestCase
Direct Known Subclasses:
AbstractQueryTestCase, BaseAggregationTestCase

public abstract class AbstractBuilderTestCase
extends ESTestCase
  • Field Details

    • TEXT_FIELD_NAME

      public static final java.lang.String TEXT_FIELD_NAME
      See Also:
      Constant Field Values
    • TEXT_ALIAS_FIELD_NAME

      public static final java.lang.String TEXT_ALIAS_FIELD_NAME
      See Also:
      Constant Field Values
    • KEYWORD_FIELD_NAME

      protected static final java.lang.String KEYWORD_FIELD_NAME
      See Also:
      Constant Field Values
    • INT_FIELD_NAME

      protected static final java.lang.String INT_FIELD_NAME
      See Also:
      Constant Field Values
    • INT_ALIAS_FIELD_NAME

      protected static final java.lang.String INT_ALIAS_FIELD_NAME
      See Also:
      Constant Field Values
    • INT_RANGE_FIELD_NAME

      protected static final java.lang.String INT_RANGE_FIELD_NAME
      See Also:
      Constant Field Values
    • DOUBLE_FIELD_NAME

      protected static final java.lang.String DOUBLE_FIELD_NAME
      See Also:
      Constant Field Values
    • BOOLEAN_FIELD_NAME

      protected static final java.lang.String BOOLEAN_FIELD_NAME
      See Also:
      Constant Field Values
    • DATE_NANOS_FIELD_NAME

      protected static final java.lang.String DATE_NANOS_FIELD_NAME
      See Also:
      Constant Field Values
    • DATE_FIELD_NAME

      protected static final java.lang.String DATE_FIELD_NAME
      See Also:
      Constant Field Values
    • DATE_ALIAS_FIELD_NAME

      protected static final java.lang.String DATE_ALIAS_FIELD_NAME
      See Also:
      Constant Field Values
    • DATE_RANGE_FIELD_NAME

      protected static final java.lang.String DATE_RANGE_FIELD_NAME
      See Also:
      Constant Field Values
    • OBJECT_FIELD_NAME

      protected static final java.lang.String OBJECT_FIELD_NAME
      See Also:
      Constant Field Values
    • GEO_POINT_FIELD_NAME

      protected static final java.lang.String GEO_POINT_FIELD_NAME
      See Also:
      Constant Field Values
    • GEO_POINT_ALIAS_FIELD_NAME

      protected static final java.lang.String GEO_POINT_ALIAS_FIELD_NAME
      See Also:
      Constant Field Values
    • GEO_SHAPE_FIELD_NAME

      protected static final java.lang.String GEO_SHAPE_FIELD_NAME
      See Also:
      Constant Field Values
    • BINARY_FIELD_NAME

      protected static final java.lang.String BINARY_FIELD_NAME
      See Also:
      Constant Field Values
    • MAPPED_FIELD_NAMES

      protected static final java.lang.String[] MAPPED_FIELD_NAMES
    • MAPPED_LEAF_FIELD_NAMES

      protected static final java.lang.String[] MAPPED_LEAF_FIELD_NAMES
  • Constructor Details

    • AbstractBuilderTestCase

      public AbstractBuilderTestCase()
  • Method Details

    • getIndex

      protected static org.elasticsearch.index.Index getIndex()
    • getPlugins

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

      protected void initializeAdditionalMappings​(org.elasticsearch.index.mapper.MapperService mapperService) throws java.io.IOException
      Throws:
      java.io.IOException
    • beforeClass

      public static void beforeClass()
    • xContentRegistry

      protected org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry()
      Description copied from class: ESTestCase
      The NamedXContentRegistry to use for this test. Subclasses should override and use liberally.
      Overrides:
      xContentRegistry in class ESTestCase
    • namedWriteableRegistry

      protected org.elasticsearch.common.io.stream.NamedWriteableRegistry namedWriteableRegistry()
    • createUniqueRandomName

      protected static java.lang.String createUniqueRandomName()
      make sure query names are unique by suffixing them with increasing counter
    • createTestIndexSettings

      protected org.elasticsearch.common.settings.Settings createTestIndexSettings()
    • indexSettings

      protected static org.elasticsearch.index.IndexSettings indexSettings()
    • expectedFieldName

      protected static java.lang.String expectedFieldName​(java.lang.String builderFieldName)
    • afterClass

      public static void afterClass() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • beforeTest

      public void beforeTest() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • afterTest

      public void afterTest()
    • executeGet

      protected org.elasticsearch.action.get.GetResponse executeGet​(org.elasticsearch.action.get.GetRequest getRequest)
      Override this to handle Client.get(GetRequest) calls from parsers / builders
    • executeMultiTermVectors

      protected org.elasticsearch.action.termvectors.MultiTermVectorsResponse executeMultiTermVectors​(org.elasticsearch.action.termvectors.MultiTermVectorsRequest mtvRequest)
      Override this to handle Client.get(GetRequest) calls from parsers / builders
    • createSearchExecutionContext

      protected static org.elasticsearch.index.query.SearchExecutionContext createSearchExecutionContext​(org.apache.lucene.search.IndexSearcher searcher)
      Returns:
      a new SearchExecutionContext with the provided searcher
    • createShardContextWithNoType

      protected static org.elasticsearch.index.query.SearchExecutionContext createShardContextWithNoType()
      Returns:
      a new SearchExecutionContext based on an index with no type registered
    • createSearchExecutionContext

      protected static org.elasticsearch.index.query.SearchExecutionContext createSearchExecutionContext()
      Returns:
      a new SearchExecutionContext based on the base test index and queryParserService
    • getMapperService

      protected static org.elasticsearch.index.mapper.MapperService getMapperService()