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

🐛 [HOSTED-RR] Generated Issue: ObjectNotFound #554

Open
1 task
sawa-ko opened this issue Oct 9, 2024 · 3 comments
Open
1 task

🐛 [HOSTED-RR] Generated Issue: ObjectNotFound #554

sawa-ko opened this issue Oct 9, 2024 · 3 comments

Comments

@sawa-ko
Copy link

sawa-ko commented Oct 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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

- OS: Ubuntu 24.04.1 LTS
- Browser: Google Chrome Versión 129.0.6668.89
- Docker image: jikanme/jikan-rest:latest

Anything else?

image

@pushrbx
Copy link
Collaborator

pushrbx commented Oct 9, 2024

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.

@pushrbx
Copy link
Collaborator

pushrbx commented Oct 9, 2024

fyi we have an issue for changing this error message: #478

@pushrbx
Copy link
Collaborator

pushrbx commented Oct 9, 2024

Related issue: #477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants