Search in sources :

Example 6 with AttributesConfig

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);
}
Also used : Execution(com.yahoo.search.searchchain.Execution) QrSearchersConfig(com.yahoo.container.QrSearchersConfig) AttributesConfig(com.yahoo.vespa.config.search.AttributesConfig) ClusterConfig(com.yahoo.search.config.ClusterConfig)

Aggregations

AttributesConfig (com.yahoo.vespa.config.search.AttributesConfig)6 VespaModel (com.yahoo.vespa.model.VespaModel)3 VespaModelCreatorWithMockPkg (com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg)3 IndexschemaConfig (com.yahoo.vespa.config.search.IndexschemaConfig)2 RankProfilesConfig (com.yahoo.vespa.config.search.RankProfilesConfig)2 ProtonConfig (com.yahoo.vespa.config.search.core.ProtonConfig)2 ContentSearchCluster (com.yahoo.vespa.model.content.ContentSearchCluster)2 Test (org.junit.Test)2 AbstractConfigProducer (com.yahoo.config.model.producer.AbstractConfigProducer)1 QrSearchersConfig (com.yahoo.container.QrSearchersConfig)1 DocumentdbInfoConfig (com.yahoo.prelude.fastsearch.DocumentdbInfoConfig)1 ClusterConfig (com.yahoo.search.config.ClusterConfig)1 IndexInfoConfig (com.yahoo.search.config.IndexInfoConfig)1 Execution (com.yahoo.search.searchchain.Execution)1 ImportedFieldsConfig (com.yahoo.vespa.config.search.ImportedFieldsConfig)1 RankingConstantsConfig (com.yahoo.vespa.config.search.core.RankingConstantsConfig)1 IlscriptsConfig (com.yahoo.vespa.configdefinition.IlscriptsConfig)1 IndexedSearchCluster (com.yahoo.vespa.model.search.IndexedSearchCluster)1