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

explain doesn't work on the Analyze API #142

Open
ackintosh opened this issue Sep 13, 2024 · 1 comment
Open

explain doesn't work on the Analyze API #142

ackintosh opened this issue Sep 13, 2024 · 1 comment

Comments

@ackintosh
Copy link

Elasticsearch 8.6.2
analysis-sudachi 3.1.0

Got an error when set explain to true:

curl -X GET "localhost:9200/_analyze?pretty" -H 'Content-Type: application/json' -d '{"tokenizer":"sudachi_tokenizer", "text" : "関西国際空港", "explain": true}'

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "cannot write xcontent for unknown value of type class com.worksap.nlp.sudachi.MorphemeImpl"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "cannot write xcontent for unknown value of type class com.worksap.nlp.sudachi.MorphemeImpl",
    "suppressed" : [
      {
        "type" : "illegal_state_exception",
        "reason" : "Failed to close the XContentBuilder",
        "caused_by" : {
          "type" : "i_o_exception",
          "reason" : "Unclosed object or array found"
        }
      }
    ]
  },
  "status" : 400
}
@mh-northlander
Copy link
Collaborator

elasticsearch-sudachi ~v3.1.* has a bug around explain (#102) and it is fixed in v3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants