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

Any way to use minimum_should_match in NEST Match queries? #741

Closed
Aaronaught opened this issue Jun 24, 2014 · 3 comments
Closed

Any way to use minimum_should_match in NEST Match queries? #741

Aaronaught opened this issue Jun 24, 2014 · 3 comments

Comments

@Aaronaught
Copy link

According to the ElasticSearch documentation, minimum_should_match is supported on all match queries, but does not appear to be supported in NEST.

It seems like I should be able to write something like:

return query.Match(match => match
    .OnField("_all")
    .Query(keywords)
    .MinimumShouldMatch("2<80%")
);

But of course I cannot... the last line isn't in the API for MatchQueryDescriptor<T>.

Shouldn't it be part of that API? Is there some other way to add minimum_should_match to the query?

(P.S. I know it's supported by the NEST API in Boolean and Query String clauses, but that doesn't help me here.)

@jbejar
Copy link

jbejar commented Jul 15, 2015

I believe this should be added for the Simple Query String as well: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

@vikingland2018
Copy link

vikingland2018 commented Feb 9, 2019

Damn, I've been struggling with this for a day why isn't this on the issue list? MinimumShouldMatch is clearly still not working in NEST.

@russcam
Copy link
Contributor

russcam commented Feb 10, 2019

@vikingland2018 MinimumShouldMatch is implemented on the following queries in NEST 5.x and 6.x:

  • match queries
  • multi match queries
  • simple query string queries
  • query string queries
  • bool queries
  • more like this queries
  • common terms queries

What issue are you having with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants