@Test
  @Parameters(method = "getListOfRegionTestTypes")
  public void dropAndRecreateIndexWithDifferentFieldsShouldFail(RegionTestableType regionTestType)
      throws Exception {
    SerializableRunnableIF createIndex = () -> {
      LuceneService luceneService = LuceneServiceProvider.get(getCache());
      luceneService.createIndexFactory().addField("text").create(INDEX_NAME, REGION_NAME);
    };
    dataStore1.invoke(() -> initDataStore(createIndex, regionTestType));
    dataStore2.invoke(() -> initDataStore(createIndex, regionTestType));
    accessor.invoke(() -> initAccessor(createIndex, regionTestType));

    putDataInRegion(accessor);
    assertTrue(waitForFlushBeforeExecuteTextSearch(accessor, 60000));
    assertTrue(waitForFlushBeforeExecuteTextSearch(dataStore1, 60000));
    executeTextSearch(accessor);

    dataStore1.invoke(this::destroyIndex);

    // re-index stored data
    verifyCreateIndexWithDifferentFieldShouldFail();
  }
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