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

[bug]: Score field is missing in the Recommendation API response #3940

Closed
1 task
scpatricklim opened this issue Oct 10, 2024 · 1 comment · Fixed by #3967
Closed
1 task

[bug]: Score field is missing in the Recommendation API response #3940

scpatricklim opened this issue Oct 10, 2024 · 1 comment · Fixed by #3967
Labels
bug Something isn't working

Comments

@scpatricklim
Copy link

Description

According to the documentation https://www.algolia.com/doc/rest-api/recommend/#tag/recommendations/operation/getRecommendations the recommendation API response returns both the _score field and objectID as mandatory fields however we encounter the _score field being empty which breaks our validation.

This can be reproduce by calling getRecommendations on a newly added record prior retraining the model.

Can you advise is this an expected behaviour and the _score field is expected to be optional ?

Language

All

Client

All

Steps to reproduce

  1. Add a new record to the index via the SaveObject method
client, err := search.NewClient(appID, apiKey)
if err != nil {
    panic(err)
}
// Add record to an index
saveResp, err := client.SaveObject(
    client.NewSaveObjectRequest(indexName, record),
)
  1. call the recommendation API on the same record.
  2. inspect the response which doesn't contains the _score field

Relevant log output

No response

Self-service

  • I'd be willing to fix this bug myself.
@scpatricklim scpatricklim added the bug Something isn't working label Oct 10, 2024
@scpatricklim
Copy link
Author

scpatricklim commented Oct 10, 2024

duplicate here algolia/algoliasearch-client-javascript#1560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant