Author: epbernard
Date: 2007-05-30 16:25:23 -0400 (Wed, 30 May 2007)
New Revision: 11599
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/engine/DocumentBuilder.java
Log:
Raise an exception if a field is not projectable
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/engine/DocumentBuilder.java
===================================================================
---
trunk/HibernateExt/search/src/java/org/hibernate/search/engine/DocumentBuilder.java 2007-05-30
20:24:24 UTC (rev 11598)
+++
trunk/HibernateExt/search/src/java/org/hibernate/search/engine/DocumentBuilder.java 2007-05-30
20:25:23 UTC (rev 11599)
@@ -590,11 +590,12 @@
}
}
else {
- //FIXME else exception?
- if ( log.isTraceEnabled() ) {
- log.trace( "Field " + fieldName + " not projected: Store = " +
store + " and isTwoWay = "
- + TwoWayFieldBridge.class.isAssignableFrom( fieldBridge.getClass() ) );
+ if ( store == Field.Store.NO ) {
+ throw new SearchException("Projecting an unstored field: " + fieldName);
}
+ else {
+ throw new SearchException( "FieldBridge is not a TwoWayFieldBridge: " +
fieldBridge.getClass() );
+ }
}
}
}