You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by fe...@apache.org on 2012/07/09 13:35:04 UTC
svn commit: r1359073 - in /nutch/trunk: CHANGES.txt conf/nutch-default.xml
src/java/org/apache/nutch/indexer/solr/SolrConstants.java
src/java/org/apache/nutch/indexer/solr/SolrIndexer.java
Author: ferdy
Date: Mon Jul 9 11:35:03 2012
New Revision: 1359073
URL: http://svn.apache.org/viewvc?rev=1359073&view=rev
Log:
NUTCH-1306 Add option to not commit and clarify existing solr.commit.size
Modified:
nutch/trunk/CHANGES.txt
nutch/trunk/conf/nutch-default.xml
nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrIndexer.java
Modified: nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1359073&r1=1359072&r2=1359073&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Mon Jul 9 11:35:03 2012
@@ -1,6 +1,7 @@
Nutch Change Log
(trunk) Current Development:
+* NUTCH-1306 Add option to not commit and clarify existing solr.commit.size (ferdy)
* NUTCH-1405 Allow to overwrite CrawlDatum's with injected entries (markus)
Modified: nutch/trunk/conf/nutch-default.xml
URL: http://svn.apache.org/viewvc/nutch/trunk/conf/nutch-default.xml?rev=1359073&r1=1359072&r2=1359073&view=diff
==============================================================================
--- nutch/trunk/conf/nutch-default.xml (original)
+++ nutch/trunk/conf/nutch-default.xml Mon Jul 9 11:35:03 2012
@@ -1398,9 +1398,17 @@
<description>
Defines the number of documents to send to Solr in a single update batch.
Decrease when handling very large documents to prevent Nutch from running
- out of memory.
- </description>
-</property>
+ out of memory. NOTE: It does not explicitly trigger a server side commit.
+ </description>
+</property>
+
+<property>
+ <name>solr.commit.index</name>
+ <value>true</value>
+ <description>
+ When closing the indexer, trigger a commit to the Solr server.
+ </description>
+</property>
<property>
<name>solr.auth</name>
Modified: nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrConstants.java?rev=1359073&r1=1359072&r2=1359073&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrConstants.java (original)
+++ nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrConstants.java Mon Jul 9 11:35:03 2012
@@ -23,6 +23,8 @@ public interface SolrConstants {
public static final String COMMIT_SIZE = SOLR_PREFIX + "commit.size";
+ public static final String COMMIT_INDEX = SOLR_PREFIX + "commit.index";
+
public static final String MAPPING_FILE = SOLR_PREFIX + "mapping.file";
public static final String USE_AUTH = SOLR_PREFIX + "auth";
Modified: nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrIndexer.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrIndexer.java?rev=1359073&r1=1359072&r2=1359073&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrIndexer.java (original)
+++ nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrIndexer.java Mon Jul 9 11:35:03 2012
@@ -57,7 +57,8 @@ public class SolrIndexer extends Configu
public void indexSolr(String solrUrl, Path crawlDb, Path linkDb,
List<Path> segments) throws IOException {
- indexSolr(solrUrl, crawlDb, linkDb, segments, false, false, null);
+ boolean noCommit = !getConf().getBoolean(SolrConstants.COMMIT_INDEX, true);
+ indexSolr(solrUrl, crawlDb, linkDb, segments, noCommit, false, null);
}
public void indexSolr(String solrUrl, Path crawlDb, Path linkDb,