estella 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b616691d2c247c0b09e6c67bd936340fea759ab989f1a2db9b63287897821ba
4
- data.tar.gz: b4abf1411c00475005ae3b136625b8cd2e4d497c8bbdef0b483b6a94e40d64ec
3
+ metadata.gz: d9d4bb9a6de7a94bdb5387ba3a75e14f1018dd335e10602aca51375eac4bdbb6
4
+ data.tar.gz: e66b62c6b09fc373017299954b05dc402f9475d9ad507e573912eaae3cc72339
5
5
  SHA512:
6
- metadata.gz: c4301d442ff5a32e5ff3a78fc1fbd6fb0ce6196e0ebd47ef503a9ed07988080cd09c6c7fbfc2f906ec53a6429dedd1733b72e0389a6ac813289eafeb7bbb1888
7
- data.tar.gz: 7fc7d4293552a2437282d50682fba461254ee82343dcbf2ce96f992c09f6ecfbcd25592899bf688fa2e1f8b3381b888d43a2fd108f090026a1e340ad782e7869
6
+ metadata.gz: 411b917c23df28896f0271907fa26a8c994913e570d3354a1442c11d506bc81627f0190964b3f3be8720259609789010f44711d78d4f6a01b5d1a300fcf3b9e8
7
+ data.tar.gz: 7800b28b9761e32d43f77cb0b04915ae33c1eca8ff44b2c72361b6a6302bc3e3573d2872af906a563b8e73964c68cad37d5f14cd78509461ae096021976b92cd
data/.circleci/config.yml CHANGED
@@ -4,7 +4,9 @@ jobs:
4
4
  test:
5
5
  docker:
6
6
  - image: "cimg/ruby:<< parameters.ruby_version >>"
7
- - image: elasticsearch:6.8.23
7
+ - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.18
8
+ environment:
9
+ - discovery.type: single-node
8
10
  parameters:
9
11
  ruby_version:
10
12
  type: string
@@ -29,4 +31,4 @@ workflows:
29
31
  - test:
30
32
  matrix:
31
33
  parameters:
32
- ruby_version: ["2.7"]
34
+ ruby_version: ["3.1"]
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ### Next Release
4
4
 
5
+ ### v7.0.0
6
+
7
+ * [#40](https://github.com/artsy/estella/pull/40): compatibility with elasticsearch v7 - [@joeyAghion]
8
+
5
9
  ### v6.0.0
6
10
 
7
11
  * [#38](https://github.com/artsy/estella/pull/38): Support Elasticsearch 6.x - [@mzikherman]
data/README.md CHANGED
@@ -9,7 +9,7 @@ Builds on [elasticsearch-model](https://github.com/elastic/elasticsearch-rails/t
9
9
 
10
10
  ## Compatibility
11
11
 
12
- This library is compatible with [Elasticsearch 1.5.x, 2.x](https://www.elastic.co/products/elasticsearch) when using versions `2.0.0` and earlier. It is compatible with Elasticsearch 5.x via version `5.0.0` or installing directly from the `main` branch of this repository. It works with many ORM/ODMs, including ActiveRecord and Mongoid.
12
+ This library is compatible with [Elasticsearch 1.5.x, 2.x](https://www.elastic.co/products/elasticsearch) when using versions `2.0.0` and earlier. It is compatible with Elasticsearch 6.x via version `6.0.0`. It is compatible with Elasticsearch 7.x via version `7.0.0` or installing directly from the `main` branch of this repository. It works with many ORM/ODMs, including ActiveRecord and Mongoid.
13
13
 
14
14
  ## Dependencies
15
15
 
data/estella.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
 
17
17
  gem.add_runtime_dependency 'activemodel'
18
18
  gem.add_runtime_dependency 'activesupport'
19
- gem.add_runtime_dependency 'elasticsearch-model', '~> 6.0'
19
+ gem.add_runtime_dependency 'elasticsearch-model', '~> 7.0'
20
20
 
21
21
  gem.add_development_dependency 'activerecord'
22
22
  gem.add_development_dependency 'pry'
@@ -63,7 +63,7 @@ module Estella
63
63
 
64
64
  def bulk_index(batch_of_ids)
65
65
  create_index! unless index_exists?
66
- __elasticsearch__.client.bulk index: index_name, type: document_type, body: batch_to_bulk(batch_of_ids)
66
+ __elasticsearch__.client.bulk index: index_name, body: batch_to_bulk(batch_of_ids)
67
67
  end
68
68
 
69
69
  # @return true if the index exists
@@ -98,7 +98,7 @@ module Estella
98
98
  end
99
99
 
100
100
  def es_delete_document(id)
101
- __elasticsearch__.client.delete type: document_type, id: id, index: index_name
101
+ __elasticsearch__.client.delete id: id, index: index_name
102
102
  end
103
103
  end
104
104
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Estella
4
- VERSION = '6.0.0'
4
+ VERSION = '7.0.0'
5
5
  end
@@ -20,8 +20,6 @@ describe Estella::Searchable, type: :model do
20
20
  'foo'
21
21
  end
22
22
 
23
- document_type 'searchable_model'
24
-
25
23
  searchable do
26
24
  field :title, type: :text, analysis: Estella::Analysis::FULLTEXT_ANALYSIS, factor: 1.0
27
25
  field :keywords, type: :text, analysis: %i[default snowball], factor: 0.5
@@ -80,7 +78,7 @@ describe Estella::Searchable, type: :model do
80
78
  it 'indexes slug field by default' do
81
79
  SearchableModel.create(title: 'liapunov', slug: 'liapunov')
82
80
  SearchableModel.refresh_index!
83
- expect(SearchableModel.mappings.to_hash[:searchable_model][:properties].key?(:slug)).to eq true
81
+ expect(SearchableModel.mappings.to_hash[:properties].key?(:slug)).to eq true
84
82
  end
85
83
  it 'supports boolean filters' do
86
84
  liapunov = SearchableModel.create(title: 'liapunov', published: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: estella
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anil Bawa-Cavia
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-01-27 00:00:00.000000000 Z
12
+ date: 2024-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '6.0'
48
+ version: '7.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '6.0'
55
+ version: '7.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: activerecord
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  requirements: []
203
- rubygems_version: 3.3.3
203
+ rubygems_version: 3.5.6
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: Make your Ruby objects searchable with Elasticsearch.