DC 5.6 MatchSearch configuration
A MatchSearch in the Import configuration is used to Match assets. It is used in two scenarios:
- Setting metadata on existing assets
- Replacing existing assets with new versions
In either case, the Importer needs to know what assets to work with and this is exactly what the MatchSearch is used for.
The standard search, delievered with the Importer app, goes by the name DamImporterMatchSearch and it is used as default way to perform matching logic. It is entirely up to the Importer user whether to use this search or their own as long as it conforms to a couple of rules as described here.
Rules for the MatchSearch
- There must be a searchfield defined with the ID sFilename. The ID is case sensitive. This is the input field that will be used be the Importer.
- The sFilename searchfield must have the valueHandler InList. The Importer searches for 50 searchtokens at a time so this is the only valueHandler that will work.
- There must be a valuefield defined with the ID filename and it must reference the same metafield or table/column as sFilename.
- The valuefield "assetId" must be present and refer to "asset.assetid" and the Id must be "assetId". It is case sensitive so if this is changed to ie. "assetid" nothing will ever be matched.
While not a rule for the search definition as such, it is also important to note the DAMs read access is in place so the user configured for the Importer must have read access to the assets needed for the Importer.
As long as these rules are followed any search definition can be used.
About the default DamImporterMatchSearch
The match search delivered with the Importer uses the assets Title to match. This does not meet all customers requirement in which case it is be necessary to either change the existing one or create a new search definition.
How to define a new search for use with the Importer
First navigate to the ConfigManager and the DAM node:
It might look a little different on your DAM depending on the version it was born with.
Navigate to the Searches tab and click the Add new search button:
Give the search a name (for this example it is DamImporterMatchSearchByAssetId):
Now click the Use another search as template button, wait for it to load and navigate to DAM Center 4.0.0:
Click done.
Now the other searches dropdown is available, find and select DamImporterMatchSearch, then select Asset as item type:
Click create new search.
Now the editing view for the new search will be automatically selected for you. Mark the sFilename field while on the input tab and the click delete selected item:
Now click add, and select assetid on the tablecolumn tab. Here Comparison type (it's what in other contexts is called valuehandler) must be InList and ID must be sFilename:
The input type is unused and irrelevant here but unfortunately we're forced to choose one. Either will work for the purpose of the Importer. Click Create.
Now go to the output tab and repeat the process, start by deleting the field with ID filename:
You may notice that assetid is already a valuefield. This is needed and we need it for the purpose of matching as well so continue by clicking add, which will open the UI to select a field. Select assetid and here is important the ID is filename.
Click create.
Now only two steps are left and the first is to save the search, so do that.
The very last step is to configure the Importer configuration to use this search which is done by entering the name of the search into the MatchSearchName config tag.