Skip to content

Your First Search

Once you’ve indexed your content, Hoard provides powerful search capabilities. This guide covers the basics.

The simplest search is a keyword query:

Terminal window
hoard search "meeting notes"

This returns chunks grouped by document:

Project Notes
Type: entity
Source: local_files
Chunk: a1b2c3d4e5f67890:2
Score: 0.87
"...discussed in the meeting notes from last week..."
Weekly Summary
Type: entity
Source: local_files
Chunk: b2c3d4e5f678901:1
Score: 0.82
"Meeting notes for January planning session..."

Memory entries can appear in the same results:

User Preferences
Type: memory
Source: memory
Chunk: 5421d0503fadb55a413761f3745891ac
Score: 0.71
"Prefers concise responses."

Search Options

Limit Results

Terminal window
hoard search "query" --limit 5

Search Specific Sources

Terminal window
hoard search "query" --source obsidian
hoard search "query" --source local_files

Filter by Result Type

Terminal window
hoard search "query" --types entity
hoard search "query" --types memory
hoard search "query" --no-memory

Understanding Results

Search results include:

FieldDescription
result_typeentity or memory
entity_idUnique document or memory identifier
entity_titleDocument title or memory key
sourceConnector name or memory
chunk_idSpecific chunk identifier (format: entity_id:index)
contentThe matching text chunk
scoreRelevance score (0-1)
char_offset_start/endPosition in original document

If you have vectors enabled, Hoard performs hybrid search:

  1. BM25 — Finds exact keyword matches
  2. Vector Search — Finds semantically similar content
  3. Reciprocal Rank Fusion — Combines both rankings

Search via MCP

When using Hoard through AI tools (Claude Code, Codex), the search tool is exposed as:

{
"name": "search",
"arguments": {
"query": "meeting notes",
"limit": 10,
"types": ["entity", "memory"]
}
}

Example in Claude Code:

“Search my hoard for meeting notes from last week”

Getting Full Documents

To retrieve a complete document or specific chunk, use the MCP tools:

  • get — Returns full entity with all chunks
  • get_chunk — Returns single chunk with optional context
  • memory_get — Retrieve a memory entry by key or id

These tools are accessed via MCP (e.g., through Claude Code or Codex), not the CLI.

Search Tips

  1. Be specific — “January project meeting” beats “meeting”
  2. Use multiple terms — More terms help ranking
  3. Check indexed sources — Run hoard doctor to see what’s indexed
  4. Sync regularly — Run hoard sync to catch new content

Troubleshooting

No Results?

  1. Check if content is indexed: hoard doctor
  2. Verify file types: Look at include_extensions in config
  3. Run a sync: hoard sync
  4. Check the search query for typos

Results Not Relevant?

  • Enable vector search for semantic matching
  • Check if the content is properly chunked
  • Try more specific queries

Next Steps