include/SugarSearchEngine/Elastic/SugarSearchEngineElastic.php
\SugarSearchEngineElastic
Package:
Constants
MAX_BULK_THRESHOLD
= 100
inherited
The max number of documents to bulk insert at a time
Inherited from: \SugarSearchEngineAbstractBase::MAX_BULK_THRESHOLD- Inherited_from
- \SugarSearchEngineAbstractBase::MAX_BULK_THRESHOLD
Properties

array
$_documents= 'array()'
inheritedInherited from:
\SugarSearchEngineAbstractBase::$$_documents
Default value
array()Details- Type
- array
- Inherited_from
- \SugarSearchEngineAbstractBase::$$_documents
Methods

__destruct(
)
:
void
inherited
Bulk insert any documents that have been marked for bulk insertion.
Inherited from: \SugarSearchEngineAbstractBase::__destruct()
addRecordsToQueue(
$records
)
:
void
inherited
Inherited from:
\SugarSearchEngineAbstractBase::addRecordsToQueue()
Parameters
| Name | Type | Description |
|---|---|---|
| $records |

checkException(
$e
)
:
void
inherited
Inherited from:
\SugarSearchEngineAbstractBase::checkException()
Parameters
| Name | Type | Description |
|---|---|---|
| $e |

cleanTeamSetID(
$teamSetID
)
:
mixedRemove the '-' from our team sets.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $teamSetID |
| Type | Description |
|---|---|
| mixed |

constructHighlightArray(
$fields, $options
)
:
void
Parameters
| Name | Type | Description |
|---|---|---|
| $fields | ||
| $options |

createIndex(
boolean $recreate
=
false
)
:
voidCreate the index and mapping.
Parameters
| Name | Type | Description |
|---|---|---|
| $recreate | boolean | OPTIONAL Deletes index first if already exists (default = false) |

createIndexDocument(
\SugarBean $bean, $searchFields
=
null
)
:
\Elastica_Document | null
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $bean | \SugarBean | |
| $searchFields |
| Type | Description |
|---|---|
| \Elastica_Document | null |

getIndexType(
$bean
)
:
stringReturn 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
Returns
| Name | Type | Description |
|---|---|---|
| $bean |
| Type | Description |
|---|---|
| string |

isModuleFtsEnabled(
$module
)
:
bool
inherited
Determine if a module is FTS enabled.
Inherited from: \SugarSearchEngineAbstractBase::isModuleFtsEnabled()
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $module |
| Type | Description |
|---|---|
| bool |

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