redis / redis-vl-python

Redis Vector Library (RedisVL) interfaces with Redis' vector database for realtime semantic search, RAG, and recommendation systems.
https://www.redisvl.com/
MIT License
176 stars 25 forks source link

Add Index Alias management capabilities #162

Open pierrelambert opened 2 weeks ago

pierrelambert commented 2 weeks ago

The Alias capability of Indexes with ft.aliasadd, ft.aliasdel, FT.ALIASUPDATE permits agility in making index and apps evolving. Would be nice to be able to handle this at SearchIndex level directly.

tylerhutcherson commented 2 weeks ago

@pierrelambert 100% Agreed - this is planned for the 0.3.0 release. Though it gets tricky without the ability to list which aliases are used per index.

Ideally the index alias would be a schema property like this:


index:
  name: users_v1
  prefix: user
  alias: users

fields:
    - name: user
      type: tag
    - name: credit_score
      type: tag

So then the alias would get added transparently as they call index.create(...)

And then a new command to update the alias:

index.update_alias("new_alias_name")

However, given we can't trace the state of the index<>alias relationships... this is pretty much impossible without footguns all over the place.

@bsbodden curious on your take?

pierrelambert commented 2 weeks ago

Define / Set an alias to an index is must have. Change the index an alias is referring to (FT.ALIASUPDATE) is must have too

bsbodden commented 1 week ago

I agree with @pierrelambert that this is a must have for prod environments, since the index to alias relationship is a one-to-many we could:

tylerhutcherson commented 1 week ago

I like this approach. I’ve been hesitant to create extra “metadata” generated by the library… but I think I agree that usability and functionality is most important here. We need alias support for sure.

I’ll start working on a more detailed write up for this.