更新索引设置

PUT /es/:target/_settings

请求示例

PUT http://localhost:4080/es/myindex/_settings

请求体

  1. {
  2. "analysis": {
  3. "analyzer": {
  4. "default": {
  5. "type": "standard"
  6. },
  7. "my_analyzer": {
  8. "tokenizer": "standard",
  9. "char_filter": [
  10. "my_mappings_char_filter"
  11. ]
  12. }
  13. },
  14. "char_filter": {
  15. "my_mappings_char_filter": {
  16. "type": "mapping",
  17. "mappings": [
  18. ":) => _happy_",
  19. ":( => _sad_"
  20. ]
  21. }
  22. }
  23. }
  24. }

setting 也能够在创建索引的时候设置