Inheritance and spellcheck/autocomplete suggestions
Current implementation of suggestions (both spellcheck and autocompletion) returns suggestions from any entity class that share the same search index.
WebDSL uses the Hibernate default, which means that subtypes and supertypes share the same search index.Example:
Entity Vehicle { model :: String ( searchable( analyzer=keyword, spellcheck ) ) ... } Entity Car : Vehicle { ... }
In this case, spellcheck suggestions for
Car.model
will include suggestions that appear in all entities of (sub)typeVehicle
.Possible workaround: Add a derived property to the subtype entity for which you want to have isolated suggestions, and make this property searchable with spellcheck and/or autocompletion enabled.
Submitted by Elmer van Chastelet on 12 December 2011 at 11:34
Log in to post comments