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
I am using elasticsearch for php client and this plugin. how to write "index" and "type" using php;
i have code like this :
$params['index'] = '_river';
$params['type'] = 'my_jdbc_river';
$params['body'] = [
'mapping' => [
'type' => 'jdbc',
'jdbc' => [
'url' => 'jdbc:mysql://localhost:3306/tourexplora',
"user" => "root",
"password" => "",
"sql" => "select *, id as _id from cities",
"index" => "teindex9",
"type" => "cities",
"bulk_size" => 500
]
]
];
$ret = $this->client->indices()->create($params);
but errors shown like this:
exception 'Elasticsearch\Common\Exceptions\UnexpectedValueException' with
message 'type is not a valid parameter' in
D:\xampp\htdocs\tourexplora\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Endpoints\AbstractEndpoint.php:263
Stack trace:
#0
I am using elasticsearch for php client and this plugin. how to write "index" and "type" using php;
i have code like this :
$params['index'] = '_river';
$params['type'] = 'my_jdbc_river';
$params['body'] = [
'mapping' => [
'type' => 'jdbc',
'jdbc' => [
'url' => 'jdbc:mysql://localhost:3306/tourexplora',
"user" => "root",
"password" => "",
"sql" => "select *, id as _id from cities",
"index" => "teindex9",
"type" => "cities",
"bulk_size" => 500
]
]
];
but errors shown like this:
exception 'Elasticsearch\Common\Exceptions\UnexpectedValueException' with
message 'type is not a valid parameter' in
D:\xampp\htdocs\tourexplora\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Endpoints\AbstractEndpoint.php:263
Stack trace:
#0
D:\xampp\htdocs\tourexplora\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Endpoints\AbstractEndpoint.php(239):
Elasticsearch\Endpoints\AbstractEndpoint->ifParamsInvalidThrowException(Array)
#1
D:\xampp\htdocs\tourexplora\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Endpoints\AbstractEndpoint.php(115):
Elasticsearch\Endpoints\AbstractEndpoint->checkUserParams(Array)
#2
D:\xampp\htdocs\tourexplora\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Namespaces\IndicesNamespace.php(838):
Elasticsearch\Endpoints\AbstractEndpoint->setParams(Array)
#3
D:\xampp\htdocs\tourexplora\protected\controllers\ElasticsearchController.php(164):
Elasticsearch\Namespaces\IndicesNamespace->create(Array)
#4
D:\xampp\htdocs\tourexplora\yii\framework114\web\actions\CInlineAction.php(49):
ElasticsearchController->actionCreateRiver()
#5 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(308):
CInlineAction->runWithParams(Array)
#6 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(286):
CController->runAction(Object(CInlineAction))
#7 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(265):
CController->runActionWithFilters(Object(CInlineAction), Array)
#8
D:\xampp\htdocs\tourexplora\yii\framework114\web\CWebApplication.php(282):
CController->run('createRiver')
#9
D:\xampp\htdocs\tourexplora\yii\framework114\web\CWebApplication.php(141):
CWebApplication->runController('elasticsearch/c...')
#10
The text was updated successfully, but these errors were encountered: