add full-text search support#73
Merged
Merged
Conversation
Closed
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds full‐text search support to the application along with several related updates such as new API endpoints, indexer and watcher implementations, and integration into the Wiki service.
- Adds search endpoints and search status API in HTTP router and handler files
- Implements a new SQLite-based full-text index along with a file watcher and indexer
- Updates tests and various Wiki initialization calls to support the new search indexing option
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/leafwiki-ui/src/components/TreeViewActionButton.tsx | Updated button markup for better accessibility and styling |
| ui/leafwiki-ui/src/components/Pagination.tsx | Introduced a new pagination component |
| internal/wiki/wiki.go | Modified Wiki initialization and Close() to integrate search indexing |
| internal/search/* | Added new search index, watcher, indexer, and bootstrap functionality |
| internal/http/api/search*.go | Created API endpoints for search status and search queries |
| internal/http/router*.go | Extended router configuration to include search routes |
| internal/core/tree/tree_service.go | Added CalculatePath() helper for page nodes |
| go.mod, cmd/leafwiki/main.go | Updated dependencies and Wiki instantiation to support search |
Comments suppressed due to low confidence (1)
internal/core/tree/tree_service.go:48
- [nitpick] Clarify the handling of empty parent paths to ensure that concatenating paths does not result in an unintended leading slash. Adding a comment or refactoring the logic may improve maintainability and clarity.
func (p *PageNode) CalculatePath() string {
- sanitize markdown on insert - add search endpoint - add the page path for the frontend - implement page path generation on the PageNode object
… as a submit button in forms. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.