SharePoint Integration via Federated Search
You can integrate PolicyTech with SharePoint® so that certain PolicyTech documents appear in SharePoint search results.
Important: Using this integration method returns only those documents meeting the following criteria:
- Must be assigned to a site to which the API key has been assigned
- Must reside in the published status
- Must have a security level designation of All Users or Public
Also be aware that, if the SharePoint server is installed on a local server computer, .NET Framework 4.6.2 must be installed on that Windows server.
|
Choosing an Interface Method
You can use either the default search interface built in to PolicyTech or, if you need more advanced handling of search requests and results, create your own by coding an interface web page (see Search Interface Web Page Details). The instructions that follow apply to both methods.
Activating the PolicyTech API and Creating an API Key
- To activate the API for your PolicyTech installation, call Client Support at 888-359-8123 (toll-free in the U.S. and Canada) or 208-359-8123. A Client Support technician will give you a new registration code.
- Log in to PolicyTech.
- Click System Settings, click System / IT Settings, and then click Registration Info.
- In the Enter Registration Code box, copy and paste the new registration code that Client Support emailed to you, and then click Submit Registration Code.
- Refresh the browser window to reload PolicyTech with new registration code.
- Click System / IT Settings, and then click API Keys.
- Click New.
- Type a name for the new key.
- (Optional) If you want to limit access to PolicyTech via the API, in the IP Range(s) box type one or more IP ranges containing the addresses of one or more servers. Type ranges in the following format: xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx
- In the Sites box, select only those sites you want SharePoint users to have access to. If you want SharePoint users to also have access to any sites that may be added to PolicyTech in the future, select Automatically select new sites as they get created.
- Click Save to generate the key and display it in the Key box.
Leave the Edit API Key window open, as you will need to access the key in a later step.
Create and Test a Search Result Source in SharePoint
Important: The instructions that follow are one example of how to configure SharePoint using Office 365™. If you're using a different administration tool, your steps and screens may be different than those below. You may also choose different options to set up your Search Result Source.
- Log in to Office 365 as an administrator.
- Click Admin, and then click SharePoint.
- Click Search, and then click Manage Result Sources.
- Click New Result Source.
- Type or select the following settings.
Name
|
PolicyTech Search
|
Description
|
(optional)
|
Protocol
|
OpenSearch 1.0/1.1
|
Type
|
SharePoint Search Results
|
Query Transform
|
{searchTerms}
|
Credentials Information
|
Anonymous: This source does not require authentication
|
- The Source URL you must provide depends on whether you're using the default PolicyTech interface or a custom interface web page.
- Default PolicyTech interface: Type the URL in the following format.
https://[your PolicyTech URL]/api/opensearch/2014/06/?MethodName=GetDocuments&APIKey=[PolicyTech API key]&SearchField=ALL&itemsPerPage={itemsPerPage}&startIndex={startIndex}&SearchTerms={searchTerms}
Make sure the protocol is https:// (secure). Replace [your PolicyTech URL] with the URL used to access your PolicyTech site. Replace [PolicyTech API key] with the key you created earlier in PolicyTech Preferences. Your completed URL should look similar to the following:
Note: The URL must be one long string containing no spaces. Line breaks were added to the sample above to accommodate viewing within this documentation format.
- Below the settings, click Save.
- Point your cursor to the white space after the newly added result source name to display a down arrow, click the arrow, and then click Test Source.
- When the test finishes, you should see a Succeeded message. Click OK.
Important: If the test fails, try executing it again. If it continues to fail, there is a configuration issue. Check the Result Source settings, especially the source URL. Also check the PolicyTech logs (see View Logs).
Adding and Configuring a Web Part
- In the SharePoint admin center, click site collections.
- Click the search site.
- In the site collection properties window, click the Web Site Address link.
- Type any keyword, and then click .
- In the results page, click , and then click Edit Page.
- Click Add a Web Part.
- In Categories, click Search; in Parts, click Search Results; for Add part to, click Main Zone; and then click Add.
Note: If the Add button is not visible, try accessing the page in Internet Explorer® with Compatibility View enabled.
- The newly added web part is displayed at the top of the Main Zone. Click and drag the new web part below the Search Navigation part (or below another Search Result part) so that Search Box and Search Navigation are the first and second parts at the top.
- In the new web part, click the down arrow near the upper right corner, and then click Edit Web Part.
- In the settings pane displayed on the right, click Change Query.
- For Select a query, click the name of the result source you created earlier, and then click OK.
- Back in the settings pane, expand Settings, and then, under Results control settings, click to clear the Show advanced link and Show language dropdown check boxes, as these features are not compatible with the PolicyTech API.
- Expand Appearance, and then update the web part title.
- At the bottom of the settings pane, click OK.
- In the alert near the top of the page, click Check it in.
- In the next alert, click Publish this draft.
- Type a keyword that you know is contained in one or more PolicyTech documents, and then click .
You should see a list of PolicyTech documents containing the keyword.
Search Interface Web Page Details
If you decide to program your own interface web page, here's one example of how you could implement it:
- Accept search parameters from the SharePoint server in an OpenSearch formatted URL.
- Send requests to and accepts results from the PolicyTech API using WCF services.
- Format returned results as an XML document in RSS or Atom format.
- Return the results to the SharePoint server.
Note: The web page can reside on the same web server as SharePoint but doesn't have to.
Coding Resources
OpenSearch.org
Code Sample: Federated Search SQL Server Connector
Windows Communication Foundation Services and WCF Data Services in Visual Studio
Add the Code for the Federated Search HTML to RSS Converter