Skip to content

fielddata_fields query string parameter ignored #11025

@gmarz

Description

@gmarz

Specifying fielddata_fields on the query string seems to be ignored, although the rest spec lists it as a valid query parameter.

PUT /twitter/tweet/1
{
  "user": "gregmarzouka"
}
GET /twitter/_search?fielddata_fields=user
"hits": {
  "total": 1,
  "max_score": 1,
  "hits": [
     {
        "_index": "twitter",
        "_type": "tweet",
        "_id": "1",
        "_score": 1,
        "_source": {
           "user": "gregmarzouka"
        }
     }
  ]
}

Specifying it as part of the request body works as expected:

GET /twitter/_search
{
  "fielddata_fields": ["user"]
}
"hits": {
  "total": 1,
  "max_score": 1,
  "hits": [
     {
        "_index": "twitter",
        "_type": "tweet",
        "_id": "1",
        "_score": 1,
        "_source": {
           "user": "gregmarzouka"
        },
        "fields": {
           "user": [
              "gregmarzouka"
           ]
        }
     }
  ]
}

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categories>buggood first issuelow hanging fruit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions