Skip to content

Commit

Permalink
Merge pull request #5 from stevenay/master
Browse files Browse the repository at this point in the history
Add Partial-Update Function
  • Loading branch information
timgws committed Jul 12, 2015
2 parents d0072bc + 6bbe687 commit a21b36c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ElasticquentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,21 @@ public function removeFromIndex()
return $this->getElasticSearchClient()->delete($this->getBasicEsParams());
}

/**
* Partial Update to Indexed Document
*
* @return array
*/
public function updateIndex()
{
$params = $this->getBasicEsParams();

// Get our document body data.
$params['body']['doc'] = $this->getIndexDocumentData();

return $this->getElasticSearchClient()->update($params);
}

/**
* Get Search Document
*
Expand Down

0 comments on commit a21b36c

Please sign in to comment.