Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.
  • 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

1 Answer 1

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

 
discard

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.