SharePoint Search API - deleted items still showing up for a while as "nulled" search results
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
Windows
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [x] 💥 Microsoft Edge
- [x] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
No response
Describe the bug / error
I am having trouble with the SharePoint Search API again. Suddenly, when we delete items it takes a while until this item is "completly" removed from the search results. A deleted item is appearing "broken" in the search results. Every managed property is "null". So for example my search query is like ContentTypeId:0x01....*. I get all my results + the deleted result but all fields are nulled. So even the ContentTypeId field is empty:
This falsy search results are breaking every solution working with search API. I could build work arounds to filter out such "null" results. But this result should not be there in the first place.
Steps to reproduce
I created to reproduce this issue in our tenant a new list on a fresh site collection
- Create a list with a custom content type
- Create items
- Search the items (until every item is found)
- Delete one or more items
- Search again (maybe a few times)
- After a while one or more "null" items should appear
Expected behavior
Deleted items should not appear in search results as "nulled" items. That an item is still visible while the crawler havent run is fine, but the item should not appear broken in the results.
👋 Hi @hstuermann,
Thank you for reporting this issue. Here is an AI-generated initial response:
Classification: Bug — Returning a deleted item as a search hit with every managed property null appears inconsistent with usable SharePoint Search REST results; the cause is unconfirmed.
- The reported delay before deletion disappears could reflect indexing lag: SharePoint search results depend on an index updated by crawls. That guidance does not explain a hit whose
ContentTypeIdis null despite aContentTypeIdquery. Thetype:bug-suspectedlabel is a triage signal, not confirmation. - As a temporary client-side safeguard, omit hits missing required properties; this does not correct the search result.
What to do now:
- Capture the exact REST request and raw responses before deletion, during the null-result period, and after it disappears.
- Record deletion and query timestamps, the affected item ID, and response request/correlation IDs; provide these to Microsoft support for investigation.
Useful links:
- No sufficiently relevant related issue found in the searched repos.
- SharePoint Search REST API overview
- How SharePoint search indexing works
Note: AI-generated guidance may be incomplete or incorrect. Please verify suggestions before applying them.
Hello @hstuermann We attempted reproduction, but our test environment is currently blocked by a separate Search REST failure: queries return HTTP 500 with SearchServiceException before deletion testing. We have not yet confirmed or ruled out the reported null-result behavior. We are seeking a working test environment. To help investigate, please provide the exact search request, a raw response showing the null-valued result row. Thanks!
I will try when my tenant is working again. I am having HTTP 500 errors too at the moment due to global M365 service problems...