Skip to content

Add date/time filtering to mempalace_search #463

Description

@nautis

Problem

Semantic search is poor at temporal queries. Searching for "what did we discuss today" or "April 9 2026" returns low similarity scores (0.35 best) even when matching drawers exist. This is a fundamental limitation of embedding-based search — dates aren't semantically meaningful.

Proposal

Add optional time-based filters to mempalace_search and the mempalace search CLI:

mempalace search "auth decisions" --after 2026-04-01
mempalace search "auth decisions" --last 7d
mempalace search "auth decisions" --between 2026-03-01 2026-04-01

MCP tool equivalent:

{
  "query": "auth decisions",
  "after": "2026-04-01",
  "before": "2026-04-10"
}

ChromaDB supports metadata filtering via where clauses. If drawers already store a timestamp in metadata, this is a straightforward addition. If not, adding created_at to drawer metadata at ingest time would enable it.

Why this matters

"What did we discuss this week?" and "what changed since last sprint?" are among the most common memory queries. Right now they effectively don't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcpMCP server and toolsarea/searchSearch and retrievalenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions