Can I use Node.js to delete only specific data from documents in the AzureAISerch index?

Taiyo Fujisaki 30 Reputation points
2024-06-19T06:16:42.4466667+00:00

Can I use Node.js to delete only specific data from documents in the AzureAISerch index?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 39,106 Reputation points Volunteer Moderator
    2025-10-16T19:13:00.7066667+00:00

    Hello Taiyo !

    Thank you for posting on Microsoft Learn Q&A.

    You can't delete part of a document in place but you can clear specific fields or remove whole documents from an Azure AI Search index using Node.js.

    You can use the delete action with the document key. https://free.blessedness.top/en-us/rest/api/searchservice/

    Then send a merge that sets that field to null this way you can deletes that field content while keeping the document. Don't forget that collection fields can't store nullbut use empty arrays.

    https://free.blessedness.top/en-us/azure/search/search-howto-reindex

    You can replace the entire collection value with fine grained partial updates inside a collection item aren’t supported unless you rebuild the whole collection value you send.

    https://free.blessedness.top/en-us/azure/search/search-howto-complex-data-types

    Physical space may free up with a short delay after deletions and the service compacts in the background.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.