-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add more context to QueryShardContext #46584
Conversation
This change adds an IndexSearcher and the node's BigArrays in the QueryShardContext. It's a spin off of elastic#46527 as this change is required to allow aggregation builder to solely use the query shard context. Relates elastic#46523
Pinging @elastic/es-search |
@@ -552,8 +552,10 @@ private static Response prepareRamIndex(Request request, | |||
indexWriter.addDocuments(parsedDocument.docs()); | |||
try (IndexReader indexReader = DirectoryReader.open(indexWriter)) { | |||
final long absoluteStartMillis = System.currentTimeMillis(); | |||
final IndexSearcher searcher = new IndexSearcher(indexReader); | |||
searcher.setQueryCache(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small question on this. where did we do setQueryCache(null) before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be required, I added this by precaution but I can remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it's fine by me, I was just curious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and what about the places where we were previously setting the query cache and the policy?
This change adds an IndexSearcher and the node's BigArrays in the QueryShardContext.
It's a spin off of #46527 as this change is required to allow aggregation builder to solely use the
query shard context.
Relates #46523