dsc icon indicating copy to clipboard operation
dsc copied to clipboard

Exported meatdata seems to have notes field truncated to 181 characters

Open mprasil opened this issue 9 months ago • 2 comments

I tried to export few items using dsc export and they all seem to have their Notes field truncated to exactly 181 characters:

# random document with longer notes field:
❯ cat metadata.json | jq .notes -r | wc -c
181

The JSON itself looks complete and valid, it's just the field is not complete. The same item shows correctly via web interface including full notes text. Items that have shorter notes show up complete in the export, only longer notes are truncated.

I have tried latest version of DSC from master branch and 0.11.0 - both seem to do the same. I'm running Docspell version 0.42 and currently can't upgrade to 0.43, so sadly can't test with that.

mprasil avatar Mar 20 '25 20:03 mprasil

Hi @mprasil I'm sorry for the very late reply. First thanks for reporting. I don't think the current version of Docspell is different here. It looks to me as if this is the limit that is used to return search results - it is configurable in the config file. It was added to avoid too large payloads, but obviously this is not good for the export command and needs fixing.

eikek avatar May 07 '25 07:05 eikek

No worries @eikek I have managed to pull that data using the API. So the incomplete export isn't a blocker for me, there's no rush. I just figured it might be useful to know - people might not realize some of their notes are truncated this way.

mprasil avatar May 07 '25 17:05 mprasil