Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My requirement is to search within sub site, if i am searching within a specific sub site result should come from current sub site. Here everything is working fine. But when I do advanced search it gives result from all site scope.

I can not create scope because we have more then 1000 sub site under one site collection and we have more then 50 site collections.

While I was looking at advanced search web part I don't see option for "Default to contextual scope" simile to search box web part.

I tried to set scope property of core result web part to "This Site" but its not working.

Note: I am not using FAST search

share|improve this question

1 Answer 1

You have to pass the context url parameter u as query string. Example:


k = keyword
cs = contextual scope
u = contextual scope url

Here is an example how you can do something similar with JavaScript: http://joshmccarty.com/2011/05/sharepoint-contextual-search-updated/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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