Author: talat
Date: Fri May 2 09:57:18 2014
New Revision: 1591849
URL: http://svn.apache.org/r1591849
Log:
NUTCH-1728 indexer-solr plugin is not delete docs from Solr (ilhamikalkan via
talat)
Modified:
nutch/branches/2.x/CHANGES.txt
nutch/branches/2.x/src/plugin/indexer-solr/src/java/org/apache/nutch/indexwriter/solr/SolrIndexWriter.java
Modified: nutch/branches/2.x/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/CHANGES.txt?rev=1591849&r1=1591848&r2=1591849&view=diff
==============================================================================
--- nutch/branches/2.x/CHANGES.txt (original)
+++ nutch/branches/2.x/CHANGES.txt Fri May 2 09:57:18 2014
@@ -2,6 +2,8 @@ Nutch Change Log
Current Development
+* NUTCH-1728 indexer-solr plugin is not delete docs from Solr (ilhamikalkan
via talat)
+
* NUTCH-1753 Eclipse dependecy problem for 2.x (talat)
* NUTCH-1720 Duplicate lines in HttpBase.java (Walter Tietze via jnioche)
Modified:
nutch/branches/2.x/src/plugin/indexer-solr/src/java/org/apache/nutch/indexwriter/solr/SolrIndexWriter.java
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/src/plugin/indexer-solr/src/java/org/apache/nutch/indexwriter/solr/SolrIndexWriter.java?rev=1591849&r1=1591848&r2=1591849&view=diff
==============================================================================
---
nutch/branches/2.x/src/plugin/indexer-solr/src/java/org/apache/nutch/indexwriter/solr/SolrIndexWriter.java
(original)
+++
nutch/branches/2.x/src/plugin/indexer-solr/src/java/org/apache/nutch/indexwriter/solr/SolrIndexWriter.java
Fri May 2 09:57:18 2014
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.conf.Configuration;
+import org.apache.nutch.indexer.CleaningJob;
import org.apache.nutch.indexer.NutchDocument;
import org.apache.nutch.indexer.IndexWriter;
import org.apache.solr.client.solrj.SolrServer;
@@ -112,6 +113,7 @@ public class SolrIndexWriter implements
public void setConf(Configuration conf) {
config = conf;
String serverURL = conf.get(SolrConstants.SERVER_URL);
+ delete = config.getBoolean(CleaningJob.ARG_COMMIT, false);
if (serverURL == null) {
String message = "Missing SOLR URL. Should be set via -D "
+ SolrConstants.SERVER_URL;