static int getQueryFlags(Query query) {
        int flags = 0;

        flags |= query.properties().getBoolean(Model.ESTIMATE) ? 0x00000080 : 0;
        flags |= (query.getRanking().getFreshness() != null) ? 0x00002000 : 0;
        flags |= 0x00008000;
        flags |= query.getNoCache() ? 0x00010000 : 0;
        flags |= 0x00020000;                         // was PARALLEL
        flags |= query.properties().getBoolean(Ranking.RANKFEATURES,false) ? 0x00040000 : 0;

        return flags;
    }
@Test
    void testGetQueryFlags() {
        assertEquals(0x00028000, StreamingVisitor.getQueryFlags(new Query("/?query=test")));
        assertEquals(0x00028080, StreamingVisitor.getQueryFlags(new Query("/?query=test&hitcountestimate=true")));
        assertEquals(0x00068000, StreamingVisitor.getQueryFlags(new Query("/?query=test&rankfeatures=true")));
        assertEquals(0x00068080, StreamingVisitor.getQueryFlags(new Query("/?query=test&hitcountestimate=true&rankfeatures=true")));

        Query query = new Query("/?query=test");
        assertEquals(0x00028000, StreamingVisitor.getQueryFlags(query));
        query.setNoCache(true);
        assertEquals(0x00038000, StreamingVisitor.getQueryFlags(query));
        query.getRanking().setFreshness("now");
        assertEquals(0x0003a000, StreamingVisitor.getQueryFlags(query));
    }