{"id":19757158,"url":"https://github.com/lyst/elasticsearch-ranking-benchmarks","last_synced_at":"2026-02-25T10:34:02.189Z","repository":{"id":66066501,"uuid":"254100232","full_name":"lyst/elasticsearch-ranking-benchmarks","owner":"lyst","description":"Comparing Ranking Performance Across Elasticsearch Configurations","archived":false,"fork":false,"pushed_at":"2024-03-20T15:46:52.000Z","size":298,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T12:31:51.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-08T13:46:09.000Z","updated_at":"2021-07-08T17:17:52.000Z","dependencies_parsed_at":"2025-05-05T06:00:34.359Z","dependency_job_id":null,"html_url":"https://github.com/lyst/elasticsearch-ranking-benchmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lyst/elasticsearch-ranking-benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Felasticsearch-ranking-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Felasticsearch-ranking-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Felasticsearch-ranking-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Felasticsearch-ranking-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyst","download_url":"https://codeload.github.com/lyst/elasticsearch-ranking-benchmarks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Felasticsearch-ranking-benchmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29817840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"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":[],"created_at":"2024-11-12T03:18:16.576Z","updated_at":"2026-02-25T10:34:02.183Z","avatar_url":"https://github.com/lyst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elasticsearch Ranking Benchmarks\n\nA comparison of ranking performance using different index configurations and sorting approaches.\n\n## _Note on metrics_\n\nEven with caching off (request cache and query cache off) a lot of the performance comes from the filesystem cache used by Elasticsearch.\nIt's difficult to reliably test absolute performance differences offline.\nThese benchmarks are _indicative_ of relative performance between configurations.\nSuggesting directions to explore in a production setting.\n\nThese benchmarks run as a single-node cluster on a laptop with no other traffic.\nThe shape and relative differences between configurations is more important than the absolute values in the timing measurements.\nThe values on the _yaxis_, query + fetch time in milliseconds, gives some idea of the scale.\n\n## Running benchmarks\n\n### Run benchmarks for a config\n\nSee configuration.py for benchmark configurations.\nBenchmark needs to be run at least twice to warm-up the filesystem cache.\n\n```sh\ndocker-compose run --rm benchmarks bash\n\u003e python run.py --benchmark-name opendistro-versions\n```\n\n## Plotting\n\n\n## Benchmarks\n\n### Open Distro Versions\n\nComparing different versions of [Open Distro](https://opendistro.github.io/) ranking performance.\nSorting by a `float` field.\nChanging the `fetch_size`.\n\n![](./img/opendistro-versions.png)\n\n### Rank Features\n\nComparing [rank feature queries](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/query-dsl-rank-feature-query.html).\nRank feature fields populated with random data from a lognormal distribution.\nChanging the `fetch_size`.\n`_doc` sort is the fastest (baseline).\nSorting by one float field is approximately the same as using a single rank feature.\nEach additional rank_feature added to the should clause adds additional time.\n\n![](./img/rank-features.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Felasticsearch-ranking-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyst%2Felasticsearch-ranking-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Felasticsearch-ranking-benchmarks/lists"}