How to set up Enterprise Search

Introduction

Enterprise Search allows you to develop applications that will push information from another system into the Interact search index, allowing documents from external systems to be presented in search results alongside Interacts own search results.

From a user’s perspective, the only difference between information stored in the intranet and information stored elsewhere is the icon displayed in the search results, and can be configured when you set up the application.

In order to do this you will need to create your own connector.This connector will communicate with the Interact Enterprise Search API. This will allow you to choose what is pushed into the search index and when. You can also write security settings into your connector.

Configuring New Applications

Documents added to Interact are grouped into “Applications”. This application will govern things like the icon that is displayed for the document, and the name that appears in the filter to the right of the search results.

API

To add documents, you use a REST endpoint exposed as part of your intranet.

The url is:

http://{your domain}/api/searchapp

You can then use this to manage documents to your search application.

http://{your domain}/api/searchapp/{appid}/document

📘

Determining the app id

The appid component of the URL refers to the id of your enterprise search configuraiton in Interact. This can be discovered by editing the enterprise search configuration and looking at the URL.
For example the URL might be https://interactgo.com/InteractV7/SearchApp/Edit/1
In this example the appid is 1

The content-type must be application/json.

The above method accepts an HTTP PUT request and accepts JSON data with the text of the document you want to submit.

Deletes

To delete a document, simply use the following with the HTTP DELETE verb.

http:///api/searchapp/1/document/{documentid}

Authentication

Each search application that you create will have its own authentication key. This is sent as part of the request in the X-ApiKey header.

The key can be set and changed using the Manage Enterprise Search page within your intranet.

The available fields are:

Field Name

Type

Searchable

Show in results

Required

Id

Text (Max 45 characters)

No

No

Yes

Title

Text

Yes

Yes

Yes

Summary

Text

Yes

Yes

Yes

Body

Text

Yes

No

Yes

Url

Text

No

Yes

Yes

Author

Test

Yes

Yes

No

BestBets

Text Array

Yes

Yes

No

Keywords

Text

Yes

No

No

IsPublic

Boolean

No

No

Yes

AllowedPeople

Integer Array

No

No

No

DisallowedPeople

Integer Array

No

No

No

AllowedOrganisations

Integer Array

No

No

No

DisallowedOrganisations

Integer Array

No

No

No

e.g.

{   
  "Url" : "http://blah/blah.aspx",   
  "Id" : "12345a",   
  "Title" : "I'm from SearchApps",   
  "IsPublic" : "true",   
  "Body" : "This text is only searchable, not viewable",   
  "summary": "The user will see a truncated part of this",   
  "Author": "Martin Thwaites",   
  "BestBets": [ "SearchApps" ],  
  "Keywords": "Keyword1 Keyword2"
}

Security

The 5 security fields allow you to define who can see the document in the search results at a granular level.

The logic for whether a user can see the content is:

If I’m in DisallowedPeople
I won’t be able to access.

If any of my organisations are in the DisallowedOrganisations
I won't be able to access.

If “IsPublic” is true Or If I’m in AllowedPeople Or One of my organisations is in AllowedOrganisations
I will be allowed access

Setting Up an Enterprise Search Application

From the Interact Bar select the cog icon and then Application Settings.

Application SettingsApplication Settings

Application Settings

From the Application Settings page, choose Control Panel and then Developer Framework.

Next choose Enterprise Search.

A page displaying your enterprise search applications is displayed.

Manage Enterprise SearchManage Enterprise Search

Manage Enterprise Search

To add a new Search App, click the Create New Search App button.

On the App Data screen.

Create Enterprise SearchCreate Enterprise Search

Create Enterprise Search

  1. Add Search App Name - The name of your Search App.

  2. Add Secret Key - Please add Secret Key, though you should never expose your secret api key in any public websites client-side code.

📘

The secret key you enter here should be included with any request as an HTTP header called 'X-ApiKey'

  1. Add Content Type Name - Please add content type name, this is what will be used in the search results as a filter option.

  2. Add Document Icon Asset - Please add the ID of the image asset you want to use for your icon.

  3. Click Save.