We have an Azure Search index connected to a SQL Server database. Integrated Change Tracking is enabled in the database and the index. The database refreshes every 24 hours at approx 10am UTC and the index refreshes approximately 2 hours later.
Right now, both have been fully refreshed, but the database table shows approx. 1.7 million records whereas the Azure Search index shows approx 1.9 million records. I would expect the two to be identical once both daily refreshes complete.
What could cause the two to be different when change tracking is enabled? The primary key field of the database table is the Key field of the index, and all values in the primary key field are unique and auto-incrementing.
If the MS Azure Search folks could chime in here with any ideas, we'd greatly appreciate it.
Index and data source being out of sync can be caused by indexing errors. You can find errors by going to your Search Service, and clicking 'Indexers' part on the overview blade.
Dependent on your retention period, if indexers fail for a few days in a row, then some changes tracked by Integrated Change Tracking may get lost.