-
Notifications
You must be signed in to change notification settings - Fork 24
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
SRCH-1754 update Elasticsearch initializer & client #128
SRCH-1754 update Elasticsearch initializer & client #128
Conversation
Closing temporarily to make a tweak. |
end | ||
|
||
Elasticsearch::Persistence.client = ES.client |
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.
Why is the assignment to Elasticsearch::Persistence.client necessary? Backwards compatibility for some code that this PR doesn't change?
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.
Yes, that's for backwards compatibility. It sets the client for the persisted classes (Document
and Collection
), replicating the logic of the existing client assignment, but using the new ES.client
method. That line is going to go away in a subsequent commit.
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.
Approved, with one request for information about a change.
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.
Approved with a request for information about one bit.
…rch 7 (#131) * SRCH-1754 update Elasticsearch initializer & client (#128) * SRCH-1743 create repository classes (#130) * SRCH-1755 upgrade elasticsearch gems to 6.x (#134) * SRCH-1819 return total search hits as an integer (#138) * SRCH-1818 set minimum_should_match to 1 in bool filter (#139) * SRCH-1730 update templates (#137) * SRCH-1820 add Elasticsearch & Kibana 7 to docker-compose.yml (#136) * SRCH-1718 run specs against Elasticsearch 6 & 7 (#140) * SRCH-1876 fix intermittent spec failures (#141) - replace patron with typhoeus - bump nokogiri * SRCH-1854 set ID when deserializing (#142) * SRCH-1822 placate Rubocop (#143)
This is the first of several PRs into the
release/elasticsearch_gems_1727
branch. I've broken up the changes largely to simplify the review process. This PR updates the Elasticsearch client initializer to avoid using theElasticsearch::Persistence.client
method, which is deprecated in the next version of theelasticsearch-persistence
gem. That will still be in temporary use to set the persistence client (Elasticsearch::Persistence.client = ES.client
) until I update the gems.It also adds a couple of test helpers to DRY up the specs.