openaec-foundation/frappe_claude_skill_package/frappe-core-search
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing search functionality in Frappe v14-v16. Covers link field search (search_link), global search, FullTextSearch (Whoosh), SQLiteSearch FTS5 [v15+], Awesomebar customization, search_fields configuration, custom search queries, and website search. Prevents common mistakes with missing search_fields and permission filtering. Keywords: search, search_link, global_search, FullTextSearch, Awesomebar,, search not finding, link field empty, autocomplete not working, global search missing results. search_fields, standard_queries, SQLiteSearch, FTS5, Whoosh.
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-core-searchSKILL.md
The same SKILL.md was published earlier as openaec-foundation/frappe_claude_skill_package/frappe-core-search.
Frappe Search System
Four Search Subsystems
| Subsystem | Module | Purpose | Real-time? | |
|---|---|---|---|---|
| Link Field Search | frappe.desk.search | Autocomplete in link fields | Yes | |
| Global Search | frappe.utils.global_search | Cross-doctype search (desk + web) | No (15min sync) | |
| FullTextSearch | frappe.search.full_text_search | Whoosh-based index (website) | On rebuild | |
| SQLiteSearch [v15+] | frappe.search.sqlite_search | FTS5 with scoring + spelling | Yes (5min queue) |
Decision Tree
Link Field Search
Configuring search_fields (Most Common Need)
ALWAYS set `search_fields` — Without it, users can only search by name (often a code like CUST-001).
How Link Search Works
- User types in link field → calls
search_link(doctype, txt) - Searches across:
name+title_field+search_fields - Allowed field types: Data, Text, Small Text, Long Text, Link, Select, Autocomplete, Read Only, Text Editor
- Prefix matches rank higher than substring matches
- Respects
enabled/disabledfields automatically
Custom Link Query
Per-Field Query Override
Global Search
Enabling
Set in_global_search = 1 on DocType fields that should be searchable.
How It Works
- Indexed fields stored in
__global_searchtable - Synced via Redis queue every 15 minutes
- Uses DB-native fulltext: MariaDB
MATCH...AGAINST, PostgreSQLTSVECTOR - Permission-filtered results
Rebuilding Index
hooks.py Configuration
SQLiteSearch [v15+]
Creating Custom Search
Register in hooks.py
Features (automatic)
- Spelling correction: Trigram-based fuzzy matching
- Recency boosting: 1.8x (24h) → 1.5x (7d) → 1.2x (30d) → 1.1x (90d)
- Resumable indexing: Progress tracked, atomic replacement
- Auto-scheduling: Build every 3h, queue every 5min, doc events trigger updates
Anti-Patterns
| NEVER | ALWAYS | Why | |
|---|---|---|---|
Omit search_fields on DocType | Set search_fields for user-friendly names | Users can't find records by name codes | |
Custom query without @frappe.whitelist() | Decorate with @frappe.whitelist() | Silently fails — rejected by security check | |
| Raw SQL without params in search | Use parameterized queries (%(txt)s) | SQL injection risk | |
| Index all fields in global search | Only in_global_search=1 on key fields | Bloats table, slows 15-min sync | |
| Use global search for real-time | Use link field search for real-time | Global search has 15-min sync delay | |
Skip get_search_filters() in SQLiteSearch | Implement permission filtering | Returns all results regardless of access | |
| Index cancelled/deleted docs | Set filters in INDEXABLE_DOCTYPES | Stale results confuse users |
Version Differences
| Feature | v14 | v15+ | |
|---|---|---|---|
| Link search caching | -- | @http_cache(max_age=60) | |
link_fieldname param | -- | Added | |
page_length default | 20 | 10 | |
| SQLiteSearch (FTS5) | -- | Full implementation | |
| Spelling correction | -- | Trigram-based | |
| Recency boosting | -- | Time-based multipliers | |
sqlite_search hook | -- | Available | |
| Global search | Yes | Yes | |
| Whoosh FullTextSearch | Yes | Yes (legacy) |
Reference Files
- Link Search API — search_link, search_widget, custom queries
- Global & Website Search — Global search, WebsiteSearch, SQLiteSearch
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/core/frappe-core-search/SKILL.md
Popularity
- Repository stars
- 88
- Repository forks
- 25
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openaec-foundation/frappe_claude_skill_package/frappe-core-search)