-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
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
Comments
gwbrown
added
:Search/Search
Search-related issues that do not fall into other categories
and removed
needs:triage
Requires assignment of a team area label
labels
Jun 11, 2024
Pinging @elastic/es-search (Team:Search) |
Additionally, the indexed terms with the default analyzer will actually be:
So, I am not sure you want the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: