Try our conversational search powered by Generative AI!

Delete 'orphaned' documents



I've read many posts on how to delete a document from the S&B index, there's even a great tool which allows you to inspect how a given page looks in the index and delete the index document for it.

However, due to data copies and indexing issues, an index might get some 'orphaned' documents which have no link to any existing content in the database. How can I delete those documents, given that I have the ID of one of those documents?

I've tried to use the IClient's Delete method, but that seems to require to have the type of the original content item. I also tried to use the IClient's DeleteByQuery and trying to pass several attempts of creating a document ID:

  • just the integer ID
  • _<pageguid>
  • _<pageguid>_en
  • ...

It always returns "OK", but the document just does not get deleted from the index.

Any thoughts?

Apr 28, 2021 12:31

If I understand you correctly, the best way to do that is to reindex all content. It's not easy to find documents with orphaned links, so reindex is your best bet...

Apr 28, 2021 13:17

I understand that re-indexing is an option. In this case, it would take too long due to the amount of content items. The rebuild index job is considered plan B.

Apr 28, 2021 13:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.