fix #1097 add context

This commit is contained in:
Shinsuke Sugaya 2017-06-09 23:50:13 +09:00
parent e40dc40cbf
commit 6b00e0dc4d

View file

@ -139,9 +139,12 @@ public interface FessTransformer {
final String template) {
Object target = value;
if (template != null) {
final Map<String, Object> paramMap = new HashMap<>(dataMap.size() + 1);
final Map<String, Object> contextMap = new HashMap<>();
contextMap.put("doc", dataMap);
final Map<String, Object> paramMap = new HashMap<>(dataMap.size() + 2);
paramMap.putAll(dataMap);
paramMap.put("value", target);
paramMap.put("context", contextMap);
target = evaluateValue(template, paramMap);
}
if (key != null && target != null) {