Overview
Logical operators enable complex query logic by combining multiple conditions. They work with all other GenosDB operators to create sophisticated filters.Operators
$and - All Conditions Must Match
Matches nodes where all specified conditions are true.**Implicit and:
$or - Any Condition Must Match
Matches nodes where at least one condition is true.$not - Negation
Matches nodes where the condition is NOT true.Examples
Multiple Conditions (AND)
Alternative Conditions (OR)
Negation Examples
Combining AND + OR
Complex Nested Logic
Age Range with OR
Multi-Field Search
Status Filtering
Date Range Queries
Permission-Based Queries
Product Filters
Real-Time Monitoring
Excluding Multiple Values
Complex Graph Queries
Operator Precedence
GenosDB evaluates operators in this order:- Field-level operators (lt, $eq, etc.)
- $not (negation)
- $and (conjunction)
- $or (disjunction)
Best Practices
Related Operators
- Comparison Operators - ne, lt, etc.
- Text Search - regex
- Graph Traversal - $edge