Skip to main content
The configuration of the search module is currently not yet directly available in OSB – neither via a graphical interface nor via code-based input. At the moment, setup can only be carried out via WEBSALE. The option to configure via code will be provided shortly. We kindly ask for your patience until then and will inform you as soon as this option becomes available. Until then, please share your desired settings with your WEBSALE contact so that the adjustments in the search module can be made for you.

Import configuration & search module configuration

For the WEBSALE | search module to work correctly, both the associated import module (“provisioning”) and the search module itself must be configured. Both areas are closely linked but perform different tasks. In the import module, the data for the search is provided. Here it is defined which data is imported and made available – for example product and category data fields, JSON files for content such as terms and conditions, contact or FAQ, stopwords, and other search parameters. However, it is not enough to merely provide the data. In the search module itself, it must additionally be configured whether and how this data should be taken into account. If the provided data is not activated or included in the search module, it has no influence on the search function.

Search module

The search module defines how the provided data is taken into account during the search in the shop – that is, at runtime. This means that, for example, imported stopwords, filter rules, or data fields are actively used in the search and filter logic. Only the combination of provided data (import module) and its activation in the search module ensures that the desired search configuration is complete and effective.

Data feed in the Dataflow Manager

The data feed forms the basis for the import module. The data feed is created in the online service area of the DataflowManager and contains all product information that is taken into account in the search index. All product data that is to be searched, filtered, or sorted is provided via the data feed. To this end, all relevant product fields must be included in the Dataflow Manager – e.g. name, description, categories, price, stock level, attributes, etc. The import module then accesses this feed and converts the contained data into the internal JSON format for the Elasticsearch index.

Configuration hierarchy (from v1.12.x / v1.11.x)

The configuration hierarchy described below is available from the plugin versions websale_search v1.12.x and elasticsearch_manager v1.11.x. The merge logic applies equally to the search module and the import module.
From these versions on, both modules support a three-level configuration hierarchy: global_configslanguage_configssubshop_configs. This allows settings to be defined once at the global level and, if required, to be selectively overridden at the subshop level. This avoids redundancies in the configuration. At the top level, generally only infrastructure aliases, for example for database connections or index names, are defined. These are included in the subordinate blocks via YAML aliases (*/).
There are currently still some exceptions to this. In elasticsearch_manager, datafeed is still configured directly at the top level. In websale_search, the same applies to filter_config and suggest_config. All other settings follow the three-level model via global_configs, language_configs, and subshop_configs.

Global configuration (global_configs)

global_configs forms the lowest level of the hierarchy. Values defined here apply to all subshops unless they are overridden at a higher level. Search module
Import module

Language configuration (language_configs)

language_configs forms the middle level of the hierarchy. Here, configurations can be defined for language groups that apply to all subshops of that language. They can only be overridden by explicit subshop configurations. Search module
Import module

Subshop configuration (subshop_configs)

subshop_configs forms the highest level of the hierarchy. Here, any configuration parameter can be explicitly overridden for an individual subshop. The language key in subshop_configs links the respective subshop to the language_configs block associated with its language. Search module
Import module

Configuration of the import module

Data feed configuration

The assignment and processing of the feed is defined in the datafeed section of the import module configuration. Here, format, encoding, storage paths, and the field assignments required by the search index during import are defined. Standard configuration
Parameter description

Subshop configuration in the import module

In this section, all subshop-specific settings for the import module are defined. Each subshop is configured as its own configuration block under the subshop_configs section. This configuration defines which data is imported and provided per subshop. This allows the search module to later access the appropriate data per subshop in a targeted manner and control the search individually. Standard configuration for the German subshop
Parameter description

Tolerance for ignoring stopwords (stopwords)

Stopwords are less meaningful words (e.g. articles, simple prepositions) that can be ignored when evaluating search queries in order to reduce irrelevant matches. Whether this ignore logic is applied at runtime is controlled by the search module. Which words are treated as stopwords, excluded (whitelist), or additionally included (blacklist) is defined by the import module. This section defines how the search function deals with frequently occurring, low-meaning words (“stopwords”). The basis is the default list from spaCy, which contains common function words like the, a, with, from, etc. This list can be individually adjusted with optional whitelist and blacklist entries:
  • The whitelist removes words from the spaCy stopword list so that they are not ignored and are considered during search.
  • The blacklist adds words to the spaCy list so that they are filtered out during search. (If a word is blacklisted that is already contained, the effect remains unchanged.)
Optionally, your own .txt file with stopwords can be used. If this is to be stored externally – e.g. on a customer system – technical coordination for including the file is required. For the configured stopwords to actually be taken into account in the search process, the parameter stopwords_filter.enabled: true must be activated in the search modulesee section “Stopword filter in the search module”. Standard configuration stopwords
Parameter description stopwords The function must also be activated for the search module.

Synonyms (synonyms)

The synonym function makes it possible to link terms with each other in the search. This means that when a term is entered, hits for equivalent or related terms also appear. Synonyms can be defined either bidirectionally (“Jacke” = “Jacket”) or unidirectionally (“Turniersakko” → “Turnierjacke”). Optionally, synonym lists can be stored as a file or maintained directly in the configuration. By default, no synonyms are stored. The function becomes active as soon as either a synonym list (path) is specified or manual synonyms (clouds) are defined. Example configuration
  • Example 1 (mode: bi) The terms “trenchcoat”, “kutte”, “caban”, “janker”, “mantel” and “jacke” are linked bidirectionally. A search for one of these terms also leads to hits that contain one of the other terms. For example, a search for “Janker” also returns results with “Mantel” or “Trenchcoat”, and vice versa.
  • Example 2 (mode: uni) The terms “kängoro”, “kängguhru” and “kengooroo” are mapped unidirectionally to the term “känguru”. A search for one of the spelling variants leads to hits with “känguru”, but not vice versa. This mode is particularly suitable for typos, spelling variants, or unified terms.
Parameter description
Note: After changes to synonyms, the data feed generation must be started manually so that reindexing takes place.

Grammatical inflection (lemmatization)

This section defines whether and for which fields grammatical word forms are reduced to their base form during import. This enables the search to also recognize linguistic variants – for example, that “rote Hemden”, “rotes Hemd” or “Hemd in Rot” mean the same term. The function improves linguistic recognition and provides more natural search results. It should be activated for descriptive text fields (e.g. name, descr) but deactivated for technical fields (e.g. product_id, sku). Standard configuration
  • Grammatical base-form recognition is activated (enabled: true).
  • German language logic is used (language: de).
  • The fields name and descr are reduced to their base forms during import.
  • This allows the search to also recognize grammatically or word-order-varying terms (e.g. “rotes Hemd” ↔ “Hemd in Rot”).
Parameter description The function must also be activated for the search module.

Categories

Fixed fields in the category index

Include content pages in the search index

In addition to products (and possibly categories), static content pages can also be included in the search – e.g. “About us”, terms and conditions, legal notice, or privacy policy. To do so, the content import is activated in the import module (content.enabled) and the connection to the respective shop API (VX or v8) is configured. Optionally, the pages to be indexed can be restricted in a targeted way (e.g. via included_content).
Category and Content are special indexes that, unlike the product index, cannot be freely extended with new fields. Both work with a fixed set of fields (see below). The custom_fields parameter here serves exclusively to override or adjust the Elasticsearch mapping of existing fields (e.g. analyzer, field type). It was adopted analogously from the product index for other indexes, but does not extend the indexing with new data fields.
Fixed fields in the content index Standard configuration of the demo shop
Parameter description

Configuration of the search module

Search suggestions (suggest_config)

Base configuration suggest_config
Parameter description
The basis of the suggest types product, category and content is the respective index. These must first be activated and configured in the import module so that the corresponding suggestions are available at runtime (see Categories, Content pages as well as the completion index).

Filter (filter_config)

Base configuration filter_config
Parameter description

Subshop configuration for the search module

The configuration of the search module is defined per subshop and is stored under the subshop ID as key. Overview example

Base configuration of the search module (search_config)

The base configuration defines which search types are active and how search terms are evaluated. These settings control whether search terms should be found exactly, partially, fuzzy, or as parts of words. Each search type can be activated, weighted, and combined separately. Basic structure
Parameter description

Exact search (exact)

The exact search only returns hits if the search term matches the stored word exactly. It thus represents the most precise form of search and is usually used as the basis or supplement to other search types. Hits from the exact search are typically assigned a higher relevance, since they represent a complete match. This search type should always remain activated, as it ensures that with identical spellings (e.g. exact product names, brands, article numbers) the most relevant results appear first. The weighting relative to other search types can be fine-tuned via the boost value. Standard configuration
Parameter description

Prefix search (prefix)

The prefix search returns hits when the search term is at the beginning of a word. It is typically used to enable hits during input or to recognize word beginnings – for example, entering “schn” also returns results such as Schneider, Schnürsenkel, or Schnalle. This search type sensibly complements the exact search, since it reacts more flexibly to partial terms without giving up precision entirely. It is particularly useful in combination with autocomplete functions and suggest components. Standard configuration
Parameter description

Wildcard search (wildcard)

The wildcard search finds hits when the search term occurs anywhere within a word. It is significantly more flexible than the prefix search, since it also recognizes word components – for example, entering “hose” returns hits such as Jeanshose, Arbeitshose, or Strumpfhose. This search type is particularly suitable for cases where users do not know the exact word beginning, e.g. for compound terms, variants of product names, or technical designations. Standard configuration
Parameter description

Partial-word search / N-gram search (ngram)

The N-gram search enables hits when a part of the search term occurs within a word – regardless of whether the term appears at the beginning, in the middle, or at the end. It is based on splitting words into small units (so-called N-grams) that are generated during index construction. This search type is particularly suitable for technical terms, model numbers, article codes, or compound words for which the user often only knows parts of the term. Example: The input “AB12” also finds AB1234-X or XX-AB12-Z. Standard configuration
Parameter description

Error-tolerant search & Levenshtein distance (fuzzy)

The fuzzy search is an error-tolerant search method that compensates for typos or spelling deviations. The basis is the Levenshtein distance, which counts how many edit steps (insert, delete, replace) separate two words. Examples:
  • “Haus” → “Maus” = distance 1 (1 letter replaced)
  • “Haus” → “Huas” = distance 2 (letters transposed → replace + replace)
  • “Haus” → “Hause” = distance 1 (one letter inserted)
fuzzy controls the global error-tolerant search based on the Levenshtein distance. Here, it is defined whether fuzzy is active, what error tolerance (e.g. AUTO depending on word length) applies, and how strongly fuzzy hits are weighted in scoring (boost, tie_breaker). The configuration generally affects all search terms and fields, unless it is restricted by downstream rules → see Exceptions to the global fuzzy logic (fuzzy_filter) Standard configuration
  • Fuzzy search activated: Error-tolerant matches (based on the Levenshtein distance) are active.
  • Weighting: With boost = 0.75, fuzzy hits receive about 75 % of the weight of an exact hit; higher values prioritize fuzzy more strongly, 0 deactivates the boost effect.
  • Cross-field weighting: tie_breaker = 0.3 causes additional hits in other fields to contribute about 30 % to the score; smaller values dampen and larger values amplify this multi-field effect.
  • Error tolerance: fuzziness = AUTO adjusts the allowed edit distance to the word length (1 - 2 characters → 0, 3 - 5 → 1, ≥6 → 2).
Parameter description

Data fields

fields_config defines which data fields are included in the search index and what they are used for (search, display, filtering, sorting, partial-word search, variants, categories). Changes to this block take effect after restarting the search module. Basic structure
Parameter description

Data fields for the search (search_fields)

This section defines the fields in which the search is actually performed. Without defined search fields, no content-based search can take place. The selection of the fields depends on the respective shop; typically, product name, description, category names, brand/manufacturer, or color variants are specified. Standard configuration
Parameter description

Data fields in the search response (display_fields)

This section defines which fields are passed to the shop frontend in the search response. These fields can then be used directly in the WebComponents for display. By default, only the product number or product index is returned, since by default the product data is loaded from the shop database using this index and displayed in the frontend by the WEBSALE template engine. If the display of the products should not be done via loading the shop database and thus not via the WEBSALE template engine, all fields required for display in the frontend must be added in this section, e.g. price, brand, product image, etc. For further information, see Integration into the templates (storefront). Standard configuration
Parameter description

Data fields for the filters (filter_fields)

This section defines which filters are available in the search frontend and by which field values it is possible to filter. The filter system supports different types of filters that are defined directly via the configuration. Depending on the data type or use case, simple selection filters, price ranges, or user-defined filter logic can be created. Supported filter types:
  • Terms filter (terms) - exact values, e.g. brands, colors, categories
  • Range filter (range) - numeric value ranges, e.g. price, rating
  • Custom filter (custom) - user-defined conditions (e.g. “salesrank ≤ 1000”)
  • Default filter (default) - automatically active filters (e.g. “only available products”)
Standard configuration
  • Terms filter farbgrp for colors.
  • Range filter price for the price (from - to)
  • Custom filter salesrank that filters products with a sales rank (salesrank) less than or equal to 1000
  • Custom filter rating that filters products with an average customer rating (rating) greater than or equal to 4
  • Custom filter new_field that filters products marked as new (new_field)
  • Default filter inventory that filters out all unavailable products by default, combined with a custom filter that makes it possible to remove this default filter and thus also display “unavailable” products.
Parameter description

Excluding certain products (filter_fields)

By default, all active products appear in the search. The exclusion of certain products is done within filter_fields. Via filter_fields, products can be excluded based on rules without taking them offline. This section describes the configuration in the search module; active rules filter the affected articles out of the search results at runtime. Example configuration filter_fields
Parameter description filter_fields Each entry under filter_fields is a rule per data field. This rule is checked on every search and decides whether a product may enter the result list or not. More information about the filter_fields as well as a complete overview of the parameters can be found in the section Data fields for the filters (filter_fields).

Data fields for the sorting (sort_fields)

This block is only configured if the UI component <ws-sort-box use-api="true"> is used. In this case, the component reads the entries from sort_fields and automatically generates a select box with all configured sort options. Changes to sort_fields are thus immediately visible in the frontend – without adjusting the template. If use-api="false" is used, sort_fields is not required; the sort UI is then provided manually via the template. You can find more about the UI component ws-sort-box here. Standard configuration
Parameter description

Data fields for the partial-word search (ngram_fields)

This section defines for which fields the partial-word search (N-gram search) is activated. The partial-word search makes it possible to find hits even with incomplete or partially matching search queries, e.g. the input “jack” also returns results such as Jacke, Jacket, or Jackett. When building the search index, so-called N-gram tokens are generated for the fields defined here. This means that search terms can already be recognized during input or with inaccurate spelling. Typical fields are product name, description, or article numbers. Standard configuration
Parameter description

Variant fields for filters (variant_fields)

This section defines which variant attributes should be considered when determining filter values. Since calculating filter options (aggregation) over many variant products is performance-critical, the relevant variant fields must be explicitly specified here. Only the fields defined in this section are included in the filter determination and, in doing so, incorporate the variants of a product. Standard configuration
  • In this example, the fields color (color) and size (size) are defined as variant fields.
Parameter description

Category fields (category_field)

In this section, the field name that contains the category IDs (category indexes) is entered. The field name configured here is used by the search module to correctly determine the context (search result page vs. category page) and to open products in the correct category after a search, filtering, or sorting. The default value is usually already set and should not be changed. Standard configuration
Parameter description

Exceptions to the global fuzzy logic (fuzzy_filter)

fuzzy_filter defines targeted exceptions to the global fuzzy logic. This allows individual terms to always be searched exactly (without fuzzy) in order to avoid confusion, and entire fields to be excluded from fuzzy (e.g. product IDs). This section serves for fine-tuning when the standard behavior leads to unwanted hits or when certain data fields should always be treated exactly. Standard configuration
  • Fuzzy search activated: Typos are tolerated according to the global fuzzy tolerance in the search_config (e.g. distance depending on word length).
  • No global word exclusions: The list list is intentionally empty, since critical terms vary per shop and should be maintained individually.
  • Fields without fuzzy: In productnumber and productid, no fuzzy match is performed (exact search on IDs/SKUs).
Parameter description

Special-character handling (punctuation_filter)

The punctuation_filter controls the handling of special characters in search queries and indexed terms. This makes it possible to unify search results and avoid zero hits due to different spellings (e.g. USB-C, USB C, USBC). An adjustment is required if you want to deviate from the standard behavior – for example, if certain special characters should additionally be preserved (e.g. & in brand names) or if additional characters must be removed. Standard configuration
  • Hyphens (-) and slashes (/) are replaced by spaces. → “USB-C” = “USB C”, “Herren/Hemd” = “Herren Hemd”.
  • Underscores (_), ampersand (&) and periods (.) are removed. → “Winter_Pullover” = “Winter Pullover”, “Jack&Jones” = “Jack Jones”, “PS.5” = “PS5”.
  • All other characters are preserved.
Parameter description

Tolerance for ignoring stopwords (stopwords_filter)

The configuration in the search module only defines whether the stopword list defined during import is taken into account during query evaluation. With stopwords_filter, the ignoring of stopwords at runtime is switched on or off: If active, terms from the stored list are removed before matching, while words from the whitelist are not removed and are thus evaluated normally. The compilation of the stopword list itself is not done in the search module, but entirely in the import module. Standard configuration stopwords_filter
Parameter description stopwords_filter

Grammatical inflection (lemmatization)

This section defines whether and in which language search terms are reduced to their grammatical base form during the search. This allows the system to recognize that different word forms – for example “rote Hemden”, “rotes Hemd” or “Hemd in Rot” – mean the same term. The function improves semantic recognition and provides more natural search results. For technical fields (e.g. product numbers, model codes), lemmatization can remain deactivated in order to preserve exact character strings.
The use of grammatical inflection (lemmatization) at search time is not recommended. In e-commerce, search queries typically consist of only 1–3 words and thus do not provide enough context for reliable lemmatization in the German language. This can distort user intent (e.g. “blau” is incorrectly turned into “blauen”), and the search delivers unpredictable or missing results. In practice, the relevant variants are already covered by the existing match strategies (including exact, prefix, N-gram, fuzzy, wildcard). If special cases must be represented, synonym mapping is the better alternative, since it is controllable and comprehensible. Lemmatization can still be useful at index time (e.g. for longer product texts with sufficient context) but should not be activated when processing the search query.
Standard configuration
Parameter description

Index configuration (index_configs)

index_configs controls per subshop which indexes are active at runtime during the search and how they behave. An index must be activated both in the import module and here in the search module to take effect. Basic structure

Products (product index)

The product index is the main index and forms the basis of every product search. It is generally always active. The content configuration – i.e. which fields are searched, filtered, or displayed – is done via fields_config. Via index_configs.product, it is primarily controlled whether the index is active at runtime. Example configuration
Parameter description

Autocompletion (completion index)

The completion index is used for the autocompletion of search terms. As with the product index, the configuration here is limited to the activation of the index – further settings (e.g. Fuzziness) are controlled via suggest_config; the content basis is defined during import. Example configuration
Parameter description

Categories (category index)

If a category index was created during import, it can be activated in the search module per subshop. This means that in addition to products (and possibly content pages), categories are also taken into account in the search. Example configuration
Parameter description

Content pages (content index)

If a content index was created during import, it can be activated in the search module per subshop. This means that in addition to products (and possibly categories), static content pages (e.g. “About us”, terms and conditions, legal notice) are also taken into account in the search. Example configuration
Parameter description