public function onVisitNode(VisitNodeEvent $event)
    {
        // any search?
        if (!$event->getNode() instanceof SearchNode || $event->getNode()->isVisited()) {
            return $event;
        }

        $this->node = $event->getNode();
        $this->builder = $event->getBuilder();
        $this->expr = $event->isExpr();
        $this->className = $event->getClassName();

        // which mode?
        if ($this->getSearchMode() === self::SEARCHMODE_SOLR) {
            $this->handleSearchSolr();
        } else {
            $this->handleSearchMongo();
        }

        $event->setBuilder($this->builder);
        $event->setNode($this->node);
        $event->setExprNode($this->exprNode);

        return $event;
    }