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
Since 6.1.0 all metadata except _index, _type and _id are accepted without the
underscore. In 6.5 it produces a deprecation warning and in 7 they are no
longer accepted.
* \Elastica\AbstractUpdateAction::getOptions( $fields ) no longer supports the $underscore parameter, option names must match what elasticsearch expects.
7
8
8
9
### Bugfixes
9
10
* Always set the Guzzle `base_uri` to support connecting to multiple ES hosts. [#1618](https://github.com/ruflin/Elastica/pull/1618)
11
+
* Properly handle underscore prefixes in options and bulk request metadata ([cf upstream](https://github.com/elastic/elasticsearch/issues/26886). [#1621](https://github.com/ruflin/Elastica/pull/1621)
@@ -354,23 +354,23 @@ public function hasRefresh()
354
354
*/
355
355
publicfunctionsetTimeout($timeout)
356
356
{
357
-
return$this->setParam('_timeout', $timeout);
357
+
return$this->setParam('timeout', $timeout);
358
358
}
359
359
360
360
/**
361
361
* @return bool
362
362
*/
363
363
publicfunctiongetTimeout()
364
364
{
365
-
return$this->getParam('_timeout');
365
+
return$this->getParam('timeout');
366
366
}
367
367
368
368
/**
369
369
* @return bool
370
370
*/
371
371
publicfunctionhasTimeout()
372
372
{
373
-
return$this->hasParam('_timeout');
373
+
return$this->hasParam('timeout');
374
374
}
375
375
376
376
/**
@@ -380,23 +380,23 @@ public function hasTimeout()
380
380
*/
381
381
publicfunctionsetConsistency($timeout)
382
382
{
383
-
return$this->setParam('_consistency', $timeout);
383
+
return$this->setParam('consistency', $timeout);
384
384
}
385
385
386
386
/**
387
387
* @return string
388
388
*/
389
389
publicfunctiongetConsistency()
390
390
{
391
-
return$this->getParam('_consistency');
391
+
return$this->getParam('consistency');
392
392
}
393
393
394
394
/**
395
395
* @return bool
396
396
*/
397
397
publicfunctionhasConsistency()
398
398
{
399
-
return$this->hasParam('_consistency');
399
+
return$this->hasParam('consistency');
400
400
}
401
401
402
402
/**
@@ -406,23 +406,23 @@ public function hasConsistency()
406
406
*/
407
407
publicfunctionsetReplication($timeout)
408
408
{
409
-
return$this->setParam('_replication', $timeout);
409
+
return$this->setParam('replication', $timeout);
410
410
}
411
411
412
412
/**
413
413
* @return string
414
414
*/
415
415
publicfunctiongetReplication()
416
416
{
417
-
return$this->getParam('_replication');
417
+
return$this->getParam('replication');
418
418
}
419
419
420
420
/**
421
421
* @return bool
422
422
*/
423
423
publicfunctionhasReplication()
424
424
{
425
-
return$this->hasParam('_replication');
425
+
return$this->hasParam('replication');
426
426
}
427
427
428
428
/**
@@ -455,31 +455,16 @@ public function hasUpsert()
455
455
}
456
456
457
457
/**
458
-
* @param array $fields if empty array all options will be returned, field names can be either with underscored either without, i.e. _percolate, routing
459
-
* @param bool $withUnderscore should option keys contain underscore prefix
458
+
* @param array $fields if empty array all options will be returned
0 commit comments