Intelligent VS Code extension for contextual search with ripgrep, Solr indexing, and AI-powered summaries.
- Fast Text Search: Uses ripgrep for lightning-fast text search across your workspace
- Interactive Search Settings: Fine-tune search results with customizable settings panels
- Ripgrep Settings: Adjust context lines, file patterns, and result limits
- Solr Settings: Control result scoring, sorting, file filtering, and session management
- Intelligent Indexing: Optional Solr integration for advanced search and indexing capabilities
- AI-Powered Summaries: Get contextual summaries of search results (when enabled)
- Symbol Search: Find functions, classes, and other code symbols quickly
- Rich Results: Interactive search results panel with file navigation
- Settings Persistence: Search settings are automatically saved and applied to new searches
- Install the extension from the VS Code marketplace
- (Optional) Set up Solr for advanced indexing - see Configuration Guide
- Make sure ripgrep is installed on your system
To get the best highlighting experience, configure Solr with optimized settings:
# Windows
npm run configure-solr
# Linux/Mac
npm run configure-solr-unix
See the detailed configuration guide: SOLR_HIGHLIGHTING_CONFIG.md
- π― Advanced highlighting with phrase and proximity matching
- π Smart snippets with context-aware fragment generation
- β‘ Better performance with optimized analyzers and field types
- π¨ Rich visual formatting with multiple highlighting styles
- π‘οΈ XSS protection with safe HTML rendering
- Press
Ctrl+Shift+F
(orCmd+Shift+F
on Mac) to open Smart Search - Enter your search query and press Enter
- Results will appear in a dedicated panel
Smart Search now supports both simple queries and advanced Solr field-specific queries:
function β Searches in configured default fields (content_all, code_all)
"exact phrase" β Phrase search across default fields
test AND bug β Boolean search across default fields
file_name:*.js β Find JavaScript files
match_text:function AND file_extension:ts β Functions in TypeScript files
ai_summary:"bug fix" β Files with "bug fix" in AI summary
relevance_score:[50 TO *] β High relevance results only
line_number:[1 TO 100] β Results from first 100 lines
file_path:src/services/*.ts β Files in services directory
search_session_id:session_* β Results from specific sessions
- Content Fields:
content_all
,code_all
,match_text
,full_line
,ai_summary
- File Fields:
file_name
,file_path
,file_extension
- Metadata Fields:
line_number
,column_number
,relevance_score
,file_size
- Session Fields:
search_session_id
,original_query
,search_timestamp
- Boolean Fields:
case_sensitive
,whole_word
# Find React components
file_name:*Component.tsx
# Find high-value functions
match_text:function AND relevance_score:[75 TO *]
# Find recent bug fixes
ai_summary:bug AND search_timestamp:[NOW-7DAY TO NOW]
# Find large files with specific content
match_text:import AND file_size:[10000 TO *]
# Complex query combining multiple fields
file_extension:js AND match_text:async AND line_number:[1 TO 50]
Both ripgrep and Solr result panels include collapsible settings panels for fine-tuning search results:
- Context Lines Before/After: Control how many lines of context to show around matches (0-100, default: 30)
- Include/Exclude Files: Filter results by file patterns (glob patterns, comma-separated)
- Max Results: Limit the number of results displayed (1-1000, default: 100)
- Max Results: Control the maximum number of results returned (1-1000, default: 100)
- Min Score: Filter results by minimum relevance score (0-100, default: 0)
- Sort Order: Choose how results are sorted (relevance, date, filename, line number)
- File Types: Filter by specific file extensions (comma-separated, e.g., "js,ts,py")
- Exclude Patterns: Exclude files matching certain patterns (e.g., "test,spec,node_modules")
- Session Filter: Search within a specific search session
All search settings are automatically persisted and will be applied to new searches until manually changed or reset.
- Search in Results: Enable "Search in Results" mode to search within previously indexed ripgrep results
- Session Management: When using Solr, each search creates a session that can be filtered and searched separately
- Use the command palette (
Ctrl+Shift+P
) and run "Smart Search: Index Workspace" - This will index your workspace for faster searches (requires Solr)
The extension can be configured through VS Code settings:
smart-search.solrUrl
: Solr server URL (default: http://localhost:8983/solr)smart-search.enableAISummaries
: Enable AI-powered summaries (default: true)smart-search.maxResults
: Maximum number of search results (default: 100)smart-search.defaultSolrFields
: Default Solr fields for simple queries (default: "content_all,code_all")
You can customize which fields are searched by default for simple queries:
{
"smart-search.defaultSolrFields": "content_all,code_all,ai_summary"
}
Examples:
"content_all"
- Search only in content"content_all,code_all"
- Search in content and code (default)"match_text,file_name,file_path"
- Search in specific fields only"content_all,code_all,ai_summary"
- Include AI summaries in default search
- VS Code 1.74.0 or higher
- ripgrep (for text search)
- Apache Solr (optional, for advanced indexing)
See the Development Guide for information on building and contributing to this extension.
This project is licensed under the MIT License - see the LICENSE file for details.