Author: shalin
Date: Thu Dec 11 01:39:31 2008
New Revision: 725635
URL: http://svn.apache.org/viewvc?rev=725635&view=rev
Log:
SOLR-841 -- DataImportHandler should throw exception if a field does not have
column attribute
Modified:
lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt
lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataConfig.java
Modified: lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt
URL:
http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt?rev=725635&r1=725634&r2=725635&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt Thu Dec 11 01:39:31
2008
@@ -73,6 +73,9 @@
10. SOLR-888: DateFormatTransformer cannot convert non-string type
(Amit Nithian via shalin)
+11. SOLR-841: DataImportHandler should throw exception if a field does not
have column attribute
+ (Michael Henson, shalin)
+
Documentation
----------------------
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=725635&r1=725634&r2=725635&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 Dec 11 01:39:31 2008
@@ -205,6 +205,9 @@
public Field(Element e) {
this.name = getStringAttribute(e, DataImporter.NAME, null);
this.column = getStringAttribute(e, DataImporter.COLUMN, null);
+ if (column == null) {
+ throw new
DataImportHandlerException(DataImportHandlerException.SEVERE, "Field must have
a column attribute");
+ }
this.boost = Float.parseFloat(getStringAttribute(e, "boost", "1.0f"));
allAttributes.putAll(getAllAttributes(e));
}