elasticsearch 使用問題總結

一、Fielddata is disabled on text fields by default. Set fielddata=true on [name] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

      原因:fielddata=true未開啓,在ElasticSearch中默認fielddata默認是false的,因爲開啓Text的fielddata後對內存的佔用很高

      解決方法

curl -i -H "Content-Type:application/json" -XPUT 127.0.0.1:9200/zipkin:span-2019-05-16/_mapping/span/?pretty  -d'{"span":{"properties":{"name":{"type":"text","fielddata":true}}}}'

 

二、localhost連接成功,通過IP連接卻失敗。

     修改配置文件elasticsearch.yml

network.host: 0.0.0.0

   另外說明,配置子文件地址

    mac 6.5版本 

/usr/local/etc/elasticsearch/elasticsearch.yml

    mac 2.4.1版本

/usr/local/Cellar/elasticsearch-2.4.1/config/elasticsearch.yml

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章