Skip to content

Introduce FetchContext #62228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
romseygeek opened this issue Sep 10, 2020 · 3 comments
Closed

Introduce FetchContext #62228

romseygeek opened this issue Sep 10, 2020 · 3 comments
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@romseygeek
Copy link
Contributor

We currently pass a SearchContext around to share configuration among FetchSubPhases. With the introduction of runtime fields, it would be useful to start storing some state on this context to be shared between different subphases (for example, stored fields or search lookups can be loaded lazily but referred to by many different subphases). However, SearchContext is a very large and unwieldy class, and adding more methods or state here feels like a bridge too far.

We should investigate extracting a FetchContext that contains only those methods necessary for the FetchPhase. This can also be an opportunity to rationalise some of the methods (there seem to be about seven different ways to indicate that the source should be loaded, for a start).

@romseygeek romseygeek added the :Search/Search Search-related issues that do not fall into other categories label Sep 10, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Sep 10, 2020
@jtibshirani
Copy link
Contributor

With the introduction of runtime fields, it would be useful to start storing some state on this context to be shared between different subphases (for example, stored fields or search lookups can be loaded lazily but referred to by many different subphases).

I filed #62511 to expand on this idea -- comments are very welcome!

@romseygeek
Copy link
Contributor Author

Fixed by #62357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

3 participants