2

I am developing a Add-In for Sharepoint. The App-web for the add-in contains a document library where I store some data.

I want to stop the items in this document library appearing in the results of the share point search when a user is searching from the host web. However I still want to be able to search the contents of the document library programmatically.

What I have tried

I tried turning off the "Allow items from this document library to appear in search results?" option in the settings of the document library (Document Library>>Settings>Advance>>), however when I did that, I couldn’t even search the library programmatically.

Does anyone know a way to hide the items from Sharepoint search results in the host web while being able to get results programmatically?

Thanks

  • 1
    I haven't tried this, but perhaps editing the default result sources to exclude items from the app's web. – wjervis Jan 21 '16 at 11:56
  • My Add-In only request app only permission from the tenant. so i wont have access to the edit the default results sources in the host web. is there a way around it? – Pubudu Tennakoon Jan 22 '16 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.