1

Please Please I need help. I am pretty new to the content roll up web part and all about crawled and manged properties stuff. I have no access to SP2013 onprem central admin so trying to achieve this on SPO.

I have a staff list which i want to display in content search web part just like in the video below. I followed the steps but I didn't figured out where/how he got the managed properties like ContactphotoOWSURLH/pic URL , FullNameOWSTEXT, EmailOWSTEXT and CommnetOWSMTXT

https://www.youtube.com/watch?v=XIIOFH2w8HI&t=164s

enter image description here I did the query and got my list using LIStID in property filter box. But unable to display their picture, email, and other columns information i want.

Now what I want is, from the screen shot below to display 4 things.

  1. Staff picture which i have in my list / In picture url box

  2.  Staff Name/Line 1

 3. Staff Email/Line 2,

 4. Staff Department/ Line 3

enter image description here

All my columns are just columns not added as a site column.,

So, How can I create a custom managed properties and map to display any column in CSWP? where and how he created those managed properties ? In search schema ? yes? then HOW? Please explain the step from the beginning. Again I am new to this web part and search

Updated ques:

Hi Chris, Thank you really for taking your time and helping me with this. I hope you'll figure out the following challenge I am getting to get it done. Well, i followed the steps and it didn't solve the issue. I can't see the managed properties in CSWP. Either mapping or creating new in ''search schema''didn't work for me. I have found my column/regular/ in managed properties but it was grayed out. Then i edited and mapped but it didn't help. Finally I created brand new 3 site columns/name,email,pic column types/ and added content type to my custom list. The result i am seeing in the managed properties vs crawled properties are like the screen shot below for my site columns.

PicA.In Managed properties

enter image description here

PicB.In Crawled properties

enter image description here

As you can see above in the managed properties it's grayed out again but I can edit it like in the screen shot below. Let me give u a brief exp what i did last time in managed properties, and it didn't work.

pic 1 ----edit

Pic 2---- just ticked all the main characteristics and left it to text type.But this is a picture column so, does text type works for picture columns?

pic 3----mapped/ tried both ows_StaffPicture and ows_q_URLH_StaffPicture/

Pic1. enter image description here

Pic2. enter image description here

Pic3. enter image description here

So, 1.why editing properties in managed proprieties didn't work? 2. what should i try next in crawled properties in the picB? which one should i map ows_staffPicture/ows_q-URLH_StaffPicture? but the ows_q-URLH_StaffPicture isn't already mapped like in picB? if so, why it doesn't show me in CSWP?

Thank you in advance.Notice it's in SPO

5
  • Re: Pic A, The greyed out properties are still mapped to crawled properties, but because they were created automatically you can't see the mappings. Commented Nov 8, 2018 at 14:28
  • Re: Pic 2 Yes, you can map IMGE properties to a TEXT property. The URL of the image file is what is returned. Commented Nov 8, 2018 at 14:31
  • #1 I'm not entirely sure. From here it seems like you are doing the right thing. #2 Try mapping multiple crawled properties to your managed properties. Each Site Column may have one or more corresponding crawled properties, so try adding all of them to the managed prop, and see if that affects what shows up in the CSWP. In other words, map both ows_StaffPicture and ows_q-URLH_StaffPicture to StaffPictureOWSURLH. It does look like the latter is already mapped in Pic B. Commented Nov 8, 2018 at 14:36
  • See also: sharepoint.stackexchange.com/questions/158199/… Commented Nov 8, 2018 at 14:43
  • I have updated my comment below. I hope this is helpful! Commented Nov 8, 2018 at 15:34

1 Answer 1

1

The short answer is that you create and edit managed properties in the Search Schema. So this is where you are going to be working on this problem. The standard URL for the Search Schema at the Site Collection level is, e.g. https://contoso.sharepoint.com/_layouts/15/listmanagedproperties.aspx?level=sitecol. Or you can find it in the Site Settings page under the Site Collection Administration heading:

The Search Schema on the Site Settings page

This is where you should be able to locate properties with names like FullNameOWSTEXT and CommentOWSTEXT. If you don't find them in the Managed Properties list then they probably don't exist. As far as I know, it is illegal for two Managed Properties to have the same name or alias.

There are several things to note when dealing with managed props:

  1. Site columns automatically get indexed and mapped during search crawls. I am not sure about regular columns- although they probably get indexed as crawled properties, you may need to manually map them to a managed property, or (at worst) convert the list to use Site Columns instead of local ones.

  2. Indexing and crawling are absolutely essential to returning managed properties- if a list has not been crawled, then it is invisible to a CSWP. They say you need to do a full crawl for new properties to be present in the index, but if you don't have access to Central Admin then the next best thing is to initiate a Reindex of this list in particular. You can do that by going into List Settings -> Advanced Settings -> click the button labeled "Reindex List". Then, during the next scheduled crawl, the list's properties will be added to the index.

Reindexing the list updates crawled and managed properties in the search schema

  1. Even though site columns automatically get indexed and mapped to managed properties, they can't be returned by a CSWP unless they are set as retrievable. Without this setting, the CSWP will not be able to "see" the property at all.

Retrievable means the property can be used in a Display Template, e.g. one used by a Content Search Web Part

  1. You can only set managed properties to be retrievable from Central Administration (at the Search Service app level), so in your case you need to make use of the Default Unused Managed Properties, which you can access from the search schema.

To find these default managed props in the schema, just search "Refinable" on the Managed Properties side, and they should appear. There are dozens of these unused managed properties for different data types.

So, referring back to your question: if you want to show the custom columns you added to your list in a CQWP, you must first map those columns' crawled properties to an unused default Managed Property. Here's how to do that:

  1. In the search schema, search for an unused managed string property and open it for editing. You can't actually change any of the settings except for the Alias and the mapping, but that's all you need.

Search for default unused managed properties in the schema

  1. Give the managed prop a unique and memorable alias with no spaces or special characters, like StaffDepartmentCustom. This alias is what you will put in the CQWP to retrieve the property value and show it on your page.

Give the managed property a unique Alias

  1. Scroll down to the section called Mappings to crawled properties and click the Add a mapping button on the right side

Add a mapping

  1. Search for the crawled property that corresponds to the column in your custom list. There is a pattern to the way these are named, which you can read about here. In general, crawled property names derive from the name of the column they are coming from. So do a search and see what shows up, and if the column you are looking for is not obviously there then it may not be in the index yet. Otherwise, select the appropriate property and click OK to add it to the mapping.

Map a crawled property to a managed property The updated mapping

  1. Now save the managed property and repeat this process for each column in your list that you want to use in the CQWP

  2. After all the mappings are done, go back to the CQWP and use the Aliases you created in the Schema to refer to these properties in each "slot" in the CQWP.

This should work, but I have only done this in SharePoint on-premises so your mileage may vary. I think the only way this system seriously differs from SP on-prem is that you are not allowed to manually initiate search crawls in SPO. So you may need to wait a bit before the custom managed properties you create actually start working.

Finally, see this page for a good explanation of how managed properties work with site columns and crawled properties: https://docs.microsoft.com/en-us/sharepoint/administration/from-site-column-to-managed-propertywhat-s-up-with-that

Edit Since you are not seeing your props in the CSWP, I would suggest troubleshooting by opening the Query editor for a Search Results web part and seeing what results you get for your props.

To do that:

  1. Go to your Site Collection's Search Center results page (e.g. https://contoso.sharepoint.com/search/Pages/results.aspx)

  2. Edit the page, then edit properties for the Results Web Part Edit properties for the Search Results web part

  3. Click "Change Query" to open the Query Editor Open the Query Editor

Now we are going to use the Query Editor to see what is returned, if anything, when we search on the managed properties we created in the Schema settings.

  1. From the Property Filter dropdown, select *-- Show All Managed Properties -- * then find one of your props in the list. Select a managed property from the dropdown

  2. Configure the filter. Set it to equal a value you know appears in one of the source list items. Then click Add Property Filter to add it to the Query Text. Add a property filter to the Query Text

  3. Now click Test Query and see what results come back. If you have results at all, it means your managed prop is configured correctly. If not, try some other property filter settings (contains vs. equals, etc.) and see if you can get results to come back. This can help you figure out what values, if any, are actually store in the crawled properties in the Search index.

3
  • Hi Chris, Thank you really for taking your time and helping me with this. I hope you'll figure out the following challenge I am getting to implement your steps.
    – MD_El
    Commented Nov 7, 2018 at 1:45
  • Hi Chris, Thank you really for taking your time and helping me with this. I hope you'll figure out the following challenge I am getting to implement your suggestion. Well, i followed your steps and it didn't solve the issue. I can't see the managed properties in CSWP i have mapped either created the new one in ''search schema''. I have found my column/regular/ in managed properties but it was grayed out. Then i edited and mapped but it didn't help.
    – MD_El
    Commented Nov 7, 2018 at 1:53
  • Hi Chris, I updated my ques for you please look at it in the main question section. Thank you
    – MD_El
    Commented Nov 7, 2018 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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