blob: 7fcd2ed357a84c54a3269f9302ed0ae03c88fe98 (
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
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.expressiontransforms;
import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchlib.rankingexpression.evaluation.Value;
import com.yahoo.searchlib.rankingexpression.transform.TransformContext;
import java.util.Map;
/**
* Extends the transform context with rank profile information
*
* @author bratseth
*/
public class RankProfileTransformContext extends TransformContext {
private final RankProfile rankProfile;
private final Map<String, RankProfile.Macro> inlineMacros;
private final Map<String, String> rankPropertiesOutput;
public RankProfileTransformContext(RankProfile rankProfile,
Map<String, Value> constants,
Map<String, RankProfile.Macro> inlineMacros,
Map<String, String> rankPropertiesOutput) {
super(constants);
this.rankProfile = rankProfile;
this.inlineMacros = inlineMacros;
this.rankPropertiesOutput = rankPropertiesOutput;
}
public RankProfile rankProfile() { return rankProfile; }
public Map<String, RankProfile.Macro> inlineMacros() { return inlineMacros; }
public Map<String, String> rankPropertiesOutput() { return rankPropertiesOutput; }
}
|