Toggle menu

Search Collections

Search Collections

Defining a search collection lets you bring additional content from outside of iCM into the iCM search.

There are two types of collection. Custom collections are powered by ColdFusion scripts (you'll need to write these). Path collections will index the content found in a directory iCM has access to.

Working with Search Collections

To create a new search collection, open "Search Collections" in the System Configuration section of iCM Management and select "Create a collection" from the action panel.

To edit an existing collection, double-click on it. To delete a collection, right-click and choose "Delete collection".

Search Collections have the following properties.

OptionDescription
NameThe name used to identify the collection. This will be used as the SOLR keytype

You cannot use one of the existing iCM content keytypes (article, media etc)

Your website search template will need to be modified to return results form this keytype. By default the core search template only returns content in the article a media keytypes. Depending upon your search template, this may be as simple as adding your keytype to the article extras form
Description:A description of the collection. This is used in the various lists and menus in iCM
Type:Either "Custom" or "Path" - see below
Item Label:A value for the custom2 field in SOLR, returned by the multi-collection search object on the website, in order to identify the kind of item returned by the search.

An item type should consist only of alphabetic characters and may not be "Article", "Media", "Message", "Metadata", "Object",  "Product", "SiteUser", "WIPEndpoint", "PublishedEndpoint", "WIPForm", "PublishedForm" which are item types reserved for use by iCM
Directory Path:The absolute path of the directory containing the files to be indexed in this collection, for example, E:\collections\myfiles
URL Path:The URL address equivalent to the directory path of the directory containing the files indexed in this collection. This will be prepended to each file name returned by the search engine when it is used to search the collection so that users are presented with a link to the file
Extensions:This is a comma-separated list of file extensions (including dots) that match all those files that you'd like to be indexed, for example: .docx,.pdf,.csv
Recursively index subdirectories:If checked the contents of all sub-directories will also be indexed

Collection Types

Search collections are either "Custom" or "Path".

A custom collection can contain any type of information, but requires a ColdFusion developer to write a script to populate the collection with the required search data. This custom work needs to be added to the searchindex.cfm file in the iCM custom directory, where it will be executed by the SearchIndex scheduled task. The default searchindex.cfm file (accessible using iCM's file manager) contains sample code to illustrate the kind of thing that could be done.

A path collection allows you to include the content of a directory and its sub-directories. This type of collection does not need any additional scripts to be written. The collection is automatically indexed by the SearchIndex scheduled task using the information provided here. Additional work may need to be done to make the directory available on your site, so that users are able to reach the files within it.

Last modified on October 15, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon