1. 程式人生 > >Elasticsearch 常見問題

Elasticsearch 常見問題

1、user_id聚合查詢異常(fielddata=true)

curl -H "Content-Type: application/json" -XPUT 'localhost:9200/_index/_doc/_mapping' -d '
{
  "properties": {
    "user_id":{
      "type": "text",
      "fielddata": true
    }
  }
}'

2、只讀異常([FORBIDDEN/12/index read-only / allow delete (api)])

curl -H "Content-Type: application/json" -XPUT 'localhost:9200/_all/_settings/' -d '
{
   "index.blocks.read_only_allow_delete": null
}'