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

Adding docs about scaled_float saturation with long values #107966

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Apr 26, 2024

closes: #105361

Copy link
Contributor

Documentation preview:

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team Team:Search Meta label for search team labels Apr 26, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

docs/reference/mapping/types/numeric.asciidoc Outdated Show resolved Hide resolved
docs/reference/mapping/types/numeric.asciidoc Outdated Show resolved Hide resolved
docs/reference/mapping/types/numeric.asciidoc Outdated Show resolved Hide resolved
docs/reference/mapping/types/numeric.asciidoc Outdated Show resolved Hide resolved
However, the value actually stored is +9223372036854775807+, the maximum value for a `long`.

This can lead to unexpected results with <<query-dsl-range-query,range queries>>
when the scaling factor is large or the value is close to the maximum value of a `long`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear whether value here is the scaled float or the original value before scaling. assume the former, so maybe we should say resulting scaled value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted, what do you think? I mean the provided value, not the stored one. If the stored one is "near" the maximum, who cares, its all about when it exceeds the maximum.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes more sense - thanks!

@benwtrent benwtrent merged commit 67748cf into elastic:main Apr 30, 2024
5 checks passed
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.0 Commit could not be cherrypicked due to conflicts
8.1 Commit could not be cherrypicked due to conflicts
8.2 Commit could not be cherrypicked due to conflicts
8.3 Commit could not be cherrypicked due to conflicts
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
8.14
8.13
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 107966

benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
@benwtrent
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.3
8.2
8.1
8.0
7.17

Questions ?

Please refer to the Backport tool documentation

benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 30, 2024
benwtrent added a commit that referenced this pull request Apr 30, 2024
benwtrent added a commit that referenced this pull request Apr 30, 2024
benwtrent added a commit that referenced this pull request Apr 30, 2024
benwtrent added a commit that referenced this pull request Apr 30, 2024
benwtrent added a commit that referenced this pull request Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scale_float does not honor limits for long values
3 participants