Allow sorting metadata to be overriden during query execution

Description

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.

Environment

None

Assignee

Yoann Rodière

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Priority

Blocker
Configure