I can understand wanting to keep certain classes out of the public API, but it would be nice if Hibernate Search provided bridges for user-defined classes in common situations, like DefaultStringBridge.
I hear you. DefaultStringBridge might be a special case indeed. An alternative could be to have a special option in the DSL which basically implies that if the indexed type is not known to Search the default toString bridge should be used. This would keep the DefaultStringBridge still private, but allows to handle the cases where a simple toString would be sufficient.
|