Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose RedisVectorStore index creation method #245

Open
mortensi opened this issue Oct 26, 2024 · 2 comments
Open

Expose RedisVectorStore index creation method #245

mortensi opened this issue Oct 26, 2024 · 2 comments

Comments

@mortensi
Copy link

Hi,

What do you think about exposing createIndex/createIndexIfMissing for the RedisVectorStore class?

I want to execute index creation on demand, even before the first similarity search execution.
Checking if the index exists on every execution of similaritySearch is suboptimal (it doubles the number of calls with the additional execution of $this->client->ftinfo($this->redisIndex);).

I would also like to have the chance to configure the indexing method: HNSW or FLAT. FLAT is good for reduced datasets, HNSW scales much better.

@f-lombardo
Copy link
Contributor

They both seem good ideas! Are you willing to contribute with a PR?

@mortensi
Copy link
Author

I will take a look and propose something. I would find it useful to enable more configurations for the index; besides the length and the algorithm, distance and float size are good ones, too. Enabling hash data modeling would complicate the current implementation, maybe we can evaluate it in a later iteration. I will share something when I have a working sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants