Skip to content

Feature/chat message search#574

Draft
annaneliaa wants to merge 4 commits into
nextcloud:mainfrom
annaneliaa:feature/chat-message-search
Draft

Feature/chat message search#574
annaneliaa wants to merge 4 commits into
nextcloud:mainfrom
annaneliaa:feature/chat-message-search

Conversation

@annaneliaa
Copy link
Copy Markdown

Added

  • MessageMapper::searchMessages() a method to query messages across all sessions from a user sessions. It uses case-insensitive LIKE '%query%' search. The messages table is joined against the sessions table to ensure user scoping with the user id. A limitation here is that search does not use a database index on the content column, so a full table scan is performed. On large instances with a lot of message this can become slow.
  • ChatService::searchMessages() a method to orchestrate the search. It returns matching messages with their session IDs
  • ChattyLLMController::searchMessages() new GET /chat/search?query= OCS endpoint
  • Route registered in appinfo/routes.php
  • Unit tests for the service layer covering empty query, null user, deduplication of session IDs, and multiple session results

… tests

Signed-off-by: Anna Visman <a.c.visman@student.tudelft.nl>
Signed-off-by: Anna Visman <a.c.visman@student.tudelft.nl>
Signed-off-by: Anna Visman <a.c.visman@student.tudelft.nl>
Signed-off-by: Anna Visman <a.c.visman@student.tudelft.nl>
@annaneliaa annaneliaa force-pushed the feature/chat-message-search branch from 50f425a to 002a45d Compare June 7, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant