Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search] Fix issue with crawler not getting deleted (#195440)
## Summary The bug is that connector doc can be of `elastic-crawler` service type, we forgot about this in the logic that handles detaching the index from connector upon index delation. This change checks if a connector doc, matching the `index_name` to be deleted, is of crawler type: - If yes, delete the connector (crawler) doc, as crawler is always tied 1:1 to an index - If no, detach the index, leave the connector doc in the connector index This bug was likely introduced as a part of: #183833 (some lazy engineer forgot to test for this edge case ...) ## Validation ### Delete Crawler case 1: Delete Crawler deletes crawler doc + related index https://github.com/user-attachments/assets/68ad14f7-4a7f-408c-8731-6ed0465f9ef1 ### Delete Crawler case 2: Delete crawler-related index deletes crawler doc https://github.com/user-attachments/assets/e2995697-32c4-4f8f-90ce-9c06c7e6d208 (cherry picked from commit bf62169)
- Loading branch information