Add the content_length field to the Document base class
This commit is contained in:
@@ -221,6 +221,10 @@ class Es4Document(Document): # pylint: disable=too-many-instance-attributes
|
||||
self._content = value
|
||||
self._content_hash = self.hash_value(value)
|
||||
|
||||
@property
|
||||
def content_length(self) -> int:
|
||||
return len(self._content)
|
||||
|
||||
def generate_hash(self) -> str:
|
||||
"""Calculate the hash of the document
|
||||
|
||||
|
Reference in New Issue
Block a user