Skip to content

Commit 84fd966

Browse files
authored
Refine delete API documentation for Markdown indexing
1 parent f653986 commit 84fd966

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/search/search-how-to-index-markdown-blobs.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,16 +466,17 @@ This method uses a soft-delete to delete documents associated with a specific bl
466466

467467
#### Option 2. Use the delete API
468468

469-
Before re-indexing a modified Markdown file, explicitly delete the existing documents associated with that file using the [https://learn.microsoft.com/en-us/rest/api/searchservice/delete-documents](https://learn.microsoft.com/en-us/rest/api/searchservice/preview-api/add-update-delete-documents). You can either:
469+
Before re-indexing a modified Markdown file, explicitly delete the existing documents associated with that file using the [delete API](https://learn.microsoft.com/rest/api/searchservice/preview-api/add-update-delete-documents). You can either:
470470

471471
* Manually indentify individual stale documents by identifying duplicates in the index to be deleted. This may be feasible for small, well-understood changes but can be time-consuming.
472472
* (**Recommended**) Remove all documents generated from the same parent file before re-indexing. This ensures a clean slate and avoids inconsistencies.
473473

474474
1. Identify the id of the documents associated with the file. Use a query like the one below to retrieve the document key IDs (e.g., `id`, `chunk_id`, etc.) for all documents tied to a specific file. Replace `metadata_storage_path` with the appropriate field in your index that maps to the file path or blob URI. Note that this field must be a key.
475-
```
476-
GET https://<search-service>.search.windows.net/indexes/<index-name>/docs?api-version=2025-05-01-preview
477-
Content-Type: application/json
478-
api-key: [admin key]
475+
```http
476+
GET https://[service name].search.windows.net/indexes/[index name]/docs?api-version=2025-05-01-preview
477+
Content-Type: application/json
478+
api-key: [admin key]
479+
479480
480481
{
481482
"filter": "metadata_storage_path eq 'https://<storage-account>.blob.core.windows.net/<container-name>/<file-name>.md'",
@@ -484,10 +485,10 @@ Before re-indexing a modified Markdown file, explicitly delete the existing docu
484485
```
485486

486487
2. Issue a delete request for the documents with the identified keys.
487-
```
488-
GET https://<search-service>.search.windows.net/indexes/<index-name>/docs?api-version=2025-05-01-preview
489-
Content-Type: application/json
490-
api-key: [admin key]
488+
```http
489+
POST https://[service name].search.windows.net/indexes/[index name]/docs/index?api-version=2025-05-01-preview
490+
Content-Type: application/json
491+
api-key: [admin key]
491492
492493
{
493494
"value": [

0 commit comments

Comments
 (0)