- Drop the "fully fluid" DSL syntaxes. Only keep the "object" syntax and the "lambda" syntax. This will allow in particular to drop the .end() methods in favor of toPredicate/toSort/etc. methods that always return an object representing the element being built. This means in particular:
- Removing org.hibernate.search.v6poc.search.dsl.query.SearchQueryResultContext#predicate()
- Removing org.hibernate.search.v6poc.search.dsl.predicate.BooleanJunctionPredicateContext#must(), org.hibernate.search.v6poc.search.dsl.predicate.BooleanJunctionPredicateContext#should(), et. al.
- Removing org.hibernate.search.v6poc.search.dsl.query.SearchQueryContext#sort()
- Removing the N generic type parameter in most predicate/sort DSL interfaces (it's no longer needed, the terminal method will always return a SearchPredicate/SearchSort depending on the DSL)
- Converting the tests. In particular those using searchTarget.query( sessionContext ).asReferences().predicate().matchAll().end().build() will become searchTarget.query( sessionContext ).asReferences().predicate( c -> c.matchAll() ).matchAll().end().build()}. Or maybe we could offer some syntactic sugar in this specific case, such as searchTarget.query( sessionContext ).asReferences().noPredicate().build() or searchTarget.query( sessionContext ).asReferences().matchAll().build() (with no additional parameter to the "matchAll" predicate)?
- Maybe changing the syntax of nested predicates. Currently the syntax switches from the "nested" predicate to the child predicate in a nested way, something like .nested().onObjectField(...).match().onField(...).matching(...), and in this context the call to end()/toPredicate might be ambiguous.
- More?
- Update the showcase accordingly (remove some DAO implementations)
- Rename .end() to toPredicate/toSort.
|
|