Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create map时出现No handler for type [text] declared on field [content] #276

Closed
clock157 opened this issue Sep 12, 2016 · 3 comments
Closed

Comments

@clock157
Copy link

docker 镜像 FROM quay.io/pires/docker-elasticsearch:2.3.5_1

JunweideMacBook-Pro:~ Junwei$ curl -XPOST http://192.168.99.100:31266/index/fulltext/_mapping -d'
> {
>     "fulltext": {
>              "_all": {
>             "analyzer": "ik_max_word",
>             "search_analyzer": "ik_max_word",
>             "term_vector": "no",
>             "store": "false"
>         },
>         "properties": {
>             "content": {
>                 "type": "text",
>                 "analyzer": "ik_max_word",
>                 "search_analyzer": "ik_max_word",
>                 "include_in_all": "true",
>                 "boost": 8
>             }
>         }
>     }
> }'
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [text] declared on field [content]"}],"type":"mapper_parsing_exception","reason":"No handler for type [text] declared on field [content]"},"status":400}JunweideMacBook-Pro:~ Junwei$
@clock157
Copy link
Author

经测试,将text改为string后可以执行,也能搜到。但不知道有何差异和影响?

@medcl
Copy link
Member

medcl commented Sep 12, 2016

text 是5.0之后的

@clock157
Copy link
Author

好的,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants