Skip to content

[FEATURE] Support bool query operators in Query DSL for fluent (descriptor) syntax #7594

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

Closed
stevejgordon opened this issue Apr 6, 2023 · 2 comments · Fixed by #8485
Closed
Labels
8.x Relates to a 8.x client version Category: Feature
Milestone

Comments

@stevejgordon
Copy link
Contributor

stevejgordon commented Apr 6, 2023

This is broken out from #6556.

Add support for combining queries created using the fluent syntax into bool queries using the &&, ||, ! and + operators.

For example:

var search = new SearchRequestDescriptor<Project>()
    .Query(q => q
            .Term(p => p.Name, "x") || q
            .Term(p => p.Name, "y"));

should produce:

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "name": {
              "value": "x"
            }
          }
        },
        {
          "term": {
            "name": {
              "value": "y"
            }
          }
        }
      ]
    }
  }
}
@stevejgordon stevejgordon added this to the Future milestone Apr 6, 2023
@b93rn
Copy link

b93rn commented Apr 7, 2023

I'm missing this as well, basically every operator on this page.

@btcpbordeaux
Copy link

Any update on this? This is preventing migration from ES 7.17 / Nest client. Is there a rough timeline on when to expect this in the client? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to a 8.x client version Category: Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants