Does it possible or better to have an extra index like “likesCount”
j
jjaybrown98
10/21/2017, 7:33 PM
You can use the meta data query to count the number of items in the array
m
Maslov
10/21/2017, 7:35 PM
@jjaybrown98 can you give me an example with orderBy
j
jjaybrown98
10/21/2017, 7:42 PM
I don’t have access to a computer right now, but in playground, try __User and you should see the syntax for a meta query. Then use order by and make the field an ID you can use that as a way to retrieve the full record by id
m
Maslov
10/21/2017, 7:51 PM
@jjaybrown98 you mean orderBy: __User ?
Maslov
10/21/2017, 7:53 PM
only id and createdAt allowed there (with _ASC _DESC)