Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to

- 🔥(backend) remove mirroring feature

### Fixed

- 🐛(backend) fix indexing payload is_active and reach

## [v0.17.0] - 2026-04-23

### Added
Expand All @@ -37,7 +41,6 @@ and this project adheres to
- 🐛(backend) fix openapi schema for item access endpoints
- 🐛(backend) load jwks url when OIDC_RS_PRIVATE_KEY_STR is set


## [v0.16.0] - 2026-04-09

### Added
Expand Down
10 changes: 7 additions & 3 deletions src/backend/core/services/search_indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,14 @@ def serialize_item(self, item, accesses):

# The deleted items are still accessible in Drive (not in Docs !)
# See in V2 for handling hard deleted ones
is_active = True
is_active = item.deleted_at is None and item.ancestors_deleted_at is None

# There is no endpoint in Find API for inactive items so we index it
# again with an empty content.
if is_active and self.can_serialize_content(item):
content = self.to_text(item)

return {
payload = {
"id": str(item.id),
"title": item.title or "",
"mimetype": item.mimetype or "",
Expand All @@ -325,11 +325,15 @@ def serialize_item(self, item, accesses):
"updated_at": item.updated_at.isoformat(),
"users": list(accesses.get(doc_path, {}).get("users", set())),
"groups": list(accesses.get(doc_path, {}).get("teams", set())),
"reach": str(item.link_reach),
"size": item.size or 0,
"is_active": is_active,
}

if item.link_reach:
payload["reach"] = str(item.link_reach)

return payload

# pylint: disable-next=too-many-arguments,too-many-positional-arguments
def search(self, text, token, visited=(), nb_results=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/backend/core/tests/test_services_search_indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def test_services_search_indexers_serialize_document_soft_deleted():
result = indexer.serialize_item(item, {})

# Still accessible through the thrashbin
assert result["is_active"] is True
assert result["is_active"] is False
assert result["content"] == "This is a text file content"


Expand Down
Loading