- I am trying with this code to search the product by name in the database but it gives those data which is the same as in a database. so give a better solution.
Code:
let response = await db
.collection("products")
.where("productName", ">=", req.body.searchText)
.where("productName", "<=", req.body.searchText + '\uf8ff')
.get();