Facets disappearing with time

We are writing React App with DB on firebase. Have implemented Algolia for searching. Everything worked fine (as we thought) but later we found out that some facets are disappearing after some time. We have a function that writes the data to firestore, this data is indexed in Algolia correctly. Also it is correctly represented in search results. But later the data started disappearing from Algolia while still is present in Firestore. We’ve tried it for several times from the beginning: cleared firestore, ran our function to fulfill the database, checked that data is indexed in Algolia correctly. And each time the same result - the data disappears from Algolia in some time (not all the data, but a part of it).
What the problem might it be? We are stucked. It looks more like some dark magic.

Hey @natalia.smirnova! That’s indeed quite strange!

Is it just the facets that are disappearing or is any other data going away?

How are you currently indexing your data from Firebase? Is it using the firebase integration or a script of some sort.

If you’re using a script, a common culprit of this is one script indexing properly and if another script uses the setSettings method it might be overriding the facets being built (even if it doesn’t have anything to do with facets in the secondary script).

Is it possible that there are two indexings happening? Sometimes one index will be built with setSettings to create facets, but another index happens that has no settings specified and that can remove facets.