cberner / redb

An embedded key-value database in pure Rust
https://www.redb.org
Apache License 2.0
3.27k stars 153 forks source link

How to perform search #655

Closed rawhuul closed 1 year ago

rawhuul commented 1 year ago

Hey, there I'm new to file-based database, I recently used only SQLite. This project seems suitable for my project but I have only one question how to perform full-text search and regex search over redb database as SQLite provide various commands for same. I know there are search engine based for same purpose, but can you help me with it how to perform searching.

cberner commented 1 year ago

redb is not a good choice for that. It is effectively a persistent BtreeMap.

rawhuul commented 1 year ago

So is there anyway that I could retrieve the whole Table to a HashMap or BTreeMap? So that I can feed it to indicium

cberner commented 1 year ago

Yes. See the documentation. There are methods to iterate over a table, after which you can copy it.

Sent from my phone

On Sun, Aug 6, 2023, 9:29 AM Rahul @.***> wrote:

So is there anyway that I could retrieve the whole Table to a HashMap or BTreeMap? So that I can feed it to indicium https://github.com/leontoeides/indicium

— Reply to this email directly, view it on GitHub https://github.com/cberner/redb/issues/655#issuecomment-1666912497, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNXQDN2RF5ZDL3CBXIJADXT7A6RANCNFSM6AAAAAA3F7MMHM . You are receiving this because you modified the open/close state.Message ID: @.***>