I want to recommend users with opposite sex to the current user. I write a query as flow
{
a as var(func: eq(user_id, "AB0000084799"), first: 1) {
user_sex as user_sex
fl as follow {
}
}
calculate_score as var(func:eq(user_sex, cond(val(user_sex)=="M", "F", "M"))) @filter(not uid(a) and not uid(fl) and not eq(university_name, "高新大学")) @cascade {
integral @filter(gt(score_date, "2018-04-11")){
s as score
}
recent_score as sum(val(s))
}
TopRecommendationCount(func: uid(calculate_score)) @filter(ge(val(recent_score), 10)) {
total: count(uid)
}
}
but ratel says
Expected comma or language but got: "M"
Is there something wrong?