Hi @ClaudiaGiv
you can just create couple of indexes:
CreateIndex({name:"refByTitle",source:Collection('Board'),terms:[{field:['data','title']}]})
and
CreateIndex({name:"docByref",source:Collection('Column'),terms:[{field:['data','board']}],values:[{field:['data','weight']},{field:['data','wip']},{field:['data','title']},{field:['data','wipLimit']},{field:['data','description']}]})
and use Join() to query documents:
Paginate(
Join(
Match('refByTitle','Value Factory'),
Index('docByref')
)
)
if you want to retrieve documents with the opposit order, just create the index that way:
CreateIndex({name:"docByrefDesc",source:Collection('Column'),terms:[{field:['data','board']}],values:[{field:['data','weight'],reverse:true},{field:['data','wip']},{field:['data','title']},{field:['data','wipLimit']},{field:['data','description']}]})
Hope this helps,
Luigi