Reputation: 10672
Cosmos Data source that is mapped to our azure search have millions of records from past more than 2 years. The challenge is we have changed the data type of newly added field in azure search, now if we I reset the azure search indexer, it will sync all records from past 2 yrs, is there a way I can reset indexer to sync data from past one week?
Upvotes: 0
Views: 142
Reputation: 136206
is there a way I can reset indexer to sync data from past one week?
As part of the indexer definition, you can define a query. You can write a query that will instruct the indexer to fetch the data only for last 1 week. Something like:
Select * from Root r where r._ts >= epoch representing time from one week ago
You can find more information here: https://learn.microsoft.com/en-us/azure/search/search-howto-index-cosmosdb.
Upvotes: 1