@@ -11,11 +11,10 @@ Versions
11
11
12
12
| elasticsearch-beyonder | elasticsearch | Release date |
13
13
| :-----------------------:| :-------------:| :------------:|
14
- | 6.5 | 6.5 -> 6.x | 2019-01-04 |
15
- | 6.3 | 6.3 -> 6.4 | 2018-07-21 |
16
- | 6.0 | 6.0 -> 6.2 | 2018-02-05 |
17
- | 5.1 | 5.x | 2017-07-12 |
18
- | 5.0 | 5.x | 2017-07-11 |
14
+ | 7.0-SNAPSHOT | 7.x | |
15
+ | 6.5-SNAPSHOT | 6.x | |
16
+ | 5.1 | 5.x, 6.x | 2017-07-12 |
17
+ | 5.0 | 5.x, 6.x | 2017-07-11 |
19
18
| 2.1.0 | 2.0, 2.1 | 2015-11-25 |
20
19
| 2.0.0 | 2.0 | 2015-10-24 |
21
20
| 1.5.0 | 1.5 | 2015-03-27 |
@@ -26,7 +25,8 @@ Versions
26
25
Documentation
27
26
=============
28
27
29
- * For 6.x elasticsearch versions, you are reading the latest documentation.
28
+ * For 7.x elasticsearch versions, you are reading the latest documentation.
29
+ * For 6.x elasticsearch versions, look at [ master branch] ( https://github.com/dadoonet/elasticsearch-beyonder/tree/master ) .
30
30
* For 5.x elasticsearch versions, look at [ es-5.x branch] ( https://github.com/dadoonet/elasticsearch-beyonder/tree/es-5.x ) .
31
31
* For 2.x elasticsearch versions, look at [ es-2.1 branch] ( https://github.com/dadoonet/elasticsearch-beyonder/tree/es-2.1 ) .
32
32
@@ -49,7 +49,7 @@ Import elasticsearch-beyonder in you project `pom.xml` file:
49
49
<dependency >
50
50
<groupId >fr.pilato.elasticsearch</groupId >
51
51
<artifactId >elasticsearch-beyonder</artifactId >
52
- <version >6.5 </version >
52
+ <version >7.0-SNAPSHOT </version >
53
53
</dependency >
54
54
```
55
55
@@ -62,7 +62,7 @@ For example, here is how to import the REST Client to your project:
62
62
<dependency >
63
63
<groupId >org.elasticsearch.client</groupId >
64
64
<artifactId >elasticsearch-rest-client</artifactId >
65
- <version >6.5.3 </version >
65
+ <version >7.0.0-beta1 </version >
66
66
</dependency >
67
67
```
68
68
@@ -72,21 +72,10 @@ For example, here is how to import the Transport Client to your project (depreca
72
72
<dependency >
73
73
<groupId >org.elasticsearch.client</groupId >
74
74
<artifactId >transport</artifactId >
75
- <version >6.5.3 </version >
75
+ <version >7.0.0-beta1 </version >
76
76
</dependency >
77
77
```
78
78
79
- For example, here is how to import the Secured Transport Client to your project (deprecated):
80
-
81
- ``` xml
82
- <dependency >
83
- <groupId >org.elasticsearch.client</groupId >
84
- <artifactId >x-pack-transport</artifactId >
85
- <version >6.5.3</version >
86
- </dependency >
87
- ```
88
-
89
-
90
79
91
80
Adding Beyonder to your client
92
81
------------------------------
@@ -114,7 +103,7 @@ In that case, Beyonder will search for resources from `models/myelasticsearch`.
114
103
115
104
## Using REST Client (recommended)
116
105
117
- Elasticsearch now provides a [ Rest Client] ( https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.5 /index.html ) .
106
+ Elasticsearch provides a [ Rest Client] ( https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.0 /index.html ) .
118
107
It's the recommended way as the Transport Client is now deprecated and will be removed in a next major version.
119
108
120
109
Just pass to Beyonder a Rest Client instance:
@@ -149,16 +138,6 @@ Client client = new PreBuiltTransportClient(Settings.EMPTY)
149
138
ElasticsearchBeyonder . start(client);
150
139
```
151
140
152
- ## Using Secured Transport Client (deprecated)
153
-
154
- To use the deprecated TransportClient, just pass it to Beyonder:
155
-
156
- ``` java
157
- Client client = new PreBuiltXPackTransportClient (Settings . builder(). put(" xpack.security.user" , " elastic:changeme" ). build())
158
- .addTransportAddress(new InetSocketTransportAddress (new InetSocketAddress (" 127.0.0.1" , 9300 )));
159
- ElasticsearchBeyonder . start(client);
160
- ```
161
-
162
141
Managing indices
163
142
----------------
164
143
@@ -174,9 +153,16 @@ For example, create the following file `src/main/resources/elasticsearch/twitter
174
153
175
154
``` javascript
176
155
{
177
- " settings" : {
178
- " number_of_shards" : 3 ,
179
- " number_of_replicas" : 2
156
+ " settings" : {
157
+ " number_of_shards" : 3 ,
158
+ " number_of_replicas" : 2
159
+ },
160
+ " mappings" : {
161
+ " properties" : {
162
+ " message" : {
163
+ " type" : " text"
164
+ }
165
+ }
180
166
}
181
167
}
182
168
```
@@ -185,31 +171,6 @@ By default, Beyonder will not overwrite an index if it already exists.
185
171
This can be overridden by setting ` force ` to ` true ` in the expanded factory method
186
172
` ElasticsearchBeyonder.start() ` .
187
173
188
- Managing types (deprecated)
189
- ---------------------------
190
-
191
- This feature will be removed in the next future. Define your mapping within the index settings (see above)
192
- or using a template (see below).
193
-
194
- If you define a file named ` elasticsearch/twitter/tweet.json ` , it will be automatically applied as the mapping for
195
- the ` tweet ` type in the ` twitter ` index.
196
-
197
- For example, create the following file ` src/main/resources/elasticsearch/twitter/tweet.json ` in your project:
198
-
199
- ``` javascript
200
- {
201
- " tweet" : {
202
- " properties" : {
203
- " message" : {" type" : " string" , " store" : " yes" }
204
- }
205
- }
206
- }
207
- ```
208
-
209
- By default, Beyonder will attempt to merge defined mappings with existing ones.
210
- This can be overridden by setting ` merge ` to ` false ` in the expanded factory method
211
- ` ElasticsearchBeyonder.start() ` .
212
-
213
174
Managing templates
214
175
------------------
215
176
@@ -226,12 +187,9 @@ in your project:
226
187
" number_of_shards" : 1
227
188
},
228
189
" mappings" : {
229
- " tweet" : {
230
- " properties" : {
231
- " message" : {
232
- " type" : " string" ,
233
- " store" : " yes"
234
- }
190
+ " properties" : {
191
+ " message" : {
192
+ " type" : " text"
235
193
}
236
194
}
237
195
}
0 commit comments