`SELECT ... WHERE match(key, '^prefix...')`
should use index similarly to
`SELECT ... WHERE key LIKE 'prefix%'`
if (type == Node::Type::And)
        {
            
            if (left->type == Node::Type::False)
                return left;
            
            if (right->type == Node::Type::False)
                return right;
            
            if (left->type == Node::Type::True)
                return right;
            
            if (right->type == Node::Type::True)
                return left;
        }
        if (type == Node::Type::Or)
        {
            
            if (left->type == Node::Type::False)
                return right;
            
            if (right->type == Node::Type::False)
                return left;
            
            if (left->type == Node::Type::True)
                return left;
            
            if (right->type == Node::Type::True)
                return right;
        }