@Test
    void testWordAlternativesInPhrase() {
        QueryTree q = parse("select * from sources * where" +
                " foo contains phrase(\"forest\", alternatives({trees: 1.0, tree: 0.7}))");
        Item root = q.getRoot();
        assertSame(PhraseItem.class, root.getClass());
        PhraseItem phrase = (PhraseItem) root;
        assertEquals(2, phrase.getItemCount());
        assertEquals("forest", ((WordItem) phrase.getItem(0)).getWord());
        checkWordAlternativesContent((WordAlternativesItem) phrase.getItem(1));
        assertEquals("foo:\"forest WORD_ALTERNATIVES foo:[ tree(0.7) trees(1.0) ]\"", root.toString());
    }
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