File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ public function mpercolate($params = array())
451
451
*
452
452
* @return array
453
453
*/
454
- public function termvector ($ params = array ())
454
+ public function termvectors ($ params = array ())
455
455
{
456
456
$ index = $ this ->extractArgument ($ params , 'index ' );
457
457
$ type = $ this ->extractArgument ($ params , 'type ' );
@@ -461,8 +461,8 @@ public function termvector($params = array())
461
461
/** @var callback $endpointBuilder */
462
462
$ endpointBuilder = $ this ->endpoints ;
463
463
464
- /** @var \Elasticsearch\Endpoints\TermVector $endpoint */
465
- $ endpoint = $ endpointBuilder ('TermVector ' );
464
+ /** @var \Elasticsearch\Endpoints\TermVectors $endpoint */
465
+ $ endpoint = $ endpointBuilder ('TermVectors ' );
466
466
$ endpoint ->setIndex ($ index )
467
467
->setType ($ type )
468
468
->setID ($ id )
@@ -473,14 +473,6 @@ public function termvector($params = array())
473
473
return $ endpoint ->resultOrFuture ($ response );
474
474
}
475
475
476
- /**
477
- * Redirect to termvector, this is just a naming difference depending on version
478
- */
479
- public function termvectors ($ params = array ())
480
- {
481
- return $ this ->termvector ($ params );
482
- }
483
-
484
476
/**
485
477
* $params['index'] = (string) Default index for items which don't provide one
486
478
* ['type'] = (string) Default document type for items which don't provide one
Original file line number Diff line number Diff line change 5
5
use Elasticsearch \Common \Exceptions ;
6
6
7
7
/**
8
- * Class TermVector
8
+ * Class TermVectors
9
9
*
10
10
* @category Elasticsearch
11
11
* @package Elasticsearch\Endpoints
12
12
* @author Zachary Tong <zach@elastic.co>
13
13
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
14
14
* @link http://elastic.co
15
15
*/
16
- class TermVector extends AbstractEndpoint
16
+ class TermVectors extends AbstractEndpoint
17
17
{
18
18
/**
19
19
* @param array $body
@@ -40,24 +40,24 @@ protected function getURI()
40
40
{
41
41
if (isset ($ this ->index ) !== true ) {
42
42
throw new Exceptions \RuntimeException (
43
- 'index is required for TermVector '
43
+ 'index is required for TermVectors '
44
44
);
45
45
}
46
46
if (isset ($ this ->type ) !== true ) {
47
47
throw new Exceptions \RuntimeException (
48
- 'type is required for TermVector '
48
+ 'type is required for TermVectors '
49
49
);
50
50
}
51
51
if (isset ($ this ->id ) !== true ) {
52
52
throw new Exceptions \RuntimeException (
53
- 'id is required for TermVector '
53
+ 'id is required for TermVectors '
54
54
);
55
55
}
56
56
57
57
$ index = $ this ->index ;
58
58
$ type = $ this ->type ;
59
59
$ id = $ this ->id ;
60
- $ uri = "/ $ index/ $ type/ $ id/_termvector " ;
60
+ $ uri = "/ $ index/ $ type/ $ id/_termvectors " ;
61
61
62
62
return $ uri ;
63
63
}
You can’t perform that action at this time.
0 commit comments