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