Class

eZSearchEngine

class eZSearchEngine implements ezpSearchEngine

Properties

$TempTablesCount
$CreatedTempTablesNames

Methods

__construct()

bool needCommit()

Whether a commit operation is required after adding/removing objects.

bool needRemoveWithUpdate()

Whether calling removeObject() is required when updating an object.

bool addObject(eZContentObject $contentObject, bool $commit = true)

Adds object $contentObject to the search database.

buildWordIDArray($indexArrayOnlyWords)

indexWords($contentObject, $indexArray, $wordIDArray, $placement)

bool removeObject(eZContentObject $contentObject, bool $commit = null)

Removes object $contentObject from the search database.

bool removeObjectById(int $contentObjectId, bool $commit = null)

Removes a content object by Id from the search database.

saveCreatedTempTableName($index, $tableName)

getSavedTempTableName($index)

getSavedTempTablesList()

search(string $searchText, array $params = array(), array $searchTypes = array())

Searches $searchText in the search database.

buildSortSQL($sortArray)

buildSqlPartForWord($wordID, $identifier = false)

buildPhraseSqlQueryPart($phraseIDArray, $identifier = false)

splitString($text)

normalizeText($text, $isMetaData = false)

array supportedSearchTypes()

Returns an array describing the supported search types by the search engine.

searchAttributeInteger($searchParams)

searchAttributeIntegers($searchParams)

searchAttributeByRange($searchParams)

searchAttributeByIdentifier($searchParams)

searchAttributeByIdentifierRange($searchParams)

searchAttributeIntegersByIdentifier($searchParams)

searchAttributePatternText($searchParams)

searchAttributeFulltext($searchParams)

createTemporaryTable($searchPartText)

buildTempTablesForFullTextSearch($searchPartsArray, $generalFilterList = array())

getPhrases($searchText)

buildSearchPartArray($phraseTextArray, $nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false)

buildSearchPartArrayForWords($nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false)

buildSearchPartArrayForPhrases($phraseTextArray, $wordIDHash, $identifier = false)

prepareWordIDArraysForPattern($searchText)

prepareWordIDArrays($searchText)

fetchTotalObjectCount()

constructMethodName($searchTypeData)

callMethod($methodName, $parameterArray)

cleanup()

isSearchPartIncomplete($part)

commit()

Commit the changes to the search engine

void updateObjectsSection(array $objectIDs, $sectionID)

Update the section in the search engine

Details

at line 18
public __construct()

at line 33
public bool needCommit()

Whether a commit operation is required after adding/removing objects.

Return Value

bool

at line 39
public bool needRemoveWithUpdate()

Whether calling removeObject() is required when updating an object.

Return Value

bool

at line 51
public bool addObject(eZContentObject $contentObject, bool $commit = true)

Adds object $contentObject to the search database.

Parameters

eZContentObject $contentObject Object to add to search engine
bool $commit Whether to commit after adding the object

Return Value

bool True if the operation succeed.

at line 163
public buildWordIDArray($indexArrayOnlyWords)

Parameters

$indexArrayOnlyWords

at line 265
public indexWords($contentObject, $indexArray, $wordIDArray, $placement)

Parameters

$contentObject
$indexArray
$wordIDArray
$placement

at line 381
public bool removeObject(eZContentObject $contentObject, bool $commit = null)

Removes object $contentObject from the search database.

Parameters

eZContentObject $contentObject the content object to remove
bool $commit Whether to commit after removing the object

Return Value

bool True if the operation succeed.

at line 394
public bool removeObjectById(int $contentObjectId, bool $commit = null)

Removes a content object by Id from the search database.

Parameters

int $contentObjectId The content object to remove by id
bool $commit Whether to commit after removing the object

Return Value

bool True if the operation succeed.

at line 438
public saveCreatedTempTableName($index, $tableName)

Parameters

$index
$tableName

at line 452
public getSavedTempTableName($index)

Parameters

$index

at line 461
public getSavedTempTablesList()

Searches $searchText in the search database.

Parameters

string $searchText Search term
array $params Search parameters
array $searchTypes Search types

at line 1106
public buildSortSQL($sortArray)

Parameters

$sortArray

at line 1237
public buildSqlPartForWord($wordID, $identifier = false)

Parameters

$wordID
$identifier

at line 1253
public buildPhraseSqlQueryPart($phraseIDArray, $identifier = false)

Parameters

$phraseIDArray
$identifier

at line 1295
public splitString($text)

Parameters

$text

at line 1331
public normalizeText($text, $isMetaData = false)

Parameters

$text
$isMetaData

at line 1355
public array supportedSearchTypes()

Returns an array describing the supported search types by the search engine.

Return Value

array

at line 1401
public searchAttributeInteger($searchParams)

Parameters

$searchParams

at line 1428
public searchAttributeIntegers($searchParams)

Parameters

$searchParams

at line 1460
public searchAttributeByRange($searchParams)

Parameters

$searchParams

at line 1488
public searchAttributeByIdentifier($searchParams)

Parameters

$searchParams

at line 1521
public searchAttributeByIdentifierRange($searchParams)

Parameters

$searchParams

at line 1541
public searchAttributeIntegersByIdentifier($searchParams)

Parameters

$searchParams

at line 1565
public searchAttributePatternText($searchParams)

Parameters

$searchParams

at line 1620
public searchAttributeFulltext($searchParams)

Parameters

$searchParams

at line 1661
public createTemporaryTable($searchPartText)

Parameters

$searchPartText

at line 1741
public buildTempTablesForFullTextSearch($searchPartsArray, $generalFilterList = array())

Parameters

$searchPartsArray
$generalFilterList

at line 1876
public getPhrases($searchText)

Parameters

$searchText

at line 1908
public buildSearchPartArray($phraseTextArray, $nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false)

Parameters

$phraseTextArray
$nonPhraseText
$wordIDHash
$wildIDArray
$identifier

at line 1919
public buildSearchPartArrayForWords($nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false)

Parameters

$nonPhraseText
$wordIDHash
$wildIDArray
$identifier

at line 1963
public buildSearchPartArrayForPhrases($phraseTextArray, $wordIDHash, $identifier = false)

Parameters

$phraseTextArray
$wordIDHash
$identifier

at line 2008
public prepareWordIDArraysForPattern($searchText)

Parameters

$searchText

at line 2070
public prepareWordIDArrays($searchText)

Parameters

$searchText

at line 2170
public fetchTotalObjectCount()

at line 2180
public constructMethodName($searchTypeData)

Parameters

$searchTypeData

at line 2189
public callMethod($methodName, $parameterArray)

Parameters

$methodName
$parameterArray

at line 2203
public cleanup()

at line 2215
public isSearchPartIncomplete($part)

Parameters

$part

at line 2294
public commit()

Commit the changes to the search engine

at line 2306
public void updateObjectsSection(array $objectIDs, $sectionID)

Update the section in the search engine

Parameters

array $objectIDs
$sectionID

Return Value

void

See also

eZSearch::updateObjectsSection()