We want to add an SPI method like HSQuery createHSQuery(Query luceneQuery, CustomTypeMetadata m); to eventually replace the method HSQuery createHSQuery(Query luceneQuery, Class<?>... entities); The new CustomTypeMetadata will encapsulate:
- which types are being targeted
- a way to override the otherwise used SortableFieldMapping
The main reason is to allow Infinispan Query to skip the uninverting of indexes (org.hibernate.search.reader.impl.ManagedMultiReader.getIndexesToBeUninverted(SortConfigurations, Sort, boolean), as the metadata is not defined at initialization time, but is known at runtime. |