Sometimes, mainly in tests, it may be useful to be able to execute queries in a backend-independent way. However, the mechanic that enables that is located in the ORM module, more precisely here: https://github.com/hibernate/hibernate-search/blob/a62de30245f726361c1566d91a62c618b6446999/orm/src/main/java/org/hibernate/search/impl/FullTextSessionImpl.java#L75 Since the relevant SPIs are located in the engine module, it feels like it's a feature of the engine module and hence the code using the SPIs should be located there. Then it would be possible to expose a way for other modules to create a QueryDescriptor in a transparent way, without knowing about the backend or manipulating services (that may or may not exist). |