Skip to content

Intervals query is missing the option to set Field #8226

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
Hesehus-ASAL opened this issue Jun 10, 2024 · 3 comments · Fixed by #8229
Closed

Intervals query is missing the option to set Field #8226

Hesehus-ASAL opened this issue Jun 10, 2024 · 3 comments · Fixed by #8229
Labels
8.x Relates to a 8.x client version Area: Generator Category: Bug

Comments

@Hesehus-ASAL
Copy link

Elastic.Clients.Elasticsearch version: 8.14.0

Elasticsearch version:8.12.0

.NET runtime version: .Net core 7.0

Operating system version: Windows 11

Description of the problem including expected versus actual behavior:
In version 8.12 of the client there was a Field method that allowed setting the toplevel field in ther intervals query:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html

The code that compiled in version 8.12:
queryDescriptor => queryDescriptor.Intervals(intervalsQueryDescriptor => intervalsQueryDescriptor
.AllOf(intervalsAllOfDescriptor => intervalsAllOfDescriptor
.Intervals(intervalsDescriptor => intervalsDescriptor
.Match(intervalsMatchDescriptor => intervalsMatchDescriptor
.Query($"phrase to match")
.MaxGaps(0).
Ordered(false))))
.Field(x => x.SearchText));

The Field method does not exist in version 8.14

Expected behavior
There is a way to set the top level field.

@Hesehus-ASAL Hesehus-ASAL added 8.x Relates to a 8.x client version Category: Bug labels Jun 10, 2024
@flobernd
Copy link
Member

Hi @asal-hesehus, thanks for reporting. This seems to be a bug in the new code generator.

@flobernd
Copy link
Member

Fixed in 8.14.1.

@Hesehus-ASAL
Copy link
Author

Thanks for the fast fix.

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 Area: Generator Category: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants