<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      ElasticSearch不區(qū)分字母大小寫搜索

      0、停止使用該索引的服務(wù)(避免新加了數(shù)據(jù)沒備份)

      1、備份filesearch索引(檢查備份的索引和原索引數(shù)據(jù)條數(shù)是否一致)

      1 POST    http://127.0.0.1:9200/_reindex
      2 {
      3     "source":{
      4         "index":"filesearch"
      5     },
      6     "dest":{
      7         "index":"filesearch_bak"
      8     }
      9 }

      2、刪除filesearch索引

      3、新建索引(不包括不區(qū)分大小寫的字段fileName)

       1 PUT    http://127.0.0.1:9200/filesearch
       2 {
       3     "mappings": {
       4         "properties": {
       5             "extendName": {
       6                 "type": "text",
       7                 "fields": {
       8                     "keyword": {
       9                         "ignore_above": 256,
      10                         "type": "keyword"
      11                     }
      12                 }
      13             },
      14             "filePath": {
      15                 "type": "text",
      16                 "fields": {
      17                     "keyword": {
      18                         "ignore_above": 256,
      19                         "type": "keyword"
      20                     }
      21                 }
      22             },
      23             "fileId": {
      24                 "type": "text",
      25                 "fields": {
      26                     "keyword": {
      27                         "ignore_above": 256,
      28                         "type": "keyword"
      29                     }
      30                 }
      31             },
      32             "isDir": {
      33                 "type": "long"
      34             }
      35         }
      36     }
      37 }

      4、關(guān)閉索引

      1 POST    http://127.0.0.1:9200/filesearch/_close

      5、修改索引屬性(添加不區(qū)分大小寫的屬性)

       1 PUT    http://127.0.0.1:9200/filesearch/_settings
       2 {
       3   "analysis": {
       4     "normalizer": {
       5       "lowercase_normalizer": {
       6         "type": "custom",
       7         "char_filter": [],
       8         "filter": [
       9           "lowercase"
      10         ]
      11       }
      12     }
      13   }
      14 }

      6、更新映射(添加不區(qū)分大小寫的字段fileName)

       1 PUT    http://127.0.0.1:9200/filesearch/_mapping
       2 {
       3     "properties": {
       4         "fileName": {
       5             "type": "text",
       6             "fields": {
       7                 "keyword": {
       8                     "normalizer": "lowercase_normalizer",
       9                     "ignore_above": 256,
      10                     "type": "keyword"
      11                 }
      12             }
      13         }
      14     }
      15 }

      7、開啟索引

      1 POST    http://127.0.0.1:9200/filesearch/_open

      8、復(fù)制備份索引到新索引

      1 POST    http://127.0.0.1:9200/_reindex
      2 {
      3     "source":{
      4         "index":"filesearch_bak"
      5     },
      6     "dest":{
      7         "index":"filesearch"
      8     }
      9 }

      9、啟動使用該索引的服務(wù)

                 完成!          

      測試:

      1、寫入數(shù)據(jù)

       1 PUT    http://127.0.0.1:9200/ws_index/_create/1/
       2 {
       3     "fileId": "83f311d71e5d4d799e5b254cf9305b04",
       4     "fileName": "0703WXb0839",
       5     "filePath": "/我的文件/20240703/demo",
       6     "extendName": "txt",
       7     "isDir": 0
       8 }
       9 
      10 PUT    http://127.0.0.1:9200/ws_index/_create/2/
      11 {
      12     "fileId": "83f311d71e5d4d799e5b254cf9305b04",
      13     "fileName": "0703wxb0843",
      14     "filePath": "/我的文件/20240703/demo",
      15     "extendName": "txt",
      16     "isDir": 0
      17 }

      2、查詢(可以查到上面新增的兩條數(shù)據(jù))

       1 POST    http://127.0.0.1:9200/filesearch/_search
       2 {
       3   "from": 0,
       4   "size": 200,
       5   "query": {
       6     "bool": {
       7       "must": [
       8         {
       9           "bool": {
      10             "should": [
      11               {
      12                 "wildcard": {
      13                   "fileName.keyword": "*Wxb*"
      14                 }
      15               }
      16             ]
      17           }
      18         },
      19         {
      20           "bool": {
      21             "should": [
      22               {
      23                 "wildcard": {
      24                   "filePath.keyword": "/我的文件/20240703/demo*"
      25                 }
      26               }
      27             ]
      28           }
      29         }
      30       ]
      31     }
      32   }
      33 }

       

      posted @ 2024-07-03 09:04  王小白吖~  閱讀(212)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 又爽又黄又无遮挡的激情视频| 欧美特级午夜一区二区三区| 国产口爆吞精在线视频2020版 | 思思99热精品在线| 国产一区二区三区精品综合| 午夜国产小视频| 麻豆精品国产熟妇aⅴ一区| 韩国免费a级毛片久久| 国产精品福利自产拍久久| 国产精品中文字幕在线| 东北妇女精品bbwbbw| 国产精品国产三级国av| 亚洲大尺度视频在线播放| 欧美猛少妇色xxxxx| 黄男女激情一区二区三区| 奶头好大揉着好爽视频| 国产精品一二三中文字幕| 日韩精品久久久肉伦网站| 亚洲综合久久精品哦夜夜嗨| 国产精品中文第一字幕| 国产草草影院ccyycom| 国产精品成人免费视频网站京东| 无码欧亚熟妇人妻AV在线外遇| 熟女系列丰满熟妇AV| 精品综合一区二区三区四区| 黄色A级国产免费大片视频| 777米奇影视第四色| 中文字幕久久人妻熟人妻| 国产一区二区三区在线观看免费| 国产欧美日韩另类在线专区| 国产精品SM捆绑调教视频| 最新国产精品好看的精品| 城固县| 黑人好猛厉害爽受不了好大撑| 宝贝腿开大点我添添公口述视频| 久久国产乱子伦免费精品| 91精品国产蜜臀在线观看| 最新国产精品好看的精品| 黎城县| 亚洲sm另类一区二区三区| 精品在线观看视频二区|