Author: rwesten
Date: Fri Sep  2 07:14:42 2016
New Revision: 1758885

URL: http://svn.apache.org/viewvc?rev=1758885&view=rev
Log:
minor: added code that prevents to store an empty set of representations to 
prevent Solr Error responses if the Store method is called with an empty 
collection

Modified:
    
stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java

Modified: 
stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java?rev=1758885&r1=1758884&r2=1758885&view=diff
==============================================================================
--- 
stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
 (original)
+++ 
stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
 Fri Sep  2 07:14:42 2016
@@ -686,6 +686,10 @@ public class SolrYard extends AbstractYa
                 added.add(representation);
             }
         }
+        if(inputDocs.isEmpty()){ //empty data sent ... nothing to do
+            log.debug("strore called with empty collection of 
Representations");
+            return representations;
+        }
         long created = System.currentTimeMillis();
         if(closed){
             log.warn("The SolrYard '{}' was already closed!",config.getName());


Reply via email to