use of org.opengrok.suggest.query.customized.CustomPhraseQuery in project OpenGrok by OpenGrok.
the class SuggesterPhraseQueryTest method phraseQueryTest.
@Test
public void phraseQueryTest() throws Exception {
SuggesterPhraseQuery q = new SuggesterPhraseQuery("test", "ident", Arrays.asList("one", "two", "tident"), 0);
CustomPhraseQuery query = q.getPhraseQuery();
assertEquals(2, query.getOffset());
Term[] terms = getTerms(query);
assertEquals("one", terms[0].text());
assertEquals("two", terms[1].text());
}
Aggregations