Skip to content

feat(core): support frontmatter field to skip embeddings for individual notes #725

@phernandez

Description

@phernandez

Summary

Add a frontmatter field that allows individual notes to opt out of semantic embeddings. Notes with this field will still be indexed and searchable via full-text search (FTS), but will skip the embedding generation step during sync/indexing.

Motivation

Some notes don't benefit from semantic search — large reference documents, logs, templates, or auto-generated content. Skipping embeddings for these notes:

  • Reduces sync time and resource usage (embedding API calls or local model inference)
  • Keeps the vector index focused on semantically meaningful content
  • Gives users fine-grained control over what gets embedded

Proposed Frontmatter Field

---
title: My Reference Note
embed: false
---

embed: false skips embedding generation. Default behavior (field absent or embed: true) is unchanged — embeddings are generated as usual.

Field name rationale: embed is concise and directly describes what it controls. Alternatives considered: embeddings: false (verbose), skip_embeddings: true (negative framing), searchable: false (ambiguous — FTS still works).

Implementation Notes

  • During indexing, check for embed: false in parsed frontmatter
  • Skip the embedding provider call for that entity
  • Entity still gets full-text indexed normally
  • Existing entities that gain this field on re-index should have their embeddings cleared
  • Search behavior: these notes appear in FTS results but not in semantic/vector search results

Test Plan

  • Note with embed: false is indexed without embeddings
  • Note without the field behaves as before (embeddings generated)
  • FTS still finds notes with embed: false
  • Semantic search does not return notes with embed: false
  • Re-indexing a note that adds embed: false clears existing embeddings
  • Re-indexing a note that removes embed: false generates embeddings

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions