:::tips 基本语法:

    • 请求方式:PUT
    • 请求路径:/索引库名
    • 请求参数:mapping映射 :::
      1. PUT /索引库名
      2. {
      3. "mappings": {
      4. "properties": {
      5. "字段名1":{
      6. "type": "text",
      7. "analyzer": "ik_smart" //设置IK分词器
      8. },
      9. "字段名2":{
      10. "type": "keyword",
      11. "index": "false" //设置不参与索引
      12. },
      13. "字段名3":{
      14. "properties": {
      15. "子字段": {
      16. "type": "keyword"
      17. }
      18. }
      19. }
      20. }
      21. }
      22. }