Skip to content

Conversation

@Rahien
Copy link

@Rahien Rahien commented Nov 10, 2025

This adds support for ES 9.2.0, it requires the changes done here: mu-semtech/mu-search-elastic-backend#3

"attachments_path_base" : "/local/files/directory",
"persist_indexes" : false,
"default_settings" : {
"number_of_replicas": 0,
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

response.headers['x-elastic-product'] = 'Elasticsearch'
@verified = true
rescue StandardError => e
Mu::log.info("SETUP") { "no reaction from elastic, retrying..." }
Copy link
Author

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
Copy link
Author

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

@Rahien Rahien marked this pull request as ready for review November 10, 2025 16:12
term = {
common: {
field => { query: value, cutoff_frequency: cutoff }
# common was deprecated and removed in favor of match
Copy link
Author

Choose a reason for hiding this comment

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

response.headers['x-elastic-product'] = 'Elasticsearch'
@verified = true
rescue StandardError => e
Mu::log.debug("SETUP") { "no reaction from elastic, retrying..." }
Copy link
Author

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.

Copy link
Author

@Rahien Rahien Nov 12, 2025

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).

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.

1 participant