fix replace with linkedhashmap
@@ -98,7 +98,7 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
public boolean prunedContent = true;
- public Map<String, String> convertUrlMap = new HashMap<>();
+ protected Map<String, String> convertUrlMap = new LinkedHashMap<>();
protected FessConfig fessConfig;
@@ -924,4 +924,12 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
addFieldRule(name, xpath);
fieldPrunedRuleMap.put(name, isPruned);
}
+
+ public void setConvertUrlMap(final Map<String, String> convertUrlMap) {
+ this.convertUrlMap.putAll(convertUrlMap);
+ }
+
+ public void addConvertUrl(final String regex,final String replacement) {
+ this.convertUrlMap.put(regex,replacement);
+ }
}
