LANG_MOUSTACHE
LANG_MOUSTACHE
Base class for Script object.
Wherever scripting is supported in the Elasticsearch API, scripts can be referenced as "inline", "id" or "file".
$_upsert : \Elastica\Document
setType(\Elastica\Type|string  $type) : $this
                Sets the document type name.
| \Elastica\Type|string | $type | Type name  | 
                            
setIndex(\Elastica\Index|string  $index) : $this
                Sets the document index name.
| \Elastica\Index|string | $index | Index name  | 
                            
setUpsert(\Elastica\Document|array  $data) : $this
                
| \Elastica\Document|array | $data | 
getUpsert() : \Elastica\Document
getOptions(array $fields = array(), boolean $withUnderscore = false) : array
| array | $fields | if empty array all options will be returned, field names can be either with underscored either without, i.e. _percolate, routing  | 
                            
| boolean | $withUnderscore | should option keys contain underscore prefix  | 
                            
create(string|array|\Elastica\Script\AbstractScript  $data) : \Elastica\Script\Script|\Elastica\Script\ScriptId
                Factory to create a script object from data structure (reverse toArray).
| string|array|\Elastica\Script\AbstractScript | $data | 
__construct(array|null $params = null, string|null $lang = null, string|null $documentId = null)
| array|null | $params | |
| string|null | $lang | Script language, see constants  | 
                            
| string|null | $documentId | Document ID the script action should be performed on (only relevant in update context)  |