Unable to correctly query data using 'query_string' #109434
Labels
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Elasticsearch Version
7.17.21
Installed Plugins
No response
Java Version
21.0.2
OS Version
3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
I use "search profile" to obtain the analysis results. I obtained all the "MultiTermQueryConstantScoreWrappers", and I used each "MultiTermQueryConstantScoreWrapper" separately to obtain the data. However, when I used all the "MultiTermQueryConstantScoreWrappers", I could not obtain the correct results
Steps to Reproduce
1. prepare data
`PUT user_aaa
{
"mappings": {
"properties": {
"address": {
"type": "text",
"index": false
},
"age": {
"type": "long"
},
"name": {
"type": "text"
}
}
}
}
PUT user_aaa/_doc/1
{
"name":"04V5:J20240506104423001!1!130322198402082311"
}
PUT user_aaa/_doc/2
{
"name":"04V5!J20240506104423001!1!130322198402082311"
}
`
2. search script
GET user_aaa/_search? { "query": { "query_string": { "query": "04V5*!J20240506104423001*!1*!130322198402082311*", "fields": ["name"] } } }
at this time, data cannot be queried
3. kibana 'Search Profile'
4. When "query" is "04v5 *", "1 *", "j2024050610423001 *", "130322198402082311 *", data can be searched, and all are MultiTermQueryConstantScoreWrappers. However, when "query" is "04V5 *! J2024050610423001 *! 1 *! 130322198402082311 *", data cannot be searched
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: