@Test
  public void testBug36591() throws Exception {
    QueryService qs;
    qs = CacheUtils.getQueryService();
    Index i1 =
        qs.createIndex("keyIndex", IndexType.FUNCTIONAL, "ks.hashCode",
            SEPARATOR + "portfolios.keys ks");
    Region rgn = CacheUtils.getRegion(SEPARATOR + "portfolios");
    rgn.put("4", new Portfolio(4));
    rgn.put("5", new Portfolio(5));
    CacheUtils.log(((CompactRangeIndex) i1).dump());

    Query qr =
        qs.newQuery("Select distinct * from " + SEPARATOR
            + "portfolios.keys keys where keys.hashCode >= $1");
    SelectResults sr = (SelectResults) qr.execute(new Object[] {-1});
    assertEquals(6, sr.size());
  }
The Index maintenance has a bug as it does not re-evaluate the index maintenance collection in
the IMQEvaluator when an entry gets modified & so the index resultset is messed up
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexCreationJUnitTest.java