-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Logic duplication in SearchRequestContext and TimeProvider #11762
Description
Describe the bug
SearchRequestContext and TimeProvider both has Phase Took Map, and they are basically recording the same thing. We can investigate if we can improve these logic to make them simpler. Also, we should seek ways to make the workflow to add a SearchOperationsListener easier so that plugins outside of core can also utilize it to create their own listeners.
Related component
Search:Query Insights
To Reproduce
Check the logic in
- https://github.com/opensearch-project/OpenSearch/blob/2.x/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java#L358
- https://github.com/opensearch-project/OpenSearch/blob/2.x/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java#L436
They are updated with the same data.
Expected behavior
Remove this duplication by refactoring the code to improve the maintainability and simplicity of the core search path.
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status