So I have a query like this.
firestore()
.collection('posts')
.where('category', '==', category)
.orderBy('price', 'asc')
.startAt(minPrice)
.endAt(maxPrice)
.orderBy('title', 'asc')
.startAt(searchString)
.endAt(`${searchString}\uf8ff`)
.limit(10)
.get()
.then(res => {
console.log(res.docs);
setPosts(res.docs);
})
Where I filter first by category and than I want filter for price in and between min and max price
After that I also want to run this filter
.orderBy('title', 'asc')
.startAt(searchString)
.endAt(`${searchString}\uf8ff`)
To get the partial string match on title
The query is running without any error but it always return an emply array. Can anyone help me with this problem.