You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The libraries are compatible with Ruby 2.4 and higher.
37
+
38
+
The version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
39
+
40
+
| Rubygem || Elasticsearch |
41
+
|:-------------:|:-:| :-----------: |
42
+
| 0.1 | → | 1.x |
43
+
| 2.x | → | 2.x |
44
+
| 5.x | → | 5.x |
45
+
| 6.x | → | 6.x |
46
+
| master | → | 7.x |
47
+
48
+
Use a release that matches the major version of Elasticsearch in your stack. Each client version is backwards compatible with all minor versions of the same major version.
49
+
50
+
Check out [Elastic product end of life dates](https://www.elastic.co/support/eol) to learn which releases are still actively supported and tested.
Copy file name to clipboardexpand all lines: elasticsearch-model/README.md
+11-23
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,22 @@
1
1
# Elasticsearch::Model
2
2
3
-
The `elasticsearch-model` library builds on top of the
4
-
the [`elasticsearch`](https://github.com/elastic/elasticsearch-ruby) library.
3
+
The `elasticsearch-model` library builds on top of the the [`elasticsearch`](https://github.com/elastic/elasticsearch-ruby) library.
5
4
6
-
It aims to simplify integration of Ruby classes ("models"), commonly found
7
-
e.g. in [Ruby on Rails](http://rubyonrails.org) applications, with the
8
-
[Elasticsearch](https://www.elastic.co) search and analytics engine.
5
+
It aims to simplify integration of Ruby classes ("models"), commonly found e.g. in [Ruby on Rails](http://rubyonrails.org) applications, with the [Elasticsearch](https://www.elastic.co) search and analytics engine.
9
6
10
7
## Compatibility
11
8
12
-
This library is compatible with Ruby 1.9.3 and higher.
9
+
This library is compatible with Ruby 2.4 and higher.
13
10
14
-
The library version numbers follow the Elasticsearch major versions, and the `master` branch
15
-
is compatible with the Elasticsearch `master` branch, therefore, with the next major version.
11
+
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
16
12
17
13
| Rubygem || Elasticsearch |
18
14
|:-------------:|:-:| :-----------: |
19
15
| 0.1 | → | 1.x |
20
16
| 2.x | → | 2.x |
21
17
| 5.x | → | 5.x |
22
18
| 6.x | → | 6.x |
23
-
| master | → |master|
19
+
| master | → |7.x |
24
20
25
21
## Installation
26
22
@@ -73,9 +69,7 @@ This will extend the model with functionality related to Elasticsearch.
73
69
74
70
#### Feature Extraction Pattern
75
71
76
-
Instead of including the `Elasticsearch::Model` module directly in your model,
77
-
you can include it in a "concern" or "trait" module, which is quite common pattern in Rails applications,
78
-
using e.g. `ActiveSupport::Concern` as the instrumentation:
72
+
Instead of including the `Elasticsearch::Model` module directly in your model, you can include it in a "concern" or "trait" module, which is quite common pattern in Rails applications, using e.g. `ActiveSupport::Concern` as the instrumentation:
79
73
80
74
```ruby
81
75
# In: app/models/concerns/searchable.rb
@@ -290,11 +284,8 @@ NOTE: It is _not_ possible to chain other methods on top of the `records` object
290
284
291
285
#### Pagination
292
286
293
-
You can implement pagination with the `from` and `size` search parameters. However, search results
294
-
can be automatically paginated with the [`kaminari`](http://rubygems.org/gems/kaminari) or
(The pagination gems must be added before the Elasticsearch gems in your Gemfile,
297
-
or loaded first in your application.)
287
+
You can implement pagination with the `from` and `size` search parameters. However, search results can be automatically paginated with the [`kaminari`](http://rubygems.org/gems/kaminari) or [`will_paginate`](https://github.com/mislav/will_paginate) gems.
288
+
(The pagination gems must be added before the Elasticsearch gems in your Gemfile, or loaded first in your application.)
298
289
299
290
If Kaminari or WillPaginate is loaded, use the familiar paging methods:
In most situations, you'll want to pass the search definition
326
-
in the Elasticsearch [domain-specific language](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) to the client:
316
+
In most situations, you'll want to pass the search definition in the Elasticsearch [domain-specific language](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) to the client:
You can pass any object which implements a `to_hash` method, which is called automatically,
337
-
so you can use a custom class or your favourite JSON builder to build the search definition:
326
+
You can pass any object which implements a `to_hash` method, which is called automatically, so you can use a custom class or your favourite JSON builder to build the search definition:
338
327
339
328
```ruby
340
329
require'jbuilder'
@@ -354,8 +343,7 @@ response.results.first.title
354
343
# => "Quick brown fox"
355
344
```
356
345
357
-
Also, you can use the [**`elasticsearch-dsl`**](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-dsl) library, which provides a specialized Ruby API for
358
-
the Elasticsearch Query DSL:
346
+
Also, you can use the [**`elasticsearch-dsl`**](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-dsl) library, which provides a specialized Ruby API for the Elasticsearch Query DSL:
Copy file name to clipboardexpand all lines: elasticsearch-persistence/README.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,17 @@ Persistence layer for Ruby domain objects in Elasticsearch, using the Repository
4
4
5
5
## Compatibility
6
6
7
-
This library is compatible with Ruby 1.9.3 and higher.
7
+
This library is compatible with Ruby 2.4 and higher.
8
8
9
-
The library version numbers follow the Elasticsearch major versions, and the `master` branch
10
-
is compatible with the Elasticsearch `master` branch, therefore, with the next major version.
9
+
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
0 commit comments