THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
In the case of partitioned regions, the query must be sent out to all the primaries. The results will then need to be aggregated back together.
PlantUML |
---|
participant LuceneQuery
participant FunctionService
participant FunctionCollector
participant CollectorManager
participant M1_LuceneFunction
participant M1_CollectorManager
participant Index_1
participant Index_2
LuceneQuery -> FunctionService: Query
activate FunctionService
FunctionService --> M1_LuceneFunction : LuceneContext
activate M1_LuceneFunction
FunctionService --> M2_LuceneFunction: LuceneContext
activate M2_LuceneFunction
M1_LuceneFunction -> Index_1 : search(Collector_1)
Index_1 -> M1_LuceneFunction : loaded Collector_1
M1_LuceneFunction -> Index_2 : search(Collector_2)
Index_2 -> M1_LuceneFunction : loaded Collector_2
M1_LuceneFunction -> M1_CollectorManager : merge Collectors
activate M1_CollectorManager
M1_CollectorManager -> M1_LuceneFunction : merged Collector
deactivate M1_CollectorManager
activate FunctionCollector
M1_LuceneFunction -> FunctionCollector:Collector_M1
deactivate M1_LuceneFunction
M2_LuceneFunction -> FunctionCollector:Collector_M2
deactivate M2_LuceneFunction
FunctionCollector -> CollectorManager : merge Collectors
activate CollectorManager
CollectorManager -> FunctionCollector : Final Collector
deactivate CollectorManager
FunctionCollector -> FunctionService : Final Collector
deactivate FunctionCollector
FunctionService -> LuceneQuery : QueryResults
deactivate FunctionService |
We are still investigating options for how to aggregate the data, see Text Search Aggregation Options.
In case of replicated regions, query will be sent to one of the members and get the results there. Aggregation will be handled in that member before returned to the caller.
Result collection and paging
The ResultSet will support pagination mechanism to retrieve the results. All the keys are aggregated at the query executor node (client or peer); and getAll is used to fetch the values according to page size.