pinecone-datasets
pinecone-datasets copied to clipboard
Bug fix - wrong behaviour for should_create_index
Problem
The should_create_index was implemented like do_create_index instead of behaving like allow_existing_index, which is the original purpose.
When the user is setting should_create_index=False, he doesn't necessarily mean "don't create index", but rather "create index of you need to, but I allow upserting to existing one".
This behavior blocks other libraries that rely on pinecone-datasets to implicitly create the index if\when needed, like pinecone-context.
Solution
Altered the behavior to match intended design.
Type of Change
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)
Test Plan
Already covered by existing tests