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

Mapping: Posting a mapping with default analyzer fails #2716

Closed
hungryblank opened this issue Mar 1, 2013 · 2 comments
Closed

Mapping: Posting a mapping with default analyzer fails #2716

hungryblank opened this issue Mar 1, 2013 · 2 comments

Comments

@hungryblank
Copy link

Seems like reposting a mapping explicitly mentioning the default analyzer throws an error when it should not
with the following mapping.json

{"foobar":{"dynamic":false,"properties":{"description": {
  "index":"analyzed",
  "analyzer":"default",
  "type":"string"}}}}

putting the mapping the 1st time everything goes well

curl -XPUT -d @mapping.json http://localhost:9200/twitter/foobar/_mapping

{"ok":true,"acknowledged":true}

but the second time
curl -XPUT -d @mapping.json http://localhost:9200/twitter/foobar/_mapping

{"error":"MergeMappingException[Merge failed with failures {[mapper [description] has different index_analyzer, mapper [description] has different search_analyzer]}]","status":400}

with this mapping instead there's no problem posting it over and over

{"foobar":{"dynamic":false,"properties":{"description": {
  "index":"analyzed",
  "analyzer":"english",
  "type":"string"}}}}

so seems like for some reason the default analyzer is not considered to be equal to itself

@nwarz
Copy link
Contributor

nwarz commented Sep 26, 2014

Just submitted PR #7902. Looks like there's only one point where null index analyzers and "default"-named index analyzers were being treated as nonequivalent.

colings86 pushed a commit that referenced this issue Nov 14, 2014
Fixed behaviour where two representations of the default index analyzer weren't being treated as equivalent. Added REST test to confirm fix.

Closes #2716
@colings86
Copy link
Contributor

closed using #7902

@colings86 colings86 changed the title posting a mapping with default analyzer fails Mapping: Posting a mapping with default analyzer fails Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants