Skip to content

OSSS.ai.agents.historian.resilient_search

Resilient search processing for the Historian agent.

This module provides error-recovery mechanisms for search operations, handling validation failures and ensuring continuous operation even when individual documents fail processing.

FailedDocument dataclass

Record of a document that failed processing.

ProcessingStats dataclass

Statistics for batch processing operations.

record_failure(error_type, error_message)

Record a failure by type.

DocumentProcessingReport dataclass

Comprehensive report of document validation and processing results.

BatchResult dataclass

Result of processing a batch of documents.

ResilientSearchProcessor

Fault-tolerant search processing with comprehensive error recovery.

process_search_with_recovery(search_interface, query, limit=10) async

Execute search with comprehensive error recovery.

This replaces the direct search call to handle validation errors gracefully.