/**
  * @param QOM\DescendantNodeInterface $constraint
  *
  * @return string
  */
 public function walkDescendantNodeConstraint(QOM\DescendantNodeInterface $constraint)
 {
     $ancestorPath = $constraint->getAncestorPath();
     if ('/' === $ancestorPath) {
         $ancestorPath = '';
     } elseif (substr($ancestorPath, -1) === '/') {
         throw new InvalidQueryException("Trailing slash in {$ancestorPath}");
     }
     return $this->getTableAlias($constraint->getSelectorName()) . ".path LIKE '" . $ancestorPath . "/%'";
 }
 private function walkDescendantNodeConstraint(QOM\DescendantNodeInterface $constraint)
 {
     $selectorName = $constraint->getSelectorName();
     $path = $constraint->getAncestorPath();
     return sprintf('%s:%s/*', $this->escape(ZendSearchAdapter::IDX_PATH), $path);
 }