Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

scope variables

Nicola Marcacci Rossif72e86992ffb
diff --git a/conf/nutch-default.xml b/conf/nutch-default.xml
index ff3d39ca7..dcf938bce 100644
--- a/conf/nutch-default.xml
+++ b/conf/nutch-default.xml
@@ -2092,30 +2092,30 @@ visit https://wiki.apache.org/nutch/SimilarityScoringFilter-->
</property>
<property>
- <name>elastic.rest.languages</name>
+ <name>elastic.rest.index.languages</name>
<value></value>
<description>
A list of strings denoting the supported languages (e.g. `en,de,fr,it`).
If this value is empty all documents will be sent to index ${elastic.rest.index}.
If not empty the Rest client will distribute documents in different indices based on their `lang` property.
- Indices are named with the following schema: ${elastic.rest.index}${elastic.rest.separator}${lang} (e.g. `nutch_de`).
- Entries with an unsupported `lang` value will be added to index ${elastic.rest.index}${elastic.rest.separator}${elastic.rest.sink} (e.g. `nutch_others`).
+ Indices are named with the following schema: ${elastic.rest.index}${elastic.rest.index.separator}${lang} (e.g. `nutch_de`).
+ Entries with an unsupported `lang` value will be added to index ${elastic.rest.index}${elastic.rest.index.separator}${elastic.rest.index.sink} (e.g. `nutch_others`).
</description>
</property>
<property>
- <name>elastic.rest.separator</name>
+ <name>elastic.rest.index.separator</name>
<value>_</value>
<description>
- Default value is `_`. Is used only if `elastic.rest.languages` is defined to build the index name (i.e. ${elastic.rest.index}${elastic.rest.separator}${lang}).
+ Default value is `_`. Is used only if `elastic.rest.index.languages` is defined to build the index name (i.e. ${elastic.rest.index}${elastic.rest.index.separator}${lang}).
</description>
</property>
<property>
- <name>elastic.rest.sink</name>
+ <name>elastic.rest.index.sink</name>
<value>others</value>
<description>
- Default value is `others`. Is used only if `elastic.rest.languages` is defined to build the index name where to store documents with unsupported languages (i.e. ${elastic.rest.index}${elastic.rest.separator}${elastic.rest.sink}).
+ Default value is `others`. Is used only if `elastic.rest.index.languages` is defined to build the index name where to store documents with unsupported languages (i.e. ${elastic.rest.index}${elastic.rest.index.separator}${elastic.rest.index.sink}).
</description>
</property>
diff --git a/src/plugin/indexer-elastic-rest/src/java/org/apache/nutch/indexwriter/elasticrest/ElasticRestConstants.java b/src/plugin/indexer-elastic-rest/src/java/org/apache/nutch/indexwriter/elasticrest/ElasticRestConstants.java
index c0f5fe79c..b36f0271c 100644
--- a/src/plugin/indexer-elastic-rest/src/java/org/apache/nutch/indexwriter/elasticrest/ElasticRestConstants.java
+++ b/src/plugin/indexer-elastic-rest/src/java/org/apache/nutch/indexwriter/elasticrest/ElasticRestConstants.java
@@ -31,7 +31,7 @@ public interface ElasticRestConstants {
public static final String HTTPS = ELASTIC_PREFIX + "https";
public static final String HOSTNAME_TRUST = ELASTIC_PREFIX + "trustallhostnames";
- public static final String LANGUAGES = ELASTIC_PREFIX + "languages";
- public static final String SEPARATOR = ELASTIC_PREFIX + "separator";
- public static final String SINK = ELASTIC_PREFIX + "sink";
+ public static final String LANGUAGES = INDEX + ".languages";
+ public static final String SEPARATOR = INDEX + ".separator";
+ public static final String SINK = INDEX + ".sink";
}