go-bond / bond

Other
10 stars 3 forks source link

Feature: Inverted indexes support #102

Open marino39 opened 1 year ago

marino39 commented 1 year ago

At the moment bond Index allows creating a single index entry per row. In order to be able to produce inverted indexes we need to be able to produce multiple index entries per single row e.g. for text search for every single word in the text field.

Use cases:

  1. text search
  2. search within list fields e.g. tags []string
  3. spatial indexes (potentially)
  4. multi-dimensional indexes (potentially)

Required changes:

  1. Indexing logic
  2. Index key builder
pkieltyka commented 11 months ago

btw, I've found https://github.com/nlfiedler/mokuroku which is a Rust library for adding a secondary index to a Rocksdb database. The reason I'm referencing it here is because we're using Pebble which is a Rocksdb impl in Go, and good to see what others have done for adding secondary indexes to LSM databases. The project also makes reference to a few papers on this topic: https://github.com/nlfiedler/mokuroku#references