Problem Algoliasearch Helper and Angular js

Is it possible to create multiple search lifecycles inside the same angular.js factory which can search from different indices.
I created a codepen demo and I can create multiple factories for different indices. I would like to know if I can do that in a single factory.