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

Adding configurable index names #812

Closed
LTMenezes opened this issue Jun 17, 2024 · 3 comments · Fixed by #818
Closed

Adding configurable index names #812

LTMenezes opened this issue Jun 17, 2024 · 3 comments · Fixed by #818
Labels
feature request Ideas to improve an integration integration:pgvector

Comments

@LTMenezes
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Yes, currently the index names (more precisely HNSW_INDEX_NAME and KEYWORD_INDEX_NAME) are not configurable, this means that you cannot create two or more document_stores tables on the same postgres schema, since you cannot have two indexes with the same name.

Describe the solution you'd like
I'd like for the index name to be configurable and to the index creation to be optional, just as the recreation of the table is also optional under the flag 'recreate_table'.

Describe alternatives you've considered
I've considered changing the index names on the tables manually, but because the index is always checked to exist by name it's impossible to workaround this.

Additional context
I'd be happy to make a PR for this myself, just want to make sure that I'm not missing anything before working on this.

@LTMenezes LTMenezes added the feature request Ideas to improve an integration label Jun 17, 2024
@anakin87
Copy link
Member

Hello! Thanks for discussing this idea...
We would be happy if you could contribute.

I agree that the index names should be configurable (we can leave the current names as default names).

Could you better explain why you would like the index creation to be optional and how it would differ from the current implementation?

@LTMenezes
Copy link
Contributor Author

Awesome @anakin87.
I think it would be good to be optional to give more freedom for people that want to tinker with creating and managing indexes themselves, without the constant fear that haystack will always check for indexes to exist and create them if they don't.
However, I understand that might be different than how the other integrations are implemented, so I'm fine with only making the index name customisable if you think it's better.

@anakin87
Copy link
Member

Perfect! Feel free to start by making index names configurable.
Then we could explore the other aspect in a later PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Ideas to improve an integration integration:pgvector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants