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

Ingest simulate should coerce _id to a string #23823

Closed
clintongormley opened this issue Mar 30, 2017 · 2 comments
Closed

Ingest simulate should coerce _id to a string #23823

clintongormley opened this issue Mar 30, 2017 · 2 comments
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement good first issue low hanging fruit help wanted adoptme

Comments

@clintongormley
Copy link
Contributor

Passing an unquoted _id to simulate:

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "set": {
          "field": "foo",
          "value": "bar"
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "t",
      "_type": "t",
      "_id": 1,
      "_source": {
        "foo": 1
      }
    }
  ]
}

throws the following exception:

      {
        "type": "parse_exception",
        "reason": "[_id] property isn't a string, but of type [java.lang.Integer]",
        "header": {
          "property_name": "_id"
        }
      }

The _id should be coerced to a string. In fact, so should _index, _type, _routing, _parent...

@clintongormley clintongormley added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP help wanted adoptme >enhancement good first issue low hanging fruit labels Mar 30, 2017
@sneivandt
Copy link
Contributor

Is this what you are expecting for this case? I would also ask if it is frowned upon for me to submit PRs for multiple issues tagged "low hanging fruit" rather than letting other new contributors take them?

talevy pushed a commit that referenced this issue Aug 3, 2017
* Allow ingest simulate to parse _id, _index, _type, _routing and _parent as either string or int (#23823)

* Generate data that includes Integer and String type fields for testing document parsing.
talevy pushed a commit that referenced this issue Aug 3, 2017
* Allow ingest simulate to parse _id, _index, _type, _routing and _parent as either string or int (#23823)

* Generate data that includes Integer and String type fields for testing document parsing.
@talevy
Copy link
Contributor

talevy commented Aug 3, 2017

Closed by: #23885
thanks @sneivandt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement good first issue low hanging fruit help wanted adoptme
Projects
None yet
Development

No branches or pull requests

3 participants