Skip to content

fix: recursive_splitter validation message and docstring accuracy - #12440

Merged
sjrl merged 3 commits into
deepset-ai:mainfrom
simpleqt:fix-docstrings-and-validation-message
Aug 24, 2026
Merged

fix: recursive_splitter validation message and docstring accuracy#12440
sjrl merged 3 commits into
deepset-ai:mainfrom
simpleqt:fix-docstrings-and-validation-message

Conversation

@simpleqt

Copy link
Copy Markdown
Contributor

Summary

All verified at HEAD:

  • recursive_splitter: the validation only rejects negative split_overlap (0 is the default), but the error message said "Overlap must be greater than zero-️ — document_splitter and hierarchical_document_splitter already word this identical check as "must be greater than or equal to 0". Also, split_overlap is measured in split_units (word/char/token), not always characters — _get_overlap() slices by unit and _run_one() even carries the comment 'split_overlap is in split_units, not chars'.
  • answer_joiner: sort_by_score docstring said 'documents' (verbatim copy-paste from DocumentJoiner); it sorts answers. _concatenate docstring claimed it "sorts by score-️ but it only flattens (sorting happens in run() and only when sort_by_score=True).
  • meta_field ranker: run() docstring referenced a nonexistent 'score' mode; valid values are reciprocal_rank_fusion and linear_score (the __init__ docstring for the same parameter already says linear_score).

- recursive_splitter only rejects negative split_overlap (0 is the
  default), but the error said 'must be greater than zero';
  document_splitter/hierarchical_document_splitter already word this
  check as 'must be greater than or equal to 0'
- recursive_splitter split_overlap is measured in split_units
  (word/char/token), not always characters
- answer_joiner sort_by_score docstring said 'documents' (copy-paste
  from DocumentJoiner); it sorts answers
- answer_joiner _concatenate docstring claimed it sorts by score; it
  only flattens (sorting happens in run() and only when sort_by_score)
- meta_field ranker run() docstring referenced a nonexistent 'score'
  mode; valid values are reciprocal_rank_fusion and linear_score
@simpleqt
simpleqt requested a review from a team as a code owner August 23, 2026 13:00
@simpleqt
simpleqt requested review from julian-risch and a lite review from Copilot and removed request for a team August 23, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

@simpleqt is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@sjrl sjrl added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Aug 24, 2026
@github-actions github-actions Bot added the type:documentation Improvements on the docs label Aug 24, 2026
Comment thread haystack/components/preprocessors/recursive_splitter.py Outdated
The CI format check flagged one over-long docstring line, and the reno
check requires a release notes file for every PR.
Comment thread releasenotes/notes/fix-splitter-message-docstrings-490155c7796d449f.yaml Outdated
@sjrl sjrl removed the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/components/joiners
  answer_joiner.py
  haystack/components/preprocessors
  recursive_splitter.py
Project Total  

This report was generated by python-coverage-comment-action

@sjrl
sjrl requested review from sjrl and removed request for julian-risch August 24, 2026 06:43
@sjrl sjrl self-assigned this Aug 24, 2026

@sjrl sjrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sjrl
sjrl merged commit b754e3f into deepset-ai:main Aug 24, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants