Configuring the SharePoint Federated Search on SP 2013 (v 1.9)

The Confluence SharePoint Connector provides a federated search allowing SharePoint to issue search requests to Confluence and display the results it gets back from Confluence. By adding a new Result Source in SharePoint and the Confluence Federated Search web part you can use Confluence's own search engine to retrieve up-to-date and relevant results. This guide is for SharePoint Foundation 2013 and SharePoint Server 2013.

On this page:

Adding a new Result Source for Confluence

The Confluence Federated Search Result web part of SharePoint connector uses Result Sources to allow SharePoint to search Confluence's content. It can be configured in any one of the following locations:

  • In Central Administration for the entire farm.
  • At the Site Collection level for an entire site collection.
  • At the Site level for a single site. 

To access Result Sources for the entire farm:

  1. Log in to your SharePoint Central Administration site as a SharePoint farm administrator.
  2. Click 'Manage service applications' under the 'Application Management' heading.
  3. Click 'Search Service Application'.
  4. Click 'Result Sources' under the 'Queries and Results' heading in the left-hand navigation panel.

To access Result Sources at the Site Collection level:

  1. Go to your SharePoint site and click 'Site Settings'.
  2. Click 'Result Sources' under the 'Site Collection Administration' heading.

To access Result Sources at the Site level:

  1. Go to the SharePoint site and click 'Site Settings'
  2. Click 'Result Sources' under the 'Search' heading.

To add a new Result Source:

(info) The process of adding a new Result Source is the same whether you are adding it for a whole farm, site collection or single site. 

  1. Click 'New Result Source'.
  2. Fill in the information for the result source, and then click 'OK'. Here are some guidelines on the mandatory fields:

Field Name

Meaning

Example Value

Location Name

The name of this location. We suggest 'Confluence'.

Confluence

Description

A description of this location.

 

ProtocolThe type of search to perform. We need OpenSearch.OpenSearch 1.0/1.1
Query TransformationThis is the incoming query that is used in the Source URL.{searchTerms}
Source URL

This is the URL which will be used to perform the actual search. This URL depends on the authentication used by Confluence.

For basic authentication:

http://{confluenceUrl}/plugins/servlet/opensearch/1.0?query={searchTerms}&format=rss_1.0&os_authType=basic

For NTLM:

http://{confluenceUrl}/plugins/servlet/opensearch/1.0?query={searchTerms}&format=rss_1.0

Credentials Information

This specifies how SharePoint will send the credentials for the searching user to Confluence. Make sure that you set the credentials in the 'Common' section. The actual credentials depend on the authentication used by Confluence.

Basic authentication: supply a Confluence-administrator group user.

NTLM authentication: supply a Confluence-administrator group user.

Only choose the NTLM option if you have configured your Confluence authentication as outlined in Access Confluence using Integrated Windows Authentication via IIS

Result Sources list showing new 'Confluence' result source

Adding the Confluence Federated Search Web Part

The main focus of this section is to demonstrate how to add the Confluence Federated Search web part to the page and configure its required properties.

There are many options for deploying a search solution in SharePoint 2013. You might consider setting up a search centre and configuring a search vertical to achieve a better search experience for your users.

Due to compatibility issues, you cannot have the Confluence Federated Search Result web part and the SharePoint Search Result web parts on the same page.

(info) Note that you cannot edit the default search page, you need to create a new search site and alter the site settings so that this site is used for searching.  

  1. Go to your SharePoint Search Site and execute a search, which will take you to the search results screen.
  2. Click 'Site Actions', then 'Edit Page'.
  3. Click 'Add a Web Part'. You can add the web part anywhere on the page. This is where the Confluence results will appear:
  4. The 'Add Web Parts' screen appears. Select the 'Confluence Federated Search' under the 'Confluence Wiki' category .
  5. Click the 'Add' button.
  6. Open the 'Edit' menu for the web part you just added and select 'Edit Web Part'. 
  7. The web part properties panel opens up. Enter the following information:

    Field Name

    Meaning

    Example Value

    Result SourceThe result source this web part should use.Confluence (or whatever you named your new result source)

    Search Variable

    The search variable where SharePoint send for query string. Default value is k.

    k

    No. of results

    The number of results to be displayed by the web part.

    10 

    Desc. lengthNumber of characters of the description to display by default. Users can click expand to view the full description.500
    Result TemplateXLST template for your search results. This controls how the search results render in the web part.
    <?xml version="1.0" encoding="utf-8"?> 
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/">  
        <h3 class='federatedResultInfo'>Search results for query :  <xsl:value-of select="DocumentElement/@query" />  (in <xsl:value-of select="DocumentElement/@time" /> seconds)</h3>     
        <xsl:for-each select="DocumentElement/Items">         
        <div>             
        <a class='federatedResultStaticLink'>
            <xsl:attribute name="href">
            <xsl:value-of select="Path"/>                 
            </xsl:attribute>                 
            <xsl:value-of select="Title"/>
            </a>             
        <p class='federatedResultShortDesc'>             
        </p>             
        <p class='federatedResultDesc'>                 
            <xsl:value-of select="HitHighlightedSummary"/>             
        </p>             
        <span class='federatedResultPath'>                 
            <xsl:value-of select="Path"/>             
        </span>         
        </div>         
        <br/>     
        </xsl:for-each>     
            <a class='federatedResultViewMoreStaticLink'>      
                <xsl:attribute name="href">          
                <xsl:value-of select="DocumentElement/@ConfluenceUrl"/> dosearchsite.action?queryString=<xsl:value-of select="DocumentElement/@query" />      
                </xsl:attribute>      
            View More Results at Confluence     
            </a> 
        </xsl:template> 
    </xsl:stylesheet>

    Confluence Federated Search Web Part properties. 

  8. Click 'OK', then 'Stop Editing'. Setup is complete.

Troubleshooting

Please refer to our knowledge base, in particular the following:

RELATED TOPICS

Installing and Configuring the SharePoint Feature on SP 2013
Installing the SharePoint Connector