eZPublish  3.8
eZSearchEngine Class Reference

Public Member Functions

 addObject (&$contentObject, $uri)
 
 buildSearchPartArray ($phraseTextArray, $nonPhraseText, &$wordIDHash, &$wildIDArray, $identifier=false)
 
 buildSearchPartArrayForPhrases ($phraseTextArray, &$wordIDHash, $identifier=false)
 
 buildSearchPartArrayForWords ($nonPhraseText, &$wordIDHash, &$wildIDArray, $identifier=false)
 
 buildTempTablesForFullTextSearch ($searchPartsArray, $generalFilterList=array())
 
 callMethod ($methodName, $parameterArray)
 
 cleanup ()
 
 constructMethodName ($searchTypeData)
 
 createTemporaryTable ($searchPartText)
 
 eZSearchEngine ()
 
 fetchTotalObjectCount ()
 
 getPhrases ($searchText)
 
 getSavedTempTableName ($index)
 
 getSavedTempTablesList ()
 
 isSearchPartIncomplete ($part)
 
 normalizeText ($text, $isMetaData=false)
 
 prepareWordIDArrays ($searchText)
 
 prepareWordIDArraysForPattern ($searchText)
 
 saveCreatedTempTableName ($index, $tableName)
 
 search ($searchText, $params=array(), $searchTypes=array())
 
 searchAttributeByIdentifier ($searchParams)
 
 searchAttributeByIdentifierRange ($searchParams)
 
 searchAttributeByRange ($searchParams)
 
 searchAttributeFulltext ($searchParams)
 
 searchAttributeInteger ($searchParams)
 
 searchAttributeIntegers ($searchParams)
 
 searchAttributeIntegersByIdentifier ($searchParams)
 
 searchAttributePatternText ($searchParams)
 

Static Public Member Functions

 removeObject ($contentObject)
 
 supportedSearchTypes ()
 

Public Attributes

 $CreatedTempTablesNames = array()
 
 $TempTablesCount = 0
 
 $UseOldCall = false
 

Private Member Functions

 buildPhraseSqlQueryPart ($phraseIDArray, $identifier=false)
 
 buildSortSQL ($sortArray)
 
 buildSqlPartForWord ($wordID, $identifier=false)
 
 buildWordIDArray (&$indexArrayOnlyWords)
 
 indexWords (&$contentObject, &$indexArray, &$wordIDArray, $placement=0)
 
 splitString ($text)
 

Member Function Documentation

eZSearchEngine::addObject ( $contentObject,
  $uri 
)

Adds an object to the search database.

eZSearchEngine::buildPhraseSqlQueryPart (   $phraseIDArray,
  $identifier = false 
)
private
Returns
Returns an sql query part for a phrase

Referenced by buildSearchPartArrayForPhrases().

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

Build search parts array for phrases and normal words

Referenced by buildSearchPartArray().

eZSearchEngine::buildSearchPartArrayForWords (   $nonPhraseText,
$wordIDHash,
$wildIDArray,
  $identifier = false 
)
eZSearchEngine::buildSortSQL (   $sortArray)
private
Returns
an array of ORDER BY SQL

Referenced by search().

eZSearchEngine::buildSqlPartForWord (   $wordID,
  $identifier = false 
)
private
Returns
Returns an sql query part for one word

Referenced by buildSearchPartArrayForWords().

eZSearchEngine::buildTempTablesForFullTextSearch (   $searchPartsArray,
  $generalFilterList = array() 
)
eZSearchEngine::buildWordIDArray ( $indexArrayOnlyWords)
private

Build WordIDArray and update ezsearch_word table

words for object to add

Returns
wordIDArray

Referenced by addObject().

eZSearchEngine::callMethod (   $methodName,
  $parameterArray 
)

Referenced by search().

eZSearchEngine::cleanup ( )

Will remove all search words and object/word relations.

eZSearchEngine::constructMethodName (   $searchTypeData)

Referenced by search().

eZSearchEngine::eZSearchEngine ( )
eZSearchEngine::fetchTotalObjectCount ( )
eZSearchEngine::getPhrases (   $searchText)
eZSearchEngine::getSavedTempTableName (   $index)
Returns
Given table name from the list of saved temporary tables names by its index.
See Also
saveCreatedTempTableName()

Referenced by buildTempTablesForFullTextSearch(), createTemporaryTable(), and search().

eZSearchEngine::getSavedTempTablesList ( )
Returns
List of saved temporary tables names.
See Also
saveCreatedTempTableName()

Referenced by search().

eZSearchEngine::indexWords ( $contentObject,
$indexArray,
$wordIDArray,
  $placement = 0 
)
private
Parameters
contentObject
indexArray
wordIDArray
placement
Returns
last placement Index wordIndex

Referenced by addObject().

eZSearchEngine::isSearchPartIncomplete (   $part)
Returns
true if the search part is incomplete.
eZSearchEngine::normalizeText (   $text,
  $isMetaData = false 
)

Normalizes the text $text so that it is easily parsable

Parameters
$isMetaDataIf true then it expects the text to be meta data from objects, if not it is the search text and needs special handling.

Referenced by addObject(), search(), searchAttributeByIdentifier(), searchAttributeFulltext(), and searchAttributePatternText().

eZSearchEngine::prepareWordIDArrays (   $searchText)
eZSearchEngine::prepareWordIDArraysForPattern (   $searchText)
eZSearchEngine::removeObject (   $contentObject)
static
eZSearchEngine::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.

Referenced by buildTempTablesForFullTextSearch(), createTemporaryTable(), and search().

eZSearchEngine::search (   $searchText,
  $params = array(),
  $searchTypes = array() 
)

Runs a query to the search engine.

OR search, not used in this version

Only support AND search at this time

tmp tables

eZSearchEngine::searchAttributeByIdentifier (   $searchParams)
eZSearchEngine::searchAttributeByIdentifierRange (   $searchParams)
eZSearchEngine::searchAttributeByRange (   $searchParams)
eZSearchEngine::searchAttributeFulltext (   $searchParams)
eZSearchEngine::searchAttributeInteger (   $searchParams)
eZSearchEngine::searchAttributeIntegers (   $searchParams)
eZSearchEngine::searchAttributeIntegersByIdentifier (   $searchParams)
eZSearchEngine::searchAttributePatternText (   $searchParams)
eZSearchEngine::splitString (   $text)
private
eZSearchEngine::supportedSearchTypes ( )
static
Returns
Returns an array describing the supported search types in thie search engine.
Note
It has been renamed. In eZ publish 3.4 and older it was (wrongly) named suportedSearchTypes().

Member Data Documentation

eZSearchEngine::$CreatedTempTablesNames = array()

Referenced by getSavedTempTablesList().

eZSearchEngine::$TempTablesCount = 0
eZSearchEngine::$UseOldCall = false

The documentation for this class was generated from the following file: