-
Notifications
You must be signed in to change notification settings - Fork 210
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
Knife search issue: when search entries are more than 10K #3951
Conversation
👷 Deploy Preview for chef-server processing.
|
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.
The changes look fine. Once tests are passing could you squash commits and include a descriptive commit message - it should reference the ticket, as well as a 'why' explanation for the change itself.
@@ -194,6 +194,7 @@ | |||
{timeout, <%= @solr_timeout %>}, | |||
{init_count, <%= @solr_http_init_count %>}, | |||
{max_count, <%= @solr_http_max_count %>}, | |||
{track_total_hits,true}, |
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.
read the config value from default.rb from attributes(Omnibus).
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.
Default value should be false for track_total_hits
@@ -30,6 +30,7 @@ from_params(Provider, ObjType, QueryString, Start, Rows) -> | |||
search_provider = Provider, | |||
start = decode({nonneg_int, "start"}, Start, 0), | |||
rows = decode({nonneg_int, "rows"}, Rows, 1000), | |||
track_total_hits = envy:get(chef_index, track_total_hits, true, boolean), |
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.
track_total_hits = envy:get(chef_index, track_total_hits, true, boolean), | |
track_total_hits = envy:get(chef_index, track_total_hits, false, boolean), |
42bdf59
to
ebe9550
Compare
b268a4a
to
6ca1f97
Compare
Video Demo for this: knife_search_issue.mov |
b5fb55b
to
624fc6f
Compare
21e8951
to
ca90f2b
Compare
ca90f2b
to
fb89786
Compare
fb89786
to
2b39607
Compare
Signed-off-by: talktovikas <[email protected]> fixing omnibus issue. Signed-off-by: talktovikas <[email protected]> fixing pedant issue. Signed-off-by: talktovikas <[email protected]> binding at runtime. Signed-off-by: talktovikas <[email protected]> Doc Changes for knife index. Signed-off-by: talktovikas <[email protected]> adding default to toml file. Signed-off-by: talktovikas <[email protected]>
2b39607
to
0a22296
Compare
Quality Gate failedFailed conditions See analysis details on SonarQube Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Quality Gate passedIssues Measures |
Description
[Please describe what this change achieves]
This PR contains the changes for issue on Jira:
https://progresssoftware.atlassian.net/browse/CHEF-5783
Issues Resolved
When user do
Knife search wildcard [ knife search 'name:*' -i | wc -l] was only providing 10k results where as user gets more than 10 when doing lets say [knife node list | wc -l].
The fix here contains adding track_total_hits value in the opensearch request body, If set as true will give all the data when searching using wildcard approach.
which tells the max_window_size a response can accommodate.
To use this feature change the value of
in the erchef which is false by default.
[List any existing issues this PR resolves, or any Discourse or
StackOverflow discussions that are relevant]
Check List