SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  • I have set a crawled property at the site level using
    $site.IndexPropertyKey.Add() and $site.Properties.Add()
  • I set the value of that property to "somevalue"
  • I full crawled.
  • I mapped it to a managed property.
  • Next, I went to change the query in a content search web part to just return a list of sites that match my new property. I used the query MyProperty=somevalue.
  • The previous query returns what I want, all sites that have "somevalue" in the "MyProperty" field.

The question: How do I create a query that lets me externalize the "somevalue" part?

Basically I want a query like this. MyProperty={Site.MyProperty}. I want this to display all sites that match the same value in "MyProperty" as the current site I am on. If this is confusing, I can explain more.

share|improve this question

I was close. The answer is ManagedPropertyName:{Site.CrawledPropertyName}. This will return all sites that match the property bag value of your current site.

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.