Hi, I have an issue with orderings my documents results by a custom field. I use javascript and when I do:
{ orderings : '[order desc]' }
nothing is happening. In my case the field "order" is a number and if I remove "desc" nothing change. I also tried with a different field but my query always returns the results in the same order.
When I use first_publication_data for ordering my results it's working, but with custom field it's not.
Thank you for contributing to the Prismic community.
Well it seems that the first query you are doing is missing the path of the document type such as
{ orderings : '[my.product.price desc]' }
If that is not the issue then can you tell us what is the location of this field that you are trying to order by (an example of one document can be useful)?
For more info about ordering please check this article
Thanks it worked ! Using "my-feed.order" worked for me. I was confused because in the document it was not clear to me that "my" needed to be part of the query.