[Azure Search] Remove field value from index when not present in data source #6761
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Search
Milestone
Query/Question
We are using Azure Search to index blobs and their metadata. Some of the blob metadata is optional and occasionally users of our application would like to remove these metadata values. However, even though the blob is re-indexed the value is not removed from the corresponding search index document. I understand that by default the indexer works in a create of update mode, whereby it will only add or update fields that are present in the data source, rather than removing those that are missing. Is there a way to alter this behaviour so that it will always ensure that the document in the search index exactly matches the data in the data source?
Note that this is further compounded by the fact that the Blob Store .NET SDK throws an exception when a metadata field is set to empty string or null as highlighted in this issue. Also, I would like to avoid any solutions that involve having to call specific index operations on a per document basis to deal with this edge case.
Why is this not a Bug or a feature Request?
As mentioned above, I understand that this is the default indexer behaviour and I hope that there is already a way to work around this without having to request new features.
Setup (please complete the following information if applicable):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: