I want to search through my firebase database, so the users are able to find the product they are searching for.
Currently I'm matching the data property this.searchText with the product.title from the firebase.
return str.filter((product) => {
return product.title.match(textSearch)
})
I have a problem with this:
If the databases contains 1000 products, it doesn't make sense to filter the products on the site, but rather make a effective query like:
firebase.database.ref('products').containing('leather shoe')
I just can't find the right solution for this.