text:字符串将被拆分index
keyword:整个字符串作为一个整体index
一个字符串可以同时使用两个type:
PUT my_index { "mappings": { "properties": { "city": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } } }
text:字符串将被拆分index
keyword:整个字符串作为一个整体index
一个字符串可以同时使用两个type:
PUT my_index { "mappings": { "properties": { "city": { "type": "text", "fields": { "raw": { "type": "keyword" } } } } } }