Search in sources :

Example 1 with NGramSearcher

use of com.yahoo.search.querytransform.NGramSearcher in project vespa by vespa-engine.

the class NGramSearcherTestCase method setUp.

@Override
public void setUp() {
    searcher = new NGramSearcher(new SimpleLinguistics());
    indexFacts = new IndexFacts();
    Index defaultIndex = new Index("default");
    defaultIndex.setNGram(true, 3);
    defaultIndex.setDynamicSummary(true);
    indexFacts.addIndex("default", defaultIndex);
    Index test = new Index("test");
    test.setHighlightSummary(true);
    indexFacts.addIndex("default", test);
    Index gram2 = new Index("gram2");
    gram2.setNGram(true, 2);
    gram2.setDynamicSummary(true);
    indexFacts.addIndex("default", gram2);
    Index gram3 = new Index("gram3");
    gram3.setNGram(true, 3);
    gram3.setHighlightSummary(true);
    indexFacts.addIndex("default", gram3);
    Index gram14 = new Index("gram14");
    gram14.setNGram(true, 14);
    gram14.setDynamicSummary(true);
    indexFacts.addIndex("default", gram14);
}
Also used : SimpleLinguistics(com.yahoo.language.simple.SimpleLinguistics) IndexFacts(com.yahoo.prelude.IndexFacts) Index(com.yahoo.prelude.Index) NGramSearcher(com.yahoo.search.querytransform.NGramSearcher)

Aggregations

SimpleLinguistics (com.yahoo.language.simple.SimpleLinguistics)1 Index (com.yahoo.prelude.Index)1 IndexFacts (com.yahoo.prelude.IndexFacts)1 NGramSearcher (com.yahoo.search.querytransform.NGramSearcher)1