Skip to content

Search Against Annotation Text Indexes#223

Merged
cubap merged 27 commits intomainfrom
222-search
Oct 20, 2025
Merged

Search Against Annotation Text Indexes#223
cubap merged 27 commits intomainfrom
222-search

Conversation

@thehabes
Copy link
Copy Markdown
Member

No description provided.

@thehabes thehabes self-assigned this Oct 15, 2025
@thehabes thehabes linked an issue Oct 15, 2025 that may be closed by this pull request
Comment thread routes/search.js Dismissed
Comment thread routes/search.js Dismissed
@thehabes thehabes marked this pull request as ready for review October 15, 2025 18:17
@thehabes thehabes requested a review from cubap as a code owner October 15, 2025 18:17
@thehabes thehabes requested a review from Copilot October 15, 2025 19:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comment thread public/API.html Outdated
Comment thread public/API.html Outdated
Comment thread public/API.html Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
Comment thread controllers/search.js Outdated
thehabes and others added 6 commits October 15, 2025 14:12
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>
@thehabes thehabes requested a review from Copilot October 15, 2025 19:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread public/API.html Outdated
Comment thread public/API.html Outdated
thehabes and others added 5 commits October 15, 2025 14:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cubap cubap merged commit c53420b into main Oct 20, 2025
6 checks passed
@cubap cubap deleted the 222-search branch October 20, 2025 15:16
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.

New /search and /search/phrase Endpoints

4 participants