Assign a default topic to a source
I have a source and I want to assign a default topic for facet display.
Is there a way to define a default topic to a source?
This is called source mappings in Coveo Cloud.
In the Coveo Cloud Administration Console, select the source, click the more menu, and click on "Manage mappings...".
In the dialog, use the filter box to search for the "topic" field. If found, double click it. If not present, click "Add" then "Mapping" in the top right corner drop down.
In the "Edit maping" dialog, you will be able to set the value you want for the field. Rules are applied in their display order. When a rule returns a value, processing stops. You can learn more about this here: https://onlinehelp.coveo.com/en/cloud/mapping_rules_hierarchy.htm
Thus, you can set 2 rules:
- `%[topic]` (Will look for a metadata named "topic" on the original documents of that source, if any. You do not need this rule if you know that no original documents have this metadata.)
- Any text you would like the topic to be for all the documents of that source (When you set a rule to text without the `%` syntax, it always stops processing of the rules and set the field to that value)