API for searching
Hello, I'am doing a application for selling product online. And you know, the search bar, I want to make them functional, to create an API my frontend can use to search for products with barcode, image, name etc
27 Replies
Whats stopping you?
What have you tried? Where are you stuck?
I want suggestions where can I find that's api
???
you have to make that api
I don't know how to make them, soo...
well, start simple
make an API endpoint that takes a string in and returns a list of results out
limit it to only accepting names for now
then add barcodes, if you have that data
Soo i need to create data for barcodes
well, duh?
if your database doesnt contain barcode information, how else would you search for it?
What about for images?
What about images?
To search the product with images
... what
like, google reverse image search?
Yep
Good luck
Like that
Hahhaha, thank you
I can almost guarantee that you can safely ignore that feature.
And if you must have it, it involves some very complicated topics - you'll need a way to "compare" two images and calculate a "similarity" rating, but you also likely need some AI tech to find the "important object" in the image etc
this image is very relevant here
Ohh, maybe is right to ignore that future
Feature
the other two make more sense and are easy to implement, given you have the data
Yep, sure. Thank you Pobiega
I know now what to do,
I didn't know where to start
again, with caveats for how fancy you want it. a name search can be as easy as a
LIKE %value%
but you might want to compensate for typos, or wrong word order etc
at that point you might need a search indexer, the complexity again skyrockets 🙂Other complexity?😅
?
Are there other complexities?
Of course. But listing them is unfeasible
it all depends on what your requirements are and what features you want
and what solutions you can use depends on your developer skills, how much this can cost, how much time this can take, etc
Is it realistic to have a search indexer for a webshop?
If you are a tiny tiny seller with single-digit customers per day, no.
If you are selling thousands of products per day? yes.
Well, with others developer in my company, we think to make for thousands products
Soo, ofc is not easy
But, I want to trying,to prove how far can I go
I will trying and for this,
Thank youuu Pobiega, a looot
:SCshocked: