GitHub user jonathanc-n edited a discussion: FT.ALIASADD, FT.ALIASDEL, 
FT.ALIASUPDATE Implementation Proposal

### Overview
These commands are used to add, delete and update alias (names which can 
substitute keys).

I'm thinking to store a table for all the Aliases in IndexManager. Here are 
some of the features:
- Add, Delete, Update function for table.
- Two way mapping for index lookups and alias reverse lookups for deletion and 
such.
- Get function for alias->index.
- DeleteByIndexName function.

### Metadata
The specifics stored in search_encoding.h:

Can use perfect hashing to create 64 bit values to make lesser memory overhead. 
Due to alias being made one at a time, there will be limited time overhead from 
hashing.

Alias table
| Hashed Alias Name (64 bits) | Index Name (32 bytes) |

Index table
| Hashed Index Name (64 bits) | Alias Name/Array (32 bytes +) |

- this is due to multiple alias mapped to same index

Not sure whether to store both maps as pair values, using encoding/decoding, or 
to operate on them as slices on storage. What are your thoughts for this?



GitHub link: https://github.com/apache/kvrocks/discussions/2565

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to