![]() |
TYPO3
7.6
|
Public Member Functions | |
initialize ($settings, $searchData, $externalParsers, $searchRootPageIdList) | |
doSearch ($searchWords, $freeIndexUid=-1) | |
mediaTypeWhere () | |
languageWhere () | |
freeIndexUidWhere ($freeIndexUid) | |
hookRequest ($functionName) | |
getSearchType () | |
getSearchRootPageIdList () | |
getJoinPagesForQuery () | |
Protected Member Functions | |
getResultRows_SQLpointer ($searchWords, $freeIndexUid=-1) | |
execPHashListQuery ($wordSel, $additionalWhereClause= '') | |
searchWord ($sWord, $wildcard) | |
searchDistinct ($sWord) | |
searchSentence ($sWord) | |
searchMetaphone ($sWord) | |
sectionTableWhere () | |
execFinalQuery ($list, $freeIndexUid=-1) | |
checkResume ($row) | |
getDescendingSortOrderFlag ($inverse=false) | |
enableFields ($table) | |
md5inthash ($str) | |
isTableUsed ($table_list) | |
getDatabaseConnection () | |
getTypoScriptFrontendController () | |
getTimeTracker () | |
Protected Attributes | |
$indexerObj | |
$externalParsers = array() | |
$frontendUserGroupList = '' | |
$sections = null | |
$searchType = null | |
$languageUid = null | |
$mediaType = null | |
$sortOrder = null | |
$descendingSortOrderFlag = null | |
$resultpagePointer = 0 | |
$numberOfResults = 10 | |
$searchRootPageIdList | |
$joinPagesForQuery = false | |
$wSelClauses = array() | |
$useExactCount = false | |
$displayForbiddenRecords = false | |
Index search abstraction to search through the index
Definition at line 25 of file IndexSearchRepository.php.
|
protected |
Checking if the resume can be shown for the search result (depending on whether the rights are OK) ? Should it also check for gr_list "0,-1"?
array | $row | Result row array. |
Definition at line 756 of file IndexSearchRepository.php.
References IndexSearchRepository\getDatabaseConnection(), and IndexSearchRepository\isTableUsed().
Referenced by IndexSearchRepository\doSearch().
doSearch | ( | $searchWords, | |
$freeIndexUid = -1 |
|||
) |
Get search result rows / data from database. Returned as data in array.
array | $searchWords | Search word array |
int | $freeIndexUid | Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content. |
Definition at line 204 of file IndexSearchRepository.php.
References IndexSearchRepository\checkResume(), MathUtility\forceIntegerInRange(), IndexSearchRepository\getDatabaseConnection(), IndexSearchRepository\getResultRows_SQLpointer(), IndexSearchRepository\getTimeTracker(), and IndexSearchRepository\hookRequest().
|
protected |
Returns a part of a WHERE clause which will filter out records with start/end times or hidden/fe_groups fields set to values that should de-select them according to the current time, preview settings or user login. Definitely a frontend function. THIS IS A VERY IMPORTANT FUNCTION: Basically you must add the output from this function for EVERY select query you create for selecting records of tables in your own applications - thus they will always be filtered according to the "enablefields" configured in TCA Simply calls ::enableFields() BUT will send the show_hidden flag along! This means this function will work in conjunction with the preview facilities of the frontend engine/Admin Panel.
string | $table | The table for which to get the where clause |
Definition at line 832 of file IndexSearchRepository.php.
References IndexSearchRepository\getTypoScriptFrontendController().
Referenced by IndexSearchRepository\execFinalQuery(), and IndexSearchRepository\freeIndexUidWhere().
|
protected |
Execute final query, based on phash integer list. The main point is sorting the result in the right order.
string | $list | List of phash integers which match the search. |
int | $freeIndexUid | Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content. |
Definition at line 643 of file IndexSearchRepository.php.
References $list, elseif, IndexSearchRepository\enableFields(), IndexSearchRepository\freeIndexUidWhere(), IndexSearchRepository\getDatabaseConnection(), IndexSearchRepository\getDescendingSortOrderFlag(), IndexSearchRepository\getTypoScriptFrontendController(), IndexSearchRepository\hookRequest(), GeneralUtility\intExplode(), IndexSearchRepository\languageWhere(), and IndexSearchRepository\mediaTypeWhere().
Referenced by IndexSearchRepository\getResultRows_SQLpointer().
|
protected |
Returns a query which selects the search-word from the word/rel tables.
string | $wordSel | WHERE clause selecting the word from phash |
string | $additionalWhereClause | Additional AND clause in the end of the query. |
Definition at line 424 of file IndexSearchRepository.php.
References IndexSearchRepository\getDatabaseConnection(), and IndexSearchRepository\sectionTableWhere().
Referenced by IndexSearchRepository\searchDistinct(), IndexSearchRepository\searchMetaphone(), and IndexSearchRepository\searchWord().
freeIndexUidWhere | ( | $freeIndexUid | ) |
Where-clause for free index-uid value.
int | $freeIndexUid | Free Index UID value to limit search to. |
Definition at line 599 of file IndexSearchRepository.php.
References $list, IndexSearchRepository\enableFields(), IndexSearchRepository\getDatabaseConnection(), GeneralUtility\revExplode(), and GeneralUtility\trimExplode().
Referenced by IndexSearchRepository\execFinalQuery().
|
protected |
Returns the database connection
Definition at line 933 of file IndexSearchRepository.php.
References $GLOBALS.
Referenced by IndexSearchRepository\checkResume(), IndexSearchRepository\doSearch(), IndexSearchRepository\execFinalQuery(), IndexSearchRepository\execPHashListQuery(), IndexSearchRepository\freeIndexUidWhere(), IndexSearchRepository\mediaTypeWhere(), and IndexSearchRepository\searchSentence().
|
protected |
Returns "DESC" or "" depending on the settings of the incoming highest/lowest result order (piVars['desc'])
bool | $inverse | If TRUE, inverse the order which is defined by piVars['desc'] |
Definition at line 809 of file IndexSearchRepository.php.
References IndexSearchRepository\$descendingSortOrderFlag.
Referenced by IndexSearchRepository\execFinalQuery().
getJoinPagesForQuery | ( | ) |
Getter for joinPagesForQuery flag enabled through TypoScript 'settings.skipExtendToSubpagesChecking'
Definition at line 923 of file IndexSearchRepository.php.
References IndexSearchRepository\$joinPagesForQuery.
|
protected |
Gets a SQL result pointer to traverse for the search records.
array | $searchWords | Search words |
int | $freeIndexUid | Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content. |
Definition at line 298 of file IndexSearchRepository.php.
References $list, IndexSearchRepository\execFinalQuery(), and IndexSearchRepository\getTimeTracker().
Referenced by IndexSearchRepository\doSearch().
getSearchRootPageIdList | ( | ) |
A list of integer which should be root-pages to search from
Definition at line 912 of file IndexSearchRepository.php.
References GeneralUtility\intExplode().
getSearchType | ( | ) |
Search type e.g. sentence (20), any part of the word (1)
Definition at line 902 of file IndexSearchRepository.php.
References IndexSearchRepository\$searchType.
|
protected |
Definition at line 949 of file IndexSearchRepository.php.
References $GLOBALS.
Referenced by IndexSearchRepository\doSearch(), and IndexSearchRepository\getResultRows_SQLpointer().
|
protected |
Definition at line 941 of file IndexSearchRepository.php.
References $GLOBALS.
Referenced by IndexSearchRepository\enableFields(), IndexSearchRepository\execFinalQuery(), IndexSearchRepository\initialize(), and IndexSearchRepository\sectionTableWhere().
hookRequest | ( | $functionName | ) |
Returns an object reference to the hook object if any
string | $functionName | Name of the function you want to call / hook key |
Definition at line 883 of file IndexSearchRepository.php.
References $GLOBALS, and GeneralUtility\getUserObj().
Referenced by IndexSearchRepository\doSearch(), and IndexSearchRepository\execFinalQuery().
initialize | ( | $settings, | |
$searchData, | |||
$externalParsers, | |||
$searchRootPageIdList | |||
) |
initialize all options that are necessary for the search
array | $settings | the extbase plugin settings |
array | $searchData | the search data |
array | $externalParsers | |
string | $searchRootPageIdList |
Definition at line 168 of file IndexSearchRepository.php.
References IndexSearchRepository\$externalParsers, IndexSearchRepository\$searchRootPageIdList, IndexSearchRepository\getTypoScriptFrontendController(), and GeneralUtility\makeInstance().
|
protected |
Check if the tables provided are configured for usage. This becomes necessary for extensions that provide additional database functionality like indexed_search_mysql.
string | $table_list | Comma-separated list of tables |
Definition at line 872 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\checkResume().
languageWhere | ( | ) |
Returns AND statement for selection of language
Definition at line 584 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\execFinalQuery().
|
protected |
md5 integer hash Using 7 instead of 8 just because that makes the integers lower than 32 bit (28 bit) and so they do not interfere with UNSIGNED integers or PHP-versions which has varying output from the hexdec function.
string | $str | String to hash |
Definition at line 859 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\searchDistinct().
mediaTypeWhere | ( | ) |
Returns AND statement for selection of media type
Definition at line 556 of file IndexSearchRepository.php.
References IndexSearchRepository\getDatabaseConnection().
Referenced by IndexSearchRepository\execFinalQuery().
|
protected |
Search for one distinct word
string | $sWord | the search word |
Definition at line 459 of file IndexSearchRepository.php.
References IndexSearchRepository\execPHashListQuery(), and IndexSearchRepository\md5inthash().
|
protected |
Search for a metaphone word
string | $sWord | the search word |
Definition at line 496 of file IndexSearchRepository.php.
References IndexSearchRepository\execPHashListQuery().
|
protected |
Search for a sentence
string | $sWord | the search word |
Definition at line 472 of file IndexSearchRepository.php.
References LikeWildcard\BOTH, IndexSearchRepository\getDatabaseConnection(), and IndexSearchRepository\sectionTableWhere().
|
protected |
Search for a word
string | $sWord | the search word |
int | $wildcard | Bit-field of Utility |
Definition at line 441 of file IndexSearchRepository.php.
References IndexSearchRepository\execPHashListQuery().
|
protected |
Returns AND statement for selection of section in database. (rootlevel 0-2 + page_id)
Definition at line 508 of file IndexSearchRepository.php.
References $GLOBALS, $list, elseif, IndexSearchRepository\getTypoScriptFrontendController(), and GeneralUtility\intExplode().
Referenced by IndexSearchRepository\execPHashListQuery(), and IndexSearchRepository\searchSentence().
|
protected |
Definition at line 94 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\getDescendingSortOrderFlag().
|
protected |
Definition at line 157 of file IndexSearchRepository.php.
|
protected |
Definition at line 39 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\initialize().
|
protected |
Definition at line 46 of file IndexSearchRepository.php.
|
protected |
Definition at line 32 of file IndexSearchRepository.php.
|
protected |
Definition at line 127 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\getJoinPagesForQuery().
|
protected |
Definition at line 70 of file IndexSearchRepository.php.
|
protected |
Definition at line 78 of file IndexSearchRepository.php.
|
protected |
Definition at line 110 of file IndexSearchRepository.php.
|
protected |
Definition at line 102 of file IndexSearchRepository.php.
|
protected |
Definition at line 119 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\initialize().
|
protected |
Definition at line 62 of file IndexSearchRepository.php.
Referenced by IndexSearchRepository\getSearchType().
|
protected |
Definition at line 54 of file IndexSearchRepository.php.
|
protected |
Definition at line 86 of file IndexSearchRepository.php.
|
protected |
Definition at line 147 of file IndexSearchRepository.php.
|
protected |
Definition at line 134 of file IndexSearchRepository.php.