Search in sources :

Example 1 with QueryRescorerBuilder

use of org.opensearch.search.rescore.QueryRescorerBuilder in project fess by codelibs.

the class LtrQueryRescorer method evaluate.

@Override
public RescorerBuilder<?> evaluate(final Map<String, Object> params) {
    final FessConfig fessConfig = ComponentUtil.getFessConfig();
    final String modelName = fessConfig.getLtrModelName();
    if (StringUtil.isBlank(modelName)) {
        return null;
    }
    return new QueryRescorerBuilder(new StoredLtrQueryBuilder().modelName(modelName).params(params)).windowSize(fessConfig.getLtrWindowSize());
}
Also used : QueryRescorerBuilder(org.opensearch.search.rescore.QueryRescorerBuilder) FessConfig(org.codelibs.fess.mylasta.direction.FessConfig) StoredLtrQueryBuilder(org.codelibs.fess.es.query.StoredLtrQueryBuilder)

Aggregations

StoredLtrQueryBuilder (org.codelibs.fess.es.query.StoredLtrQueryBuilder)1 FessConfig (org.codelibs.fess.mylasta.direction.FessConfig)1 QueryRescorerBuilder (org.opensearch.search.rescore.QueryRescorerBuilder)1