A class that extends BaseTranslator to translate structured queries
into functional filters.
class FunctionalTranslatorconst functionalTranslator = new FunctionalTranslator();
const relevantDocuments = await functionalTranslator.getRelevantDocuments(
"Which movies are rated higher than 8.5?",
);Formats a given function (either an operator or a comparator) into a string.
Returns the allowed comparators for a given data type.
Returns a function that performs a comparison based on the provided comparator.
Returns a function that performs an operation based on the provided operator.
Merges two filters into one, based on the specified merge type.
Visits the comparison part of a structured query and translates it into a functional filter.
Visits the operation part of a structured query and translates it into a functional filter.
Visits a structured query and translates it into a functional filter.