sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SharePoint Search API - deleted items still showing up for a while as "nulled" search results

Open hstuermann opened this issue 2 weeks ago • 3 comments

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:

grafik

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

  1. Create a list with a custom content type
  2. Create items
  3. Search the items (until every item is found)
  4. Delete one or more items
  5. Search again (maybe a few times)
  6. 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.

hstuermann avatar Nov 12 '26 12:11 hstuermann

👋 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 ContentTypeId is null despite a ContentTypeId query. The type:bug-suspected label 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:

  1. Capture the exact REST request and raw responses before deletion, during the null-result period, and after it disappears.
  2. Record deletion and query timestamps, the affected item ID, and response request/correlation IDs; provide these to Microsoft support for investigation.

Useful links:


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!

Ashlesha-MSFT avatar Nov 13 '26 08:11 Ashlesha-MSFT

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...

hstuermann avatar Nov 13 '26 10:11 hstuermann