Skip to content
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

Emit warning when using fuzziness parameter for cross_fields query type of multi_match query #7764

grmblfrz opened this issue Sep 17, 2014 · 4 comments


None yet
5 participants
Copy link

commented Sep 17, 2014

I was using the cross_fields query type with the fuzzyness parameter and got unexpected results. While fuzziness is not documented for cross_fields it is accepted and then leads to strange results. It would be nice to emit a warning in this case (and perhaps add an explicit warning to the documentation). Even better would be the possibility to use fuzziness with cross_fields, see #6866.

Relates to #10217


This comment has been minimized.

Copy link

commented Nov 7, 2014

+1 stricter parsing of the match and multi_match queries would be good.


This comment has been minimized.

Copy link

commented Nov 7, 2014

A warning or parse error should also be thrown when trying to use an array instead of a string as search query:

GET ponies/record/_search?explain
  "query": {
    "multi_match": {
      "query": ["laptop", "journalists", "yolo"],
      "fields": ["caption.Keywords"]

Produce a search with "yolo" only:

"description": "weight(caption.Keywords:yolo in 17202) [PerFieldSimilarity], result of:",

As it is accepted without warnings, users expect this to work, but only the last entry of the array is used which is very strange.

@clintongormley clintongormley added v2.2.0 and removed v2.1.0 labels Nov 20, 2015

@spinscale spinscale added v2.3.0 and removed v2.2.0 labels Dec 23, 2015

@clintongormley clintongormley added v2.4.0 and removed v2.3.0 labels Mar 16, 2016

@clintongormley clintongormley added v5.0.0-alpha3 and removed v2.4.0 labels May 11, 2016


This comment has been minimized.

Copy link

commented May 11, 2016

@cbuescher any chance this could be added for 5.0? It not obvious that fuzziness can't be combined with cross_fields - we should throw an exception in this case


This comment has been minimized.

Copy link

commented May 13, 2016

The same seems to be true for phrase and phrase_prefix, they shouldn’t support fuzziness either. match_phrase query already throws an exception if you specify fuzziness. So I'll add those two types to the list of exclusions in the PR above.

cbuescher added a commit to cbuescher/elasticsearch that referenced this issue May 13, 2016

Don't allow `fuzziness` for `multi_match` types cross_fields, phrase …
…and phrase_prefix

Currently `fuzziness` is not supported for the `cross_fields` type
of the `multi_match` query since it complicates the logic that
blends the term queries that cross_fields uses internally. At the
moment using this combination is silently ignored, which can lead to
confusions. Instead we should throw an exception in this case.
The same is true for phrase and phrase_prefix type.

Closes elastic#7764

siddharthlatest added a commit to appbaseio/reactivesearch that referenced this issue Dec 26, 2017

davkap92 pushed a commit to davkap92/reactivesearch-web that referenced this issue Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.