Author: ferdy
Date: Mon Jul 9 11:38:47 2012
New Revision: 1359075
URL: http://svn.apache.org/viewvc?rev=1359075&view=rev
Log:
NUTCH-1306 Add option to not commit and clarify existing solr.commit.size
Modified:
nutch/branches/nutchgora/CHANGES.txt
nutch/branches/nutchgora/conf/nutch-default.xml
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrIndexerJob.java
Modified: nutch/branches/nutchgora/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/branches/nutchgora/CHANGES.txt?rev=1359075&r1=1359074&r2=1359075&view=diff
==============================================================================
--- nutch/branches/nutchgora/CHANGES.txt (original)
+++ nutch/branches/nutchgora/CHANGES.txt Mon Jul 9 11:38:47 2012
@@ -1,5 +1,9 @@
Nutch Change Log
+Release 2.1 - Current Development
+
+* NUTCH-1306 Add option to not commit and clarify existing solr.commit.size
(ferdy)
+
Release 2.0 (08/06/2012) ddmmyyy
Full Jira report -
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10680&version=12314893
Modified: nutch/branches/nutchgora/conf/nutch-default.xml
URL:
http://svn.apache.org/viewvc/nutch/branches/nutchgora/conf/nutch-default.xml?rev=1359075&r1=1359074&r2=1359075&view=diff
==============================================================================
--- nutch/branches/nutchgora/conf/nutch-default.xml (original)
+++ nutch/branches/nutchgora/conf/nutch-default.xml Mon Jul 9 11:38:47 2012
@@ -1121,7 +1121,15 @@
<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.
+ 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>
Modified:
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
URL:
http://svn.apache.org/viewvc/nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrConstants.java?rev=1359075&r1=1359074&r2=1359075&view=diff
==============================================================================
---
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
(original)
+++
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrConstants.java
Mon Jul 9 11:38:47 2012
@@ -22,6 +22,8 @@ public interface SolrConstants {
public static final String SERVER_URL = SOLR_PREFIX + "server.url";
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";
Modified:
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrIndexerJob.java
URL:
http://svn.apache.org/viewvc/nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrIndexerJob.java?rev=1359075&r1=1359074&r2=1359075&view=diff
==============================================================================
---
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrIndexerJob.java
(original)
+++
nutch/branches/nutchgora/src/java/org/apache/nutch/indexer/solr/SolrIndexerJob.java
Mon Jul 9 11:38:47 2012
@@ -69,7 +69,9 @@ public class SolrIndexerJob extends Inde
Nutch.ARG_BATCH, batchId));
// do the commits once and for all the reducers in one go
SolrServer solr = new CommonsHttpSolrServer(solrUrl);
- solr.commit();
+ if (getConf().getBoolean(SolrConstants.COMMIT_INDEX, true)) {
+ solr.commit();
+ }
} finally {
FileSystem.get(getConf()).delete(
FileOutputFormat.getOutputPath(currentJob), true);