Skip to content

fix: exclude non-string findAndRerank passages - #2639

Draft
erichare wants to merge 2 commits into
mainfrom
fix/rerank-on-string-passages
Draft

erichare wants to merge 2 commits into
mainfrom
fix/rerank-on-string-passages

Conversation

@erichare

@erichare erichare commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

findAndRerank sends numbers and booleans in the rerankOn field to the reranker as text, e.g. 42 becomes "42" and 1.50 becomes "1.5". Objects and arrays fail the whole request with UNEXPECTED_SERVER_ERROR.

Only string values are now used as passages. Other types are excluded, the same as missing, null, and blank values, matching the docs.

Updates the ScoredDocument passage cases and adds an integration test that checks only the string passage reaches the reranker. The 44 reranking unit tests and FindAndRerankCollectionSuccessIntegrationTest pass on Java 21 against DSE.

Which issue(s) this PR fixes:
Fixes #2613
Fixes #2611

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@erichare
erichare requested a review from a team as a code owner October 8, 2026 20:06
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

📉 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 54.71%
This PR 54.70%
Delta 🔴 -0.02%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 54.7% 🍏
Files changed 100% 🍏

File Coverage
ScoredDocument.java 92.04% 🍏

@erichare

erichare commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@Hazel-Datastax this conflicts with the non-string rerankOn cases #2638 pins. I followed the docs (exclude them), but holding as draft until we agree which way to go.

@erichare
erichare marked this pull request as draft October 8, 2026 20:14
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 72.95%
This PR 72.96%
Delta 🟢 +0.01%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.96% 🍏
Files changed 100% 🍏

File Coverage
ScoredDocument.java 56.75% 🍏

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

📈 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.27%
This PR 74.29%
Delta 🟢 +0.01%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.29% 🍏
Files changed 100% 🍏

File Coverage
ScoredDocument.java 59.17% 🍏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant