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

Search no longer works after upgrading MeiliSearch #141

Closed
drcongo opened this issue Jul 30, 2020 · 5 comments
Closed

Search no longer works after upgrading MeiliSearch #141

drcongo opened this issue Jul 30, 2020 · 5 comments

Comments

@drcongo
Copy link

drcongo commented Jul 30, 2020

Hello. I built the wagtail-meilisearch backend for the Wagtail CMS, and I'm trying to update it to use more recent versions of MeiliSearch, but since upgrading MeiliSearch and meilisearch-python I get an error when searching the index that I had previously built...

/usr/lib/python3.6/site-packages/meilisearch/_httprequests.py in __validate(request)
     49             return HttpRequests.__to_json(request)
     50         except requests.exceptions.HTTPError as err:
---> 51             raise MeiliSearchApiError(err, request)

MeiliSearchApiError: MeiliSearchApiError. Error code: search_error. Error message: impossible to search documents; heed error; error while decoding. Error documentation: https://docs.meilisearch.com/error/search_error

The link to the error documentation at the end there is a 404, I was able to find the relevant page on the docs but it didn't help much. Should I kill and rebuild the index from scratch after upgrading?

@curquiza
Copy link
Member

Hello @drcongo! Thanks for building wagtail-meilisearch! 😁

Can you give me the version of MeiliSearch and the version of meilisearch-python you are using? 🙂
And if possible, a dataset (or a piece of your dataset) so that we can reproduce the error?

@drcongo
Copy link
Author

drcongo commented Jul 30, 2020

Hi @curquiza - I'm upgrading from MeiliSearch 0.9.x to 0.11.1 and using meilisearch-python 0.11.2

I've just trashed the data.ms folder and I'm currently rebuilding the index to see if that helps. One possible change that I spotted in the tracebacks was that primary_key is no longer accepted on the create_index method, so I'm now passing in options={'primaryKey': 'id'} - does this seem sensible?

Thanks!

@drcongo
Copy link
Author

drcongo commented Jul 30, 2020

In fact, everything seems to work now that I've rebuilt the index (and Indexing seems faster?). Sorry to have bothered you!

One small question though, I was thinking I might update my versioning on wagtail-meilisearch to track the version numbers of your package, which is fairly close to tracking the version numbers of MeiliSearch itself. Does that sound like a good idea to you?

@curquiza
Copy link
Member

curquiza commented Jul 30, 2020

Not a problem, the database (data.ms) is indeed not compatible between 2 minors versions of MeiliSearch, it means you have to re-populate your MeiliSearch instance! Snapshotting and back-up are currently implemented to solve that 🙂

One small question though, I was thinking I might update my versioning on wagtail-meilisearch to track the version numbers of your package, which is fairly close to tracking the version numbers of MeiliSearch itself. Does that sound like a good idea to you?

Hum, at the beginning meilisearch-python did indeed follow the same minor version (0.X.Y where X is the minor) of MeiliSearch. But we realized this is not convenient because the breaking changes of MeiliSearch do not necessarily involve breaking changes for meilisearch-python, and the opposite. So we stop that. Now, our SDKs (like meilisearch-python) follow their own versioning, so tracking the meilisearch-python version does not mean tracking the MeiliSearch version as well...
And I'm not sure I recommend your package following the meilisearch-python version for the same reason. MeiliSearch, and meilisearch-python, are not enough stable yet: we are doing a lot of changes every week.
You should follow your own versioning and when MeiliSearch will be more stable, I mean using the major, we (and you) should reconsider this possibility 🙂
(Hope I understood well your question)

@drcongo
Copy link
Author

drcongo commented Jul 30, 2020

Perfect, thanks. I actually ended up pushing a compatibility update as 0.11.0, but yeah, I take your point about how the different versions don't necessarily mean compatibility alignment. When we all hit 1.x it would make more sense.

Thanks for all the great work on this library!

@drcongo drcongo closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants