langchain.retrievers.self_query.opensearch
.OpenSearchTranslator¶
- class langchain.retrievers.self_query.opensearch.OpenSearchTranslator[source]¶
Translate OpenSearch internal query domain-specific language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
Subset of allowed logical operators.
Methods
__init__
()visit_comparison
(comparison)Translate a Comparison.
visit_operation
(operation)Translate an Operation.
visit_structured_query
(structured_query)Translate a StructuredQuery.
- __init__()¶
- visit_comparison(comparison: Comparison) Dict [source]¶
Translate a Comparison.
- visit_structured_query(structured_query: StructuredQuery) Tuple[str, dict] [source]¶
Translate a StructuredQuery.