@Test
    void testRangeSearchHitPopulationOrdering() {
        assertParse("select * from sources * where {hitLimit: 38, ascending: true}range(foo, 0, 1)",
                "foo:[0;1;38]");
        assertParse("select * from sources * where {hitLimit: 38, ascending: false}range(foo, 0, 1)",
                "foo:[0;1;-38]");
        assertParse("select * from sources * where {hitLimit: 38, descending: true}range(foo, 0, 1)",
                "foo:[0;1;-38]");
        assertParse("select * from sources * where {hitLimit: 38, descending: false}range(foo, 0, 1)",
                "foo:[0;1;38]");

        boolean gotExceptionFromParse = false;
        try {
            parse("select * from sources * where {hitLimit: 38, ascending: true, descending: false}range(foo, 0, 1)");
        } catch (IllegalArgumentException e) {
            assertTrue(e.getMessage().contains("both ascending and descending ordering set"),
                    "Expected information about abuse of settings.");
            gotExceptionFromParse = true;
        }
        assertTrue(gotExceptionFromParse);
    }
Specification for the conversion of YQL+ expressions to Vespa search queries.

@author Steinar Knutsen
@author Stian Kristoffersen
container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java