Hi Sanne,
When I create a LazyIterator, every node makes a local normal query and thern I return the TopDocs to the requester node. With TopDocs I can merge the results and maintain them ordered. I'm using the idea behind
org.apache.lucene.search.ParallelMultiSearcher.search(Weight, Filter, int, Sort).
We could make the classes
org.hibernate.search.query.engine.impl.HSQueryImpl
org.hibernate.search.query.engine.impl.QueryHits
suitable for being extended (changing most private methods to
protected, and also refactor the HSQueryImpl to possibly use a
different type for QueryHits)
and then making sure that it's possible to have
org.hibernate.search.spi.SearchFactoryIntegrator.createHSQuery()
return a custom type.