-
Notifications
You must be signed in to change notification settings - Fork 11
support ES 9.2.0 #102
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
base: master
Are you sure you want to change the base?
support ES 9.2.0 #102
Conversation
| "attachments_path_base" : "/local/files/directory", | ||
| "persist_indexes" : false, | ||
| "default_settings" : { | ||
| "number_of_replicas": 0, |
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.
ES put the cluster status to yellow if we don't specify that we really only want a single node.
| query: value, | ||
| fields: all_fields ? nil : fields, | ||
| default_operator: "and", | ||
| all_fields: all_fields |
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.
deprecated in 6.0.0 and since removed
| module Elasticsearch | ||
| class Client | ||
| alias original_verify_with_version_or_header verify_with_version_or_header | ||
| module ElasticsearchMonkeyPatch |
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.
new version of the monkeypatch was needed
lib/mu_search/elastic.rb
Outdated
| response.headers['x-elastic-product'] = 'Elasticsearch' | ||
| @verified = true | ||
| rescue StandardError => e | ||
| Mu::log.info("SETUP") { "no reaction from elastic, retrying..." } |
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 verification does a request, if it fails and we don't rescue, the container dies
| ## | ||
| module MuSearch | ||
| class Elastic | ||
| class ElasticWrapper |
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.
to avoid conflict with the Elastic::Transport that replaces Elasticsearch::Transport
| term = { | ||
| common: { | ||
| field => { query: value, cutoff_frequency: cutoff } | ||
| # common was deprecated and removed in favor of match |
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.
see deprecation message here https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-common-terms-query.html
(since removed)
| response.headers['x-elastic-product'] = 'Elasticsearch' | ||
| @verified = true | ||
| rescue StandardError => e | ||
| Mu::log.debug("SETUP") { "no reaction from elastic, retrying..." } |
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.
when creating the connection pool, the library already performs this check, but elastic isn't there yet, this causes an error and if we don't rescue, the service crashes.
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.
this is before our check on if elastic is up (which is still needed because the cluster may not be healthy yet even if the response gives a 200).
This adds support for ES 9.2.0, it requires the changes done here: mu-semtech/mu-search-elastic-backend#3