es 的mapping之ignore_above


# mapping的ignore_above
PUT s8
{
  "mappings": {
    "properties": {
      "title": {
        "type": "keyword",
        "ignore_above": 256     # 超過ignore_above大小的字符串不會被索引或存儲
      }
    }
  }  
}

DELETE s7

PUT s7/_doc/1
{
  "title": "xiongfy"
}

PUT s8/_doc/2
{
  "title": "熊今天理了個發,心情美滋滋"
}

GET s7/_search
{
  "query": {
    "match": {
      "title": "xiongfy"
    }
  }
}


GET s8/_search
{
  "query": {
    "match": {
      "title": "熊今天理了個發,心情美滋滋"
    }
  }
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM