Sunday, September 1, 2013

Adding values ​​to the people search results in SharePoint Farm

שלום חברים,
היום אני רוצה לשתף אתכם ביכולת נחמדה שקיימת ב-SharePoint , שינוי דף תוצאות חיפוש.
את השינוי עשיתי בדף תוצאות החיפוש של אנשים. בדף זה מוצגים מס' ערכים על המשתמש וניתן להוסיף ערכים נוספים כגון : מנהל ישיר, יום הולדת, מספר טלפון נייד/בית ועוד.
אז איך עושים את זה ? ראו והשכילו :)    :
1.       ראשית יש לוודא שהפרופילים מאונדקסים (במידה ולא יש ליצור מקור תוכן מסוג SharePoint ולאנדקס )









2.       יש להוסיף Role ע"מ להגיע לאינדוקס מיטבי.



3.       אני יוצא מתוך נק' הנחה שקיים לכם בחווה Search Center ומכאן שקיים Scope  ברירת מחדל של חיפוש אנשים.
a.       בצעו חיפוש של משתמש בארגון ובדקו אילו ערכים חוזרים.


b.       ערכו את דף תוצאות החיפוש וערכו את ה-WebPart של תוצאות החיפוש.


c.       ניתן לראות את התוצאות שחוזרות בפורמט XML , ע"מ לראות אילו ערכים ניתן להוסיף (הערכים שניתן להוסיף הינם ערכים מנוהלים בלבד – Manage Properties) ע"י הוספת קטע הקוד הבא בחלון של XSL Editor (לאחר שלחצתם על הכפתור, שימרו את קטע הקוד ה-Defaultי של ה-XSL בצד).

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>




d.       שמרו את השינויים ושמרו את הדף.
e.       רעננו את הדף וראו את התוצאות בפורמט XML.


4.       חזרו על צעד 3 עד לסעיף c , הוסיפו את הערכים המנוהלים לשורת Text 'Fetched Properties' (אני הוספתי Cell Phone   ו- Home Phone, חשוב שאלו יהיו ערכים מנוהלים, במידה ולא הוסיפו את הערכים המנוהלים ומפו אותם לערכים שמאונדקסים, Crawl Properties).


5.       הוסיפו את הערכים לקוד XSL ע"מ שתוכלו לראות את הנתונים בדף תוצאות חיפוש.






6.       שמרו את השינויים , שמרו את הדף.
7.       בצעו חיפוש נוסף. (חשוב לוודא שהערכים שהוספתם מאונדקסים ומסונכרנים לפרופיל)
התוצאה, נתונים נוספים על היישות המבוקשת.





בהצלחה !
רון נס.

============================================================================================================================================================================================================================================================




Hello Friends ,
Today I want to share a nice ability that exists in SharePoint , changing the search results page .
I did change of the people search results page. This page are Display values for the user and can add additional values such as direct manager , birthday , phone number, Mobile / Home and more.
So how do you do it? See and learn :
1.     First, ensure that the Profiles are indexed ( if not then create a SharePoint content source and index the content Source)






2.      Role must be added in order to reach the optimal indexing .


3.     I'm out of points off your existing Search Center farm and hence there is a default Scope People Search .
a. Perform a search on some user in the organization and see what return values .


b . Edit the search results page and edited the WebPart 's search results.


c . If You want to see the results are repeated in XML format , in order to see which values can be added ( values are values that you can add only managed - Manage Properties) You can achieve it by adding the following snippet of XSL Editor window ( after you've pressed the button , save the code in the - Default J. of the XSL side) .

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>



d . Save the changes and save the page.
e . Refresh the page and see the results in XML format .


4.      Repeat step 3 to Section C , add the values managed line Text 'Fetched Properties' ( I added Cell Phone and Home Phone , it is important that these values be managed , if not add the values managed and shampoos them indexed values , Crawl Properties) .

5.      Add the XSL code values in order that you can see the database search page .




6.      Save the changes , save the page.
7.      Perform another search . ( It is important to ensure that the values you added indexed and synchronized profile )
The result , additional data requested entity .




Good luck :)
Ron Ness .


No comments:

Post a Comment