opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.77k stars 1.82k forks source link

Add support of "uint256" Data Type in OpenSearch #7561

Open ghost opened 1 year ago

ghost commented 1 year ago

Is your feature request related to a problem? Please describe. Current data types available in OpenSearch do not support "uint256". This is causing difficulties in executing range queries and sorting operations when dealing with high-precision numerical data. The current workaround, using the keyword data type, does not offer an optimal solution as it does not inherently support range queries or sorting. Describe the solution you'd like

I request adding support for the "uint256" data type in OpenSearch. This would allow users to handle high-precision numerical data more effectively and perform operations like range queries and sorting without any significant overhead or loss of accuracy.

Describe alternatives you've considered An alternative that I've experimented with involved using the "keyword" data type. However, this approach proved to be suboptimal for our requirements. To facilitate greater-than-equal-to (gte) and less-than-equal-to (lte) queries, and to enable sorting, I resorted to splitting larger numbers into five separate long data types.

Additional context The "uint256" data type is a standard in many computing and blockchain-related applications, and its support would significantly improve OpenSearch's versatility and usability for a wide range of applications. As data sets grow increasingly large and complex, native support for high-precision numerical data types like "uint256" will be crucial to ensure optimal performance and accurate results.

gkozyryatskyy commented 1 year ago

This will be a great feature for growing web3 development. This feature is requested from ElasticSearch from 2019 https://github.com/elastic/elasticsearch/issues/38242 and it will be great advantage of OpenSearch, for web3, if we can have this feature implemented.

peternied commented 1 year ago

Thanks for filing this issue @vhordiienkohk, we'd be interested in reviewing a pull request if you'd like to move this feature forward