You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MetaExtractor previously stored Docling's origin.binary_hash as an integer in document metadata. Since binary_hash is an unsigned 64-bit integer, values greater than 2^63 - 1 break document stores that map numeric metadata to signed 64-bit types (e.g. OpenSearch long), causing:
failed to parse field [dl_meta.origin.binary_hash] of type [long]
Numeric value (9768961288489567249) out of range of long
Following @julian-risch's guidance on #3604, binary_hash is now always stored as a string via a new _stringify_binary_hash() recursive helper applied in both extract_dl_doc_meta and extract_chunk_meta.
Reproduction
Before fix — binary_hash returned as int, overflows OpenSearch long:
# model_dump() returns: {binary_hash: 9768961288489567249} � int, rejected by OpenSearch
Hi @SyedShahmeerAli12, thanks for your interest in contributing to Haystack! 🙏
⚠️ Issue #3604 is already being addressed by open pull request(s) #3607. Before opening a PR for an issue, please check whether a PR is already linked to it, and consider contributing to the existing PR instead. We may close duplicate PRs to keep the review queue manageable.
⚠️ You currently have 4 open pull requests in this repository (#3565, #3483, #3254 and this one). Our review capacity is limited, so please hold off opening more PRs until we've had a chance to review your first 2 open PRs. This helps us give each contribution the attention it deserves. Thank you!
This is an automated message to help us keep the review queue healthy.
anakin87
changed the title
fix(docling): stringify binary_hash to prevent OpenSearch long overflow
fix!(docling): stringify binary_hash to prevent OpenSearch long overflow
Jul 31, 2026
anakin87
changed the title
fix!(docling): stringify binary_hash to prevent OpenSearch long overflow
fix(docling)!: store binary_hash as a string to avoid 64-bit overflow
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes
MetaExtractorpreviously stored Docling'sorigin.binary_hashas an integer in document metadata. Sincebinary_hashis an unsigned 64-bit integer, values greater than2^63 - 1break document stores that map numeric metadata to signed 64-bit types (e.g. OpenSearchlong), causing:Following @julian-risch's guidance on #3604,
binary_hashis now always stored as a string via a new_stringify_binary_hash()recursive helper applied in bothextract_dl_doc_metaandextract_chunk_meta.Reproduction
Before fix —
binary_hashreturned asint, overflows OpenSearchlong:# model_dump() returns: {binary_hash: 9768961288489567249} � int, rejected by OpenSearchAfter fix — stored as
str, no overflow:# _stringify_binary_hash() returns: {binary_hash: 9768961288489567249} � safe keywordTesting
TestMetaExtractortests passruff checkcleanNotes
binary_hashwasint— aligns with maintainer suggestion for a major release