This project is read-only.

Results Per Page Search Core Results Web Part

Problem Statement

The number of results to be displayed on a search results page is pre-configured in out of the box Search Core Results web part and there is no provision for the end users to change the results per page.

Software Required

  • SharePoint Server 2010
  • FAST Search for SharePoint

Approach

Results Per Page Search Core Results web part is developed by extending the out of the box Search Core Results web part. It uses custom configuration to enable the Results Per Page functionality – by default, it is activated. The custom list of results per page values will be displayed in a drop down list on the top of the search results.

Steps to deploy this solution

  1. Download the solution package Microsoft.Services.SP.WebParts.ResultsPerPageSearchCoreResults.wsp uploaded along with the deployment document in MS Engage.
  2. Copy the solution package Microsoft.Services.SP.WebParts.ResultsPerPageSearchCoreResults.wsp to a local folder on the SharePoint server.

Solution Deployment

  1. Open a SharePoint 2010 Management Shell using the Run as Administrator option.
  2. Run the following cmdlet to add the farm solution;

      Add-SPSolution –LiteralPath "<<Physical Path>>"

    • Where "<<Physical Path>>" specifies the path to the solution package.
    • Note: The type must be a valid path in either of the following forms:

  3. Run the next cmdlet to deploy the farm solution:

      Install-SPSolution –Identity Microsoft.Services.SP.WebParts.ResultsPerPageSearchCoreResults.wsp –GACDeployment –WebApplication "<<Web Application URL>>" –Force

    • Where <<Web Application URL>>” specifies a valid URL of SharePoint Web application.

  4. Run the next cmdlet to install the feature;

      Install-SPFeature –Path "Microsoft.Services.SP.WebParts_ResultsPerPageSearchCoreResults" –Force

  5. Run the next cmdlet to activate feature at the given scope (in this case, the site collection);

      Enabled-SPFeature –Identity "c9a2012c-da13-43b0-9097-c1b2d702abc7" –Url "<<Site Collection URL>>" –Force

    • Where "<<Site Collection URL>>" specifies a valid URL of SharePoint site collection.

Configure Multiple Select Refinement Panel Web Part

  1. In the Search Center, navigate to the Search Results page.
  2. On the Search Results page, click the Site Actions menu, and then click Edit Page (The Search Results page opens in Edit mode).
  3. On the Bottom Zone, delete the out of the box Search Core Results web part.
  4. Click on the link Add a Web Part.
  5. In the Categories list, click Custom. In the Web Parts box, click Results Per Page Search Core Results.
  6. In the About the Web Part box at the top of the page, click Add. The web part is added to the Bottom Zone in the web part page.
  7. The rest of the steps are optional and used to configure/alter the default behavior of the Results Per Page, if required.
  8. In the Results Per Page Search Core Results Web Part, click the edit arrow to display the Web Part menu, and then click Edit Web Part (This opens the Web Part tool pane).
  9. Expand the Miscellaneous section;

    Results Per Page

    Enable Results Per Page:

    • This property is enabled by default.
    • Uncheck the check box to disable the Results Per Page functionality. It then behaves like an out of the box Search Core Results web part.

    Increment Value:

    • This property holds the incremental value that is added as the multiplier to the results per page drop down list.
    • By default the value is set as 10. Hence the results per page drop down list will have the incremental values of 10.

      Examples

      • When Increment Value is set as 10 and Maximum Limit is 50, the results per page down list will be rendered as shown below;

      • Decreasing the Increment Value to 5 and retaining the Maximum Limit as 50, the drop down list looks as follows;

    Maximum Limit:

    • This property is to set the maximum limit of results that can be displayed on the search results page.
    • By default the value is set as 50. Hence the results per page drop down list will have the maximum limit to 50.

      Examples

      • When Maximum Limit set as 50 and the Increment Value is 10, the results per page down list will be rendered as shown below;

      • Decreasing the Maximum Limit to 30 and retaining the Increment Value as 10, the drop down list looks as follows;

    Results Per Page Title:

    • This property will have the text associated with the results per page drop down list.
    • The default value is Results Per Page.

  10. After making the desired changes to the property value, click OK to close the tool pane

Screenshots

Last edited Jun 21, 2012 at 4:51 PM by arunpnair, version 2