SpringSearch turns your Obsidian vault into a fully searchable knowledge base, powered by Spring Boot and MongoDB Search.
It supports full-text queries, autocomplete, fuzzy matching, and custom boosting for prioritizing your most relevant notes — all exposed via a simple REST API.
- Full-text search: Query across
title,tags, andcontentfields. - Autocomplete: Type-ahead search for instant suggestions.
- Fuzzy matching: Tolerates typos and misspellings in queries.
- Custom boosting: Prioritize matches in specific fields like
titleortags. - Obsidian integration: Automatically parses Markdown files (with frontmatter) into MongoDB documents.
- REST API: Simple endpoints for searching notes.
- Java 24+ (or update
pom.xmlto your installed version) - Maven 3.9+
- MongoDB Atlas (free M0 cluster is sufficient)
- An existing Obsidian Vault containing Markdown notes with optional frontmatter.
git clone https://github.com/mongodb-developer/SpringSearch.git
cd SpringSearchEdit the src/main/resources/application.properties file:
spring.data.mongodb.uri=${MONGODB_URI}
spring.data.mongodb.database=obsidian
notes.folder.path=/path/to/your/vaultMake sure your MongoDB cluster has a Search Index with this configuration:
{
"mappings": {
"dynamic": false,
"fields": {
"title": [
{ "type": "string" },
{ "type": "autocomplete" }
],
"tags": { "type": "string" },
"content": { "type": "string" }
}
}
}MONGODB_URI="your-mongodb-uri" mvn spring-boot:runBasic search:
GET /api/notes/search?q=<query>
Boosted by title:
GET /api/notes/search/boost-title?q=<query>
Autocomplete + fuzzy matching:
GET /api/notes/search/autocomplete-fuzzy?q=<query>
All-in-one (boosting + autocomplete + fuzzy):
GET /api/notes/search/autocomplete-fuzzy-boosted?q=<query>
curl "http://localhost:8080/api/notes/search?q=Spring%20Boot"