# SearXNG Configuration Verified β
## Your Configuration Summary
### Enabled Engines: 13 Total
#### π General Web (3)
- β
DuckDuckGo - Primary general search
- β
Brave - Backup general search
- β
Qwant - Additional coverage
#### π» Code & Developer (4) β CRITICAL
- β
GitHub - Code repositories
- β
GitLab - More code repos
- β
Codeberg - Open source repos
- β
Stack Overflow - Code Q&A
#### π Documentation (2)
- β
MDN - Web documentation
- β
Wikipedia - General knowledge
#### π° Tech Community (2)
- β
Reddit - Discussions & tutorials
- β
Hacker News - Tech articles
#### π¦ Package Registries (3)
- β
npm - JavaScript packages
- β
PyPI - Python packages
- β
Crates.io - Rust packages
### Optimizations Applied
- β
Autocomplete: DuckDuckGo
- β
IT Category: All code engines included
- β
Categories: Properly configured
---
## What This Means for search_examples
### Before Configuration
β Only MDN results
β No code examples
β No Stack Overflow
β No GitHub repos
### After Configuration β
β
GitHub repositories with code
β
Stack Overflow Q&A
β
Reddit discussions
β
Hacker News articles
β
MDN documentation
β
GitLab & Codeberg repos
---
## Expected Results Now
### Query: "React hooks examples"
**Before:**
```
1. Site glossary - MDN
2. XSS documentation - MDN
3. HTTP headers - MDN
```
**After (Expected):**
```
1. [GitHub] facebook/react - Hooks documentation
2. [Stack Overflow] How to use React hooks?
3. [Article] React Hooks Tutorial - Reddit
4. [GitHub] awesome-react-hooks - Collection
5. React Hooks - MDN
```
### Query: "Rust async await examples"
**Before:**
```
1. "Site" glossary - MDN
2. Generic docs - MDN
```
**After (Expected):**
```
1. [GitHub] tokio-rs/tokio - Async runtime
2. [Stack Overflow] Rust async/await patterns
3. [GitHub] async-book examples
4. [Article] Rust async tutorial - Reddit
5. [Hacker News] Async Rust discussion
```
### Query: "FastAPI dependency injection"
**Before:**
```
1. SQL injection glossary - MDN
2. HTTP 424 status - MDN
```
**After (Expected):**
```
1. [GitHub] tiangolo/fastapi - Official repo
2. [Stack Overflow] FastAPI dependency injection
3. [GitHub] fastapi-users examples
4. [Article] FastAPI DI tutorial - Reddit
5. FastAPI docs - MDN (if available)
```
---
## Testing Instructions
### 1. Restart Your SearXNG Instance
```bash
docker restart searxng
# or
systemctl restart searxng
```
### 2. Test with MCP Tool
```python
# Test 1: Code search
search_examples(
query="React hooks examples",
content_type="code",
max_results=5
)
# Test 2: Article search
search_examples(
query="Rust async tutorial",
content_type="articles",
max_results=5
)
# Test 3: Mixed search
search_examples(
query="FastAPI dependency injection",
content_type="both",
max_results=5
)
```
### 3. Verify Results
You should now see:
- β
Multiple different domains (github.com, stackoverflow.com, reddit.com)
- β
Source indicators ([GitHub], [Stack Overflow], [Article])
- β
Relevant code examples and tutorials
- β
No more "all MDN" results
---
## What Changed
### search_examples Tool Behavior
**Query Enhancement (Already Working):**
- Code searches: Adds `site:github.com OR site:stackoverflow.com`
- Article searches: Adds `tutorial OR guide OR article`
- Uses IT category for technical content
**Now Effective Because:**
- SearXNG can actually access GitHub β
- SearXNG can actually access Stack Overflow β
- SearXNG can access Reddit & Hacker News β
- IT category has all these engines enabled β
### Warnings (Should No Longer Appear)
The tool's warning messages should rarely trigger now:
```
βΉοΈ Note: All results are from the same source...
```
This warning only appears when all results come from one domain. With your new config, results should be diverse!
---
## Performance Expectations
### Response Time
- Should remain fast (< 2 seconds)
- Multiple engines running in parallel
- SearXNG aggregates efficiently
### Result Quality
- **High relevance** - Multiple sources voting
- **Diversity** - GitHub, Stack Overflow, Reddit, etc.
- **Fresh content** - Time filtering works when supported
- **Code-focused** - IT category prioritizes developer content
### Rate Limits
All enabled engines are FREE with no rate limits for reasonable use:
- GitHub: Public API, no auth needed for search
- Stack Overflow: Free, no limits
- Reddit: Free, no API key
- DuckDuckGo/Brave/Qwant: Free
- npm/PyPI/Crates: Free
---
## Troubleshooting
### Still seeing only MDN?
1. **Restart SearXNG** (required for config changes)
2. **Check settings.yml** was saved correctly
3. **Verify IT category** includes code engines
4. **Test directly** in SearXNG UI (http://localhost:2288)
### Slow searches?
1. **Reduce engines** - Start with 8 core ones
2. **Disable unused categories** - Focus on IT category
3. **Check timeouts** in settings.yml
### Some engines not working?
1. **Network issues** - Some sites blocked?
2. **Engine down** - GitHub/SO occasionally has issues
3. **Check logs** - SearXNG logs show engine errors
---
## Optimal Usage Patterns
### For Code Examples
```python
search_examples(
query="specific library/framework + feature",
content_type="code", # GitHub + Stack Overflow
max_results=5
)
```
### For Tutorials
```python
search_examples(
query="technology + tutorial/guide",
content_type="articles", # Reddit + HN + blogs
max_results=5
)
```
### For Comprehensive Research
```python
search_examples(
query="technology + concept",
content_type="both", # All sources
max_results=10
)
```
---
## Success Metrics
Your configuration is successful if:
- β
Queries return 3+ different domains
- β
GitHub repos appear in code searches
- β
Stack Overflow Q&A appears in results
- β
Reddit/HN articles appear for tutorials
- β
Results are relevant to query
- β
No "all same source" warnings
---
## Next Steps
1. **Restart SearXNG** if not already done
2. **Test with our MCP tool** - Try the example queries above
3. **Verify diversity** - Check multiple domains in results
4. **Adjust if needed** - Enable/disable engines based on results
5. **Enjoy high-quality code search!** π
---
**Your SearXNG is now optimized for the search_examples tool!**
The tool will automatically leverage all these search engines when you use it.
No changes needed to the MCP server - it will just work better now!