Toggle menu

Search and Replace in iCM

This article describes searching in iCM. Documentation for your website search is included in the Website Templates template section.

Search and replace is performed within the section of iCM you are working in. So if you are in the Article Library, the search will only search for articles.

Each searchable section of iCM includes a link to the search (and replace) homepage in its main action panel, and a quick search box in the top right of the title bar.

Article Search - Action Panel
  
Search Bar
 

Searching

The search function performs a case insensitive search using the content of the search box and returns a list of matching items.

To search for a particular item based on its unique ID, enter the ID in the search text box, and check the "ID only" check box before performing the search. You can enter several IDs at a time by separating each ID with a comma.

By default, with the "ID only" checkbox unchecked, the search term will be compared against the unique ID and the text of the items.

The search engine returns the first 50 results, with the most matching words at the top of the list and least matching at the bottom.

Stemming

For most types of content, apart from external links, the search engine will also search for words that derive from a common stem, behaviour that is referred to as "stemming". Stemming works on words, not word fragments. For example, a search for "instrument" will return items containing "instrument", "instruments", "instrumental", and "instrumentation". A search for "instru" will not. (A wildcard search for 'instru*' would return items containing these words, and also those containing "instruct", "instructional", and so on.)

Stop Words

You should also be aware that there are certain words that are ignored by the search engine. These are present in sentences largely to provide grammatical structure and usually do not add information to the text. Typical stop words are: "a", "if", "then", "but", "since", etc. The search engine omits these words from it's index in order to provide faster, more meaningful searches. If you specify search terms that consist entirely of stop words, the search engine will either not perform the search or will return a very large number of general results.

Example Searches

The following table shows examples of simple searches.

ExampleSearch result
low,brass,instrumentlow or brass or instrument
low brass instrumentlow or brass or instrument
filmfilm, films, filming, or filmed
filming AND funfilm, films, filming, or filmed, and fun
filming OR funfilm, films, filming, or filmed, or fun
filming NOT funfilm, films, filming, or filmed, but not fun

You can perform more advanced searches using search operators. The most important search operators are:

NOTItems containing the keyword immediately following the NOT operator will not be returned
ANDOnly items containing both of the keywords on either side of the AND operator will be returned
ORItems with at least one of the keywords on either side of the OR operator will be returned
*A wildcard which matches zero or more alphanumeric characters
?A wildcard which matches any single alphanumeric character

Complex searches can also be constructed using brackets (parentheses). The following table gives examples of using these basic operators/wildcards and their results:  

Search termReturns items that contain
doctorate AND nauseaboth doctorate and nausea
doctorate "and" nauseathe words "doctorate" and "and" and "nausea"
"doctorate and nausea"the phrase doctorate and nausea
masters OR doctorate AND nauseamasters, or the combination of doctorate and nausea
masters OR (doctorate AND nausea)masters, or the combination of doctorate and nausea
(masters OR doctorate) AND nauseaeither masters or doctorate, and nausea
masters OR doctorate NOT nauseaeither masters or doctorate, but not nausea
apple?apples or applet
app*edAppleseed, applied, appropriated, and so on

External Links

The external link search works directly against the database so doesn't perform any stemming or understand operators/wildcards.

Replacing

The replace function is a two stage process.

Enter your search term and click "Replace" in the action panel. This carries out a search as described above with one exception. This search will only return those items to which you have "edit" access, and in the case of articles, permission to publish them.

Above the search results are two boxes, one for the word you would like to replace, another for the word you would like to replace it with.

Search and Replace
 

Note that although the initial set of results is returned using a case insensitive search. The second step (the replacing bit) is a simple text find-and-replacement procedure and the following points should be noted:

  • It is case sensitive (except for the keywords belonging to a media item), so you may need to make text changes in several stages, if the case of the text varies depending on context
  • The replace function will not change text in part-words e.g. replacing "book" with "novel" will not change "bookcase" to "novelcase"
  • The initial search may include items that are locked for editing; this will be indicated within the results list. However, locked items will not be amended by the replace function and so it is recommended that all items are unlocked prior to performing a global replace
  • If performing an article search and replace, work in progress, awaiting approval or rejected versions of articles will not be changed by the Replace function. You will be warned of the existence of any such articles, and the articles which have modified versions will be marked with an asterisk (*) beside their article ID in the search results list. Also be aware that even though the initial search will check all text, including HTML tags, the replace function will not replace text within HTML tags
  • If performing a media search and replace, the replace option will not modify the content of the physical media files (e.g. Word documents) even though you may have configured their content to be indexed/searchable
  • If performing a forum message search, only approved messages or those that do not require approval will be changed by the Replace function

Click on the "Cancel replace" option from the actions panel if you decide not to go ahead, or click on the "Replace" in item option to perform the replacement. You will be told how many items have had some text replaced. This may not be the same as the number of items in the initial candidate list, for the reasons outlined above.

Only live items will be searched or modified during a replace. For example, if you are performing a forum message search, only approved messages or those that do not require approval will be searched. Similarly, if performing an article search, only live articles will be searched.

If iCM has been set up to search the contents of media files, such as Word documents, the replace option will not modify the specified text within these files.

Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon