blob: 7d1cf85cb36f5329d77740a2f5f6837b467942a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchlib.rankingexpression.evaluation;
import com.yahoo.searchlib.rankingexpression.RankingExpression;
/**
* Superclass of ranking expression optimizers
*
* @author bratseth
*/
public abstract class Optimizer {
private boolean enabled=true;
/** Sets whether this optimizer is enabled. Default true */
public void setEnabled(boolean enabled) { this.enabled=enabled; }
/** Returns whether this is enabled */
public boolean isEnabled() { return enabled; }
public abstract void optimize(RankingExpression expression, ContextIndex context, OptimizationReport report);
}
|