我正在关注elasticsearch的官方视频
他们说要这样做:
PUT /blablabla/doc/_mapping
{
"properties": {
"title" : {
"type": "string",
"fields": {
"stemmed" : {
"type": "string",
"analyzer": "english"
},
"autocomplete" : {
"type": "string",
"analyzer": "edge_ngrams"
}
}
}
}
}
我得到分析器edge_ngrams不存在的错误
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "analyzer [edge_ngrams] not found for field [autocomplete]"
}
],
"type": "mapper_parsing_exception",
"reason": "analyzer [edge_ngrams] not found for field [autocomplete]"
},
"status": 400
}
为什么好吗? 我正在使用elasticsearch 2.2
调用GET /blablabla
我得到以下内容
{
"blablabla": {
"aliases": {},
"mappings": {
"doc": {
"properties": {
"job": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"settings": {
"index": {
"creation_date": "1456267981541",
"number_of_shards": "5",
"number_of_replicas": "1",
"uuid": "5042-5UwR42QY45jMRw8jQ",
"version": {
"created": "2010199"
}
}
},
"warmers": {}
}
}