Skip to content
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

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Sep 11, 2019

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

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
@jimczi jimczi added >non-issue :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.5.0 labels Sep 11, 2019
@jimczi jimczi requested a review from javanna September 11, 2019 08:25
@elasticmachine
Copy link
Collaborator

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);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Member

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?

@jimczi jimczi merged commit ee79859 into elastic:master Sep 11, 2019
@jimczi jimczi deleted the query_shard_context_plus branch September 11, 2019 09:55
jimczi added a commit that referenced this pull request Sep 11, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants