typesense/firestore-typesense-search

Typesense Firebase Extension issue

shaunbyrnes opened this issue · 14 comments

With the typesense extensions in Firebase, I have just been prompted by Firebase extension manager to update - however, the update seems like it might be a bit glitched on the versioning? The version which installed from the marketplace is 1.0.1 (which is also what shows as latest here https://extensions.dev/extensions/typesense/firestore-typesense-search) however, it shows to "update" that version (pictured). Choosing to update, suggests to update to 0.4.2 and doing so then shows the extension is "up to date" when "updated" to 0.4.2 so we are not sure if it's a Firebase extension issue or a Typesense one.

Screenshot 2023-05-08 at 12 33 05 pm
Screenshot 2023-05-08 at 12 32 17 pm
Screenshot 2023-05-08 at 12 31 53 pm
Screenshot 2023-05-08 at 12 30 50 pm

@shaunbyrnes I just realized what's most likely happening here.

It seems like as of May 10, 2023, there's a new review process when publishing new versions of Firebase extensions, and there's also new method to publish these versions that will trigger the review process.

When I published 1.0.1, I was unaware of this new mechanism and so I used an older method of publishing the extension, which bypasses the review mechanism, but the side-effect of this is that it doesn't update the latest version of the extension in the marketplace. So even though I published 1.0.1, since it was unreviewed, it wasn't considered as the latest version.

I suspect this is why the UI asked you to "update" to the latest marketplace version, which at this time is still 0.4.2.

I've now initiated the publishing + review process for 1.0.2, which once approved (hopefully in the next few business days according to Firebase), will then show up as the latest version in the marketplace.

Yeah, makes sense. Thanks for the info, will await the update getting approval.

Any news back from Google on the review process

Not yet, I've followed up with the team.

@shaunbyrnes Just got word that the latest version of the extension has been approved. Could you try upgrading to it now?

Hopefully it should now say the latest version is 1.0.2.

Screenshot 2023-05-19 at 10 38 35 am

I think it's meant to say:

If you are running Typesense Server v0.24 or above, set “Flatten Nested Documents” to “No” (since indexing nested fields is natively supported in Typesense in these versions).

Am I correct?

You're right!

That was a copy-paste typo. I'll fix it now 🤦‍♂️

Ah thought so, haha all good :)
I am trying the update process on one of the extensions in Firebase, presumably it completes all good, then we would need to clear the docs from the collection in Typesense, then backfill it?

That's right, you would have to specifically create a new collection and backfill to that, and then switch over to it in your application and then delete the old one.

Ah, so we can't use the same Typesense collection that has already been created and just purge the documents in it?

Unfortunately no, because the collection schema doesn't get cleared out when you delete all documents. And 0.x version of the extension would have sent documents over in a flattened format which might have caused Typesense to generate a different schema that's now incompatible with the new unflattened version of the document generated by 1.x version of the extension.

Understand, makes sense, we will try deleting the collection and generate a new one, then advise how it goes. So far, the upgrade/update process to 1.0.2 worked without the glitching we had previously.

Looks like that is now all good!
Screenshot 2023-05-19 at 5 24 58 pm
If you can just leave case open for now, as this was our development environment and we still have to update on client, make sure everything is fine and then replicate in production.