Elasticsearch\Bulk::count PHP Метод

count() публичный Метод

count all pending operations
public count ( ) : integer
Результат integer
    public function count()
    {
        return count($this->operations);
    }

Usage Example

Пример #1
0
 /**
  * commit a bulk-transaction
  * @return array
  * @throws Exception
  */
 public function commitBulk()
 {
     if ($this->bulk && $this->bulk->count()) {
         $result = $this->bulk->commit();
         $this->bulk = null;
         return $result;
     }
     throw new Exception('bulk error!');
 }