You don't know which library it resides in, nor site, nor site collection. The only entry point is the search center URL or _api/Search endpoint.

The problem is that when you retrieve the File it is also agnostic of parent folder/list/web/site. Anyone solved it already?


If I got you right, you search for documents using CSOM/REST. Let's assume you try to use 'query' method of '_api/Search' endpoint. All you need is to define selectproperties for query: Search Query params

You may need SPWebUrl to construct request to REST endpoint for item properties. Let me assume you're using on-premises SharePoint Server 2013 installation. In this case you have to create new text managed property in Search Service Application's schema (don't forget to mark it as Retrievable): OnPrem crawled prop

Also don't forget to do full crawl after property has been added.

SharePoint Online already has it mapped to "SPWebUrl, owstaxIdSPLocationSite" (not enough reputation to post another link :) )

Hope this help.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.