Open
Description
Is your feature request related to a problem?
Recently, in OpenSearch core we introduced interfaces like QueryCollectorContextFactory and QueryCollectorContextSpec. We should implement them in Hybrid query to improve its performance. See issue opensearch-project/OpenSearch#18278 for more details.
What solution would you like?
- Remove HybridQueryAggregationProcessor for initializing HybridCollectorManager.
- Implement interfaces QueryCollectorContextFactory and QueryCollectorContextSpec.
- Inject QueryCollectorContextSpec for hybrid query so that OpenSearch can create QueryCollectorContext out of it.
- For non concurrent search, provide logic of createCollector and collectorManager in QueryCollectorContextSpec.
- For concurrent search, optimize HybridCollectorManager.