DELETE test
POST test/_doc/1
{
"message": "java.util.concurrent.TimeoutException: Remote system has been silent for too long. (more than 48.0 hours)"
}
GET test/_search?q=message:"too long"&size=1000
This matches the doc, as does the longer match query example you shared.
This is probably down to your mapping. Can you share your mapping configuration?
Thanks. You're using an analyzer called ik_max_word which I can't see and will be defined in your settings.
One of the ways of debugging this and other issues yourself is to use the _analyze api to see how the document and query is tokenized and the _explain API to show how a query does (or doesn't) match a doc.
{
"_index": "test",
"_type": "_doc",
"_id": "xHPL8nUBlF-KtMFxz-1J",
"matched": false,
"explanation": {
"value": 0.0,
"description": "Failure to meet condition(s) of required/prohibited clause(s)",
"details": [
{
"value": 0.0,
"description": "no match on required clause (message:\"too long\")",
"details": [
{
"value": 0.0,
"description": "no matching phrase",
"details": []
}
]
},
{
"value": 0.0,
"description": "no match on required clause (MatchNoDocsQuery(\"Type list does not contain the index type\"))",
"details": [
{
"value": 0.0,
"description": "MatchNoDocsQuery(\"Type list does not contain the index type\") doesn't match id 0",
"details": []
}
]
}
]
}
}
it's amazing that The content has “too long ” phrase.
My output from the analyze API is identical to yours and yet the query below works OK in 6.6. and 7.10.
Can you try run this and compare? Then try it using your Analyzer..
DELETE test
POST test/_doc/1
{
"message": "java.util.concurrent.TimeoutException: Remote system has been silent for too long. (more than 48.0 hours)"
}
GET test/_analyze
{
"field": "message",
"text": "too long"
}
GET test/_doc/1/_explain?q=message:"too long"
Did my example (with the default analyzer) work?
What is the output of the analyze api using your analyzer and the string that is your document’s message?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.