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

Get field mapping api doesn't honor pretty flag #6552

Closed
javanna opened this issue Jun 18, 2014 · 0 comments
Closed

Get field mapping api doesn't honor pretty flag #6552

javanna opened this issue Jun 18, 2014 · 0 comments
Labels

Comments

@javanna
Copy link
Member

javanna commented Jun 18, 2014

The problem is due to the use of XContentHelper#writeRawField in GetFieldMappingsResponse which is great when dealing with the _source field as we never want to prettify it, but in this case the output should be prettified if requested.

Steps to reproduce:

curl -XPUT localhost:9200/index/type/1 -d '{
   "foo":"bar"
 }
 '

curl localhost:9200/_mapping/field/foo?pretty

{
  "index" : {
    "mappings" : {
      "type" : {
        "foo" : {
          "full_name" : "foo",
          "mapping":{"foo":{"type":"string"}}
        }
      }
    }
  }
}
@javanna javanna added the bug label Jun 18, 2014
johtani added a commit to johtani/elasticsearch that referenced this issue Dec 7, 2014
johtani added a commit to johtani/elasticsearch that referenced this issue Dec 8, 2014
Change assertion more simple
Use writeRawField if pretty off

Closes elastic#6552
johtani added a commit to johtani/elasticsearch that referenced this issue Dec 8, 2014
johtani added a commit to johtani/elasticsearch that referenced this issue Dec 9, 2014
johtani added a commit to johtani/elasticsearch that referenced this issue Dec 9, 2014
Change an assertion using re-parse pretty printing

Closes elastic#6552
@javanna javanna removed the help wanted adoptme label Dec 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants