Closed javiramos1 closed 4 years ago
Pinging @elastic/es-search (:Search/Search)
@javiramos1
Could you please use the validate query API to check your query? maybe use the ?explain=true
as well.
@javiramos1
Could you please use the validate query API to check your query? maybe use the
?explain=true
as well.
I added the response in the description
Why do you use it twice: (\"Hair Connections\" | \"Hair Connections\")
?
Why do you use it twice:
(\"Hair Connections\" | \"Hair Connections\")
?
This is from an user, so no idea why they did that but without it we have the same issue.
Another thing is that for the simple query string query the boost is only supported per field unlike the more complicated things you can do with boost in query string query.:
Boosts can also be applied to phrases or to groups:
"john smith"^2 (foo bar)^4
@javiramos1
Thank you very much for your interest in Elasticsearch, but as this appears to be a user question, we'd like to direct you to the forums. for further discussion. If you can stop by there, we'd appreciate it. This allows us to use GitHub for verified bug reports, feature requests, and pull requests.
There's an active community in the forums that should be able to help get an answer to your question. As such, I hope you don't mind that I close this.
Describe the feature:
Logical operators do not work in the
simple_query_string
search compared toquery_string
Elasticsearch version 7.0.1
Plugins installed: []
JVM version (
java -version
): docker image elasticsearch:7.0.1OS version (
uname -a
if on a Unix-like system): docker image elasticsearch:7.0.1Description of the problem including expected versus actual behavior:
We recently switched from
query_string
tosimple_query_string
since we do not want to fail on invalid queries. We are starting to see inconsistent behavior with the logical operations where the logical AND is not respected. Thesimple_query_string
returns results that match just one side of the logical AND. This does not happen withquery_string
Steps to reproduce:
Index Settings:
Mappings:
Query String:
This returns no results because there is no matches on the right side of the AND.
And the same version using the simple simple_query_string:
Expected results: No results Actual results: several results that matches the left side of the query.
NOTE: Setting
minimum_should_match
to 1 seems to solve this problem. Maybe the issue is that is set to zero. I'm not sure about the relation betweenminimum_should_match
andminimum_should_match
but setting this to one solves the issue for both type of queries but I do not know the implications and it looks more like a work around. Could you check why thesimple_query_string
returns different data and clarify the relation tominimum_should_match
? thank you very much!Provide logs (if relevant):
Validate API Response: