Overview
The Crawler and SearchEngine microservices function as a pair to deliver comprehensive web content processing:prismeai-crawler
prismeai-searchengine
Installation Prerequisites
Before deploying these microservices, ensure you have access to the following dependencies:ElasticSearch
- Can use the same ElasticSearch instance as the core deployment
- Stores indexed content and search metadata
- Provides the search functionality backend
Redis
- Can use the same Redis instance as the core deployment
- Manages crawl queues and job scheduling
- Facilitates communication between services
- Stores temporary processing data
Configuration
Environment Variables
Configure the Crawler and SearchEngine microservices with the following environment variables:Common Environment Variables
Common Environment Variables
Crawler-Specific Environment Variables
Crawler-Specific Environment Variables
ACK & Reliability Environment Variables
ACK & Reliability Environment Variables
Resource Throttling Environment Variables
Resource Throttling Environment Variables
CONTAINER_CPU_LIMIT_MILLICORES and CONTAINER_MEMORY_LIMIT_BYTES as fallbacks.Document Processing Environment Variables
Document Processing Environment Variables
Resource Considerations
When planning your deployment, consider these resource recommendations:Memory Requirements
- Crawler: Min 1GB, recommended 2GB+
- SearchEngine: Min 1GB, recommended 2GB+
- Scale based on crawl volume and index size
CPU Allocation
- Crawler: Min 0.5 vCPU, recommended 1+ vCPU
- SearchEngine: Min 0.5 vCPU, recommended 1+ vCPU
- Consider additional resources for high request volumes
Storage Needs
- ElasticSearch: Plan for index growth based on content volume
- Redis: Minimal requirements for queue management
- Consider storage class with good I/O performance
Network Configuration
- Internet access for the Crawler service
- Internal network access between services
- Consider bandwidth requirements for crawl activities
Deployment Process
Follow these steps to deploy the Crawler and SearchEngine microservices:Configure Dependencies
-
Verify ElasticSearch connection with:
You should receive a response with version and cluster information
-
Verify Redis connection with:
The response should be “PONG”
Deploy Microservices
values.yaml configuration:Verify Deployment
Running status and be ready (e.g., 1/1).Configure Network Access
- ElasticSearch and Redis internally
- Internet access for the Crawler service
- Access from other Prisme.ai services that will use search functionality
Microservice Testing
After deploying the Crawler and SearchEngine microservices, verify their operation with these steps:Create a Test SearchEngine
id field.Check Crawl Progress
- The
metrics.indexed_pagesfield is greater than 0 - The
metrics.pending_requestsfield indicates active crawling - The
crawl_historysection shows pages that have been processed
Test Search Functionality
results array containing pages from the crawled website that match your search term. Each result should include relevance information and content snippets.Features and Capabilities
Web Crawling
Web Crawling
- Configurable crawl depth: Control how many links deep the crawler will explore
- URL filtering: Include or exclude specific URL patterns
- Rate limiting: Respect website terms of service with configurable crawl rates
- Content extraction: Parse and clean HTML to extract meaningful content
- Metadata extraction: Capture titles, descriptions, and other metadata
- Scheduled crawls: Set up periodic recrawling to keep content fresh
- Robots.txt compliance: Respect website crawling policies
Search Capabilities
Search Capabilities
- Full-text search: Find content across all indexed documents
- Relevance ranking: Surface the most relevant content first
- Content highlighting: Highlight matching terms in search results
- Faceted search: Filter results by metadata fields
- Synonym handling: Find content using related terms
- Language support: Index and search content in multiple languages
- Query suggestions: Support for “did you mean” functionality
- Result snippets: Show context around matching terms
Integration with Prisme.ai
The Crawler and SearchEngine microservices integrate with other Prisme.ai components:Knowledges
- Create knowledge bases from crawled web content
- Enrich existing knowledge bases with web information
- Use search capabilities for better information retrieval
Builder
- Build custom search interfaces using search API
- Integrate search results into workflows
- Trigger crawls programmatically in automations
Agent Creator
- Power research agents with web crawling capabilities
- Create domain-specific search tools
- Develop content discovery applications
Custom Code
- Extend crawling behavior with custom functions
- Process search results with specialized logic
- Create advanced search and discovery experiences
Advanced Configuration
Crawl Configuration Options
Crawl Configuration Options
ElasticSearch Index Management
ElasticSearch Index Management
- Configure index settings like sharding and replication
- Set up index lifecycle policies for managing index growth
- Implement custom analyzers for specialized search needs
- Configure cross-cluster search for large-scale deployments
Performance Tuning
Performance Tuning
- Adjust
MAX_CONTENT_LENto balance comprehensiveness with resource usage - Configure crawler concurrency settings for faster crawling
- Implement ElasticSearch performance optimizations
- Consider Redis caching strategies for frequent searches
- Use horizontal scaling for high-volume crawling and search scenarios
Troubleshooting
Crawling Issues
Crawling Issues
- Network connectivity issues
- Website robots.txt restrictions
- Rate limiting by target websites
- URL pattern configuration excluding relevant pages
- Check crawler logs for specific error messages
- Verify network connectivity to target websites
- Review website robots.txt for restrictions
- Adjust crawl rate settings to avoid being blocked
- Check URL pattern configurations
Search Problems
Search Problems
- Content not properly indexed
- ElasticSearch configuration issues
- Query formatting problems
- Content exceeding maximum length limits
- Verify content was successfully crawled and indexed
- Check ElasticSearch connectivity and health
- Review search query format and parameters
- Check if content exceeds
MAX_CONTENT_LENsetting - Test simple queries to validate basic functionality
Performance Issues
Performance Issues
- Insufficient resources allocated
- ElasticSearch performance problems
- Redis bottlenecks
- Large crawl queues or index sizes
- Monitor resource usage during operations
- Check ElasticSearch performance metrics
- Verify Redis isn’t running out of memory
- Consider scaling resources horizontally or vertically
- Implement more targeted crawling strategies
Tika troubleshooting
Tika troubleshooting
- /app/tika/tika.log
- /app/tika/tika-server.log
Security Considerations
When deploying and using the Crawler and SearchEngine microservices, keep these security considerations in mind:Network Security
- Implement appropriate network policies
- Consider using a dedicated proxy for outbound crawling
- Monitor for unusual traffic patterns
Content Security
- Be mindful of crawling and indexing sensitive content
- Implement URL patterns to exclude sensitive areas
- Consider content filtering before indexing
Authentication
- Secure ElasticSearch and Redis with strong authentication
- Implement API access controls for search endpoints
- Use TLS for all service communications
Compliance
- Respect website terms of service when crawling
- Consider data retention policies for crawled content
- Be aware of copyright implications of content indexing