Search in sources :

Example 6 with QueryProfileTypeRegistry

use of com.yahoo.search.query.profile.types.QueryProfileTypeRegistry in project vespa by vespa-engine.

the class OverrideTestCase method setUp.

@Override
protected void setUp() {
    type = new QueryProfileType(new ComponentId("testtype"));
    user = new QueryProfileType(new ComponentId("user"));
    registry = new QueryProfileTypeRegistry();
    registry.register(type);
    registry.register(user);
    addTypeFields(type);
    addUserFields(user);
}
Also used : QueryProfileTypeRegistry(com.yahoo.search.query.profile.types.QueryProfileTypeRegistry) QueryProfileType(com.yahoo.search.query.profile.types.QueryProfileType) ComponentId(com.yahoo.component.ComponentId)

Example 7 with QueryProfileTypeRegistry

use of com.yahoo.search.query.profile.types.QueryProfileTypeRegistry in project vespa by vespa-engine.

the class QueryProfileTypeInheritanceTestCase method setUp.

@Override
protected void setUp() {
    type = new QueryProfileType(new ComponentId("testtype"));
    typeStrict = new QueryProfileType(new ComponentId("testtypeStrict"));
    typeStrict.setStrict(true);
    user = new QueryProfileType(new ComponentId("user"));
    userStrict = new QueryProfileType(new ComponentId("userStrict"));
    userStrict.setStrict(true);
    registry = new QueryProfileTypeRegistry();
    registry.register(type);
    registry.register(typeStrict);
    registry.register(user);
    registry.register(userStrict);
    addTypeFields(type);
    type.addField(new FieldDescription("myUserQueryProfile", FieldType.fromString("query-profile:user", registry)));
    addTypeFields(typeStrict);
    typeStrict.addField(new FieldDescription("myUserQueryProfile", FieldType.fromString("query-profile:userStrict", registry)));
    addUserFields(user);
    addUserFields(userStrict);
}
Also used : QueryProfileTypeRegistry(com.yahoo.search.query.profile.types.QueryProfileTypeRegistry) QueryProfileType(com.yahoo.search.query.profile.types.QueryProfileType) ComponentId(com.yahoo.component.ComponentId) FieldDescription(com.yahoo.search.query.profile.types.FieldDescription)

Aggregations

QueryProfileType (com.yahoo.search.query.profile.types.QueryProfileType)7 QueryProfileTypeRegistry (com.yahoo.search.query.profile.types.QueryProfileTypeRegistry)7 FieldDescription (com.yahoo.search.query.profile.types.FieldDescription)5 ComponentId (com.yahoo.component.ComponentId)4 QueryProfileRegistry (com.yahoo.search.query.profile.QueryProfileRegistry)4 QueryProfile (com.yahoo.search.query.profile.QueryProfile)1 CompiledQueryProfileRegistry (com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry)1 QueryProfileConfigurer (com.yahoo.search.query.profile.config.QueryProfileConfigurer)1 Test (org.junit.Test)1