use of com.yahoo.vespa.config.search.AttributesConfig in project vespa by vespa-engine.
the class GroupingValidatorTestCase method validateGrouping.
private static void validateGrouping(String clusterName, Collection<String> attributeNames, Query query) {
QrSearchersConfig.Builder qrsConfig = new QrSearchersConfig.Builder().searchcluster(new QrSearchersConfig.Searchcluster.Builder().indexingmode(QrSearchersConfig.Searchcluster.Indexingmode.Enum.REALTIME).name(clusterName));
ClusterConfig.Builder clusterConfig = new ClusterConfig.Builder().clusterId(0).clusterName("test");
AttributesConfig.Builder attributesConfig = new AttributesConfig.Builder();
for (String attributeName : attributeNames) {
attributesConfig.attribute(new AttributesConfig.Attribute.Builder().name(attributeName));
}
new Execution(new GroupingValidator(new QrSearchersConfig(qrsConfig), new ClusterConfig(clusterConfig), new AttributesConfig(attributesConfig)), Execution.Context.createContextStub()).search(query);
}
Aggregations