mirror of https://github.com/apache/lucene.git
SOLR-841 -- DataImportHandler should throw exception if a field does not have column attribute
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@725635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cf0a31f1f7
commit
714d1c7ad7
|
@ -73,6 +73,9 @@ Bug Fixes
|
||||||
10. SOLR-888: DateFormatTransformer cannot convert non-string type
|
10. SOLR-888: DateFormatTransformer cannot convert non-string type
|
||||||
(Amit Nithian via shalin)
|
(Amit Nithian via shalin)
|
||||||
|
|
||||||
|
11. SOLR-841: DataImportHandler should throw exception if a field does not have column attribute
|
||||||
|
(Michael Henson, shalin)
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,9 @@ public class DataConfig {
|
||||||
public Field(Element e) {
|
public Field(Element e) {
|
||||||
this.name = getStringAttribute(e, DataImporter.NAME, null);
|
this.name = getStringAttribute(e, DataImporter.NAME, null);
|
||||||
this.column = getStringAttribute(e, DataImporter.COLUMN, 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"));
|
this.boost = Float.parseFloat(getStringAttribute(e, "boost", "1.0f"));
|
||||||
allAttributes.putAll(getAllAttributes(e));
|
allAttributes.putAll(getAllAttributes(e));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue