Quick Start¶
Get Polymathy running and make your first search request.
1. Configure Environment¶
Create a .env file in the project root:
# Required: SearxNG search endpoint
SEARXNG_URL=http://your-searxng-instance/search
# Required: Content processor service
PROCESSOR_URL=http://your-processor-service/v1/process
# Optional: Server configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=8080
2. Start the Service¶
Run Polymathy:
You should see output like:
3. Make Your First Query¶
Using curl:
Example response:
{
"0": ["https://example.com/rust-intro", "Rust is a systems programming language..."],
"1": ["https://example.com/rust-tutorial", "Getting started with Rust requires..."],
"2": ["https://another-site.com/rust", "The Rust programming language focuses on..."]
}
4. Explore the API Documentation¶
Polymathy includes multiple API documentation UIs:
| UI | URL |
|---|---|
| Swagger UI | http://localhost:8080/swagger |
| ReDoc | http://localhost:8080/redoc |
| RapiDoc | http://localhost:8080/rapidoc |
| Scalar | http://localhost:8080/scalar |
| OpenAPI JSON | http://localhost:8080/openapi.json |
Understanding the Response¶
The search endpoint returns a map where:
- Keys are sequential chunk IDs (0, 1, 2, ...)
- Values are tuples of
[source_url, content_chunk]
Each content chunk is a semantic segment of the original page, typically around 100 words.
Next Steps¶
- Configuration - Learn about all configuration options
- API Endpoints - Full API reference
- Examples - More usage examples