include/SugarSearchEngine/Interface.php
\SugarSearchEngineInterface
Generic interface all sublcasses must implement in order to be pluggable with FTS.
Methods

bulkInsert(
$docs
)
:
voidPerform bulk inserts on serveral documents to mitigate performance issues.
| Name | Type | Description |
|---|---|---|
| $docs |
- Abstract

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

createIndexDocument(
\SugarBean}stdClass $bean, array | null $searchFields
=
null
)
:
voidCreate the index document that will be sent to the IR System.
| Name | Type | Description |
|---|---|---|
| $bean | \SugarBean}stdClass | |
| $searchFields | array | null |
- Abstract

delete(
$bean
)
:
voidDelete a bean from the Full Text Search Engine
| Name | Type | Description |
|---|---|---|
| $bean |
- Abstract

getServerStatus(
)
:
arrayReturn info about the server status.
| Type | Description |
|---|---|
| array | valid: indicates if the connection was successful. status: text to display to the end user |
- Abstract

indexBean(
$bean, $batched
=
TRUE
)
:
voidPass in a bean and go through the list of fields to pass to the engine
| Name | Type | Description |
|---|---|---|
| $bean | ||
| $batched |
- Abstract
\SugarSearchEngineResult
Interface for a single FTS result.
- Children
- \SugarSearchEngineAbstractResult
Methods

__toString(
)
:
voidNever called within the view but helpful for debugging purposes.
- Abstract

getHighlightedHitText(
)
:
voidReturn the highlighted text of a hit with the field name as the key
- Abstract

getId(
)
:
StringGet the id of the result
| Type | Description |
|---|---|
| String | The id of the result, typically a SugarBean id. |
- Abstract

getModule(
)
:
StringGet the module name of the result
| Type | Description |
|---|---|
| String |
- Abstract

getModuleName(
)
:
StringGet the translated module name of the result
| Type | Description |
|---|---|
| String |
- Abstract
\SugarSearchEngineResultSet
Interface to access results from a FTS search. Is composed of zero or more SugarSearchEngineResult objects.
- Parent(s)
- \Iterator
- Children
- \SugarSeachEngineElasticResultSet