Comments (4)
This seems like a precision issue (32 vs 64 bits) to me.
Can be reproduced with:
NumericUtils.sortableLongToDouble(NumericUtils.doubleToSortableLong(0.000001f)) // Returns 9.999999974752427E-7
If we use double for the initial value
NumericUtils.sortableLongToDouble(NumericUtils.doubleToSortableLong(0.000001d)) // Returns 1.0E-6
@kkewwei Since the mapping type used here is float, the precision is lost when the value is actually parsed as a number and you get the nearest value representable as float and is used in bucket creation. The hit returned returns the source as it was ingested (i.e. the source content itself), and hence shows the provided value.
Using double in mappings should solve this
from opensearch.
@mgodwan yes if it's a bug, I'm pleasure to solve it.
from opensearch.
@mgodwan let us know if this still needs to be fixed? we are assuming this is just a mapping issue based on the comment " mappings should solve this"
from opensearch.
@mgodwan let us know if this still needs to be fixed? we are assuming this is just a mapping issue based on the comment " mappings should solve this"
I think we should fix it, as float field type is common, when it is used in aggregation, the bucket name of the aggregation response may be inaccurate, which is confusing to user. We can't force the user not to use float field type in aggregation.
from opensearch.
Related Issues (20)
- [Star tree] Support for timezone and offset for date dimension
- [Concurrent Segment Search] Provide index level setting for controlling slice count at index level HOT 1
- [Feature Request] Add a cluster setting for memory threshold to pick OrdinalsCollector in Cardinality aggregation HOT 1
- [BUG] <analysis-phonetic is no longer usable for OpenSearch 2.16 > HOT 2
- Increase the max_shards_per_node limit beyond 1000 shards by default
- [BUG] Transforming Metric Value to Aggregated Value Type during Star Tree Merges
- [BUG] Continuous SSL exceptions post upgrade from 2.11 to 2.15 HOT 3
- [Feature Request] Remote Translog Optimisations for faster and resilient recoveries
- [Feature Request] Lucene Abstractions for Star Tree
- [BUG] The highlighting type unified when used with auto_generate_synonyms_phrase_query in the query, does not highlight as expected HOT 2
- [Feature Request] A field to store histogram data in Opensearch HOT 1
- [Feature Request] Support for `_doc_count` field in star tree to represent `_doc_count` as part of aggregations response
- [Feature Request] Star Tree Meta and Data Writers
- [BUG] RemoteShardsBalancer cannot rebalance shards as expected HOT 1
- [META] Reader/Writer Separation
- [META] <Leverage protobuf for serializing select node-to-node objects> HOT 1
- Manual approval required for workflow run 10462716839: Request to approve/deny benchmark run for PR #13788 HOT 2
- [Feature Request] Add the `Suggest` field containing the output from the did-you-mean suggester in the SearchResp
- [Snapshot V2] Integrate clone snapshot flow with pinned timestamp HOT 1
- [Feature Request] Placing lucene packages outside of server module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensearch.