Publishing to SOLR (SES)
- Last Updated: May 29, 2026
- 2 minute read
- Semaphore
- Documentation
We use SOLR as the search engine underlying the Semaphore Semantic Enhancement Service. This brings the benefits of the SOLR infrastructure to the SES implementation, including its ability to replicate indexes to increase throughput and resilience.
SES is supplied as a separate installation and can be installed where ever it is required. Note, the Publisher needs to communicate with it on its access port (8983 by default). Versions of Semaphore prior to 5.4 required access to zookeeper (port 9983 by default) but this is no longer required.
The Solr Writer
The SolrWriter class writes the model to a local or remote instance of SOLR. If the required indexes are not present they will be created.
If you are using a version of KMM older than 5.2, please refer to the documentation for that section.
For versions 5.2.0 and later, the following line in the list of output processors will suffice.
<ref bean="environmentSolrWriterJson" />
This will pick up the SES details from the environment and create the SES index with the sanitized name of the model as the index name. If you want to change the name of the SES index, you can create a bean with parent environmentSolrWriterJson and use the indexName property (as in the older version) to override the default.
All versions
Note, we actually using two SOLR collections for each SES model with an alias pointing to the latest version. After the first publish, one index is “live” and readable, the other is offline. The latter one is written to by Publisher, then at the end of the Publish process, the alias is pointed to the new index. All this configuration is handled for you by the SOLR writer, but don’t be suprised to see more than one index on your file system.
Search as You Type and Concept Mapping by relationship type
In the Knowledge Model Management (KMM) interface there is the ability to switch on and off Concept Mapping and Search as You Type for particular labels.
By adding triples to the model, it is also possible to create a default value by relationship type. To do this, add the following triple to your model (you will have to do this through the SPARQL interface as the edit functionality is not yet present in KMM:
<Relationship type URI> <http://www.smartlogic.com/2014/08/semaphore-core#autocompletion> <http://www.smartlogic.com/2014/08/semaphore-core#AutocompletionOff>
The Relationship type URI can be read from the model structure interface, it is the URI of the alt label relationship type that you wish to exclude from Search as You Type (autocompletion).
To remove a particular relationship type from Concept Mapping, add the following triple to your model:
<Relationship type URI> <http://www.smartlogic.com/2014/08/semaphore-core#conceptMapping> <http://www.smartlogic.com/2014/08/semaphore-core#ConceptMappingOff>
The order of resolving the value to use is:
- The value on the label itself will take top priority but if this is set to default then
- The default value for the relationship type will be used. If this is unset then
- The the default value for the model will be used.