Search in sources :

Example 1 with TypeContext

use of com.yahoo.tensor.evaluation.TypeContext in project vespa by vespa-engine.

the class RankingExpressionTypeValidator method validate.

/**
 * Throws an IllegalArgumentException if the given rank profile does not produce valid type
 */
private void validate(RankProfile profile) {
    profile.parseExpressions();
    TypeContext context = profile.typeContext(queryProfiles);
    profile.getSummaryFeatures().forEach(f -> ensureValid(f, "summary feature " + f, context));
    ensureValidDouble(profile.getFirstPhaseRanking(), "first-phase expression", context);
    ensureValidDouble(profile.getSecondPhaseRanking(), "second-phase expression", context);
}
Also used : TypeContext(com.yahoo.tensor.evaluation.TypeContext)

Aggregations

TypeContext (com.yahoo.tensor.evaluation.TypeContext)1