Skip to content

Commit 66a9cb4

Browse files
committed
Merge branch 'master' of github.com:Elasticquent/Elasticquent
2 parents 945ad4f + a21b36c commit 66a9cb4

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/ElasticquentTrait.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
*/
1212
trait ElasticquentTrait
1313
{
14-
/**
15-
* @var array mapping properties
16-
*/
17-
public $mappingProperties;
1814

1915
/**
2016
* Uses Timestamps In Index
@@ -337,6 +333,21 @@ public function removeFromIndex()
337333
return $this->getElasticSearchClient()->delete($this->getBasicEsParams());
338334
}
339335

336+
/**
337+
* Partial Update to Indexed Document
338+
*
339+
* @return array
340+
*/
341+
public function updateIndex()
342+
{
343+
$params = $this->getBasicEsParams();
344+
345+
// Get our document body data.
346+
$params['body']['doc'] = $this->getIndexDocumentData();
347+
348+
return $this->getElasticSearchClient()->update($params);
349+
}
350+
340351
/**
341352
* Get Search Document
342353
*

0 commit comments

Comments
 (0)