Anyone having a search bar made? Can this be done ...
# orm-help
p
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
filter array by string?
p
Just fetch all and then filter with js? So its not tons of queries being sent?
h
Yea, depends on use case
w
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
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
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
👍 1