Sitelet https://github.com/github/elastomer-client/commit/2347557fc57b9060c500911bdfbb324682d392d2
Skip to content

Commit 2347557

Browse files
authored
Merge branch 'main' into remove-8.6
2 parents ddf78a9 + 80415dc commit 2347557

26 files changed

Lines changed: 111 additions & 6639 deletions

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ jobs:
1212
strategy:
1313
matrix:
1414
ruby-version: ['3.0', '3.1', '3.2']
15-
ES_VERSION: ['5.6.15', '7.17.8', '8.7.0']
15+
ES_VERSION: ['5.6.15', '8.7.0']
1616
include:
1717
- ES_VERSION: '5.6.15'
1818
ES_DOWNLOAD_URL: >-
1919
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.15.tar.gz
20-
- ES_VERSION: '7.17.8'
21-
ES_DOWNLOAD_URL: >-
22-
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.8-linux-x86_64.tar.gz
2320
- ES_VERSION: '8.7.0'
2421
ES_DOWNLOAD_URL: >-
2522
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.7.0-linux-x86_64.tar.gz

‎README.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,10 @@ Get started by cloning and running a few scripts:
9898
2. Run ES in Docker (see below)
9999
3. Run tests
100100
- for ES 8: `ES_PORT=9208 rake test`
101-
- for ES 7: `ES_PORT=9207 rake test`
102101
- for ES 5: `ES_PORT=9205 rake test`
103102

104103

105-
Run ES 5, ES 7, and ES 8:
104+
Run ES 5 and ES 8:
106105
```
107106
cd docker
108107
docker compose --profile all up
@@ -114,12 +113,6 @@ cd docker
114113
docker compose --profile es8 up
115114
```
116115

117-
Run only ES 7:
118-
```
119-
cd docker
120-
docker compose --profile es7 up
121-
```
122-
123116
Run only ES 5:
124117
```
125118
cd docker

‎docker/compose.yaml‎

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,10 @@ services:
2424
- IPC_LOCK
2525
volumes:
2626
- esrepos8:/usr/share/elasticsearch/repos
27-
- ./elasticsearch7plus.yml:/usr/share/elasticsearch/config/elasticsearch.yml
27+
- ./elasticsearch8plus.yml:/usr/share/elasticsearch/config/elasticsearch.yml
2828
ports:
2929
- 127.0.0.1:${ES_8_PORT:-9208}:9200
3030

31-
elasticsearch7.17:
32-
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.7
33-
container_name: es7.17
34-
profiles: ["es7", "all"]
35-
environment:
36-
- cluster.name=elastomer7.17
37-
- bootstrap.memory_lock=true
38-
- discovery.type=single-node
39-
- xpack.monitoring.enabled=false
40-
- xpack.security.enabled=false
41-
- xpack.watcher.enabled=false
42-
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
43-
ulimits:
44-
memlock:
45-
soft: -1
46-
hard: -1
47-
nofile:
48-
soft: 65536
49-
hard: 65536
50-
mem_limit: 2g
51-
cap_add:
52-
- IPC_LOCK
53-
volumes:
54-
- esrepos7:/usr/share/elasticsearch/repos
55-
- ./elasticsearch7plus.yml:/usr/share/elasticsearch/config/elasticsearch.yml
56-
ports:
57-
- 127.0.0.1:${ES_7_PORT:-9207}:9200
58-
5931
elasticsearch5.6:
6032
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.4
6133
container_name: es5.6
@@ -91,21 +63,9 @@ volumes:
9163
device: tmpfs
9264
type: tmpfs
9365
o: size=100m,uid=102,gid=102
94-
esrepos7:
95-
driver: local
96-
driver_opts:
97-
device: tmpfs
98-
type: tmpfs
99-
o: size=100m,uid=102,gid=102
10066
esrepos5:
10167
driver: local
10268
driver_opts:
10369
device: tmpfs
10470
type: tmpfs
10571
o: size=100m,uid=102,gid=102
106-
esrepos2:
107-
driver: local
108-
driver_opts:
109-
device: tmpfs
110-
type: tmpfs
111-
o: size=100m,uid=102,gid=102

‎lib/elastomer_client/client/bulk.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def prepare_params(document, params)
333333
params.delete(:_id) if params[:_id].nil? || params[:_id].to_s.empty?
334334
params.delete("_id") if params["_id"].nil? || params["_id"].to_s.empty?
335335

336-
if client.version_support.es_version_7_plus?
336+
if client.version_support.es_version_8_plus?
337337
params.delete(:_type)
338338
params.delete("_type")
339339
end
@@ -356,7 +356,7 @@ def convert_special_keys(params)
356356

357357
SPECIAL_KEYS.each do |key|
358358
omit_prefix = (
359-
client.version_support.es_version_7_plus? &&
359+
client.version_support.es_version_8_plus? &&
360360
UNPREFIXED_SPECIAL_KEYS.include?(key)
361361
)
362362

‎lib/elastomer_client/client/docs.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def update_params(params, overrides = nil, delete_type = false)
603603
h = defaults.update params
604604
h.update overrides unless overrides.nil?
605605
h[:routing] = h[:routing].join(",") if h[:routing].is_a?(Array)
606-
h[:type] = "_doc" if client.version_support.es_version_7_plus? && !delete_type
606+
h[:type] = "_doc" if client.version_support.es_version_8_plus? && !delete_type
607607
h.delete(:type) if delete_type
608608
h
609609
end

‎lib/elastomer_client/client/index.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def segments(params = {})
348348
#
349349
# Returns a Docs instance.
350350
def docs(type = nil)
351-
type = "_doc" if client.version_support.es_version_7_plus?
351+
type = "_doc" if client.version_support.es_version_8_plus?
352352
client.docs name, type
353353
end
354354

@@ -557,7 +557,7 @@ def percolator(id)
557557
def update_params(params, overrides = nil)
558558
h = defaults.update params
559559
h.update overrides unless overrides.nil?
560-
h.delete(:type) if client.version_support.es_version_7_plus?
560+
h.delete(:type) if client.version_support.es_version_8_plus?
561561
h
562562
end
563563

0 commit comments

Comments
 (0)