ElasticSearch索引出错

I want to index some data from MongoDB to ElasticSearch but i got a error like below:

{"error":{"root_cause": [{"type":"number_format_exception","reason":"Unable to parse"}],"type":"number_format_exception","reason":"Unable to parse"},"status":400}

All my data are a string and array string on MongoDB and all my Elastic mapping type is text like below :

        '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',
        ]

Also, I change some data value while indexing to elastic

      $words = explode(' ',$array['whole_name_fa']);
      for($i=0; $i < count($words);$i++){
        $tags[] = $words[$i].'|'.$i;
      }
      $array['searchable_whole_name_fa'] = implode(' ',$tags);

So why the error shows while indexing?

dpvr49226
dpvr49226 没有身体可以帮忙?
2 年多之前 回复
dongshi3818
dongshi3818 我该怎么办呢?
2 年多之前 回复
dongpiao0731
dongpiao0731 当字段类型被记录猜到,然后后面的记录没有正确的类型时,通常会发生这种情况。
2 年多之前 回复
doulan4371
doulan4371 我的意思是事实上索引,我会编辑我的问题
2 年多之前 回复
dryl34156
dryl34156 在elasticsearch“voca。”中,reindex意味着将弹性搜索索引复制到另一个,这是你想要做的?
2 年多之前 回复
dounianji7883
dounianji7883 因为第一次索引完成没有任何错误,但当我将数据值从whole_name_fa更改为searchable_whole_name_fa而索引显示错误
2 年多之前 回复
doujing6436
doujing6436 你为什么称它为“重新索引”?
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐