src/Managers/DocumentManager.php
/**
     * Update Elasticsearch document for item. Create it if it doesn't exist.
     *
     * @param mixed $item
     * @return array Elasticsearch response.
     */
Update Elasticsearch document for item. Create it if it doesn't exist.
@param mixed $item
@return array Elasticsearch response.
Update Elasticsearch document for item . Create it if it doesn ' t exist . @param mixed $item @return array Elasticsearch response .
public function updateOrCreate($item)
    {
        if ($this->exists($item)) {
            return $this->update($item);
        }
        return $this->create($item);
    }
public function updateOrCreate ( $ item ) { if ( $ this -> exists ( $ item ) ) { return $ this -> update ( $ item ) ; } return $ this -> create ( $ item ) ; }
Update Elasticsearch document for item.
Update Elasticsearch document for item .