IT tutorials
 
Applications Server
 

SharePoint 2010 : Customizing Search Pages (part 1) - Query Pages, Search Box Web Part

12/22/2012 11:00:52 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Other than the tab control, the basic three search pages are essentially the same in the Basic, Enterprise, and FAST Search Center sites. The customization of the pages involves the placement and customization of Web Parts.

Search results Web Parts in SharePoint 2010 are based on the Federation Object Model (FOM) and are used by both SharePoint Search and FAST Search. The Web Parts on a results page communicate with a shared query manager identified in the Web Parts as the Cross Web Part Query ID. This query manager receives the query passed to the page, gathers the requirements and query modifications from the results Web Parts, processes the query, and returns the results to the appropriate Web Parts. For new Web Parts to participate with existing Web Parts, the new Web Parts simply need to use the same query ID. Because the out-of-the-box Web Parts are no longer sealed, developers can extend their functionality instead of writing new ones from scratch.

1. Query Pages

The Welcome page of all Search Center sites is a basic query page named Default.aspx. Although this page seems rather simple, as shown in Figure 1, it supports a number of customization options.

Figure 1. Portion of the basic query page in edit mode


The page has two Web Part zones but only a single Search Box Web Part. You can choose to add other Web Parts, such as a content editor where instructions on how to search more effectively can be presented. Because Web Parts can be targeted by audience, you may add multiple instances of the same Search Box Web Part on the same page customized for different groups of users.

The Preferences link next to the Search Box allows you to apply the new “conversational” approach introduced in SharePoint 2010 Search; it opens the dialog box shown in Figure 2, where users can configure personal preferences for the configuration of the Web Part.

The user’s first option regards the display of search suggestions as they type in query terms. These suggestions are retrieved from the history of successful queries. Users can also choose to override the default behavior of searching in the language of the browser and instead choose up to five languages to include in the search results. From that list, they can choose the default language, which is given a higher relevance ranking in the results list.

Figure 2. User Preferences dialog box for the Search Box Web Part


2. Search Box Web Part

The Search Box Web Part is used in both search and results pages and has the same functionality as the Search Box control on the master pages. To configure the properties of a Web Part on the Search page, perform the following steps.

  1. From the Site Actions menu or the Page Ribbon of the page, select Edit Page.

  2. In the Web Part zone, click the small down arrow for the Web Part to expose the context menu and then select Edit Web Part.

  3. Expand the appropriate sections to configure properties as needed.

  4. Click OK.

  5. For publishing pages, you need to save, check in, and publish the page after making changes. For standard pages, the action is simply Stop Editing.

The Scopes Dropdown section of the Search Box Web Part is shown in Figure 3. The Dropdown mode options are the same as those of the Site Settings Search Settings page. The choices are as follow.

  • Do Not Show Scopes Dropdown, And Default To Target Results Page Does not display a scope drop-down list and sends the query to the results page with no scope selected. Normally, this will be a custom results page with Web Parts configured to use one or more scopes.

  • Show Scopes Dropdown Displays the scopes defined in the search drop-down display group and the contextual scopes in the scopes list.

  • Show, And Default To ‘S’ URL Parameter Displays the scopes defined in the search drop-down display group and the contextual scopes in the scopes list. The selected scope will be added to the query passed to the results page using the ‘s’ parameter.

  • Show, And Default To Contextual Scope Displays the search drop-down list and automatically selects the This Site or This List scope as the default. Contextual scopes cannot be managed in the search drop-down list.

  • Show, Do Not Include Contextual Scopes Displays only the scopes in the search drop-down list that do not include This Site and This List contextual scopes.

  • Show, Do Not Include Contextual Scopes, And Default To ‘S’ URL Parameter Displays only the scopes defined in the search drop-down display group in the scopes list. The selected scope will be added to the query passed to the results page using the ‘s’ parameter.

Normally, you do not need to enter text in the Dropdown Label box or modify the default automatic Fixed Dropdown Width setting (0).

Figure 3. Scopes Dropdown section of the Search Box Web Part properties


The Query Text Box Label and Query Text Box Label Width text boxes are shown in Figure 4. Additional query terms can be added to the user-entered query; the Additional Query Description Label text box is usually empty. The text entered in this text box shown in Figure 13-21 limits the results to contracts. Any keyword query can be placed here, including scope definitions. Because these terms modify the query transparently to the user, appropriately labeling the query box will inform the user of its functionality. The prompt string will appear in the query box unless the focus is set there automatically or unless thecursor is placed there manually. The Append Additional Terms To Query check box is critical because the additional query terms entered in this section are not used unless it is selected.

Figure 4. Query Text Box section of the Search Box Web Part properties


The search query box, shown in Figure 5, displays the configurations set in Figure 4.

Figure 5. Customized search query box


The Query Suggestions section, shown in Figure 6, controls the suggestions process, where the preferences page let users opt in or out. The Minimum Prefix Length setting determines how many characters a user must enter before suggestions are offered. The Suggestion Delay setting controls the response time, and the Number Of Suggestions To Display setting controls the maximum number of suggestions.

Figure 6. Query Suggestions section of the Search Box Web Part properties


The Miscellaneous section shown in Figure 7 is probably the most often used in customizing search. The first four entries control the Search button images.

Figure 7. Miscellaneous section of Search box Web Part properties


Two switches, Use Site Level Defaults and Use Site Dropdown Mode, override the settings in the Scope Dropdown section. Use these options to establish centralized control of multiple search box Web Parts from the Search Settings of the site collection.

Below this, two switches control the advanced search and user preferences links at the end of the query box. You might choose not to offer an advanced search page for some searches, such as the People Query page in the Enterprise Search Center. Obviously, if you did not select the Show Query Suggestions check box in the previous section, you also might choose to remove the user preferences link. Remember that user preferences also control query languages.

In the Advanced Search Page URL box, you can direct the advanced search link to the appropriate custom page. This text box is active even if the Display Advanced Search Link check box is not selected. The URL entered will be a relative path for local pages.

The Target Search Results Page URL setting configures the target page for queries. Because the actual work of the search query is accomplished by the results page, you might configure custom query pages or custom query Web Parts where the only customization is the target results page.

The Display Submitted Search check box affects only Search Box Web Parts placed on a results page. By displaying the original query, these Web Parts permit the user to easily modify the query without retyping it. If you need to change the scope display group, you must type the name exactly as it appears in the site collection scope management page.

The Appearance, Layout, and Advanced sections are standard for SharePoint Web Parts. If you need to target to audiences, you can find the Audiences configuration in the Advanced section. By having multiple Search Box Web Parts targeted to different audiences on the same page, you can have a single query page customized to the user opening it.

 
Others
 
- Microsoft Dynamic GP 2010 : Dynamics GP System - General Ledger Chart of Accounts, Master record IDs and names
- Microsoft Dynamic GP 2010 : Dynamics GP System - Companies in Dynamics GP, Integration with other systems
- Exchange Server 2010 : The Exchange Control Panel (ECP)
- Exchange Server 2010 : The Exchange Management Console
- Microsoft Lync Server 2010 : SQL 2008 R2 Backup and Restore
- Microsoft Lync Server 2010 : Installing SQL 2008 R2
- Microsoft Dynamics Sure Step 2010 : Quality Management and Optimization (part 2) - The Sure Step Optimization Offerings Roadmap
- Microsoft Dynamics Sure Step 2010 : Quality Management and Optimization (part 1) - Quality control within the project types
- Managing Exchange Server 2010 : The Exchange Management Shell (part 3) - Reporting with the Exchange Management Shell
- Managing Exchange Server 2010 : The Exchange Management Shell (part 2) - Remote PowerShell
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us