OP_TYPE_CREATE
OP_TYPE_CREATE
Single document stored in elastic search.
This function can be used to handle params for queries, filter
$_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  | 
                            
__construct(integer|string $id = '', array|string $data = array(), \Elastica\Type|string $type = '', \Elastica\Index|string $index = '')
Creates a new document.
| integer|string | $id | OPTIONAL $id Id is create if empty  | 
                            
| array|string | $data | OPTIONAL Data array  | 
                            
| \Elastica\Type|string | $type | OPTIONAL Type name  | 
                            
| \Elastica\Index|string | $index | OPTIONAL Index name  | 
                            
addFile(string $key, string $filepath, string $mimeType = '') : $this
Adds a file to the index.
To use this feature you have to call the following command in the
elasticsearch directory:
./bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0
This installs the tika file analysis plugin. More infos about supported formats
can be found here: http://tika.apache.org/0.7/formats.html
| string | $key | Key to add the file to  | 
                            
| string | $filepath | Path to add the file  | 
                            
| string | $mimeType | OPTIONAL Header mime type  | 
                            
create(array|\Elastica\Document  $data) : self
                
| array|\Elastica\Document | $data |