To open the source search, go to the launchpad and click on the Source search icon.
The Source search app allows to search resources and in addition to programmatically replace parts of content.
It displays it's results in an explorer-like list that enables you to work on this results directly.
Source search works in two steps:
- Collect: A specified set of resources is collected (e.g., resources under a specific folder and/or with a specific type)
- Match: The collected resources are filter via a given search pattern (regular expression) and optionally the matches are replaced by another provided regular expression.
The resources that are matched, are displayed in an explorer-like resource list. Such you have all the context menu options for the resources that you would have in the explorer. E.g., you can display, edit, rename or publish the resources.
Search types
The source search provides several search types that are the combination of different collect types and different match types, as you will notice in the description below.
- Plain text
Collection is performed via a database query directly on the VFS (get all values of the specified type under the specified folder). If you are in the online project, collection is performed for the online resources, if you are offline, the offline resources are collected.
From the collected resources all are matched by interpreting them as plain text. In particular, for XML contents, you can also match the XML-nodes, because the XML file is interpreted as plain text.
- XML content values only
Collection is performed via a database query directly on the VFS (get all values of the specified type under the specified folder). If you are in the online project, collection is performed for the online resources, if you are offline, the offline resources are collected.
Matching on collected XML resources will only be performed on values in the XML content, not the XML structure itself. You additionally get options to restrict the parts of the content where matching should be performed, i.e., a locale and an XPath restriction.
- Property search
Collects all resources where the selected property is set and where the value matches the search pattern. Optionally, the matching property values can be replaced.
- Elements in pages
Collects all container pages where the specified element (path to the underlying XML content) is placed on. Optionally, the element can be replaced. Settings remain identically.
- Rename nested containers
Similarly to the "Elements in page" mode, all container pages the provided content is placed on are collected. Now you can rename nested containers made up by the elements. This can be interesting if your formatter for the element has changed and now the nested container has a different name. Unless you rename the container in all exsisting container pages, the contents in that containers will not display anymore.
- SOLR
Collection is performed using the Solr search engine. If you are in the online project, only online indexes can be used for collection (e.g. Solr Online), if you are offline, only offline indexes (e.g., Solr Offline) can be used for collection. You can specify a Solr query directly. Also the information you provided in "Search folder" and "Resource type" will be merged in your Solr query.
From the collected resources all are matched by interpreting them as plain text. In particular, for XML contents, you can also match the XML-nodes, because the XML file is interpreted as plain text.
- SOLR content values only
Collection is performed using the Solr search engine. If you are in the online project, only online indexes can be used for collection (e.g. Solr Online), if you are offline, only offline indexes (e.g., Solr Offline) can be used for collection. You can specify a Solr query directly. Also the information you provided in "Search folder" and "Resource type" will be merged in your Solr query.
Matching on collected XML resources will only be performed on values in the XML content, not the XML structure itself. You additionally get options to restrict the parts of the content where matching should be performed, i.e., a locale and an XPath restriction.
Using Solr for the content collection allows you to apply very advanced collection criteria, it may also speed up collection. But for many cases, the "Plain text" search might be sufficient.