meilisearch / meilisearch/grenad

Introduce a method on the Sorter to get the last inserted value of a key

Open
#32 0 comments 0 reactions 1 assignee View on GitHub

@irevoire is already working on this.

Since Mar 23, 2022.

enhancement
Dominant language
Rust
Stars
26
Forks
4
PR merge metrics
No merged PRs in 30d

Description

It could be useful to be able to get the latest value inserted in a sorter. There can be small lifetime issues but we can maybe just clone the value in a Vec for a first version.

The system could simply iterate on the in-memory values in revert order and then iterate over the reader in revert order until we find the requested entry. The algorithm should be O(N) for the in-memory search and O(log N) in the grenad files.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.