-
Notifications
You must be signed in to change notification settings - Fork 232
feat: index or collection name will default to doc-type name #1486
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
Conversation
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
96469c2
to
20d648a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <joan.martinez@jina.ai>
7ef4fa5
to
18ea080
Compare
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
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 <joan.martinez@jina.ai>
590b23f
to
44fcd80
Compare
Signed-off-by: AnneY <evangeline-lun@foxmail.com>
Signed-off-by: AnneY <evangeline-lun@foxmail.com>
5f10ffd
to
7c1acf9
Compare
Signed-off-by: AnneY <evangeline-lun@foxmail.com>
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 <evangeline-lun@foxmail.com>
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 <evangeline-lun@foxmail.com>
4f4c31a
to
ff172e9
Compare
📝 Docs are deployed on https://ft-feat-default-name-index--jina-docs.netlify.app 🎉 |
No description provided.