@Test
  @Parameters(method = "getListOfRegionTestTypes")
  public void recreateDifferentIndexesWithDifferentFieldsShouldPass(
      RegionTestableType regionTestType) throws Exception {

    dataStore1.invoke(() -> {
      regionTestType.createDataStore(getCache(), REGION_NAME);
    });
    dataStore2.invoke(() -> {
      regionTestType.createDataStore(getCache(), REGION_NAME);
    });
    accessor.invoke(() -> {
      regionTestType.createAccessor(getCache(), REGION_NAME);
    });

    putDataInRegion(accessor);

    // re-index stored data
    AsyncInvocation<Void> ai1 = dataStore1.invokeAsync(() -> {
      createIndex("text");
    });

    AsyncInvocation<Void> ai2 = dataStore2.invokeAsync(() -> {
      createIndex(INDEX_NAME + "2", "text2");
    });

    AsyncInvocation<Void> ai3 = dataStore1.invokeAsync(() -> {
      createIndex(INDEX_NAME + "2", "text2");
    });

    AsyncInvocation<Void> ai4 = dataStore2.invokeAsync(() -> {
      createIndex("text");
    });

    AsyncInvocation<Void> ai5 = accessor.invokeAsync(() -> {
      if (getCache().getRegion(REGION_NAME) instanceof PartitionedRegion) {
        createIndex(INDEX_NAME + "1", "text");
      }
    });

    AsyncInvocation<Void> ai6 = accessor.invokeAsync(() -> {
      if (getCache().getRegion(REGION_NAME) instanceof PartitionedRegion) {
        createIndex(INDEX_NAME + "2", "text2");
      }
    });

    ai1.join();
    ai2.join();
    ai3.join();
    ai4.join();
    ai5.join();
    ai6.join();

    ai1.checkException();
    ai2.checkException();
    ai3.checkException();
    ai4.checkException();
    ai5.checkException();
    ai6.checkException();

    waitForFlushBeforeExecuteTextSearch(accessor, 60000);
    executeTextSearch(accessor);
  }
This test class is intended to contain basic integration tests of the lucene query class that
should be executed against a number of different regions types and topologies.
geode-lucene/src/distributedTest/java/org/apache/geode/cache/lucene/LuceneQueriesReindexDUnitTest.java