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

Simulate API returning an error in version 6.4.1 #27

Closed
melvynator opened this issue Oct 19, 2018 · 0 comments
Closed

Simulate API returning an error in version 6.4.1 #27

melvynator opened this issue Oct 19, 2018 · 0 comments

Comments

@melvynator
Copy link

melvynator commented Oct 19, 2018

The version 6.4.1 seem to have a problem with the simulate API:

PUT _ingest/pipeline/per_dat_loc_recognition
{
  "description": "A pipeline to do dates, locations and persons recognition",
  "processors": [
    {
      "opennlp" : {
        "field" : "original"
      }
    }
  ]
}


POST _ingest/pipeline/per_dat_loc_recognition/_simulate
{
  "docs": [
    {
      "_source": {
        "original" : "John Smith has been working in New York since September 2015"
      }
    }
  ]
}

This return the following error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "unexpected value type [class java.util.HashSet]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "unexpected value type [class java.util.HashSet]"
  },
  "status": 400
}

But the following work perfectly fine:

PUT ingest_pipeline_index/_doc/1?pipeline=per_dat_loc_recognition
{
  "original" : "John Smith has been working in New York since September 2015"
}

GET ingest_pipeline_index/_search

Give the result:

{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": "ingest_pipeline_index",
        "_type": "_doc",
        "_id": "1",
        "_score": 1,
        "_source": {
          "original": "John Smith has been working in New York since September 2015",
          "entities": {
            "persons": [
              "John Smith"
            ],
            "dates": [
              "since September 2015"
            ],
            "locations": [
              "New York"
            ]
          }
        }
      }
    ]
  }
}
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

1 participant