Adapt backend search to complex filter - #48
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for an “advanced search filter” (year range + nested AND/OR text conditions) across backend search endpoints and propagates it through the generated OpenAPI schema/client and frontend search flow.
Changes:
- Introduces
AdvancedSearchFilter/ConditionGroup/TextConditionDTOs and wires them through search request/handling. - Applies advanced filters in the vector search repository query (year bounds + title/abstract contains/not-contains).
- Updates OpenAPI spec + regenerated TypeScript client and hooks the new filter into the frontend search calls.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/openapi.json | Documents the new advanced filter schemas and updated search endpoint descriptions/parameters. |
| frontend/src/services/search.ts | Adds advanced filter support to text/PDF search service calls. |
| frontend/src/pages/SearchPage.vue | Passes advanced options through to the updated search service functions. |
| frontend/src/api/models/validation-error.ts | Updates validation error loc type import to the regenerated model. |
| frontend/src/api/models/text-condition.ts | Adds generated model for text conditions. |
| frontend/src/api/models/search-request.ts | Adds filter to SearchRequest type. |
| frontend/src/api/models/index.ts | Exports newly generated advanced-filter-related models. |
| frontend/src/api/models/condition-group.ts | Adds generated model for condition groups. |
| frontend/src/api/models/condition-group-children-inner.ts | Adds generated union type for recursive group/condition children. |
| frontend/src/api/models/advanced-search-filter.ts | Adds generated model for the advanced search filter DTO. |
| frontend/src/api/common.ts | Updates query param flattening and JSON serialization behavior in the generated client. |
| frontend/src/api/apis/users-api.ts | Removes now-nonexistent helper import from generated API. |
| frontend/src/api/apis/search-api.ts | Adds filter form field parameter for PDF search and updates generated docs/signatures. |
| frontend/src/api/apis/projects-api.ts | Removes now-nonexistent helper import from generated API. |
| frontend/src/api/apis/paper-api.ts | Removes now-nonexistent helper import from generated API. |
| frontend/src/api/apis/authentication-api.ts | Removes now-nonexistent helper import from generated API. |
| frontend/src/api/.openapi-generator/VERSION | Updates recorded OpenAPI generator version. |
| frontend/src/api/.openapi-generator/FILES | Updates generated file manifest for new/removed models. |
| backend/app/services/search_service.py | Threads search_filter through the search pipeline into the repository. |
| backend/app/schemas/search_dto.py | Defines Pydantic DTOs for advanced filtering and adds them to SearchRequest. |
| backend/app/routes/search_routes.py | Accepts/parses advanced filter for PDF search and passes it to the service layer. |
| backend/app/repositories/search_repository.py | Implements SQLAlchemy clause generation for year/text-condition filters. |
| CLAUDE.md | Adds repository guidance for Claude Code usage and project commands. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.