How to set up Enterprise Search

šŸš§

Enterprise Search vs the REST API

It's worth pointing out that the Enterprise Search API is completely distinct from the REST API.

You do not need to authenticate with the REST API in order to use 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:

https://{your_intranet_url}/api/searchapp

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

https://{your_intranet_url}/api/searchapp/{appid}/document

šŸ“˜

Determining the app id

The appid component of the URL refers to the id of your enterprise search configuration 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.

https://{your_intranet_url}/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 NameTypeSearchableShow in resultsRequired
IdText (Max 45 characters)NoNoYes
TitleTextYesYesYes
SummaryTextYesYesYes
BodyTextYesNoYes
UrlTextNoYesYes
AuthorTextYesYesNo
BestBetsText ArrayYesYesNo
KeywordsTextYesNoNo
IsPublicBooleanNoNoYes
AllowedPeopleInteger ArrayNoNoNo
DisallowedPeopleInteger ArrayNoNoNo
AllowedOrganisationsInteger ArrayNoNoNo
DisallowedOrganisationsInteger ArrayNoNoNo

e.g.

{   
  "Url" : "http://example/example.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": "Peter Smith",   
  "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

On your Intranet homepage, select the Profile icon and then Application Settings.

346 250

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.

1223

Manage Enterprise Search

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

On the App Data screen.

668

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.