I'v successfully setup an algolia search engine on my web page. My backend syncs public data to algolia, and the searchbar works just fine.
Now I want to setup the same for my admin application. Unlike the public application, this app should be able to recover secret data from algolia.
So far, I can think about two ways of doing this:
OR
my_admin_collection_index
, duplicate the settings, and use it just like the my_collection_index
from the admin app.So in first version I search the same index, but with different tags; in the second version I search two different indices.
Is there some insights about how to choose between the two approaches ? I'd say it would be easier for me to duplicate documents and put some tags on them, but I can't really tell about the performances impact of such an approach.
Thanks !
Using more indexes to increase performance The disks will spend less time seeking when accessing the source type in question. If you have access to multiple storage devices, placing indexes on different devices can help increase the performance even more by taking advantage of different hardware for different queries.
Algolia doesn't charge for search operations, only for write operations. We charge for all operations which are either indexing or search operations.
An index is the place where the data used by a search engine is stored. It is the equivalent for search of what a “table” is for a database. Unlike a database table, an index is optimized for search operations.
The first approach consisting in pushing all objects to a single index and tagging them with the permissions is the good way to go. Combining that approach with the Secured API keys allows you to easily scale while keeping a secure front-end implementation (embedding the key in the javascript code for instance).
Even if the Algolia engine supports an unlimited number of indices per application (I saw users with +700,000 indices), having too many indices may result in some indexing overheads & slowdown (especially on the mutualized plans where you're sharing the indexing CPUs with other customers).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With