You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2015/04/05 07:22:08 UTC
svn commit: r1671375 - in /oodt/trunk: CHANGES.txt
filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java
Author: mattmann
Date: Sun Apr 5 05:22:07 2015
New Revision: 1671375
URL: http://svn.apache.org/r1671375
Log:
- fix for OODT-715: SolrIndexer fails to index when numProducts == pageSize contributed by Paul Ramirez and tested by Michael Starch
Modified:
oodt/trunk/CHANGES.txt
oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java
Modified: oodt/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/oodt/trunk/CHANGES.txt?rev=1671375&r1=1671374&r2=1671375&view=diff
==============================================================================
--- oodt/trunk/CHANGES.txt (original)
+++ oodt/trunk/CHANGES.txt Sun Apr 5 05:22:07 2015
@@ -2,6 +2,8 @@ Apache OODT Change Log
======================
Release 0.9 - Current Development
+* OODT-715 SolrIndexer fails to index when numProducts == pageSize (pramirez, mdstarch via mattmann)
+
* OODT-821 OODT-821 FMProd RDF conf shouldn't use EDRN as a default namespace for keys and for types (mattmann)
* OODT-818 CmdLineIngester should log there was an exception and move on during ingest (mattmann)
Modified: oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java
URL: http://svn.apache.org/viewvc/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java?rev=1671375&r1=1671374&r2=1671375&view=diff
==============================================================================
--- oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java (original)
+++ oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java Sun Apr 5 05:22:07 2015
@@ -327,9 +327,9 @@ public class SolrIndexer {
if (!config.getIgnoreTypes().contains(type.getName().trim())) {
LOG.info("Paging through products for product type: "
+ type.getName());
- for (ProductPage page = safeFirstPage(fmClient, type); page != null && !page
- .isLastPage(); page = fmClient.getNextPage(type, page)) {
- for (Product product : page.getPageProducts()) {
+ ProductPage page = safeFirstPage(fmClient, type);
+ while (page != null) {
+ for (Product product : page.getPageProducts()) {
try {
this.indexProduct(product.getProductId(), fmClient
.getMetadata(product), type.getTypeMetadata());
@@ -338,6 +338,10 @@ public class SolrIndexer {
+ e.getMessage());
}
}
+ if (page.isLastPage()) {
+ break;
+ }
+ page = fmClient.getNextPage(type, page);
}
}
}