Class AbstractRerankerIT

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.ESIntegTestCase
org.elasticsearch.search.rank.rerank.AbstractRerankerIT

public abstract class AbstractRerankerIT extends ESIntegTestCase
this base class acts as a wrapper for testing different rerankers, and their behavior when exceptions are thrown the main idea is that we: - index some documents, with a rank feature field and a search field - have a random initial scoring - rerank the results based on the rank feature field (converting String -> Float) - assert that the results are correctly reranked and that we properly close all resources
  • Constructor Details

    • AbstractRerankerIT

      public AbstractRerankerIT()
  • Method Details

    • getRankBuilder

      protected abstract RankBuilder getRankBuilder(int rankWindowSize, String rankFeatureField)
    • getThrowingRankBuilder

      protected abstract RankBuilder getThrowingRankBuilder(int rankWindowSize, String rankFeatureField, AbstractRerankerIT.ThrowingRankBuilderType type)
    • pluginsNeeded

      protected abstract Collection<Class<? extends Plugin>> pluginsNeeded()
    • shouldCheckScores

      protected boolean shouldCheckScores()
    • nodePlugins

      protected Collection<Class<? extends Plugin>> nodePlugins()
      Description copied from class: ESIntegTestCase
      Returns a collection of plugins that should be loaded on each node.
      Overrides:
      nodePlugins in class ESIntegTestCase
    • testRerankerNoExceptions

      public void testRerankerNoExceptions() throws Exception
      Throws:
      Exception
    • testRerankerPagination

      public void testRerankerPagination() throws Exception
      Throws:
      Exception
    • testRerankerPaginationOutsideOfBounds

      public void testRerankerPaginationOutsideOfBounds() throws Exception
      Throws:
      Exception
    • testNotAllShardsArePresentInFetchPhase

      public void testNotAllShardsArePresentInFetchPhase() throws Exception
      Throws:
      Exception
    • testRerankerNoMatchingDocs

      public void testRerankerNoMatchingDocs() throws Exception
      Throws:
      Exception
    • testQueryPhaseShardThrowingAllShardsFail

      public void testQueryPhaseShardThrowingAllShardsFail() throws Exception
      Throws:
      Exception
    • testQueryPhaseCoordinatorThrowingAllShardsFail

      public void testQueryPhaseCoordinatorThrowingAllShardsFail() throws Exception
      Throws:
      Exception
    • testRankFeaturePhaseShardThrowingPartialFailures

      public void testRankFeaturePhaseShardThrowingPartialFailures() throws Exception
      Throws:
      Exception
    • testRankFeaturePhaseShardThrowingAllShardsFail

      public void testRankFeaturePhaseShardThrowingAllShardsFail() throws Exception
      Throws:
      Exception
    • testRankFeaturePhaseCoordinatorThrowingAllShardsFail

      public void testRankFeaturePhaseCoordinatorThrowingAllShardsFail() throws Exception
      Throws:
      Exception
    • assertNoOpenContext

      protected void assertNoOpenContext(String indexName) throws Exception
      Throws:
      Exception