Я хочу проиндексировать некоторые данные из MongoDB в ElasticSearch, но я получил ошибку, подобную приведенной ниже:
{"error":{"root_cause": [{"type":"number_format_exception","reason":"Unable to parse"}],"type":"number_format_exception","reason":"Unable to parse"},"status":400}
Все мои данные представляют собой строку и строку массива в MongoDB, и все мои типы сопоставления Elastic имеют вид текстаниже:
'iran_code' => [
'type' => 'text',
],
'gs1' => [
'type' => 'text',
],
'international_code' => [
'type' => 'text',
],
"catalouge_link" => [
'type' => 'text',
],
"group_name_fa" => [
'type' => 'text',
],
"group_name_eng" => [
'type' => 'text',
],
"member_name" => [
'type' => 'text',
],
"brand" => [
'type' => 'text',
],
"whole_name_fa" => [
'type' => 'text',
],
"searchable_whole_name_fa" => [
'type' => 'text',
"norms"=>false,
"term_vector"=> "with_positions_offsets_payloads",
"analyzer"=> "positionPayloadAnalyzer",
"similarity"=> "positionSimilarity",
],
'whole_name_eng' => [
'type' => 'text',
],
'attr_keys' => [
'type' => 'text',
],
'attr_values' => [
'type' => 'text',
]
Кроме того, я изменяю некоторые значения данных при индексации на эластичные
$words = explode(' ',$array['whole_name_fa']);
for($i=0; $i < count($words);$i++){
$tags[] = $words[$i].'|'.$i;
}
$array['searchable_whole_name_fa'] = implode(' ',$tags);
Так почему ошибка отображается при индексации?