The author environment of AEM provides various mechanisms for searching for content, dependent on the UI you are using (and the resource type).
With the search rail you can:
- Search for a specific keyword, path or tag.
- Filter according to resource specific criteria, such as modified dates, page status, file size, etc.
- Define and use a saved search - based on the above criteria.
Search can also be invoked by using the hotkey / (forward slash) whenever the search rail is visible.
If you want to drill down further, select the Rail symbol (top left) to open the side panel Filters & Options.
The side panel allows you to select:
- Saved Searches
- Search Directory
- Search Criteria; for example, Modified Dates, Publish Status, LiveCopy Status.
The search criteria can vary:
- Depending on the resource type you have selected (for example the Assets and Communities), criteria are understandably specialized.
- Your instance as the Search Forms can be customized (appropriate to the location within AEM).
As well as searching by a wide range of facets you can also save a particular search configuration for retrieval and use at a later stage:
To access the search panel, click on the Search tab at the top of the left-hand pane of the appropriate console.
The search panel lets you search across all your website pages. It contains fields and widgets for the following:
- Fulltext: Search for the specified text
- Modified after/before: Search only those pages that were changed between the specific dates
- Template: Search only those pages based on the specified template
- Tags: Search only those pages with the specified tags
Execute the search by clicking Search at the bottom of the pane. Click Reset to clear the search criteria.
In the Websites console a Find & Replace menu option allows you to search for, and replace multiple instances of a string, within a section of the website.
The Find & Replace dialog does the following:
- confirms the root path where the find action should start
- defines the term to be found
- defines the term that should replace it
- indicates whether the search should be case-sensitive
- indicates whether only whole words should be found (otherwise substrings are also found)
Clicking Preview lists where the term has been found. You can select/clear specific instances to be replaced:
The default scope for the find and replace servlet covers the following properties:
The scope can be changed using the Apache Felix Web Management Console (for example, at http://localhost:4502/system/console/configMgr). Select CQ WCM Find Replace Servlet (com.day.cq.wcm.core.impl.servlets.FindReplaceServlet) and configure the scope as required.
In a standard AEM installation Find and Replace uses Lucene for the search functionality.
Lucene indexes string properties of up to 16k in length. Strings in excess of this will not be searched.