Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

External Content Connector for SharePoint - modify Search Source Condition

Sarbartha
Tera Contributor

We are able to configure the crawl settings for the SharePoint Online Search Connector used by ServiceNow. However, the client has requested that only specific folders be indexed and made available through the SharePoint Search Source, while certain folders should be excluded from being shown in the Search.

Example Scenario

SharePoint Site

Assume the document library contains the following folders:
/Documents

├── HR
├── Finance
├── Legal
├── IT
├── Projects
└── KnowledgeBase

Currently, the connector crawls all folders under the site and search result is provided on all folders.

Whereas, only the KnowledgeBase folder should be exposed to the SharePoint Search Source and indexed by ServiceNow.

 

Is it possible to be built ?

2 REPLIES 2

boteeuwen
Kilo Sage

Hi,

With the SharePoint Online Search Connector, you can choose which sites and subsites to index, but there is no standard setting to include just one folder within a document library (eg /HR). If you index the site in your example, the connector can also index files in HR, Finance, Legal, IT and Projects. Entering the KnowledgeBase folder URL as a site to include will not turn it into a folder filter.

The simplest supported setup is to put KnowledgeBase in its own SharePoint site, then configure the connector to index that site. That gives you a clear boundary for the crawl and keeps the other libraries or folders outside its scope. It does mean changing how the content is organised in SharePoint, so you would want to check existing links and permissions before moving it.

If the folder has to stay in the current library, you would need to investigate a custom solution. Filtering the Search Source might hide unwanted results from users, but those files could still have been crawled and indexed. That distinction matters if the requirement is that ServiceNow must never index them. I would also avoid assuming that Sites.Selected solves this, since ServiceNow uses it to control access to sites, not individual folders.

If this helps, could you mark the reply as helpful or as the solution?

Thanks for your quick help on this.  

As you mentioned, we have no problem if the respective documents from other folders gets indexed in ServiceNow. The target is to keep those content away from the search.

We tried filter the Search Source to hide unwanted results from users. However, as we are not being able to see any sample data in the table "sn_ext_conn_spo_external_search_schema", not being able to understand which attributes will be useful for the search.