【发布时间】:2018-02-02 20:07:54
【问题描述】:
我正在尝试使用 json 文件来定义每个索引的默认映射。这就是我想要做的:
/usr/share/elasticsearch/config/default-mapping.json
{
"item": {
"properties": {
"uuid": {"type": "string", "store": "yes", "index": "no"},
"title": {"type": "string", "store": "yes", "boost": 5,
"index": "analyzed", "analyzer": "english"},
"description": {"type": "string", "store": "yes", "boost": 3,
"index": "analyzed", "analyzer": "english"},
}
当我尝试查询我的 index_test elasticsearch 索引时,我得到了这个:
curl -XGET 'http://...:9200/index_test/_mapping'
{"index_test":{"mappings":{}}}
我使用了在此处找到的文档。
https://www.found.no/foundation/elasticsearch-mapping-introduction/
【问题讨论】:
-
@Rob 谢谢你的回复,我之前确实看到过,但我不确定它对我有什么帮助
标签: json elasticsearch