Edit the ResourceManager.xml File
The first step is to edit the <DATADIR>/config/ResourceManager.xml
file. In this file, you define groups of resources and which roles to publish these
resources to.
Tip: Grouping resource files enables you to keep dependant resources together (for example, if a Rules Matcher depends on the Ontology Matcher's results). This ensures consistent updates since the group is published as a unit. |
The default configuration includes the following resource groups:
-
indexing, which targets the analyzers
-
search, which targets the searcher
For example, to include an OntologyMatcher in the semantic pipeline:
-
Insert an
ontology
resource in the indexingResourceGroup
as shown in the followingResourceManager.xml
example:<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <res:ResourceManagerConfig resourceDir="data:///build/resources" version="0" xmlns:res="exa:com.exalead.mercury.mami.resources.v10" xmlns="exa:exa.bee" xmlns:config="exa:exa.bee.config"> <res:ResourceGroup waitOnSync="false" roles="Analyzer,Searcher,Dictionary" name="content-filtering"> <res:Resource type="rt-blacklist" name="rt-blacklist"/> <res:Resource type="rt-whitelist" name="rt-whitelist"/> <res:Resource type="categories-blacklist" name="synthesis-blacklist"/> <res:Resource type="facets-blacklist" name="facets-blacklist"/> <res:Resource type="stopwords" name="stopwords"/> <res:Resource type="spellcheck-blacklist" name="spellcheck-blacklist"/> <res:Resource type="spellcheck-whitelist" name="spellcheck-whitelist"/> </res:ResourceGroup> <res:ResourceGroup waitOnSync="false" roles="Analyzer" name="indexing"> <res:SemanticResource type="ontology" name="onto" tokenizationConfig="tok0"/> <res:SemanticResource type="rules" name="rules" tokenizationConfig="tok0"/> </res:ResourceGroup> <res:ResourceGroup waitOnSync="false" roles="Searcher" name="search" /> </res:ResourceManagerConfig>
Once you have edited your
ResourceManager.xml
file, apply the configuration: - Open the API Console.
- Select Manage.
- Search for the
applyConfiguration
method. - Click Send.