public function index($record, $stage = 'Stage') {
        if (!$this->enabled) {
            return;
        }
		$document = $record->getElasticaDocument($stage);
		$type = $record->getElasticaType();

        $this->indexDocument($document, $type);
	}
public function index($record, $stage = 'Stage') {
        if (!$this->enabled) {
            return;
        }
		$document = $record->getElasticaDocument($stage);
		$type = $record->getElasticaType();

        $this->indexDocument($document, $type);
	}
public function index ( $ record , $ stage = 'Stage' ) { if ( ! $ this -> enabled ) { return ; } $ document = $ record -> getElasticaDocument ( $ stage ) ; $ type = $ record -> getElasticaType ( ) ; $ this -> indexDocument ( $ document , $ type ) ; }
Either creates or updates a record in the index.

@param Searchable $record
Either creates or updates a record in the index .