Skip to main content

Posts

Showing posts with the label search customization

Search Results Customization - part 2

Search Results Look-and-feel Customization. Scenario We started using our mighty Expense Claim form and decided that we will use custom search scope to simplify administration of expense claims. Using search helps us output expense claims where necessary and will help us present expense claims information in the appropriate manner. For example like the following: We need to output employee name, department, claim amount and total amount of all claims we find. Solution Customize Search Core Results output. There is one note: in this scenario we will modify search results output for the page which is used only for selected search scope. If the idea is to customize common search results page the solution is to use conditional output in XSL. 1. We have to edit search core results XSL. Go to Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part -> XSL Editor: 2. In the Text Entry copy all text and paste it into the XML editor: ...

Search Results Customization - part 1

Scenario We want to output search results in the format which is different from standard. Solution Customize search results. The easiest way to do that is to customize the output provided by Search Core Results Web part. First part of the solution is to define the output properties and second part is to customize look-and-feel. 1. Manage output properties. Go to your search results page -> Site Actions -> Edit Page -> Search Core Results Web Part -> Modify Shared Web Part: In the Results Query Options section select Selected Columns button: Copy text from the appeared Text Entry dialog into the proper XML editor. I will use Visual Studio 2008. In the Columns element create child Column elements for each property you want to output specifying the Name attribute appropriately. Name attribute should be equal to the name of a relevant managed property : Copy text from the XML editor and paste it back into the Text Entry dialog. Press OK button and then p...

Custom Managed Properties and Metadata Property Mappings

Scenario We would like to expose additional information on the search results page and to be able to search using specific properties. Solution Set up custom metadata property mappings for search. I will use the form library described here and custom search page described here . 1. Go to Shared Service Provider Settings -> Search Settings -> Metadata Property Mappings and click New Managed Property button: 2. Provide name for managed property, specify that you will provide mappings to crawled properties and tick the checkbox that you will use this mapping in scopes. I will use Business Purpose column from the my Expense Claims form library therefore I will call my managed property "VG Business Purpose". Click "Add Mapping" button: 3. In the Crawled Property Selection dialog select SharePoint category and browse for the desired metadata crawled property. Usually the crawled property name has the following format: "ows_ColumnInternalName...

Custom Search Scope

Scenario We want to expose some SharePoint data as a directed output for the search. Users will be able to search that data specifically. Solution Create a custom search scope. 1. Go to Shared Service Provider settings -> Search Settings -> Scopes section. Click View scopes link: 2. Click New Scope button from the actions menu: 3. Provide name and search results page for the new search scope. In my case it is "Expense Claims" and "/Pages/customsearchresults.aspx" respectively - I will use the forms library created in this post and search results page created in that post : 4. In the Search scopes list click Add rules link for the newly created scope: 5. In the Scope Rule Type section select Web Address option, in Web Address section select Folder option and provide folder URL - in my case it is "http://your_server_name/Expense%20Claims" - and press OK button: 6. At this stage your new search scope will be empty and you have to wait some time until i...

Custom Search Results Page

Scenario We have to display customized search results in SharePoint. We also need custom look and feel of our search results page. Solution Create a custom Search Result Page and make it work as we need. 1. Create a Web Part Page from the Create menu: 2. Edit the created page and press Add Web Part button: 3. Select some Web parts related to Search - the most required are Search Box and Search Core Results - and click Add button: 4. Web parts will appear on the page: 5. Edit Search Box Web part properties. Set up Target search result page URL to the server relative URL of current page. In my case it is "/Pages/customsearchresults.aspx": 6. Setup Scopes Dropdown - Dropdown mode - to "Show, and default to 's' URL parameter" and press OK button: Pretty easy right? :) If you have any questions in regard to implementing and customizing SharePoint Search to get more efficiency in business activities for your company or you need ass...