Question

I am working with Content Search Webparts.

I have a site column of type DateTime used in content type and then in a Page Layout.

My Query in CSWP is to bring pages which are associated with this Content Type. And I need to show this Date Time column value using managed property.

Now the confusion is we have also created managed property using PowerShell, there is one oob created might be during incremental crawl.

I have tried both the managed properties but none of them return values.

So how do we know which managed property is associated with a Site Column?

Any Idea or could someone throw a little light on it? Thanks

Was it helpful?

Solution

When you create a Site Column and a full crawl is completed, you will end up with a crawled property named ows_SiteColumnName. But that is a crawled property, and not a Managed Property. You can create a Managed Property and add a mapping to your Crawled Property, not the other way around.

In my documentation over the different farms we have, I’ve created a Site Column named Farm. I can create a managed property in the Search Center > Search Schema > New Managed Property. I name it Farm and make it Searchable via the checkbox. A little further down on the New managed Property page in the section Mappings to crawled properties, I click the button Add Mapping. If I search for ows_Farm and select it in the list view below.

enter image description here

Upon saving and doing a full crawl again (to be sure), I can use the managed property in the CSWP.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top