ES之映射关系

映射管理

GET     http://127.0.0.1:9200/user/_mapping

{
   "properties":{
       "name":{
           "type":"text",
           "index":true
       },
       "sex":{
           "type":"keyword",
           "index":true
       },
       "tel":{
           "type":"keyword",
           "index":true
       }
   }
} 

text:表示可以进行分词
keyword:表示只能完整匹配
这是一种映射关系,可以通过这个映射关系,设置该属性是否需要被分词。

posted @ 2022-10-23 23:45  King-DA  阅读(76)  评论(0)    收藏  举报