@Test
  public void testJoinQueryPRWithMultipleIndexes() {

    server1.invoke(new CacheSerializableRunnable("Test query with indexes") {

      @Override
      public void run2() throws CacheException {
        Set filter = getFilter(0, 1);
        function = new TestQueryFunction("queryFunction-2");
        Object[][] r = new Object[2][2];
        QueryUsingFunctionContextDUnitTest test = new QueryUsingFunctionContextDUnitTest();
        int j = 0;
        for (int i = 3; i < 5; i++) {
          ArrayList queryResults2 =
              test.runQueryOnClientUsingFunc(function, PartitionedRegionName1, filter, queries[i]);
          if (queryResults2 == null) {
            fail(queries[i] + "result is null from client function");
          }
          r[j++][1] = queryResults2;
        }
        createIndex();
        j = 0;
        for (int i = 3; i < 5; i++) {
          ArrayList queryResults1 =
              test.runQueryOnClientUsingFunc(function, PartitionedRegionName1, filter, queries[i]);
          if (queryResults1 == null) {
            fail(queries[i] + "result is null from client function");
          }
          r[j++][0] = queryResults1;
        }

        StructSetOrResultsSet ssORrs = new StructSetOrResultsSet();
        ssORrs.CompareQueryResultsAsListWithoutAndWithIndexes(r, 2, false, queries);

      }
    });
  }
Test on PR on one server only using filter.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java