{"id":20672448,"url":"https://github.com/zhuliquan/scaled_float","last_synced_at":"2026-04-18T18:34:15.116Z","repository":{"id":61624240,"uuid":"538141125","full_name":"zhuliquan/scaled_float","owner":"zhuliquan","description":"Scaled float field type in ElasticSearch, a floating point number that is backed by a long, scaled by a fixed double scaling factor.","archived":false,"fork":false,"pushed_at":"2022-09-18T15:16:33.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T18:08:57.425Z","etag":null,"topics":["elasticsearch","es","golang","scaledfloat"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhuliquan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-18T14:48:19.000Z","updated_at":"2022-09-18T16:32:47.000Z","dependencies_parsed_at":"2022-10-18T18:00:21.344Z","dependency_job_id":null,"html_url":"https://github.com/zhuliquan/scaled_float","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zhuliquan/scaled_float","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuliquan%2Fscaled_float","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuliquan%2Fscaled_float/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuliquan%2Fscaled_float/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuliquan%2Fscaled_float/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhuliquan","download_url":"https://codeload.github.com/zhuliquan/scaled_float/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuliquan%2Fscaled_float/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31980127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","es","golang","scaledfloat"],"created_at":"2024-11-16T20:37:33.480Z","updated_at":"2026-04-18T18:34:15.071Z","avatar_url":"https://github.com/zhuliquan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\r\nScaled float field type in ElasticSearch, a floating point number that is backed by a long, scaled by a fixed double scaling factor.\r\n\r\n# Detail\r\nFor floating-point types, it is often more efficient to store floating-point data into an integer using a scaling factor, which is what the scaled_float type does under the hood. For instance, a price field could be stored in a scaled_float with a scaling_factor of 100. All APIs would work as if the field was stored as a double, but under the hood Elasticsearch would be working with the number of cents, price*100, which is an integer. This is mostly helpful to save disk space since integers are way easier to compress than floating points. scaled_float is also fine to use in order to trade accuracy for disk space. For instance imagine that you are tracking cpu utilization as a number between 0 and 1. It usually does not matter much whether cpu utilization is 12.7% or 13%, so you could use a scaled_float with a scaling_factor of 100 in order to round cpu utilization to the closest percent in order to save space.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuliquan%2Fscaled_float","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhuliquan%2Fscaled_float","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuliquan%2Fscaled_float/lists"}