src/Query.php
public function whereExists($name, $exists = true)
    {

        if ($exists) {
            $this->must[] = ["exists" => ["field" => $name]];
        } else {
            $this->must_not[] = ["exists" => ["field" => $name]];
        }

        return $this;
    }
public function whereExists($name, $exists = true)
    {

        if ($exists) {
            $this->must[] = ["exists" => ["field" => $name]];
        } else {
            $this->must_not[] = ["exists" => ["field" => $name]];
        }

        return $this;
    }
public function whereExists ( $ name , $ exists = true ) { if ( $ exists ) { $ this -> must [ ] = [ "exists" => [ "field" => $ name ] ] ; } else { $ this -> must_not [ ] = [ "exists" => [ "field" => $ name ] ] ; } return $ this ; }
Set the query where exists clause
@param      $name
@param bool $exists
@return $this
Set the query where exists clause