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 option to warm lucene core query only #838

Draft
wants to merge 1 commit into
base: profiling
Choose a base branch
from

Conversation

fragosoluana
Copy link
Member

No description provided.

// have obtained this searcher from the NRTManager
// (i.e. sometimes we pulled from
// SearcherLifetimeManager, other times (if
// snapshot was specified) we opened ourselves,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not want to warm the query with specific generation, i.e. snapshot. But this is likely a fix in saving criteria.

@@ -233,6 +233,44 @@ public static SearchContext buildContextForRequest(
return searchContext;
}

public static SearchContext buildContextForLuceneQueryOnly(
SearchRequest searchRequest,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we override the topHits to 0 ? This may lead to an autoskip of FunctionScoreScript as score is not needed.

@@ -257,7 +257,8 @@ public void initWarmer(Archiver archiver, String indexName) {
archiver,
configuration.getServiceName(),
indexName,
warmerConfig.getMaxWarmingQueries());
warmerConfig.getMaxWarmingQueries(),
warmerConfig.getMaxWarmingLuceneQueryOnlyCount());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still use the % settings in your final PR if you prefer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants