Project · library
ranking-index
- How you run it
- not recorded
- Holochain version
- 0.1.0-beta-rc.1
- Activity
- stalled
- Checked
- 27 October 2026
What is ranking-index and what is it for?
ranking-index is a small Rust library that people building Holochain apps add to their back-end code so entries can be kept in order by a number the app assigns. It lets the app ask for a slice of that ordered list around a position, rather than looking through every entry.
ranking-index is a small Rust library for people building Holochain apps. Its organisation documents a family of libraries that make entries on a shared database easier to find: one indexes by keyword, one by time range, and ranking-index indexes and searches entries by a numerical ranking.
Many Holochain apps need a list where every item carries a score — a vote count, a rating, a position. ranking-index keeps those scores in an ordered index inside the app's own code, so the app can ask for a slice of the list around a position instead of scanning every entry. A developer points the index at one of the app's own link types, sets an interval value, then adds entries and reads them back through that index.
A worked example zome ships with the repository, showing how an index is defined and how ranked entries are both added and read back. The README walks through the steps a developer follows, from the dependency line in a zome's Cargo.toml to the calls that write a ranking and fetch a chunk of the ranking, and it is the best place for a builder to start.
How to get it
As a library
- Add the crate hc_lib_ranking_index to the Cargo.toml of the zome that will use the index, as the README documents.
- Declare a link type in your zome for the ranking index path.
- Define a RankingIndex against that link type, with an index interval.
- Add entries to the index with a ranking value, and read an ordered chunk back, giving a direction, a count and an optional cursor.
- The README links a fully working example zome inside the repository.
Questions people ask
- How do you add ranking-index to a zome?
- The README documents adding the crate hc_lib_ranking_index as a git dependency in the Cargo.toml of the zome that will use the index, then declaring a link type, defining the index, and adding and reading ranked entries. source
- Is there an example to follow?
- Yes. The README points to a fully working example zome inside the repository, and the repository also documents entering a nix-shell and running its shell test script. source
- How does it relate to the other indexing libraries?
- The same organisation presents it as one of three DHT indexing modules, alongside a keyword index and a time-range index; ranking-index is the one described as indexing and searching by numerical ranking. source
From 3 public sources, checked 23 September 2026.
Try ranking-index
- Code on GitHubOpen on GitHub ↗Last change 24 January 2023.
- ReleaseNo GitHub release recorded.
- The project's own files do not say how it is run.
Details & sources
Evidence
- Last change
- api.github.com/repos/holochain-open-dev/ranking-indexlisted by a third party · seen since 20 October 2026 · github.repository@1
- Activity
- api.github.com/repos/holochain-open-dev/ranking-indexlisted by a third party · seen since 20 October 2026 · liveness@1
Compatibility
- hdk
- 0.1.0-beta-rc.1 · example/zomes/example/coordinator/Cargo.toml @ deb2de4
- hdi
- 0.2.0-beta-rc.1 · example/zomes/example/integrity/Cargo.toml @ deb2de4
- holochain-client
- —
- happ.yaml
- absent
- web-happ.yaml
- absent