How do I configure the SharePoint Remote Connector to only crawl Files and List Item Attachments

How do I configure the SharePoint Remote Connector to only crawl Files and List Item Attachments

The content in SharePoint is organized in the following structure.

SPStructure.PNG

 

 

 

 

 

 

 

 

 

The IndexSites, IndexLists, and IndexFolders connector cfg settings specify whether to index a metadata-only document for each container object (highlighted in yellow above).


To prevent these metadata-only container objects from being indexed, set these to False in the [FetchTasks] section or directly in the repository Task section. The list items or files that they contain are still indexed though.

[FetchTasks]

IndexSites=false
IndexFolders=false
IndexLists=false

The screenshot below shows some List Items in my SharePoint repository when I don’t have IndexLists=false (this setting defaults to True if not in your cfg file)

SP1.PNG

 

 

 

 

 

 

 

 

If I add IndexLists=false then these will not be indexed. However, as mentioned above, List Items will still be indexed (highlighted in the screenshot below)

Sp2.PNG

 

List Items are just metadata in SharePoint. List Items can have attachments, and these will be of value to you, but the actual List Items are not binary documents and so you will be unable to perform any actions on them, nor would you want to. If you want to ignore List Items but index their Attachments then you will need to add some custom lua to your configuration.

I have created a file called ExcludeListItems.lua with the following content:

function handler(config,document,params)

local docPath = document:getFieldValue("TYPE")
if docPath == "LISTITEM" then
return false
end

return true
end

Drop the lua file into your SharePoint Remote Connector working directory (\Program Files\Micro Focus\ControlPoint\Indexer\SharePoint Remote Connector\).
Before you scan a new repository, you will need to edit the task section by updating the IngestActions to include the LUA:

[TaskSP_Test]
IndexSites=false
IndexFolders=false
IndexLists=false
...
IngestActions=META:CPREPOSITORYTYPEID=9,META:SecurityType=SharePointSecurity,META:AUTN_CATEGORIZE=false,META:AUTN_EDUCTION=true, LUA:ExcludeListItems.lua
...

With this lua and the IndexSites, IndexLists, and IndexFolders settings in place, only SharePoint Files and List Item Attachments will be indexed.

 

 

Labels (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2020-06-15 21:13
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.