@Test
    void testRaw() {
        // Default: Not raw, for comparison
        Item root = parse("select foo from bar where baz contains (\"yoni jo dima\")").getRoot();
        assertEquals("baz:'yoni jo dima'", root.toString());
        assertFalse(root instanceof WordItem);
        assertTrue(root instanceof PhraseSegmentItem);

        root = parse("select foo from bar where baz contains ({grammar:\"raw\"}\"yoni jo dima\")").getRoot();
        assertEquals("baz:yoni jo dima", root.toString());
        assertTrue(root instanceof WordItem);
        assertFalse(root instanceof ExactStringItem);
        assertEquals("yoni jo dima", ((WordItem) root).getWord());

        root = parse("select foo from bar where {grammar:\"all\"}userInput(\"yoni jo dima\")").getRoot();
        assertTrue(root instanceof AndItem);
        AndItem andItem = (AndItem) root;
        assertEquals(3, andItem.getItemCount());

        root = parse("select foo from bar where {grammar:\"raw\"}userInput(\"yoni jo dima\")").getRoot();
        assertTrue(root instanceof WordItem);
        assertTrue(root instanceof ExactStringItem);
        assertEquals("yoni jo dima", ((WordItem) root).getWord());
    }
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