Open sawa-ko opened 5 days ago
Hi @sawa-ko, You see this error when you have nothing in the search index or there are missing collections because you haven't loaded enough data yet.
Please refer to the following lines for the correct artisan commands to update the index: https://github.com/jikan-me/jikan-rest/blob/master/container-setup.sh#L158-L169 Note that this can take 4-5 days to finish.
Alternatively you can use the "scout" artisan commands to drop and reload the search index, given if you have data in your mongodb instance:
php artisan scout:delete-all-indexes
php artisan scout:import App\Anime
php artisan scout:import App\Manga
php artisan scout:import App\Person
php artisan scout:import App\Character
php artisan scout:import App\GenreAnime
php artisan scout:import App\GenreManga
php artisan scout:import App\Magazine
php artisan scout:import App\Producers
php artisan scout:import App\Character
php artisan scout:import App\Profile
php artisan scout:import App\Club
Enter in the container with docker exec -it <container name> /bin/bash
or podman exec -it <container name> /bin/bash
, and execute the above commands one by one.
fyi we have an issue for changing this error message: https://github.com/jikan-me/jikan-rest/issues/478
Related issue: https://github.com/jikan-me/jikan-rest/issues/477
Is there an existing issue for this?
Current Behavior
The API has returned an error:
Typesense\Exceptions\ObjectNotFound
Status code:0
Message:Could not find a field named `popularity` in the schema for sorting.
Trace:/app/vendor/typesense/typesense-php/src/ApiCall.php on line 348
Expected Behavior
The API should have returned a successful response with data.
Steps To Reproduce
Http Request: `GET /v4/anime?q=pekora
Environment
Anything else?