Note that, with https://hibernate.atlassian.net/browse/HSEARCH-3567 , use cases that actually require explicitly writing down the query would become quite rare. Also, in Hibernate Search 6 we don't have @ContainedIn anymore, so I think the most obvious place to fit that feature would be @AssociationInverseSide (see here). Maybe @AssociationInverseSide(query = "...")? A likely use case would be associations with @Where/@WhereJoinTable (see here)… Maybe? |