0

I am working on a sharepoint server 2013. and i have a list which contain the following built-in fields:-

  1. Title
  2. Description
  3. and so on....

now when i search for list items i always get this display template, which shows:- Item Title + Description + URL to Display form, as follow:-

enter image description here

now our customer asked us to do the following modification to the built-in description site column:-

  1. make it mandatory
  2. chnage it display name to be "Issue Description"
  3. change its type from "Rich Text" to "Enhanced Rich Text"..

so i find the best way of doing these modifications is to create a new custom Description field, and hide the built-in description field.

now my concern was if i hide the built-in Description field and i replace it with the new custom description field,,will the search result display template get affected... now based on my test sharepoint was smart enough to start showing the new custom description field instead of the hidden description field inside the search result display template.. so can anyone adivce how sharepoint implement this internally? i mean how it automatically start showing the new custom description field instead of the hidden built-in description field??? i thought at the beginning that the search result display template will start showing empty result inside the Description area.. but the search was smart enough to show the new cusotm description ,, so how did SharePoint implements this ??

EDIT

I Also did this test, which proves that sharepoint default search result does not depend specifically on the built-in Description field:-

  1. inside my content type i create a new site column name "Custom Description" beside the built-in "Description" field. and i provide the following values for a test item (which have title= test 54321):-

Description = "this is the Description"

CustomDescription= "this is the Custom Description"

now when i search for the item title , i got this result:-

enter image description here

where sharepoint will not show the Description nor the CustomDescription. i think it is because the values for these fields are not long enough.

  1. i update the test item where i set the Description = "this is the Description so now it should be shown". i run an incremental search. and here is the result, where sharepoint start showing the Description:-

enter image description here

  1. now i set the Description back to "this is the Description", and i update the Custom Description = "this is the custom Description so now it should be shown". i run an incremental search. and here is the result, where sharepoint start showing the Custom Description:-

enter image description here

so this proves that sharepoint will either show the Description or the CustomDescritoon based on the content of these fields.. and it will not always depend on the built-in Description field ..... is this correct? and i am still not sure how SP implement these scenarios internally ?

1

you need to check post your changes, and if you need to customise how the results need to be displayed, Display templates need to modified accordingly.

@MatthewMcDermott also explains in his blog post introduction-to-sharepoint-2013-display-templates

Please refer MSDN articles on SharePoint 2013 Design Manager display templates

How to display values from custom managed properties in search results - option 1 in SharePoint Server 2013

How to display values from custom managed properties in search results – option 2 in SharePoint Server 2013

  • i am asking about a specific scenario, where the search service was able to show the new custom description field instead of the built-in description field, when i hide the built-in field and start using my custom description.. so my question is how did sharepoint implement this ?? – john Gu Apr 21 '17 at 9:37
  • can you check my edit to the original question please? – john Gu Apr 21 '17 at 15:04
  • 1
    Interesting to see!! I am not sure on this one. But you can dig deeper into the the display templates for the same item display template and inside that you can find highlight section which does this job will have the fields. So my guess is that it the area you can analyze and would get answers. – John Zachariah Apr 23 '17 at 3:44
  • can you advice more on this ? – john Gu Apr 23 '17 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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