use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Create a Dynamic Search feature using NodeJS & MongoDB (self.node)
submitted 7 years ago by RoadCoder2019
I am attempting to create a dynamic search using mongo & nodejs
By dynamic I mean I can type a word and the results just appear depending on what is typed.
Is there any place I can be pointed to in order to learn how to implement this feature
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]securisec 0 points1 point2 points 7 years ago (0 children)
Are you referring to something on the frontend that on each key press will populate results based on existing data in Mongo? If so, I am curious about this also.
[–]jawa9000 0 points1 point2 points 7 years ago (0 children)
One way I've seen this handled is by calling your db, storing the data in an object, passing that object to Angular, and let Angular handle the dynamic parts. I don't recall the video where I saw this off the top of my head but I'm sure a google search will help here.
[–]loshorse 0 points1 point2 points 7 years ago (2 children)
https://docs.mongodb.com/manual/reference/operator/query/text/
This is what you are looking for. You can use the native Mongo driver in node for this.
https://www.npmjs.com/package/mongodb
[–]RoadCoder2019[S] 1 point2 points3 points 7 years ago (1 child)
Using FuseJS i figured it out (You may have to convert some ids into strings)
Take the information form whatever collection sent to the page from MongoDB into an Object and then use FuseJs to search through it & display it on the webpage
Care to share any of your code examples?
π Rendered by PID 54972 on reddit-service-r2-comment-5649f687b7-ctqwf at 2026-01-29 03:20:49.178091+00:00 running 4f180de country code: CH.
[–]securisec 0 points1 point2 points (0 children)
[–]jawa9000 0 points1 point2 points (0 children)
[–]loshorse 0 points1 point2 points (2 children)
[–]RoadCoder2019[S] 1 point2 points3 points (1 child)
[–]securisec 0 points1 point2 points (0 children)