The QueryContextBuilder DSL currently allows only one class to initialize a query builder DSL. This works if you have simple classes. However, if you have an even slightly complex class hierarchy where an index has multiple classes in it, the query builder only is aware of fields on a single class.
e.g. if you have a Document class that has a title, author, etc. and an article class which is a subclass of document, but also adds a Journal Title field, and they're all stored in your document index, there's no way to build a query that takes into account the union of the parent and children classes without representing all of the fields on Document or by having some subclass that has every possible field on it.
|