Anyone having a search bar made? Can this be done without example elastic search? I need to make a users search. I have tried to google, but I dont find anything. (I might be searching wrong)
h
huv1k
05/11/2018, 1:21 PM
filter array by string?
p
pettanko
05/11/2018, 1:39 PM
Just fetch all and then filter with js? So its not tons of queries being sent?
h
huv1k
05/11/2018, 1:42 PM
Yea, depends on use case
w
weakky
05/11/2018, 1:53 PM
Why don’t you use prisma’s filtering instead of using js ? It’ll never be that powerful but you can easily build a multi-criteria search using the
OR
operator, and
_contains
fields
h
huv1k
05/11/2018, 2:00 PM
Yea, but if he wants searchbar it will need debouce on type or something, because otherwise it will just fire too much request etc
w
weakky
05/11/2018, 2:02 PM
Sure, but debouncing/throttling is no big deal with lodash ! It all depends whether he’s building something on mobile or desktop, and how many items he has in db