C
C#•9mo ago
Ajetekrasniqi

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
Pobiega
Pobiega•9mo ago
Whats stopping you? What have you tried? Where are you stuck?
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
I want suggestions where can I find that's api
Pobiega
Pobiega•9mo ago
??? you have to make that api
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
I don't know how to make them, soo...
Pobiega
Pobiega•9mo ago
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
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Soo i need to create data for barcodes
Pobiega
Pobiega•9mo ago
well, duh? if your database doesnt contain barcode information, how else would you search for it?
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
What about for images?
Pobiega
Pobiega•9mo ago
What about images?
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
To search the product with images
Pobiega
Pobiega•9mo ago
... what like, google reverse image search?
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Yep
Pobiega
Pobiega•9mo ago
Good luck
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Like that Hahhaha, thank you
Pobiega
Pobiega•9mo ago
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
Pobiega
Pobiega•9mo ago
No description
Pobiega
Pobiega•9mo ago
this image is very relevant here
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Ohh, maybe is right to ignore that future Feature
Pobiega
Pobiega•9mo ago
the other two make more sense and are easy to implement, given you have the data
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Yep, sure. Thank you Pobiega I know now what to do, I didn't know where to start
Pobiega
Pobiega•9mo ago
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 🙂
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Other complexity?😅
Pobiega
Pobiega•9mo ago
?
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
Are there other complexities?
Pobiega
Pobiega•9mo ago
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.
Ajetekrasniqi
AjetekrasniqiOP•9mo ago
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
The Fog from Human Resources
:SCshocked:
Want results from more Discord servers?
Add your server