Aloglia PHP Laravel Scout : How do I search in multiple indices in single API call?

1k Views Asked by At

How can I search in multiple indices in single API call ?

currently we can search in single index vai Laravel Model level search method or create query search call in Algolia PHP client.

I have found following for Laravel but it requires Laravel 5.6 and I am using Laravel 5.4 :

https://github.com/algolia/scout-extended

this allows to search in multiple indices using Aggregator Model but lacks individual index/model pagination.

I have also found another Algolia PHP client example as mentioned here :

Algolia: searching multiple indices in Laravel

But how do I access Algolia client in Laravel Scout to perform above multipleQueries() function, create queries and paginiation with individual index ?

I have been using Algolia's javascript client in AngularJs:

https://github.com/algolia/algoliasearch-client-javascript/blob/develop/examples/angular.html

https://github.com/algolia/algoliasearch-client-javascript

to search and show hits directly from Algolia server to Angular in browser for multiple indices but since I upgraded to Angular 6 and Alglia's current libraries/widgets doesn't support multiple indices search I am switching Algolia search service to backend webservice/API which is running on Laravel where I have been already using Laravel Scout to submit Model data save to Aloglia index as searchable.

0

There are 0 best solutions below