Skip to content
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-1743 create repository classes #130

Merged

Conversation

MothOnMars
Copy link
Contributor

This PR sets up the new Repository classes, which will subsequently be used to store the corresponding Document and Collection instances. The goal is to decouple the model logic from the persistence logic. A detailed explanation of why and how these changes are being made is in:
https://www.elastic.co/blog/activerecord-to-repository-changing-persistence-patterns-with-the-elasticsearch-rails-gem

The follow-up commits will build on these repository classes, moving the persistence, serialization, and search logic out of the Document and Collection classes and into the repository classes. (I toyed with retaining the elasticsearch-model gem, which offers ActiveRecord-y persistence to POROs, but ultimately I agree w/ the recommendation to decouple the model/ persistence logic. It won't surprise me at all if the elasticsearch-model gem is deprecated in the future, which also makes this a safer route.)

@MothOnMars MothOnMars merged commit 64a23f8 into GSA:release/elasticsearch_gems_1727 Dec 7, 2020
MothOnMars added a commit that referenced this pull request Feb 25, 2021
…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)
@MyNameIsMissing MyNameIsMissing mentioned this pull request Feb 25, 2021
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.

2 participants