ossis
August 9, 2021, 12:04pm
1
Is it possible to override Fess properties values in crawler Config Parameters,
for example crawler.document.html.content.xpath ?
For crawler.document.html.content.xpath
, you can set it as xpath.default.content
in Config Parameters. Other parameters are here .
ossis
August 10, 2021, 1:26pm
3
Thank you for quick reply.
Actually the setting xpath.default.content
does not work. It has to be field.xpath.default.content
.
The key must start with XPATH_PREFIX, which is “field.xpath.”:
map.put(ConfigName.META, metaConfigMap);
map.put(ConfigName.VALUE, valueConfigMap);
map.put(ConfigName.SCRIPT, scriptConfigMap);
map.put(ConfigName.FIELD, fieldConfigMap);
for (final Map.Entry<String, String> entry : ParameterUtil.parse(configParameters).entrySet()) {
final String key = entry.getKey();
if (key.startsWith(CONFIG_PREFIX)) {
configConfigMap.put(key.substring(CONFIG_PREFIX.length()), entry.getValue());
} else if (key.startsWith(CLIENT_PREFIX)) {
clientConfigMap.put(key.substring(CLIENT_PREFIX.length()), entry.getValue());
} else if (key.startsWith(XPATH_PREFIX)) {
xpathConfigMap.put(key.substring(XPATH_PREFIX.length()), entry.getValue());
} else if (key.startsWith(META_PREFIX)) {
metaConfigMap.put(key.substring(META_PREFIX.length()), entry.getValue());
} else if (key.startsWith(VALUE_PREFIX)) {
valueConfigMap.put(key.substring(VALUE_PREFIX.length()), entry.getValue());
} else if (key.startsWith(SCRIPT_PREFIX)) {
scriptConfigMap.put(key.substring(SCRIPT_PREFIX.length()), entry.getValue());
} else if (key.startsWith(FIELD_PREFIX)) {
fieldConfigMap.put(key.substring(FIELD_PREFIX.length()), entry.getValue());
}
Java 11 is now required for the Fess. Is it possible to update remote debug parameters?
this.timeout = timeout;
return this;
}
public ExecJob useLocalFesen(final boolean useLocalFesen) {
this.useLocalFesen = useLocalFesen;
return this;
}
public ExecJob remoteDebug() {
return jvmOptions("-Xdebug", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=localhost:8000");
}
public ExecJob gcLogging() {
final StringBuilder buf = new StringBuilder(100);
buf.append("-Xlog:gc*,gc+age=trace,safepoint:file=");
if (logFilePath != null) {
buf.append(logFilePath);
} else {
buf.append(ComponentUtil.getSystemHelper().getLogFilePath());
}
field.xpath.default.content is correct.
To update debug parameters, please use jvmOptions.