Find answers from the community

Updated 2 weeks ago

Setting a Hash for Document Comparison

Does anyone know if there is a way to set a hash for a document? (or some other way to make the comparison between current document and one in the db only between the document.text hashes, and to not use document.metadata in the hash calculation)
L
p
3 comments
The hash is an @property method, so its hardcoded. You'd need to subclass the document/text node class to override that calculation.
This is the conclusion I arrived to aswell, would a pr changing it so TextNode has additional properties hash_text and hash_metadata calculating the hash only based on text or metadata go through?
I guess that wouldn't work either since it wouldn't change the hash in the database, it would require removing the @property method and making hash an attribute instead
Add a reply
Sign up and join the conversation on Discord