My Schema:
name: string @index(term) .
type Student {
name
}
type Teacher {
name
}
Search Query:
{
student(func:allofterms(name, "Lydia Spirits"), first:10, offset: 0) @filter(type(Student)) {
uid
name
}
}
Want to understand the order of execution in search query above and how it affects pagination? Is it right to left ? i.e 1. @filter(type(Student)) → 2. allofterms(name, “Lydia Spirits”) → 3. pagination(first:10, offset: 0) applied after evaluating previous two criteria(filter → allofterms)?
Will the pagination results(and total count) change if query changes like:
New Search Query:
{
student(func:type(Student), first:10, offset: 0) @filter(allofterms(name, "Lydia Spirits"),) {
uid
name
}
}
The above qn is becs of where the pagination arguments are part of and whether it gets applied after all conditions are evaluated ? Both Students and Teachers can have name “Lydia Spirits”
Note: I can always have explicit predicates like student_name, teacher_name but wanna understand how it will behave in above cases.