Skip to content

Apache Lucene open-source search software

SOLR-3077: Better error messages when attempting to use blank field names

Chris M. Hostetterf30f04a3475e
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e095af90ab4..39a0f9249ef 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -674,6 +674,10 @@ Other Changes
* SOLR-3140: Upgrade schema version to 1.5, where omitNorms defaults to "true" for all
primitive (non-analyzed) field types such as int, float, date, bool, string.. (janhoy)
+* SOLR-3077: Better error messages when attempting to use "blank" field names
+ (Antony Stubbs via hossman)
+
+
Build
----------------------
* SOLR-2487: Add build target to package war without slf4j jars (janhoy)
diff --git a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
index eba2502a823..7cac8994e5b 100644
--- a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
+++ b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
@@ -920,7 +920,7 @@ public final class IndexSchema {
/*** REMOVED -YCS
if (defaultFieldType != null) return new SchemaField(fieldName,defaultFieldType);
***/
- throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,"undefined field "+fieldName);
+ throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,"undefined field: \""+fieldName+"\"");
}
/**