You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2016/09/02 07:14:43 UTC
svn commit: r1758885 -
/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
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());