PHP 클래스 eZSearchEngine

파일 보기 프로젝트 열기: ezsystems/ezpublish-legacy 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$CreatedTempTablesNames
$TempTablesCount

공개 메소드들

메소드 설명
addObject ( eZContentObject $contentObject, boolean $commit = true ) : boolean Adds object $contentObject to the search database.
buildPhraseSqlQueryPart ( $phraseIDArray, $identifier = false ) *! \private \return Returns an sql query part for a phrase
buildSearchPartArray ( $phraseTextArray, $nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false )
buildSearchPartArrayForPhrases ( $phraseTextArray, $wordIDHash, $identifier = false )
buildSearchPartArrayForWords ( $nonPhraseText, $wordIDHash, $wildIDArray, $identifier = false )
buildSortSQL ( $sortArray ) *! \private \return an array of ORDER BY SQL
buildSqlPartForWord ( $wordID, $identifier = false ) *! \private \return Returns an sql query part for one word
buildTempTablesForFullTextSearch ( $searchPartsArray, $generalFilterList = [] )
buildWordIDArray ( $indexArrayOnlyWords ) *! \private
callMethod ( $methodName, $parameterArray )
cleanup ( ) *! Will remove all search words and object/word relations.
commit ( ) Commit the changes to the search engine
constructMethodName ( $searchTypeData )
createTemporaryTable ( $searchPartText )
eZSearchEngine ( )
fetchTotalObjectCount ( )
getPhrases ( $searchText )
getSavedTempTableName ( $index ) *! \return Given table name from the list of saved temporary tables names by its index.
getSavedTempTablesList ( ) *! \return List of saved temporary tables names.
indexWords ( $contentObject, $indexArray, $wordIDArray, $placement ) *! \private
isSearchPartIncomplete ( $part ) *! \return true if the search part is incomplete.
needCommit ( )
needRemoveWithUpdate ( )
normalizeText ( $text, $isMetaData = false ) *! Normalizes the text \a $text so that it is easily parsable \param $isMetaData If \c true then it expects the text to be meta data from objects, if not it is the search text and needs special handling.
prepareWordIDArrays ( $searchText )
prepareWordIDArraysForPattern ( $searchText )
removeObject ( eZContentObject $contentObject, boolean $commit = null ) : boolean Removes object $contentObject from the search database.
removeObjectById ( integer $contentObjectId, boolean $commit = null ) : boolean Removes a content object by Id from the search database.
saveCreatedTempTableName ( $index, $tableName ) *! Saves name of a temporary that has just been created, for us to know its name when it's time to drop the table.
search ( $searchText, $params = [], $searchTypes = [] ) *! Runs a query to the search engine.
searchAttributeByIdentifier ( $searchParams )
searchAttributeByIdentifierRange ( $searchParams )
searchAttributeByRange ( $searchParams )
searchAttributeFulltext ( $searchParams )
searchAttributeInteger ( $searchParams )
searchAttributeIntegers ( $searchParams )
searchAttributeIntegersByIdentifier ( $searchParams )
searchAttributePatternText ( $searchParams )
splitString ( $text ) *! \private \return Returns an array of words created from the input string.
supportedSearchTypes ( ) *! \static \return Returns an array describing the supported search types in thie search engine.
updateObjectsSection ( array $objectIDs, integer $sectionID ) : void Update the section in the search engine

보호된 메소드들

메소드 설명
removeAllQuotes ( string $text ) : string Remove single and double quotes, including UTF-8 variations
removeDuplicatedSpaces ( string $text ) : string Remove duplicated spaces

메소드 상세

addObject() 공개 메소드

Adds object $contentObject to the search database.
public addObject ( eZContentObject $contentObject, boolean $commit = true ) : boolean
$contentObject eZContentObject Object to add to search engine
$commit boolean Whether to commit after adding the object
리턴 boolean True if the operation succeed.

buildPhraseSqlQueryPart() 공개 메소드

*! \private \return Returns an sql query part for a phrase
public buildPhraseSqlQueryPart ( $phraseIDArray, $identifier = false )

buildSearchPartArray() 공개 메소드

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

buildSearchPartArrayForPhrases() 공개 메소드

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

buildSearchPartArrayForWords() 공개 메소드

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

buildSortSQL() 공개 메소드

*! \private \return an array of ORDER BY SQL
public buildSortSQL ( $sortArray )

buildSqlPartForWord() 공개 메소드

*! \private \return Returns an sql query part for one word
public buildSqlPartForWord ( $wordID, $identifier = false )

buildTempTablesForFullTextSearch() 공개 메소드

public buildTempTablesForFullTextSearch ( $searchPartsArray, $generalFilterList = [] )

buildWordIDArray() 공개 메소드

Build WordIDArray and update ezsearch_word table \params words for object to add \return wordIDArray
public buildWordIDArray ( $indexArrayOnlyWords )

callMethod() 공개 메소드

public callMethod ( $methodName, $parameterArray )

cleanup() 공개 메소드

*! Will remove all search words and object/word relations.
public cleanup ( )

commit() 공개 메소드

Commit the changes to the search engine
public commit ( )

constructMethodName() 공개 메소드

public constructMethodName ( $searchTypeData )

createTemporaryTable() 공개 메소드

public createTemporaryTable ( $searchPartText )

eZSearchEngine() 공개 메소드

public eZSearchEngine ( )

fetchTotalObjectCount() 공개 메소드

getPhrases() 공개 메소드

public getPhrases ( $searchText )

getSavedTempTableName() 공개 메소드

\see saveCreatedTempTableName()
public getSavedTempTableName ( $index )

getSavedTempTablesList() 공개 메소드

\see saveCreatedTempTableName()

indexWords() 공개 메소드

\param contentObject \param indexArray \param wordIDArray \param placement \return last placement Index wordIndex
public indexWords ( $contentObject, $indexArray, $wordIDArray, $placement )

isSearchPartIncomplete() 공개 메소드

*! \return true if the search part is incomplete.
public isSearchPartIncomplete ( $part )

needCommit() 공개 메소드

public needCommit ( )

needRemoveWithUpdate() 공개 메소드

normalizeText() 공개 메소드

*! Normalizes the text \a $text so that it is easily parsable \param $isMetaData If \c true then it expects the text to be meta data from objects, if not it is the search text and needs special handling.
public normalizeText ( $text, $isMetaData = false )

prepareWordIDArrays() 공개 메소드

public prepareWordIDArrays ( $searchText )

prepareWordIDArraysForPattern() 공개 메소드

public prepareWordIDArraysForPattern ( $searchText )

removeAllQuotes() 보호된 정적인 메소드

Remove single and double quotes, including UTF-8 variations
protected static removeAllQuotes ( string $text ) : string
$text string
리턴 string

removeDuplicatedSpaces() 보호된 정적인 메소드

Remove duplicated spaces
protected static removeDuplicatedSpaces ( string $text ) : string
$text string
리턴 string

removeObject() 공개 메소드

Removes object $contentObject from the search database.
사용 중단: Since 5.0, use removeObjectById()
public removeObject ( eZContentObject $contentObject, boolean $commit = null ) : boolean
$contentObject eZContentObject the content object to remove
$commit boolean Whether to commit after removing the object
리턴 boolean True if the operation succeed.

removeObjectById() 공개 메소드

Removes a content object by Id from the search database.
부터: 5.0
public removeObjectById ( integer $contentObjectId, boolean $commit = null ) : boolean
$contentObjectId integer The content object to remove by id
$commit boolean Whether to commit after removing the object
리턴 boolean True if the operation succeed.

saveCreatedTempTableName() 공개 메소드

*! Saves name of a temporary that has just been created, for us to know its name when it's time to drop the table.
public saveCreatedTempTableName ( $index, $tableName )

searchAttributeByIdentifier() 공개 메소드

public searchAttributeByIdentifier ( $searchParams )

searchAttributeByIdentifierRange() 공개 메소드

public searchAttributeByIdentifierRange ( $searchParams )

searchAttributeByRange() 공개 메소드

public searchAttributeByRange ( $searchParams )

searchAttributeFulltext() 공개 메소드

public searchAttributeFulltext ( $searchParams )

searchAttributeInteger() 공개 메소드

public searchAttributeInteger ( $searchParams )

searchAttributeIntegers() 공개 메소드

public searchAttributeIntegers ( $searchParams )

searchAttributeIntegersByIdentifier() 공개 메소드

public searchAttributeIntegersByIdentifier ( $searchParams )

searchAttributePatternText() 공개 메소드

public searchAttributePatternText ( $searchParams )

splitString() 공개 메소드

*! \private \return Returns an array of words created from the input string.
public splitString ( $text )

supportedSearchTypes() 공개 메소드

\note It has been renamed. In eZ Publish 3.4 and older it was (wrongly) named suportedSearchTypes().

updateObjectsSection() 공개 메소드

Update the section in the search engine
또한 보기: eZSearch::updateObjectsSection()
public updateObjectsSection ( array $objectIDs, integer $sectionID ) : void
$objectIDs array
$sectionID integer
리턴 void

프로퍼티 상세

$CreatedTempTablesNames 공개적으로 프로퍼티

public $CreatedTempTablesNames

$TempTablesCount 공개적으로 프로퍼티

public $TempTablesCount