我正在从ES2迁移到ES6。
我已经有了这些要迁移的定义:
'1' => array('type' => 'string', 'analyzer' => 'autocomplete', 'norms' => array('enabled' => false)),
'2' => array('type' => 'string', 'analyzer' => 'standard','fields'=>array('raw'=>array('type'=>'string','index'=>'not_analyzed'))),
'3' => array('type' => 'string', 'analyzer' => 'custom_search_analyzer'),
'4' => array('type' => 'integer', 'analyzer' => 'standard', 'index'=>'not_analyzed'),
'5' => array('type' => 'integer', 'analyzer' => 'standard'),
'6' => array('type' => 'integer', 'analyzer' => 'autocomplete', 'index'=>'not_analyzed'),
我知道index : analyzed
转换为type : text
,而index : not analyzed
转换为type = keyword
。
遵循以下逻辑:
'1' => array('type' => 'keyword', 'analyzer' => 'autocomplete', 'norms' => array('enabled' => false)),
'2' => array('type' => 'text', 'analyzer' => 'standard','fields'=>array('raw'=>array('type'=>'string','index'=>'not_analyzed'))),
'3' => array('type' => 'keyword', 'analyzer' => 'custom_search_analyzer'),
'4' => array('type' => 'integer', 'analyzer' => 'standard', 'index'=>'not_analyzed'),
'5' => array('type' => 'integer', 'analyzer' => 'standard'),
'6' => array('type' => 'integer', 'analyzer' => 'autocomplete', 'index'=>'not_analyzed'),
但是可以同时具有两个索引的类型integer
呢?我应该将其转换为什么?分析仪又如何相应变化?