Свойство | Тип | Описание | |
---|---|---|---|
$_index | Index. | ||
$_name | Type name. | ||
$_serializer | A callable that serializes an object passed to it |
Метод | Описание | |
---|---|---|
__construct ( |
Creates a new type object inside the given index. | |
addDocument ( Document $doc ) : |
Adds the given document to the search index. | |
addDocuments ( array $docs ) : |
Uses _bulk to send documents to the server. | |
addObject ( $object, Document $doc = null ) : |
||
addObjects ( array $objects ) : |
Uses _bulk to send documents to the server. | |
count ( string | array | |
Count docs by query. | |
createDocument ( string $id = '', array | string $data = [] ) : Document | ||
createSearch ( string | array | |
Create search object. | |
deleteById ( integer | string $id, array $options = [] ) : |
Deletes an entry by its unique identifier. | |
deleteByQuery ( |
Deletes entries in the db based on a query. | |
deleteDocument ( Document $document ) : |
||
deleteDocuments ( array $docs ) : |
Uses _bulk to delete documents from the server. | |
deleteIds ( array $ids, string | boolean $routing = false ) : |
Deletes the given list of ids from this type. | |
exists ( ) : boolean | Checks if the given type exists in Index. | |
getDocument ( string $id, array $options = [] ) : |
Get the document from search index. | |
getIndex ( ) : |
Returns index client. | |
getMapping ( ) : array | Returns current mapping for the given type. | |
getName ( ) : string | Returns the type name. | |
request ( string $path, string $method, array $data = [], array $query = [] ) : |
Makes calls to the elasticsearch server based on this type. | |
search ( string | array | |
Do a search on this type. | |
setMapping ( |
Sets value type mapping for this type. | |
setSerializer ( array | string $serializer ) | Sets the serializer callable used in addObject. | |
updateDocument ( |
Update document, using update script. Requires elasticsearch >= 0.19.0. | |
updateDocuments ( array $docs ) : |
Uses _bulk to send documents to the server. |
public __construct ( |
||
$index | Index Object | |
$name | string | Type name |
public addDocument ( Document $doc ) : |
||
$doc | Document | Document with data |
Результат |
public addDocuments ( array $docs ) : |
||
$docs | array | Array of Elastica\Document |
Результат |
public addObject ( $object, Document $doc = null ) : |
||
$object | ||
$doc | Document | |
Результат |
public addObjects ( array $objects ) : |
||
$objects | array | |
Результат |
public createSearch ( string | array | |
||
$query | string | array | |
Array with all query data inside or a Elastica\Query object |
$options | integer | array | OPTIONAL Limit or associative array of options (option=>value) |
$builder | Elastica\ResultSet\BuilderInterface | |
Результат |
public deleteByQuery ( |
||
$query | Query object | |
$options | array | Optional params |
Результат |
public deleteDocument ( Document $document ) : |
||
$document | Document | |
Результат |
public deleteDocuments ( array $docs ) : |
||
$docs | array | Array of Elastica\Document |
Результат |
public getDocument ( string $id, array $options = [] ) : |
||
$id | string | Document id |
$options | array | Options for the get request. |
Результат |
public getIndex ( ) : |
||
Результат | Index object |
public getMapping ( ) : array | ||
Результат | array | Current mapping |
public search ( string | array | |
||
$query | string | array | |
Array with all query data inside or a Elastica\Query object |
$options | integer | array | OPTIONAL Limit or associative array of options (option=>value) |
Результат | with all results inside |
public setMapping ( |
||
$mapping | Elastica\Type\MappingType object or property array with all mappings | |
Результат |
public setSerializer ( array | string $serializer ) | ||
$serializer | array | string | @see \Elastica\Type::_serializer |
public updateDocument ( |
||
$data | Document with update data | |
$options | array | array of query params to use for query. For possible options check es api |
Результат |
public updateDocuments ( array $docs ) : |
||
$docs | array | Array of Elastica\Document |
Результат |