Reputation: 355
We are using data source and indexers to synchronize data between cosmos-db and Azure Index. Now in cosmosdb if the properties value get changed from state A to State B below, index reflects those value:
State A
{ "systemID": null,
"machineTag": null }
State B
{"systemID": "*1YRPHS3J7NGUVA9",
"machineTag": "prashant-tarun"}
But now say, application changes the state in cosmos-db from state B to State A, the values do not get reflected in the index. Another way of putting it, the staring properties in the index are not updating the values to null. Is there a different way to handle this?
Upvotes: 1
Views: 355
Reputation: 4671
This is a known limitation of Azure Search indexers. Indexer machinery treats null values as if the property wasn't present.
The workaround for string values is to use an empty string instead of null.
Upvotes: 1