-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MsearchTemplate endpoint implementation #599
Comments
++ Looks like it was just an oversight. I'll try to add it soon :) |
I've got an error when I was trying to call msearchTemplate method $request = [
'body' => [
[
'index' => 'base'
],
[
'file' => 'basetmpl',
'params' => [
'baselist' => [
'baseid' => [
['value' => 1],
['value' => 2, 'isLast' => true]
]
]
]
],
[
'index' => 'target'
],
[
'file' => 'targettmpl',
'params' => [
'targetlist' => [
'targetid' => [
['value' => 11],
['value' => 12, 'isLast' => true]
]
]
]
]
]
];
$result = $this->client->msearchTemplate($request); Too few arguments to function Elasticsearch\Endpoints\MsearchTemplate::__construct(), 0 passed in .../vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php on line 531 and exactly 1 expected Seems you forgot to change one line in ClientBuilder. if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MPercolate') {
return new $fullPath($serializer);
} else {
return new $fullPath();
} should be if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MsearchTemplate' || $class === 'MPercolate') {
return new $fullPath($serializer);
} else {
return new $fullPath();
} Am I right? |
Argh, yep, you're right. Wanna send a PR? If not, I'll take care of this tomorrow. Sorry about that! |
@polyfractal I've sent two PR as you mentioned above, but they are still open. Something wrong? |
I'm just bad, that's all :( Sorry for the delay, been very busy around here. Merged! Thanks again |
MsearchTemplate endpoint implementation
/_msearch/template is a beautiful and useful feature in Elasticsearch 5.x, and I have no idea why this endpoint isn't implemented yet here.
The text was updated successfully, but these errors were encountered: