include/SugarSearchEngine/Elastic/SugarSearchEngineElastic.php

Show: inherited
Table of Contents

\SugarSearchEngineElastic

Package:
Parent(s)
\SugarSearchEngineAbstractBase < \SugarSearchEngineInterface

Constants

Constant  DEFAULT_INDEX_TYPE = 'SugarBean'
Constant  WILDCARD_CHAR = '*'
Constant  MAX_BULK_THRESHOLD = 100
inherited

The max number of documents to bulk insert at a time

Inherited from: \SugarSearchEngineAbstractBase::MAX_BULK_THRESHOLD

Properties

Propertyprivate  $_client= 'null'
Default valuenullDetails
Type
n/a
Propertyprivate  $_config= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotectedarray  $_documents= 'array()'
Default valuearray()Details
Type
array
Inherited_from
\SugarSearchEngineAbstractBase::$$_documents  
Propertyprivate  $_indexName= '""'
Default value""Details
Type
n/a
Propertyprivate  $_indexType= ''SugarBean''
Default value'SugarBean'Details
Type
n/a

Methods

methodpublic__construct(  $params = array() ) : void

Parameters
Name Type Description
$params
methodpublic__destruct( ) : void
inherited

Bulk insert any documents that have been marked for bulk insertion.

Inherited from: \SugarSearchEngineAbstractBase::__destruct()
methodprotectedaddRecordsToQueue(  $records ) : void
Parameters
Name Type Description
$records
methodpublicbulkInsert(  $docs ) : void

Parameters
Name Type Description
$docs
methodprotectedcanAppendWildcard(  $queryString ) : void

Parameters
Name Type Description
$queryString
methodprotectedcheckException(  $e ) : void
Parameters
Name Type Description
$e
methodprotectedcleanTeamSetID(  $teamSetID ) : mixed

Remove the '-' from our team sets.

Parameters
Name Type Description
$teamSetID
Returns
Type Description
mixed
methodprotectedconstructHighlightArray(  $fields,  $options ) : void

Parameters
Name Type Description
$fields
$options
methodprotectedconstructMainFilter(  $finalTypes ) : void

Parameters
Name Type Description
$finalTypes
methodprotectedconstructModuleLevelFilter(  $module ) : void

Parameters
Name Type Description
$module
methodprotectedconstructTeamFilter( ) : void

methodpubliccreateIndex( boolean $recreate = false ) : void

Create the index and mapping.

Parameters
Name Type Description
$recreate boolean

OPTIONAL Deletes index first if already exists (default = false)

methodpubliccreateIndexDocument( \SugarBean $bean,  $searchFields = null ) : \Elastica_Document | null

Parameters
Name Type Description
$bean \SugarBean
$searchFields
Returns
Type Description
\Elastica_Document | null
methodpublicdelete(  $bean ) : void

Parameters
Name Type Description
$bean
methodprotecteddisableFTS( ) : void
methodpublicgetClient( ) : void

methodpublicgetIndexName( ) : void

methodprotectedgetIndexType(  $bean ) : string

Return the 'type' for the index. By using the bean type we can specify mappings on a per bean basis if we need to in the future.

Parameters
Name Type Description
$bean
Returns
Type Description
string
methodprotectedgetOwnerField(  $bean ) : void

Parameters
Name Type Description
$bean
methodprotectedgetOwnerTermFilter( ) : void

methodprotectedgetRecordsFromDocs(  $docs ) : void

Parameters
Name Type Description
$docs
methodprotectedgetSearchFields(  $options ) : void

Parameters
Name Type Description
$options
methodpublicgetServerStatus( ) : void

Check the server status

methodprotectedgetTypeTermFilter(  $module ) : void

Parameters
Name Type Description
$module
methodpublicindexBean(  $bean,  $batch = TRUE ) : void

Parameters
Name Type Description
$bean
$batch
methodprotectedindexSingleBean(  $bean ) : void

Parameters
Name Type Description
$bean
methodprotectedisModuleFtsEnabled(  $module ) : bool
inherited

Determine if a module is FTS enabled.

Inherited from: \SugarSearchEngineAbstractBase::isModuleFtsEnabled()
Parameters
Name Type Description
$module
Returns
Type Description
bool
methodprotectedloader(  $className ) : void

Parameters
Name Type Description
$className
methodpublicsearch(  $queryString, int $offset = 0, int $limit = 20,  $options = array() ) : null | \SugarSeachEngineElasticResultSet

Parameters
Name Type Description
$queryString
$offset int
$limit int
$options
Returns
Type Description
null | \SugarSeachEngineElasticResultSet
Documentation was generated by DocBlox 0.18.1.