Som
Som

Reputation: 11

Track Deletion with combined index Azure Cognitive Search

I have a combined index that crawls data from Azure SQL and Blob and are mapped based a common column.

The mapped blob document is optional.

When there is no blob document the search indexer indexes the respective SQL row setting the content propertyas null and if the document is available the content property shows correct data.

I have enabled BLOB deletion tracking and the issue comes when a blob document is deleted. The deletion policy triggers and also removes the mapped SQL row values from index.

I was expecting that the content property will be set to null, but the deletion policy also removes the mapped SQL row values from index.

What am I doing wrong? Kindly help.

Thanks a lot in advance..

BR

Upvotes: 1

Views: 242

Answers (1)

Gia Mondragon - MSFT
Gia Mondragon - MSFT

Reputation: 466

The behavior you are seeing is by default. SQL Deletion Policy deletes full index documents based on their document Key, not specific fields. The policy doesn't have a way to know the index has values from other sources too. If there is a combined index and you would like the behavior you are looking for, you may try instead using a Logic App SQL trigger to update only specific fields with Add, update or delete documents, instead of the Deletion Policy.

Upvotes: 0

Related Questions