Can we search Algolia Places and on of our Indices at the same time?

108 Views Asked by At

Here's an example of what I would like to do based on this example in Algolia docs: https://www.algolia.com/doc/api-reference/api-methods/multiple-queries/

var algolia = algoliasearch(app_id,  search_only_key);
var regionIndex = algolia.initIndex("Global");
var algoliaPlaces = algoliasearch.initPlaces(app_id, search_only_key)

algolia.search([
  {
    index: algoliaPlaces,
    query: "211 Solti St"
  }, {
    index: regionIndex,
    query: "211 Solti St"
  }
])
1

There are 1 best solutions below

0
On BEST ANSWER

You cannot use multiple-queries to query Places since it is a service API and not a simple index.

You can query both separately and combine results, or take a look at the following example that does what you want!

https://community.algolia.com/places/examples.html#autocompletejs