Presentation is loading. Please wait.

Presentation is loading. Please wait.

Customizing the MOSS 2007 Search Results November 2007 Rafael Perez.

Similar presentations


Presentation on theme: "Customizing the MOSS 2007 Search Results November 2007 Rafael Perez."— Presentation transcript:

1 Customizing the MOSS 2007 Search Results November 2007 Rafael Perez

2 Customizing the MOSS 2007 Search Results A little bit about myself: Rafael Perez Sr. Lead Consultant Catapult Systems rafael.perez@catapultsystems.com http://blog.rafelo.com

3 Customizing the MOSS 2007 Search Results The Search Core Results and People Search Core Results Web Parts can easily be modified to show results different than they appear out-of- the box. There are 2 key web part components. 1.Columns – Dictate what data is returned 2.XSL – Dictates how the data is displayed Both components are configurable via the interface.

4 Importing Users from Active Directory Create a 3 or 4 test users in Active Directory populating their; First Name, Last Name, Telephone Number, Title, Department, and Company. Make sure that more than one share the same first name. If you do not have access to Active Directory, have someone who does create the users for you, making sure you have them populate the above specified Attributes.

5 Importing Users from Active Directory. Cont.. 1.Open SharePoint Central Administration 2.Select the Shared Service Provider on the Left Navigation Menu 3.Click on “User Profiles and Properties”

6 Importing Users from Active Directory. Cont.. We should make sure that the Attributes we’ve populated for the users are properly mapped out to SharePoint Properties before we kick off the import. 4. Click on View Profile Properties

7 Importing Users from Active Directory. Cont.. Notice that Work Phone, Department and Title have all been mapped out to the Corresponding Active Directory Attributes, but no profile property has been mapped out to Company. We’ll have to add this one manually. 5. Click on “New Property”

8 Importing Users from Active Directory. Cont.. 6.Specify a Name and Display Name for the Company Property (Make sure you do not use the name “Company” as it is already being used by another SharePoint Managed Property) 7.Change the Default Privacy Policy to “Everyone”

9 Importing Users from Active Directory. Cont.. 8.In the “Property Import Mapping” section select the “Company” attribute as the data source field to map 9.Click OK

10 Importing Users from Active Directory 10.Go to “User Profile and Properties” 11.Click on “Start Full Import”

11 Importing Users from Active Directory. Cont.. Wait for the Import to complete 12.Hit the “Refresh” Link to update the status of the Import 13.You will know that the import was successfully completed when the Profile Import Status says “Idle – Completed …”

12 Starting the Crawl Now that we have content and profiles to crawl. We are ready to kick-off the crawl / indexing of content and profiles. 1.Go to the Test SSP Home Page 2.Click on Search Settings

13 Starting the Crawl. Cont.. 3.Click on the “Content Sources and Crawl Schedules” link

14 Starting the Crawl. Cont.. 4.Click on the “Local Office SharePoint Server sites” content source. 5.You should see a start address for you test portal in “Start Addresses” 6.Checkmark “Start full crawl of this content source” 7.Click OK

15 Customizing the People Search Results Before beginning this section make sure that crawl has complete (hopefully without too many errors.) 1.Open the Test Portal in Internet Explorer and go to the Search Site. 2.Click on the “People” Tab 3.Enter a name shared by multiple users you created in Active Directory 4.Click on the little magnifying glass to perform the search

16 Customizing the People Search Results. Cont.. One or more users should appear on the search results. 5.Click on “Site Actions” 6.Select “Edit Page” from the list of options

17 Customizing the People Search Results. Cont.. 7.Scroll down to the “People Search Core Results” web part 8.Click on the Edit Menu of the Web Part 9.Select “Modify Shared Web Part”

18 Customizing the People Search Results. Cont.. 10.Scroll down to the “People Search Core Results” web part 11.Click on the Edit Menu of the Web Part 12.Select “Modify Shared Web Part”

19 Customizing the People Search Results. Cont.. We will begin by adding the “ADCompany” profile property to the search results. 13.Expand the “Results Query Options” 14.Click on the three dots “…” next to “Selected Columns”

20 Customizing the People Search Results. Cont.. You will get a pop-up window with an XML excerpt containing the columns that are being selected. 15.Add the ADCompany Column 16.Click OK You may get an error indicating that an Item with the same name has allready been added. If you do, ignore this error.

21 Customizing the People Search Results. Cont.. 18.Click on the button labeled “XSL Editor” 19.This will bring up a window with the XSL used to display the results. Since we don’t know what the actual XML looks like in order to create our own customizations, replace the XSL with the following: 20.Click Save

22 Customizing the People Search Results. Cont.. 20.Click the OK button 21.Click the Publish Button 22.You should see the XML for the search results displayed on the web part 23.Highlight and Copy the XML

23 Customizing the People Search Results. Cont.. 24.Paste the text into Notepad and save it to your desktop as an XML file (ie. Results.xml) 25.Upload the xml file to a document library in the portal 26.Open up the Portal in SharePoint Designer 27.Create a new blank page

24 Customizing the People Search Results. Cont.. 28.Click on the “Data View” menu and select “Manage Data Sources”. 29.In the “Data Source Library” toolbox, expand the “XML file” node and click on “Add XML File” 30.Browse to and select the XML file containing the results 31.Click Open 32.Click OK

25 Customizing the People Search Results. Cont.. 33.Hover the mouse pointer over XML File from the Data Sources Toolbox 34.Click on the drop-down list and select “Show Data”. 35.The toolbox should display a tree view of the XML nodes.

26 Customizing the People Search Results. Cont.. 36.Open the newly created page 37.Click on the Data View Menu and select “Insert Data View” 38.From the “Data Source Details” toolbox, drag and drop Preferred Name, Department, JobTitle, and ADCompany into the dataview web part on the page.

27 Customizing the People Search Results. Cont.. 39.Modify the column headers (ie. Change ADCompany to Company, etc.) 40.Hover the mouse pointer over the data view web part and click on the arrow that comes up on the top right corner. 41.Select “Sort and Group”

28 Customizing the People Search Results. Cont.. 42.Choose to sort by “Department” 43.Checkmark “Show Group Header” 44.Click OK

29 Customizing the People Search Results. Cont.. 45.Switch to Code View 46.Look for and copy everything contained in the tag

30 Customizing the People Search Results. Cont.. 47.Return to the People Search Results Page 48.Click on Site Actions > Edit Page 49.Find the “People Search Core Results” web part 50.Replace the XSL on the People Search Results Web Part with the copied XSL from the page in SharePoint Designer. 51.Click Save 52.Click OK

31 Customizing the People Search Results. Cont.. 53.Publish the page and perform a search 54.Enjoy the results


Download ppt "Customizing the MOSS 2007 Search Results November 2007 Rafael Perez."

Similar presentations


Ads by Google