You can actually use a search only key on the frontend that Algolia provides so user's can't start modifying your indexes and your account and so forth. Rest of your index creation and management would remain on the backend. This can actually be a pretty significant performance advantage without much security risk. Obviously it depends on your dataset but if it's general data accessible to everyone highly recommend going with the client side solution. If it's data related to specific users per index or you need to do some specific filtering on the result set that you don't want the user to know about, then would say keep it on the backend and proxy the results through your own API. In general I don't think it should be implemented on the backend just for the sake of code maintainability if it slows down the user experience.
Jun 24, 2015
2
Level 5
Algolia: front-end or back-end implementation?
Hi there,
I started this conversation because I would love to hear your opinion on this subject. Although front-end (JS) implementation is more performant and brings other advantages like search dialog and other cool stuff, I feel that a back-end implementation is more secure (you keep your keys on the server) and scalable (if you code to an interface like in the first lesson Jeffrey presented, later you can easily move to another search engine without much hassle whereas in the fron-end case it seems much more difficult to achieve the same goal). What do you think?
Cheers!
Please or to participate in this conversation.