# Implementation
# Distributed Event
The thesaurusSearchExtender
is an event listener that is executed on each BeforeSearchEvent
. Most search requests will not be extended by it, so the computational costs for determining whether a thesaurus extends the search or not is supposed to be low.
The system stores the information necessary for this decision in the main memory. In order to organize the thesauri in a system with multiple backend nodes, a distributed event is issued whenever the properties of a thesaurus change by the node causing this change. The other nodes then refresh their cash of the thesauri table. The distributed event contains command refresh_thesauri
.
# Misspelling Replacement Strategy
The misspelling replacement strategy defines whether or when a term listed as a misspelling is excluded from a search. This strategy is necessary because multiple thesauri can be assigned to the same field. Generally, a term that is listed as a misspelling is supposed to be removed from the search query. However, if there are multiple thesauri of which only some list this term as a misspelling, the behaviour is unclear. Thus, there are three strategies to chose from:
Name | Description |
---|---|
NEVER (default) | The term is always kept in the search. |
SINGLE_HIT | The term is replaced if ONE of the assigned thesauri lists it as a misspelling. |
ALL_HIT | The term is replaced if ALL assigned thesauri list it as a misspelling. |