lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r803784 - /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java
Date Thu, 13 Aug 2009 06:08:03 GMT
Author: noble
Date: Thu Aug 13 06:08:03 2009
New Revision: 803784

URL: http://svn.apache.org/viewvc?rev=803784&view=rev
Log:
SOLR-1235

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java?rev=803784&r1=803783&r2=803784&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java
Thu Aug 13 06:08:03 2009
@@ -22,6 +22,8 @@
 import org.w3c.dom.NodeList;
 import org.apache.solr.schema.SchemaField;
 import static org.apache.solr.handler.dataimport.DataImportHandlerException.SEVERE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.*;
 
@@ -42,6 +44,8 @@
  * @since solr 1.3
  */
 public class DataConfig {
+  static final Logger LOG = LoggerFactory.getLogger(DataConfig.class);
+
   public Document document;
 
   public List<Map<String, String >> functions = new ArrayList<Map<String
,String>>();
@@ -115,7 +119,8 @@
     public Entity(Element element) {
       name = getStringAttribute(element, NAME, null);
       if(name == null){
-        throw new DataImportHandlerException(SEVERE, "Entity must have name '" );
+        LOG.warn("Entity does not have a name");
+        name= ""+System.nanoTime();
       }
       if(name.indexOf(".") != -1){
         throw new DataImportHandlerException(SEVERE, "Entity name must not have period (.):
'" + name);



Mime
View raw message