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

AdvancedSearch: Querying topCollections with curated results throws error #13

Open
michaelbromley opened this issue Mar 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@michaelbromley
Copy link
Member

When performing a search query and selecting the topCollections field, and curated results in the result set will cause an error to be thrown.

The root cause seems to be that we attempt some Math operations on the text_match field (which is normally a number) but for curated results this is not numeric, resulting in a "score" of NaN, which in turn causes the GraphQL layer to return:

{
  "errors": [
    {
      "message": "Int cannot represent non-integer value: NaN",
      "locations": [
        {
          "line": 42,
          "column": 7
        }
      ],
      "path": [
        "search",
        "topCollections",
        0,
        "score"
      ]
    }
  ]
}
@michaelbromley michaelbromley added the bug Something isn't working label Mar 29, 2023
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

No branches or pull requests

1 participant