--- title: About decompounding slug: pc2k4264 canonical_url: https://docs.coveo.com/en/pc2k4264/ collection: searching-with-coveo source_format: adoc --- # About decompounding Decompounding, also called word decomposition, is the process of splitting compound words into individual components to improve search recall. ## What are compound words? A compound word is formed by combining two or more words to create a new term. In languages like English and French, most compounds are lexicalized, meaning they are fixed terms found in a standard dictionary. They are also typically written as spaced (_school bus_) or hyphenated (_chauffe-eau_) words, which allows search engines to naturally match the individual terms without special processing. However, languages like German, Dutch, and Swedish allow productive compounding. This means speakers can spontaneously invent new words by joining nouns together, much like forming a sentence (for example, combining _Sand_, _Stein_, and _Türme_ to create _Sandsteintürme_). Because these custom compounds often don't exist in a static dictionary, the index uses decompounding to identify and split them into their meaningful components. The [index](https://docs.coveo.com/en/204/) uses decompounding to expand compound words in both [queries](https://docs.coveo.com/en/231/) and index [items](https://docs.coveo.com/en/210/), enabling searches to match the original compound and its individual components. This improves search recall by surfacing relevant results that wouldn't otherwise be found. **Example** In German, _Handtuch_ (hand towel) is a compound word made of _Hand_ (hand) and _Tuch_ (towel). Without decompounding: * Searching for _Hand_ or _Tuch_ wouldn't match items containing only the compound _Handtuch_. * Searching for _Handtuch_ wouldn't match items containing only the separate words _Hand_ and _Tuch_. With decompounding enabled, the index splits the compound and matches both the full compound (_Handtuch_) and its individual components (_Hand_ and _Tuch_), ensuring more relevant results are retrieved. ## How decompounding works Decompounding operates in two stages: **During document indexing**: When documents are indexed, compound words are automatically split into their components. These components are added to the index alongside the original compound, enriching the searchable content. **At query time**: When a query contains a compound word, the index decompounds it and searches for both the compound word and all of its components. Items containing the full compound or all of its individual parts are returned. > **Note** > > * Decompounding only applies to free text queries. > It doesn't apply to [field](https://docs.coveo.com/en/200/) queries. > * Query-time decompounding adds a small processing overhead to queries. > * Because query-time decompounding increases recall by matching individual word components in addition to the full compound, it can return results that are less precisely related to the original query. > This trade-off works well in scenarios where broad coverage matters more than strict precision, such as knowledge bases or support portals. > In scenarios where precision is more important than recall, such as curated product catalogs, query-time decompounding should be disabled. ## Supported languages Decompounding uses language-specific dictionaries to accurately split compounds. For more information, see the list of [languages for which Coveo supports decompounding](https://docs.coveo.com/en/1956/). During document indexing, the language detected in each document determines which dictionary the index uses. At query time, the `locale` query parameter determines which dictionary is used for decompounding. > **Note** > > Since decompounding relies on language-specific dictionaries, compounds containing words that aren't in the dictionary won't be split. > This can occur with highly specialized terminology, proper nouns, or newly coined terms. ## Ranking The index applies ranking to decompounded results: * Items containing the original compound form rank higher than items containing only the individual components. * Items containing both the compound and its individual components rank highest. **Example** When searching for the German word _Handtuch_ (hand towel): * Items containing _Handtuch_ and also _Hand_ and _Tuch_ as separate words rank highest. * Items containing only _Handtuch_ rank lower. * Items containing only _Hand_ and _Tuch_ (but not _Handtuch_) rank lowest among matching results. ## Indexing-time decompounding requirements For decompounding to be applied during indexing, the item's language [field](https://docs.coveo.com/en/200/) must be set to a [supported language](#supported-languages). This can happen automatically through language detection during indexing, or you can [manually set the item language](https://docs.coveo.com/en/3114/). ## Query-time decompounding requirements For decompounding to be applied at query time, you must: . Set the [`locale`](https://docs.coveo.com/en/13#operation/searchUsingPost-locale) query parameter to a valid IETF BCP 47 locale code corresponding to one of the [supported languages](#supported-languages). . Set the `forwardLanguageToCoveoIndex` query parameter to `true` to force the index to use the language specified in the `locale` parameter. **Example** To enable German decompounding in a Search API query: ```json { "q": "Handtuch", "locale": "de-DE", "forwardLanguageToCoveoIndex": true } ``` Without both the `locale` and `forwardLanguageToCoveoIndex` parameters properly set, decompounding won't be applied to your queries.