include/SugarSearchEngine/Elastic/Elastica/Search.php

Show: inherited
Table of Contents

Elastica search object

Author
Nicolas Ruflin  
Category
Xodoa  
Package
Elastica  

\Elastica_Search

Package: Elastica

Elastica search object

Author
Nicolas Ruflin  
Category
Xodoa  

Properties

Propertyprotected\Elastica_Client  $_client= ''

Details
Type
\Elastica_Client
Propertyprotected  $_indices= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $_types= 'array()'
Default valuearray()Details
Type
n/a

Methods

methodpublic__construct( \Elastica_Client $client ) : void

Constructs search object

Parameters
Name Type Description
$client \Elastica_Client

Client object

methodpublicaddIndex( \Elastica_Index | string $index ) : \Elastica_Search

Adds a index to the list

Parameters
Name Type Description
$index \Elastica_Index | string

Index object or string

Returns
Type Description
\Elastica_Search Current object
methodpublicaddIndices( array $indices = array() ) : \Elastica_Search

Add array of indices at once

Parameters
Name Type Description
$indices array
Returns
Type Description
\Elastica_Search
methodpublicaddType( \Elastica_Type | string $type ) : \Elastica_Search

Adds a type to the current search

Parameters
Name Type Description
$type \Elastica_Type | string

Type name or object

Returns
Type Description
\Elastica_Search Search object
Throws
Exception Description
\Elastica_Exception_Invalid
methodpublicaddTypes( array $types = array() ) : \Elastica_Search

Add array of types

Parameters
Name Type Description
$types array
Returns
Type Description
\Elastica_Search
methodpubliccreate( \Elastica_Searchable $searchObject ) : void
static

Creates new search object

Parameters
Name Type Description
$searchObject \Elastica_Searchable
methodpublicgetClient( ) : \Elastica_Client

Returns
Type Description
\Elastica_Client Client object
methodpublicgetIndices( ) : \string[]

Returns
Type Description
\string[] List of index names
methodpublicgetPath( ) : string

Combines indices and types to the search request path

Returns
Type Description
string Search path
methodpublicgetTypes( ) : \string[]

Returns
Type Description
\string[] List of types
methodpublicsearch( mixed $query, int $limit = 0 ) : \Elastica_ResultSet

Search in the set indices, types

Parameters
Name Type Description
$query mixed
$limit int

OPTIONAL

Returns
Type Description
\Elastica_ResultSet
Documentation was generated by DocBlox 0.18.1.