Skip to content

⚡️(backend) remove content from Document serializer when asked#1910

Merged
lunika merged 2 commits intomainfrom
improvement/retrive_without_content
Feb 25, 2026
Merged

⚡️(backend) remove content from Document serializer when asked#1910
lunika merged 2 commits intomainfrom
improvement/retrive_without_content

Conversation

@lunika
Copy link
Member

@lunika lunika commented Feb 23, 2026

Purpose

The frontend can fetch the retrieve endpoint just for having the title. Everytime, the content is added and to get the content, a request is made to the s3 bucket. A query string without_content can be used, if the value is true then the content is not added (and not also not fetch).

Proposal

  • ⚡️(backend) remove content from Document serializer when asked

Fix #1229

@lunika lunika requested a review from AntoLC February 23, 2026 11:15
@AntoLC AntoLC force-pushed the improvement/retrive_without_content branch from 3d5cfbb to db0aaa8 Compare February 24, 2026 09:15
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !

@AntoLC AntoLC added enhancement improve an existing feature frontend backend labels Feb 24, 2026
@lunika lunika requested a review from Ash-Crow February 24, 2026 09:17
@github-actions
Copy link

github-actions bot commented Feb 24, 2026

Size Change: +12 B (0%)

Total Size: 4.22 MB

Filename Size Change
apps/impress/out/_next/static/28de6b56/_buildManifest.js 892 B +892 B (new file) 🆕
apps/impress/out/_next/static/f472f058/_buildManifest.js 0 B -892 B (removed) 🏆

compressed-size-action

@AntoLC AntoLC force-pushed the improvement/retrive_without_content branch from db0aaa8 to 3c0b390 Compare February 24, 2026 10:14
Copy link
Collaborator

@Ash-Crow Ash-Crow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

lunika and others added 2 commits February 25, 2026 21:18
The frontend can fetch the retrieve endpoint just for having the title.
Everytime, the content is added and to get the content, a request is
made to the s3 bucket. A query string `without_content` can be used, if
the value is `true` then the content is not added (and not also not
fetch).
To improve performance, especially for documents
with large content, an optional query parameter
`without_content` has been added to the document
fetching API endpoint. When this parameter is set
to true, the API will return the document
metadata without the content, allowing the frontend
to load faster and reduce unnecessary data transfer.
@lunika lunika force-pushed the improvement/retrive_without_content branch from 3c0b390 to 1ac6b42 Compare February 25, 2026 20:18
@lunika lunika merged commit 1ac6b42 into main Feb 25, 2026
35 of 37 checks passed
@lunika lunika deleted the improvement/retrive_without_content branch February 25, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend enhancement improve an existing feature frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡️Request /api/v1.0/documents/[DOC_ID/ without content property

3 participants