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
score()
returns null
when used in a joined query
#75
Comments
This should work. If you can give me your project ID and dataset name, I can investigate. You can either email me or reach out to me by DM in the community Slack, which is a better place for this kind of support problem. |
Actually I'm able to reproduce the problem here. |
We have a fix in testing that we'll probably get out today or Monday. |
I guess I forgot to update this issue. The fix was released Oct 27. Closing this, but we can reopen if it's still a problem for you. |
@atombender I think this might be the exact issue I'm currently having. Here's the query I'm using: *[_type == "instrumentType"] {
"instruments": *[_type == "instrument" && references(^._id)] | score(title match "example") {
title,
_score
}
} Here's the result (in Sanity Vision): […] 2 items
0: {…} 1 property
instruments: […] 46 items
0: {…} 2 properties
title: Example
_score: null
... Running that same query as a standalone query, however: *[_type == "instrument"] | score(title match "example") {
title,
_score
} Shows the following (in Sanity Vision): instruments: […] 80 items
0: {…} 2 properties
title: Example
_score: 5.1123605
... |
score()
on joined queriesI'm attempting to organize posts by categories and further organize each grouping of posts in categories by a variety of variables.
Single Category Listing page
I'm using
score()
on each category listing page that looks like the following:Data:
Main Listing page
However, on the main listing page, with groupings of categories, the query and results look as follows:
Output:
Questions
There are several Gotchas in the official documentation, but nothing to suggest that this isn't support. My assumption this is unsupported by the
score()
function based on the return ofnull
rather than0
or an actual score.The text was updated successfully, but these errors were encountered: