private void helpTestHashIndexRecreate() throws Exception {
    index = qs.createHashIndex("idHash", "p.ID", SEPARATOR + "portfolios p");
    createData(region, 200);

    SelectResults noIndexResults =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 1")
            .execute();

    IndexStatistics ist = index.getStatistics();
    assertEquals(200, ist.getNumberOfValues());
    assertEquals(200, ist.getNumUpdates());
    assertEquals(1, ist.getTotalUses());

    region.clear();

    ist = index.getStatistics();
    assertEquals(0, ist.getNumberOfValues());
    assertEquals(1, ist.getTotalUses());
    assertEquals(400, ist.getNumUpdates());

    createData(region, 200);

    SelectResults results =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 1")
            .execute();

    ist = index.getStatistics();
    assertEquals(200, ist.getNumberOfValues());
    assertEquals(2, ist.getTotalUses());
    assertEquals(600, ist.getNumUpdates());

    assertEquals(noIndexResults.size(), results.size());
    assertTrue(observer.indexUsed);
  }
test remove and not equals Query
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java