使用分析仪标准的整数类型

时间:2019-04-08 10:31:27

标签: elasticsearch elastica

我正在从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呢?我应该将其转换为什么?分析仪又如何相应变化?

0 个答案:

没有答案