You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use score/boost on nested documents, however I get the message:
score() function received unexpected expression
This is the query that fails:
*[_type in ["pageFaq", "pageContact", "pageFlexible", "pageGeneric", "article"] && ([
title,
description,
pt::text(sections[].list[].answer[])
] match $terms)] {
_score,
_createdAt,
_id,
_type,
title,
slug {
current
}
} | score(
boost(title match $terms, 5),
boost(pt::text(description) match $terms, 3),
boost(pt::text(sections[].list[].answer[]) match $terms, 1), // <-- This line throws the error
)
I've also tried using:
boost(pt::text(sections[].list[].answer[]) match $terms, 1)
boost(pt::text(sections[].list[].answer) match $terms, 1)
boost(pt::text(sections.list.answer) match $terms, 1)
The latter doesn't throw an error, but at the same time it doesn't return a score so I assume it's not working either.
The text was updated successfully, but these errors were encountered:
I'm trying to use score/boost on nested documents, however I get the message:
This is the query that fails:
I've also tried using:
The latter doesn't throw an error, but at the same time it doesn't return a score so I assume it's not working either.
The text was updated successfully, but these errors were encountered: