Are the segments queried in parallel or sequentially when querying multiple indexes?
Sequential. This seems actually quite simple to implement. I expect we'd have a single ExecutorService started during boot of the SearchIntegrator, and pass this to each org.apache.lucene.search.IndexSearcher constructor. Or would you expect to have multiple ExecutorService instances, like a dedicated one for each sharded index? I think not as ultimately you have the same CPU to limit/share. A nice side-effect is that people would be able to limit how many CPU cores at maximum they would dedicate to query execution; this would require some configuration properties to set the initial constraints of the ExecutorService but I guess people would likely want to be able to manage these parameters over some mbean as well. In the case of Infinispan I suspect you'd want multiple caches to share the same ExecutorService, which implies having multiple SearchIntegrator instances share one, so you'd want this executor to be provided by an injectable Service. |