I have installed the Search with Algolia extension into my firebase project, but after configuring the correct collection path (‘listings) and inputting the Algolia Index Name and Algolia Application id. the index in Algolia is not registering updates to the collection. I get the message of ‘No Records Yet’.
I have followed the video on the Algolia website, and it is installed into the correct project on firebase.
When clicking the ‘How this extension works’ tab, the link takes me to the Firebase realtime Database tab, and asks me to create a database. I can’t see it requiring this anywhere in the Algolia extension, as currently my database is using the Firestore Database.
Do I need to switch to using the realtime Database for the extension to work, or should it also work with the Firestore Database?
The path to the collection set in the Extension Configuration is listings
, should it projectName? listings? listings is the collection name though.
EDIT:
So another answer is listed here Firestore / Algolia integration fail: API key problem
The 400 error was down to insufficent permissions relating to the API key. The Admin API key will work, but you are better off creating a new API key with the desired permissions.
2
Answers
The Firebase Extension works with Firestore, so you should be good there. For the collection, it should just be as it is named in Firestore, so a collection named
listings
should just be configured aslistings
.Do you have a transform function enabled on this extension? Or is that field left blank? (not a space either — as this field can accept spaces)
Do you see any errors if you examine the logs for the Extension’s function? To check this, navigate to Firebase > Functions and select the project you have installed the extension into. On the row for the function named
ext-firestore-algolia-search-executeIndexOperation
, hover over the right-hand side and click the three vertical dots. ClickView Logs
in this drop-down.Are there any errors here that may help narrow down the issue?
Go to Algolia website -> login -> Navigate to API Monitoring -> Search API Logs -> I found status 400 for updating index when cloud firestore document was updated.
I updated the algolia – firebase extension again and added admin API key instead of search API key. Then the index update worked as expected. Search API key is only for read only operations. Whereas admin key supports write operations.