1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! OpenSearch backend implementation for TQL.
//!
//! This module provides integration with OpenSearch, enabling TQL queries to be
//! translated to OpenSearch Query DSL and executed against OpenSearch indices.
//!
//! # Features
//!
//! - TQL query execution with `execute_opensearch()` - the main entry point
//! - Client connection management with environment configuration
//! - TQL AST to OpenSearch DSL translation
//! - Field mapping intelligence (keyword, text, multi-field handling)
//! - Post-processing for mutators not supported by OpenSearch (is_private, is_global, geo, etc.)
//! - Automatic scroll API for scan_all mode (unlimited results)
//!
//! # Example
//!
//! ```no_run
//! use tellaro_query_language::opensearch::{OpenSearchConfig, TqlExecutor, ExecuteOptions};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create executor from environment configuration
//! let config = OpenSearchConfig::from_env()?;
//! let executor = TqlExecutor::new(config)?;
//!
//! // Execute TQL query with scan_all for unlimited results
//! let result = executor.execute_opensearch(
//! "source.ip | is_private eq true",
//! "endpoint-*",
//! ExecuteOptions::default()
//! .with_scan_all(true)
//! .with_time_range("2024-01-01T00:00:00Z", "2024-01-02T00:00:00Z"),
//! ).await?;
//!
//! println!("Found {} results (OpenSearch total: {})",
//! result.total, result.opensearch_total);
//! println!("Post-processing applied: {}", result.post_processing_applied);
//!
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use MappingCache;
pub use PostProcessor;
pub use QueryBuilder;