I'm trying to query my firestore like,
db.collection("products").where("price",">=","200").orderBy("relevance")
But it's giving an error that, first orderBy must have the field that's been used in range comparison in my case 'price'. As per the official firebase documentation it's given that
If you include a filter with a range comparison (<, <=, >, >=), your first ordering must be on the same field.
In my scenario it's important to have this kind of query, is there any way to achieve this?
https://stackoverflow.com/questions/66073475/trying-to-combine-range-comparison-and-orderby-in-firebase-firestore-but-i February 06, 2021 at 12:07PM
没有评论:
发表评论