use of com.yahoo.prelude.querytransform.CollapsePhraseSearcher in project vespa by vespa-engine.
the class CollapsePhraseSearcherTestCase method transformQuery.
private String transformQuery(String rawQuery) {
CollapsePhraseSearcher searcher = new CollapsePhraseSearcher();
Query query = new Query(rawQuery);
new Execution(searcher, Execution.Context.createContextStub()).search(query);
Item newRoot = query.getModel().getQueryTree().getRoot();
if (newRoot != null)
return newRoot.toString();
else
return null;
}
use of com.yahoo.prelude.querytransform.CollapsePhraseSearcher in project vespa by vespa-engine.
the class CollapsePhraseSearcherTestCase method transformQuery.
private String transformQuery(Item queryTree) {
CollapsePhraseSearcher searcher = new CollapsePhraseSearcher();
Query query = new Query();
query.getModel().getQueryTree().setRoot(queryTree);
new Execution(searcher, Execution.Context.createContextStub()).search(query);
Item newRoot = query.getModel().getQueryTree().getRoot();
if (newRoot != null)
return newRoot.toString();
else
return null;
}
Aggregations