Hey all, I'm using the Search Firestore with Types...
# community-help
j
Hey all, I'm using the Search Firestore with Typesense extension, and my data is out of sync. If I backfill, how does Typesense manage existing documents? Is it checking every single one and updating it? I just tried it, but I still have an out-of-sync state.
f
It either updates existing documents or adds new ones. It doesn't delete old ones that aren't in state with the Typesense index
j
How does it handle new fields? I can see that my collection has fields like actionRequired but and the original one in firestore has this property but the document in typesense doesn't...
I have a very confusing behaviour that I'm observing atm. I can confirm that I have the field isDeactivated on every document in Firestore. I now truncated the entire Typesense collection and backfilled all documents. When I check the document now, I only see a limited amount of properties and the isDeacitvated for example is missing... Is there any cache / limited amount of data that Typesense is using?
f
There's no cache that Typesense is using. It just goes off by the extension parameters
Is the field defined in your Typesense schema?
j
Yes it is
I tried to make it required, but then the backfill function complained that the documents on firestore don't have this field
f
Do they? Even if one document is missing that field, the backfill operation will fail.
j
The solution was to just create a new Typesense collection with only the fields that I needed. I also set these fields on the Firestore extension. Using the alias, it is now back up and working fine. I think if you get documents with crazy nested things on them it can lead to errors as well. So better to be intentional with the fields to sync and index.
As always, thanks for your support @Fanis Tharropoulos 😄
🙌 1