2

i am facing a problem in understanding why some site columns got managed & crawl properties while the other do not. now when i check this further i found that only site columns which have data, will get managed properties created automatically when the crawl runs.

now i am facing this problem.

  1. I have a site collection named Depts.
  2. Inside this site collection i got 5 sub-sites; "HR", "Finance", "IT", "Accounting","customer service".
  3. Inside each sub-site. it got its own site collection site columns. for example the HR sub-site have site columns such as "HR Area", "HR Problem Manager", etc..

  4. now i wanted to add a Content Search WebPart. which oversee the 5 sub sites and show items which have the related "Problem Manager" = login user.

  5. so i added a new Content Search webpart inside the site collection home page.
  6. then i wanted to reference the related "<<Dept Name>> Problem Manager" site column.
  7. the problem is that i have noted that only site columns which have data got a managed property under "central admin >> Manage services >> search service >> search schema". but i still want to referecne all the site columns inside my Content search web part. so when users add data the realted items shows inside the web part.

so now not sure how i can overcome these problems:-

  1. how i can reference site columns which do not have data and thus do not have managed properties inside my "Content search web part"??

  2. Now if manually creating the managed properties inside "central admin >> Manage services >> search service >> search schema" is the way to go . then how i can make sure that the crawl/managed property names are correct. because i got this example; i created a site column using the UI named "Software Development Risk/Issue owner" ,, where the site column got the following internal name "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Owner", which is fine.. but its managed property name inside the search is "SoftwareDevelopmentOWSUSER" . so seems when building the managed property the white spaces are going to be removed from the site column name + there will be some character truncating... so how i can build my managed properties for the columns that do not have data in this case !!

2
  • 1
    For what I remember from my own experience, I haven't had this problem when the site columns had been created on the root level of the site collection.
    – moe
    Oct 3, 2016 at 12:08
  • @moe but in my case all the site columns i am referring at were created at the site collection root .. but site columns which do not have data ,, does not have any managed properties inside the search .. so can i manually create the managed properties ?
    – John John
    Oct 3, 2016 at 14:42

4 Answers 4

1

When adding new columns in your SharePoint environment, and wanting to use them in SharePoint Search, they should be indexed first before you can use them.

To have new columns indexed, and thus have them available in search, you should:

  • Make sure they have data in them
  • Perform a full crawl

Columns that do not have any content in them will not be indexed if they do not exist in the search index yet. Of course, when they already exist, they will not be removed when the data is cleared.

Easiest approach that we come across, is usually:

  • Create the column(s)
  • Fill with dummy data
  • Perform full crawl
  • Remove dummy items

More information: https://technet.microsoft.com/en-us/library/dn794220.aspx

6
  • this is a workaround i do not want to go with !!! so is manually creating the Managed Properties a valid appraoch to follow?
    – John John
    Oct 3, 2016 at 14:41
  • 1
    Creating properties manually is done buy mapping a Crawled Property to a more "user-friendly" name. This crawled property will only exist if the column is crawled at least once. This only happens when the column had at least 1 time a value in it, when a full crawl was run. I know it's not ideal, but that's simply how the indexer works. The search index only stores actual content. Never null values - unfortunately.
    – Nsevens
    Oct 3, 2016 at 15:18
  • i am trying to get the correct answer to my question.. so you are saying that i can create the managed properties manually ...is this correct ? is Yes then can you chekc my point2 inside my original question ? to see exactly how i can manually build my managed properties names ?
    – John John
    Oct 3, 2016 at 16:04
  • You can create them manually, but only after they have been indexed - and thus a Crawled property exists. Then when creating the Managed property you can decide yourself what you name it.
    – Nsevens
    Oct 3, 2016 at 19:02
  • so you are saying that the actual name of the managed property does not have to be related to the site column internal name??,, and what really matters is the name of the crawled property , which should relative to actual site column name??
    – John John
    Oct 3, 2016 at 22:52
1

Managed Property name doesn't create any affect! You can create a managed property named ABC for a column named XYZ, what matters is the fact that you do proper mapping of the crawl property to the managed property. You can then set that managed property to be

  • Sortable
  • Refinable

This is a blog which guides you to how to create a custom managed property

Ref

15
  • so let me wrap up the final results . now managed properties will not be created until the site columns contain data,and a full crawl runs on the non-empty site columns. so in my case i have to create the managed crawl & managed properties manually. now the managed properties names can be whatever i want, unlike the managed crawl properties which should relate to the site column.now in my case i have a site column with the following internal name "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Owner" , and the crawl property for this column is "ows_q_USER_SoftwareDevelopment"
    – John John
    Oct 4, 2016 at 11:36
  • while the managed properties for it is "SoftwareDevelopmentOWSUSERUser".. so this mean if i where to manually create the crawl property for the "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Own‌​er" then i need to apply certain pattern on the site columns , to get its crawl property the pattern is what extract "SoftwareDevelopmentOWSUSERUser" from "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Own‌​er" ?? so where i can find this pattern ?
    – John John
    Oct 4, 2016 at 11:38
  • You are on right track :) Sometimes there are multiple crawl properties created just take care of them.
    – Taran Goel
    Oct 4, 2016 at 11:38
  • Generally crawl property is made like 'ows_InternalColumnName'. But you can refer this article to create via PowerShell olafd.wordpress.com/2013/08/20/…
    – Taran Goel
    Oct 4, 2016 at 11:44
  • so now i need to understand first how existing crawl properties relate to site columns.now i have short named site column , for example "NetWrokArea" where its crawl and manged properties are straight forward which are "ows_q_CHCS_NetworkArea" & "NetworkAreaOWSCHCS" . but when i have a site column with the following internal name "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Own‌​‌​er" how i can know that its related crawl property is "ows_q_USER_SoftwareDevelopment"?? ...
    – John John
    Oct 4, 2016 at 13:08
1

Just to add on top of the answers above. In your scenario the best possible solution for your Problem managers site column is to create manually or using Powershell one custom managed property let's say "ProblemManager" and map it to crawled properties of all the 5 site column for problem managers. Now this managed property will always contain the data for HR or IT or Finance problem manager depending on from which site the result was returned. enter image description here

The advantage here is in your content search webpart query you just have to specify "ProblemManager:{User.Name}" to get the results from all the 5 sites where current user is the problem manager.

14
  • now i can manage this problem as you mentioned. but currently i am trying to understand how the managed/crawl properties were mapped to my current site columns. For example i have 2 site columns with these INTERNAL names "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Own‌​‌​‌​‌​er" & "Software_x0020_Development_x0020_Own‌​‌​‌​er",, where these 2 site columns got the same crawl property which is "ows_q_USER_SoftwareDevelopment" and the same managed property which is "SoftwareDevelopmentOWSUSERUser".
    – John John
    Oct 4, 2016 at 23:42
  • so my first question is how the "ows_q_USER_SoftwareDevelopment" crawl property was extracted from the 2 site columns internal names and produce the same crawl property name? second question. when i write the following inside my Content Search web part "SoftwareDevelopmentOWSUSERUser:{User.Name}" i got results from the two site columns,, so how did sharepoint recognize that the managed property which is map to the same crawl property is referring two site columns that have different internal names?
    – John John
    Oct 4, 2016 at 23:42
  • No SharePoint does not map different internal name site column into same crawled property.
    – Unnie
    Oct 5, 2016 at 6:10
  • but based on my test and also in my case the 2 site columns which have their internal names as "Software_x0020_Development_x0020_Risk_x002F_Issue_x0020_Own‌​‌​‌​‌​‌​er" & "Software_x0020_Development_x0020_Own‌​‌​‌​er",, got the same crawl property which is "ows_q_USER_SoftwareDevelopment". also these two site columns will have the same internal names on the list level (when i access a list that have these 2 site column) their internal names were "Software_x0020_Development_x0020" but of course still they have different siteid.
    – John John
    Oct 5, 2016 at 11:31
  • 1
    1 crawled property for 2 different site columns is always a bad idea. So you should try to overcome that by keeping your site column internal names short
    – Unnie
    Oct 5, 2016 at 11:42
0

I am not sure do you refer to Sharepoint on premise or online, but to my knowledge Managed property are not created automatically. The process usually is

  1. Create site column, create some content with this column (list item, document item)
  2. Crawl the content, after crawl you should have crawled property available.
  3. Then you create new managed property and map it to the crawled property.

This works well for couple of columns, but if you work on project then it may not be most efficient. You can create both crawled and managed properties using powershell, then you are not worried about column contains data:

New-SPEnterpriseSearchMetadataCrawledProperty (https://technet.microsoft.com/en-us/library/ff608064.aspx)

New-SPEnterpriseSearchMetadataManagedProperty (https://technet.microsoft.com/en-us/library/ff608089.aspx)

Here you have example how to bind them together in a script: http://blog.kuppens-switsers.net/sharepoint/creating-managed-crawled-properties-using-powershell/

3
  • 1
    Actually managed properties are created automatically (sp2013 +). technet.microsoft.com/en-us/library/…
    – Bunzab
    Oct 4, 2016 at 9:21
  • Good to know, moved to SP2013 only recently so still finding out the differences, thanks for sharing @Bunzab. Oct 4, 2016 at 9:32
  • @MarekSarad i have never created any managed properties manully in SP 2013 .. and i am using on-primise
    – John John
    Oct 4, 2016 at 11:28

Your Answer

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

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