Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [data.search] Clean up code around ES preference usage (#204076) (
#205661) # Backport This will backport the following commits from `main` to `8.x`: - [[data.search] Clean up code around ES preference usage (#204076)](#204076) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-06T22:02:48Z","message":"[data.search] Clean up code around ES preference usage (#204076)\n\n## Summary\r\n\r\nWhile refreshing my memory on how we are using the Elasticsearch\r\n`preference` parameter, I noticed we had a method `getEsPreference` that\r\nwas exported but not used. We then had an additional method\r\n`getPreference` that was being used to actually set the parameter. I\r\nconsolidated these into one place and moved the tests so that we can\r\nutilize it when ES|QL supports this parameter.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Vettorello <[email protected]>","sha":"df3665fbf59295dfbd664dfc280658b5232498d9","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Search","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"[data.search] Clean up code around ES preference usage","number":204076,"url":"https://github.com/elastic/kibana/pull/204076","mergeCommit":{"message":"[data.search] Clean up code around ES preference usage (#204076)\n\n## Summary\r\n\r\nWhile refreshing my memory on how we are using the Elasticsearch\r\n`preference` parameter, I noticed we had a method `getEsPreference` that\r\nwas exported but not used. We then had an additional method\r\n`getPreference` that was being used to actually set the parameter. I\r\nconsolidated these into one place and moved the tests so that we can\r\nutilize it when ES|QL supports this parameter.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Vettorello <[email protected]>","sha":"df3665fbf59295dfbd664dfc280658b5232498d9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204076","number":204076,"mergeCommit":{"message":"[data.search] Clean up code around ES preference usage (#204076)\n\n## Summary\r\n\r\nWhile refreshing my memory on how we are using the Elasticsearch\r\n`preference` parameter, I noticed we had a method `getEsPreference` that\r\nwas exported but not used. We then had an additional method\r\n`getPreference` that was being used to actually set the parameter. I\r\nconsolidated these into one place and moved the tests so that we can\r\nutilize it when ES|QL supports this parameter.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Vettorello <[email protected]>","sha":"df3665fbf59295dfbd664dfc280658b5232498d9"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <[email protected]>
- Loading branch information