Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds text search capabilities to the RERUM API v1 server by implementing MongoDB Atlas Search functionality. The implementation enables searching across annotation text content using different search strategies.
Key changes:
- Introduces two new search endpoints:
/api/search(text search) and/api/search/phrase(phrase search) - Adds comprehensive search controller with support for multiple search types (text, phrase, fuzzy, wildcard, and similarity-based)
- Updates API documentation with detailed examples and usage guidelines for the new search endpoints
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| routes/search.js | New route file defining search endpoints with POST handlers for text and phrase search |
| routes/api-routes.js | Imports and mounts the search router at /api/search path |
| public/API.html | Adds extensive documentation for text search and phrase search endpoints including examples and behavior details |
| db-controller.js | Exports the new search functions (searchAsWords, searchAsPhrase) from the search controller |
| controllers/search.js | New controller implementing five search strategies with MongoDB Atlas Search integration across IIIF 2.1 and 3.0 indexes |
| app.js | Adds express.text() middleware to support plain text request bodies for search endpoints |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cubap
approved these changes
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.