How can i set an index into many to many table to do the filtering

In here, i made an index with terms: data.studentID
but it is fail to filter if i put the student ref id.

the reason of failing is because studentID is not actually a string i guess.

then how can i get the student course belongs to that student using index?

The value stored at studentId is not an “ID”. It’s a full Ref object.

Search by the full Ref then:

Paginate(
  Match(
    Index('LinkTable_by_student'), 
    Ref(Collection('Student'), '293595790902821386')
  )
)
1 Like