feat: index or collection name will default to doc-type name#1486
feat: index or collection name will default to doc-type name#1486
Conversation
Signed-off-by: Joan Fontanals Martinez <[email protected]>
96469c2 to
20d648a
Compare
JohannesMessner
left a comment
There was a problem hiding this comment.
Since this is a breaking change I think we need to be careful to guide people to un-break their code.
Concretely what will happen is that collections/tables created with a docarray version before this will be called Document, and when a user tries to access their database with a new version of docarray it will assume a table called MyDoc or something like that, and it will fail.
I think for this case we should catch the error and add a message like:
You are trying to connect to table {whatever}, but no such table exists. If you are trying to access a table that was created with DocArray version {one smaller than this one} this could be because the default table name has changed between versions. In that case, try adding the following
QdrantDocIndex(..., table_name='Document'), or equivalently, addingtable_name='Document'to your DBConfig
The details of this messag will depend on the particular backend i suppose
Signed-off-by: Joan Fontanals Martinez <[email protected]>
7ef4fa5 to
18ea080
Compare
Signed-off-by: Johannes Messner <[email protected]>
32ef595 to
8d3990c
Compare
This would be really nice, but it does not seem so feasible, nowhere in the code I see this check being done, plus I am not sure what each of the Backends throw when this happens, or they may simply create the table/etc ... I would simply add a breaking change note in the release notes once this is released |
421df67 to
590b23f
Compare
Signed-off-by: Joan Fontanals Martinez <[email protected]>
590b23f to
44fcd80
Compare
Signed-off-by: AnneY <[email protected]>
Signed-off-by: AnneY <[email protected]>
5f10ffd to
7c1acf9
Compare
Signed-off-by: AnneY <[email protected]>
7c1acf9 to
7358f5d
Compare
|
@AnneYang720 why is it needed to change the names? why the tests do not pass with default naming? |
The schema name is used as default index = ElasticDocIndex[SimpleDoc]()The |
Signed-off-by: AnneY <[email protected]>
Can we have some tests were the default name is used for indexing and retrieving in one shot? |
Some tests with schema that is only used once(like |
e201503 to
4f4c31a
Compare
Signed-off-by: AnneY <[email protected]>
4f4c31a to
ff172e9
Compare
|
📝 Docs are deployed on https://ft-feat-default-name-index--jina-docs.netlify.app 🎉 |
No description provided.