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.
42
42
43
-
The version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
43
+
The version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
44
44
45
45
| Rubygem || Elasticsearch |
46
46
|:-------------:|:-:| :-----------: |
47
47
| 0.1 | → | 1.x |
48
48
| 2.x | → | 2.x |
49
49
| 5.x | → | 5.x |
50
50
| 6.x | → | 6.x |
51
-
|master| → | 7.x |
51
+
|main | → | 7.x |
52
52
53
53
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.
54
54
@@ -58,13 +58,13 @@ Check out [Elastic product end of life dates](https://www.elastic.co/support/eol
which contains various features for Ruby on Rails applications
69
69
70
70
Example of a basic integration into an ActiveRecord-based model:
@@ -87,7 +87,7 @@ Article.import
87
87
```
88
88
89
89
You can generate a simple Ruby on Rails application with a single command
90
-
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-rails#rails-application-templates)). You'll need to have an Elasticsearch cluster running on your system before generating the app. The easiest way of getting this set up is by running it with Docker with this command:
90
+
(see the [other available templates](https://github.com/elastic/elasticsearch-rails/tree/main/elasticsearch-rails#rails-application-templates)). You'll need to have an Elasticsearch cluster running on your system before generating the app. The easiest way of getting this set up is by running it with Docker with this command:
91
91
92
92
```bash
93
93
docker run \
@@ -103,7 +103,7 @@ You can generate a simple Ruby on Rails application with a single command
103
103
Once Elasticsearch is running, you can generate the simple app with this command:
104
104
105
105
```bash
106
-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
106
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/01-basic.rb
107
107
```
108
108
109
109
Example of using Elasticsearch as a repository for a Ruby domain object:
Copy file name to clipboardexpand all lines: elasticsearch-model/README.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ It aims to simplify integration of Ruby classes ("models"), commonly found e.g.
8
8
9
9
This library is compatible with Ruby 2.4 and higher.
10
10
11
-
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
11
+
The library version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
12
12
13
13
| Rubygem || Elasticsearch |
14
14
|:-------------:|:-:| :-----------: |
15
15
| 0.1 | → | 1.x |
16
16
| 2.x | → | 2.x |
17
17
| 5.x | → | 5.x |
18
18
| 6.x | → | 6.x |
19
-
|master| → | 7.x |
19
+
|main | → | 7.x |
20
20
21
21
## Installation
22
22
@@ -116,7 +116,7 @@ See the `Elasticsearch::Model` module documentation for technical information.
116
116
117
117
### The Elasticsearch client
118
118
119
-
The module will set up a [client](https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch),
119
+
The module will set up a [client](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch),
120
120
connected to `localhost:9200`, by default. You can access and use it as any other `Elasticsearch::Client`:
library for more information about compatibility with the Ruby on Rails framework.
253
253
254
254
When you want to access both the database `records` and search `results`, use the `each_with_hit`
@@ -343,7 +343,7 @@ response.results.first.title
343
343
# => "Quick brown fox"
344
344
```
345
345
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:
346
+
Also, you can use the [**`elasticsearch-dsl`**](https://github.com/elastic/elasticsearch-ruby/tree/main/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
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ Persistence layer for Ruby domain objects in Elasticsearch, using the Repository
6
6
7
7
This library is compatible with Ruby 2.4 and higher.
8
8
9
-
The library version numbers follow the Elasticsearch major versions. The `master` branch is compatible with the latest Elasticsearch stack stable release.
9
+
The library version numbers follow the Elasticsearch major versions. The `main` branch is compatible with the latest Elasticsearch stack stable release.
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
116
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/02-pretty.rb
117
117
```
118
118
119
-
Run the same command with the [`03-expert.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/03-expert.rb)
119
+
Run the same command with the [`03-expert.rb`](https://github.com/elastic/elasticsearch-rails/blob/main/elasticsearch-rails/lib/rails/templates/03-expert.rb)
120
120
template to refactor the application into a more complex use case,
121
121
with couple of hundreds of The New York Times articles as the example content.
122
122
The template will extract the Elasticsearch integration into a `Searchable` "concern" module,
123
123
define complex mapping, custom serialization, implement faceted navigation and suggestions as a part of
124
124
a complex query, and add a _Sidekiq_-based worker for updating the index in the background.
125
125
126
126
```bash
127
-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
127
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/main/elasticsearch-rails/lib/rails/templates/03-expert.rb
0 commit comments