Search Methods
There are three ways to search documentation:AI Assistant
Let your AI query documentation automatically
Web Interface
Test queries at http://localhost:6280
CLI
Search from command line
Basic Search
CLI Search
- Simple Query
- With Version
- All Libraries
MCP Tool Search
From your AI assistant:Search Ranking
Results are ranked using a hybrid approach:Vector Search
Semantic similarity using embeddings (if configured)Finds conceptually related content even without exact keyword matches
Vector search requires an embedding model to be configured. Without it, only keyword search is used.
Version Matching
Control which versions are searched:Version Patterns
Match specific version:
18.3.1, 3.12.0Match latest within range:
18.x, 3.x18.x matches latest 18.x.x versionMatch most recent version:
latestSearch all versions:
* or omit versionExamples
- Exact Version
- X-Range
- Latest
- All Versions
Query Formulation
Best Practices
Be Specific
“useState hook initialization” is better than “hooks”
Use Natural Language
“How to handle authentication” works well with semantic search
Include Context
“React server components data fetching” vs just “data fetching”
Technical Terms
Include API names, class names, or method names
Query Examples
API Usage
API Usage
Good Queries:
- “useState hook initial state”
- “express middleware error handling”
- “pandas DataFrame merge join”
- “state” (too broad)
- “how to use” (too generic)
Configuration
Configuration
Good Queries:
- “Next.js middleware configuration”
- “Django database settings production”
- “TypeScript tsconfig strict mode”
- “configuration” (too broad)
- “settings” (too generic)
Troubleshooting
Troubleshooting
Good Queries:
- “React hydration mismatch error”
- “Python ImportError module not found”
- “PostgreSQL connection pool exhausted”
- Error messages
- Specific symptoms
- Component or module names
Search Parameters
Search query text
Library name to search within (omit to search all)
Version pattern to match (
18.x, latest, *)Maximum number of results to return
Number of results to skip (for pagination)
Search Results
Each result includes:Document title
Text excerpt with matched content
Source URL of the documentation
Library name
Version number
Relevance score (higher is better)
Additional metadata (file path, document type, etc.)
Example Output
Advanced Search
Multi-Library Search
Search across multiple libraries:Version Comparison
Find differences between versions:- Old Version
- New Version
Pagination
Retrieve more results:Performance Optimization
Enable Embeddings
Configure an embedding model for semantic search
Specific Libraries
Search within specific libraries rather than all
Version Patterns
Use version patterns to narrow search scope
Limit Results
Set appropriate
--limit to reduce processing timeSearch Configuration
Tune search behavior:Weight for vector search in RRF (0.0 to 1.0)
Retrieve 3x more candidates before final ranking
Troubleshooting
No Results Found
No Results Found
Problem: Search returns empty resultsSolutions:
- Verify library is indexed:
npx @arabold/docs-mcp-server@latest list - Check version pattern matches indexed versions
- Try broader query terms
- Search all libraries (omit
--library) - Check indexing completed successfully
Irrelevant Results
Irrelevant Results
Problem: Results don’t match query intentSolutions:
- Make query more specific
- Include more context terms
- Enable embedding model for semantic search
- Adjust
search.vectorWeightconfiguration - Use exact phrases in quotes
Version Not Found
Version Not Found
Problem: Error: “No versions found matching pattern”Solutions:
- List available versions:
npx @arabold/docs-mcp-server@latest list - Use
--version *to search all versions - Check version pattern syntax (
18.xnot18.X) - Verify version was indexed successfully
Slow Search
Slow Search
Problem: Search takes too longSolutions:
- Reduce
--limit(default: 10) - Search specific library instead of all
- Use version pattern to narrow scope
- Check database size and vacuum if needed
Search from AI Assistant
Your AI assistant can search documentation automatically:Example Prompts
Direct Search
Direct Search
Prompt:
“Search the React documentation for information about the useEffect hook cleanup function”AI uses
search_docs tool with appropriate queryVersion-Specific
Version-Specific
Prompt:
“What’s new in React 18 regarding Suspense? Check the React 18.x documentation.”AI searches with
version: "18.x" parameterMulti-Step
Multi-Step
Prompt:
“How do I implement authentication in Express? First list what Express versions we have, then search the latest.”AI uses
list_libraries then search_docsComparison
Comparison
Prompt:
“Compare how routing works in Next.js 13 versus Next.js 14”AI performs multiple searches with different version patterns
Next Steps
Embedding Models
Configure semantic search for better results
CLI Reference
Complete search command reference
MCP Search Tool
Using search from AI assistants
Configuration
Tune search parameters and behavior
