The search functionality has been improved to support intelligent AND/OR logic.
Space-separated words were treated as a single pattern:
scmd> postgresql replication slave
→ Searched for the exact phrase "postgresql replication slave"
→ No results (because no record has this exact phrase)
Space-separated words use AND logic - all words must be present:
scmd> postgresql replication slave
→ Searches for records containing ALL three words
→ Finds ID 786 and ID 787 (both contain all three words)
All words must be present in the command or description.
scmd> postgresql replication slave
Finds:
✓ ID 786: "Postgresql Replication check on SLAVE Server..."
✓ ID 787: "Postgresql Replication delay check on SLAVE Server..."
Does NOT find:
✗ ID 774: Has "postgresql" and "replication" but not "slave"
✗ ID 785: Has "postgresql" and "replication" but not "slave"
Any pattern can match - unchanged from before.
scmd> docker,kubernetes,postgresql
Finds:
✓ All docker commands
✓ All kubernetes commands
✓ All postgresql commands
You can mix both!
scmd> postgresql replication slave,docker backup
Finds:
✓ Records with (postgresql AND replication AND slave)
✓ OR records with (docker AND backup)
Search: postgresql replication
Found 4 results:
- ID 774: Postgresql replication backup...
- ID 785: Postgresql Replication check on Master...
- ID 786: Postgresql Replication check on SLAVE...
- ID 787: Postgresql Replication delay check on SLAVE...
Search: postgresql replication slave
Found 2 results:
- ID 786: Postgresql Replication check on SLAVE...
- ID 787: Postgresql Replication delay check on SLAVE...
Search: postgresql replication slave delay
Found 1 result:
- ID 787: Postgresql Replication delay check on SLAVE...
Search: docker
Found 500+ results (too many!)
Search: docker logs
Found 15 results (better!)
Search: docker logs follow
Found 3 results (perfect!)
Search: docker,kubernetes
Found 200+ results (all docker OR kubernetes commands)
Search: docker logs,kubernetes logs
Found 20 results (docker log commands OR kubernetes log commands)
Before:
scmd> postgresql replication slave
→ No results (too specific as a phrase)
After:
scmd> postgresql replication slave
→ 2 results (exactly what you wanted!)
Start broad, then narrow down:
scmd> postgresql → 100 results
scmd> postgresql backup → 10 results
scmd> postgresql backup docker → 3 results
Matches how people naturally think:
- "Find commands about postgresql replication on slave"
- All three concepts should be present
- Use spaces to narrow (AND)
- Use commas to broaden (OR)
- Combine both for complex queries
Space-separated (AND):
SELECT * FROM scmd
WHERE (key ILIKE '%postgresql%' OR data ILIKE '%postgresql%')
AND (key ILIKE '%replication%' OR data ILIKE '%replication%')
AND (key ILIKE '%slave%' OR data ILIKE '%slave%')Comma-separated (OR):
SELECT * FROM scmd
WHERE (key ILIKE '%docker%' OR data ILIKE '%docker%')
OR (key ILIKE '%kubernetes%' OR data ILIKE '%kubernetes%')All searches are case-insensitive using PostgreSQL's ILIKE:
postgresql = POSTGRESQL = PostgreSQL = PoStGrEsQl
Uses wildcard matching (%) for flexibility:
replic → matches replication, replica, replicate, etc.
If you have scripts using the traditional CLI, they will benefit from the improved search:
Before:
scmd.exe --search "postgresql replication"
# Might have missed some resultsAfter:
scmd.exe --search "postgresql replication"
# Now finds all records with both wordsComma-separated searches work exactly as before:
scmd.exe --search "docker,kubernetes"
# Same behavior - OR logicAdd more specific words:
scmd> docker
→ Too many results
scmd> docker compose logs
→ Much better!
Remove some words:
scmd> postgresql replication slave delay master backup
→ No results (too specific)
scmd> postgresql replication slave delay
→ Found 1 result!
Use commas:
scmd> postgresql,mysql,mongodb
→ All database commands
| Feature | Before | After |
|---|---|---|
| Space-separated | Single phrase search | AND logic (all words) |
| Comma-separated | OR logic | OR logic (unchanged) |
| Precision | Less precise | More precise |
| Flexibility | Limited | High |
| Natural language | Partial | Full support |
The search is now smarter and more intuitive! 🎉
- SEARCH_GUIDE.md - Complete search guide
- INTERACTIVE_MODE.md - Interactive mode documentation
- FEATURES.md - All features overview