This is an automated email from the ASF dual-hosted git repository.
snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new ac03cf164 NUTCH-3063 Support for "addBinaryContent" from REST API
ac03cf164 is described below
commit ac03cf1646f5af152daeb9f0bef3fec2b51739c2
Author: Sebastian Nagel <[email protected]>
AuthorDate: Fri Sep 6 21:59:51 2024 +0200
NUTCH-3063 Support for "addBinaryContent" from REST API
Apply patch contributed by Isabelle Giguere.
---
src/java/org/apache/nutch/indexer/IndexingJob.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/nutch/indexer/IndexingJob.java
b/src/java/org/apache/nutch/indexer/IndexingJob.java
index c3ddb4ae9..fc2c44a06 100644
--- a/src/java/org/apache/nutch/indexer/IndexingJob.java
+++ b/src/java/org/apache/nutch/indexer/IndexingJob.java
@@ -312,6 +312,8 @@ public class IndexingJob extends NutchTool implements Tool {
boolean filter = false;
boolean normalize = false;
boolean isSegment = false;
+ boolean addBinaryContent = false;
+ boolean base64 = false;
String params= null;
Configuration conf = getConf();
@@ -405,12 +407,18 @@ public class IndexingJob extends NutchTool implements
Tool {
if(args.containsKey("filter")){
filter = true;
}
+ if (args.containsKey("addBinaryContent")) {
+ addBinaryContent = true;
+ if (args.containsKey("base64")) {
+ base64 = true;
+ }
+ }
if(args.containsKey("params")){
params = (String)args.get("params");
}
setConf(conf);
index(crawlDb, linkdb, segments, noCommit, deleteGone, params, filter,
- normalize);
+ normalize, addBinaryContent, base64);
Map<String, Object> results = new HashMap<>();
results.put(Nutch.VAL_RESULT, 0);
return results;