GET _analyze
{
"analyzer": "nori",
"text": "abc",
"explain": true
}
{
"detail": {
"custom_analyzer": false,
"analyzer": {
"name": null,
"tokens": [
{
"token": "abc",
"start_offset": 0,
"end_offset": 3,
"type": "word",
"position": 0,
"bytes": "[61 62 63]",
"leftPOS": "SL(Foreign language)",
"morphemes": null,
"posType": "MORPHEME",
"positionLength": 1,
"reading": null,
"rightPOS": "SL(Foreign language)",
"termFrequency": 1
}
]
}
}
}
AnalyzeRequest analyzeRequest = new AnalyzeRequest.Builder()
.analyzer("nori")
.text("abc")
.index(MY_INDEX)
.explain(true)
.build();
With nori_analyzer,
request
response
Using analyze API provided in ElasticsearchIndicesAsyncClient.java
request
Since there is no such variable "attributes" in ExplainAnalyzeToken.java which was present in RHLC AnalyzeResponse.java,
there is no way to retrieve response values
"posType", "rightPOS" ,... and etc.