@@ -21,7 +21,7 @@ import (
21
21
22
22
const (
23
23
// Version is the current version of Elastic.
24
- Version = "3.0.28 "
24
+ Version = "3.0.29 "
25
25
26
26
// DefaultUrl is the default endpoint of Elasticsearch on the local machine.
27
27
// It is used e.g. when initializing a new Client without a specific URL.
@@ -1194,6 +1194,11 @@ func (c *Client) Update() *UpdateService {
1194
1194
return NewUpdateService (c )
1195
1195
}
1196
1196
1197
+ // UpdateByQuery performs an update on a set of documents.
1198
+ func (c * Client ) UpdateByQuery (indices ... string ) * UpdateByQueryService {
1199
+ return NewUpdateByQueryService (c ).Index (indices ... )
1200
+ }
1201
+
1197
1202
// Bulk is the entry point to mass insert/update/delete documents.
1198
1203
func (c * Client ) Bulk () * BulkService {
1199
1204
return NewBulkService (c )
@@ -1204,6 +1209,31 @@ func (c *Client) BulkProcessor() *BulkProcessorService {
1204
1209
return NewBulkProcessorService (c )
1205
1210
}
1206
1211
1212
+ // Reindex returns a service that will reindex documents from a source
1213
+ // index into a target index.
1214
+ //
1215
+ // Notice that this Reindexer is an Elastic-specific solution that pre-dated
1216
+ // the Reindex API introduced in Elasticsearch 2.3.0 (see ReindexTask).
1217
+ //
1218
+ // See http://www.elastic.co/guide/en/elasticsearch/guide/current/reindex.html
1219
+ // for more information about reindexing.
1220
+ func (c * Client ) Reindex (sourceIndex , targetIndex string ) * Reindexer {
1221
+ return NewReindexer (c , sourceIndex , CopyToTargetIndex (targetIndex ))
1222
+ }
1223
+
1224
+ // ReindexTask copies data from a source index into a destination index.
1225
+ //
1226
+ // The Reindex API has been introduced in Elasticsearch 2.3.0. Notice that
1227
+ // there is a Elastic-specific Reindexer that pre-dates the Reindex API from
1228
+ // Elasticsearch. If you rely on that, use the ReindexerService via
1229
+ // Client.Reindex.
1230
+ //
1231
+ // See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
1232
+ // for details on the Reindex API.
1233
+ func (c * Client ) ReindexTask () * ReindexService {
1234
+ return NewReindexService (c )
1235
+ }
1236
+
1207
1237
// TODO Term Vectors
1208
1238
// TODO Multi termvectors API
1209
1239
@@ -1462,6 +1492,16 @@ func (c *Client) NodesInfo() *NodesInfoService {
1462
1492
return NewNodesInfoService (c )
1463
1493
}
1464
1494
1495
+ // TasksCancel cancels tasks running on the specified nodes.
1496
+ func (c * Client ) TasksCancel () * TasksCancelService {
1497
+ return NewTasksCancelService (c )
1498
+ }
1499
+
1500
+ // TasksList retrieves the list of tasks running on the specified nodes.
1501
+ func (c * Client ) TasksList () * TasksListService {
1502
+ return NewTasksListService (c )
1503
+ }
1504
+
1465
1505
// TODO Pending cluster tasks
1466
1506
// TODO Cluster Reroute
1467
1507
// TODO Cluster Update Settings
@@ -1514,14 +1554,6 @@ func (c *Client) Ping(url string) *PingService {
1514
1554
return NewPingService (c ).URL (url )
1515
1555
}
1516
1556
1517
- // Reindex returns a service that will reindex documents from a source
1518
- // index into a target index. See
1519
- // http://www.elastic.co/guide/en/elasticsearch/guide/current/reindex.html
1520
- // for more information about reindexing.
1521
- func (c * Client ) Reindex (sourceIndex , targetIndex string ) * Reindexer {
1522
- return NewReindexer (c , sourceIndex , CopyToTargetIndex (targetIndex ))
1523
- }
1524
-
1525
1557
// WaitForStatus waits for the cluster to have the given status.
1526
1558
// This is a shortcut method for the ClusterHealth service.
1527
1559
//
0 commit comments