Elasticsearch Primary/Replica DocFreq Not In Sync

Using an explain query, I'm seeing a drastic difference in the docFreqs between a query with preference for _primary vs one for _replica.

The index is restored from a snapshot from a 5.4.3 cluster to a 6.8.6 cluster.

I've tried three approaches:

  1. restoring the index with 0 replicas and then replicating
  2. force merging & expunging deletes for the restored index and then re-replicating
  3. reindexing from the restored index to a new index and then replicating

but nothing seems to sync the statistics between the primary and the replica.. This leads to shifting results depending on which type of shard the request lands on (primary vs replica).

Has anybody experienced this or know how to sync the statistics between the primary and replica?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.