Using the Preprocessor

The Preprocessor parameter allows you to change a search query even before FACT-Finder interprets it. Preprocessor entries are simple from/to replacement commands. A “from” character string is replaced with a “to” character string. You can compare this to the “search and replace” feature in Microsoft Word.

Example 1

Denimjacket -> Denim jacket

If the word "Denimjacket" appears in the search request, FACT-Finder replaces it with "Denim jacket". What is important is that Denimjacket is specified in the search string as a single word. The Preprocessor takes word limits into account. This means that you can use several words in the Preprocessor but only whole words, not partial strings. The aforementioned Preprocessor entry would not apply to the search query “denimjackets” (plural).

You can use the “*” symbol to ensure that this entry also takes effect when "denimjackets" is entered. This wildcard tells FACT-Finder that any number of characters may follow. Again, word limits are taken into account. The asterisk only applies until the end of the word.

Denimjacket* -> Denim jacket

In this case, “Denimjackets” would also be replaced with “Denim jacket”. If a person is searching for “denimjackets blue”, it will be replaced with “denim jacket blue”.
If in the initial term (“from” string) an “*” was used, then an “*” may also be used in the target term (“to” string).

This is where FACT-Finder adds “any characters”:

Denimjacket* -> Denim jacket*

FACT-Finder would replace a search for “denimjackets” with “denim jackets”. And “denimjacketscare” would be replaced with “denim jacketscare”.

The “*” can appear anywhere. But it can only be used once in the initial term and once in the target term string.

In practice, the Preprocessor is sometimes used as a substitute for the thesaurus. Its advantage is that it can work with several words. However, it replaces the original string with a new string, thus operating very differently than the thesaurus, and it should be used with care. If synonym-like constructs are required with the pre-processor, then search terms can be connected with OR. For details see below.

FACT-Finder will process the entire list of Preprocessor entries in each search. For search performance reasons, the number of Preprocessor entries should be kept as small as possible.

Impact

The Preprocessor replaces a part of the search query with another string before FACT-Finder processes the query.

How to change settings

You can manage the Preprocessor list within the Preprocessor settings in the Management Interface.

Operators within the Preprocessor

The Preprocessor can be precisely controlled via operators. The following operators are available:

Operator

Example

Effect

+ (exact search, influence)

children -> +boys +girls

Hits do have to include “boys”
as well as “girls”

- (exclusion)

women -> women –men

Only hits are returned which
include “women” but not
“men”

"search term“ (exact phrase)

rain jacket -> “waterproof
jacket”

Instead of searching for “rain
jacket”, FACT-Finder will
search for the exact phrase
“waterproof jacket”

|| (logical OR)

jacket -> jacket || parka

When searching for “jacket”,
FACT-Finder will also search
for “parka”

&& (logical AND)

children -> children || boys
&& girls

Additinally to “children”, FACTFinder
will also search for
“boys” AND “girls” (both terms
have to be found, the logical
AND is stronger than the OR)

Recommendation

Only use the Preprocessor for situations that cannot be resolved by the Thesaurus settings. The formation of preprocessor chains can also produce unexpected or undesirable results, so we recommend that you use the test environment in the Configuration tool to discover potential problems.

Page Contents