Skip to content

[DOC] hyphenation_decompounder: document no_sub_matches / no_overlapping_matches; fix only_longest_match description #12816

Description

@d1am0nd

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request.

Page: https://docs.opensearch.org/latest/analyzers/token-filters/hyphenation-decompounder/

Two related problems on this page:

  1. Two supported parameters are undocumented. The hyphenation_decompounder
    token filter accepts no_sub_matches and no_overlapping_matches since
    OpenSearch 2.17.0 (Adding access to noSubMatches and noOverlappingMatches in Hyphenation… OpenSearch#13895), but the parameter
    table only lists only_longest_match. Suggested rows:

    • no_sub_matches (Optional, Boolean, default false): excludes subwords
      that are fully contained within another matched subword (e.g., excludes
      ball if fußball also matched). Available in OpenSearch 2.17 and later.
    • no_overlapping_matches (Optional, Boolean, default false): excludes
      subwords that overlap with another matched subword. The most restrictive
      of the three matching options. Available in OpenSearch 2.17 and later.
    • Plus a note that typically only one of the three flags is enabled, because
      a more restrictive option makes the less restrictive ones redundant.
  2. The only_longest_match description is misleading. It currently reads
    "Only includes the longest subword in the generated tokens." Per the underlying
    Lucene implementation, the flag keeps the longest dictionary match per
    hyphenation start point
    ; subwords starting at other hyphenation points are
    still emitted, so overlapping subwords still occur. It does not select a single
    longest decomposition of the whole word.

Reproduction for both points: analyzing the German input kurzehose using the
German decompounding resources from
https://github.com/uschindler/german-decompounder emits the subwords kurz, zeh,
hose — with identical output for only_longest_match: true and false,
because each match starts at a different hyphenation point. The overlapping token zeh ("toe") causes search false positives;
no_overlapping_matches: true is the setting that fixes it, but users cannot
discover it from the current docs.

I'm happy to open a PR with the table changes.

Version: 2.17 and later (parameters introduced in 2.17.0; the
only_longest_match wording issue applies to all versions)

What other resources are available?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions