-
Notifications
You must be signed in to change notification settings - Fork 90
Changes due to the implicit index creation #171
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
d2538f5
to
47225d9
Compare
I'm not sure I understand this point. Is I do not remember we talked about that change. Also, it should be a
Nevermind, I understood it with the bullet point after this one |
Before my change there were 2 methods
The first one (in |
I don't think |
I completely agree, but because it was here, I thought there was an implementation reason and I didn't want to "impose" another restructuration change 😂 Rename it was the best compromise I found because I don't like this function either. But I would be glad to remove it if both of you agree. @eskombro ? |
47225d9
to
199a080
Compare
76fac9d
to
fb8c217
Compare
422ebf4
to
d079862
Compare
It was a mistake to make such a big PR with changes that are not related to the PR (comments in the code + code restructuration). My bad! The git history of the branch and the conversation history of this PR are not clear anymore, I will open 3 new distinct ones:
Sorry for this inconvenience. |
Related to meilisearch/integration-guides#48
📣 So sorry for all the "pollution" changes in the code-base comments. In order to help you with this huge PR, here is the list of changes you have to check:
get_index()
does an HTTP call and is not the main method to use anymore.index()
methodindex()
methodget_or_create_index
with the new way of usingindex()
Index.get_indexes
intoIndex.list_all
to avoid repetition. This method is not provided in the docs so this is mostly an internal usage.primary_key
attribute inIndex
class. This attribute is updated when an HTTP call to the index is done (creation, update, or fetch the info). The attribute is obviously not up-to-date when using theindex()
method. See the limitation section in the main issue.info()
method is not documented anymore becauseget_index
does the job now. I renamed it tofetch_info()
to make the HTTP call explicit. Since it's not documented, its usage is mostly internal, but I also updated the tests accordingly, so this method is still well tested.get_index
from theIndex
class. This method is not used internally, and if the users would use it, they would have to writeIndex.get_index('movies')
which is not really intuitive. The right usage isclient.get_index('movies')
orclient.index('movies').fetch_info()
.index.py
changes might be not visible if you don't click onload diff
:Good luck♥️