Note that when targeting types {A, B}, where {A, B}
have a common parent C, rather than issuing two queries to load all of the As and all of the Bs it would be more efficient doing a single query on type C with the full list of ids.
So the ids returned from the Lucene projection don't always need to be classified per type, but rather per entity hierarchies.
I suspect that to compute the optimal loading plan we'd need to query the org.hibernate.search.cfg.spi.IdUniquenessResolver.
|