2 namespace wcf\system\search
;
3 use wcf\system\database\util\PreparedStatementConditionBuilder
;
6 * Default interface for search engines.
8 * @author Alexander Ebert
9 * @copyright 2001-2014 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package com.woltlab.wcf
12 * @subpackage system.search
13 * @category Community Framework
15 interface ISearchEngine
{
17 * Returns the condition builder class name required to provide conditions for getInnerJoin().
21 public function getConditionBuilderClassName();
24 * Returns the inner join query and the condition parameters. This method is allowed to return NULL
25 * for the 'fulltextCondition' index instead of a PreparedStatementConditionBuilder instance:
28 * 'fulltextCondition' => $fulltextCondition || null,
32 * @param string $objectTypeName
34 * @param boolean $subjectOnly
35 * @param \wcf\system\database\util\PreparedStatementConditionBuilder $searchIndexCondition
36 * @param string $orderBy
37 * @param integer $limit
40 public function getInnerJoin($objectTypeName, $q, $subjectOnly = false, PreparedStatementConditionBuilder
$searchIndexCondition = null, $orderBy = 'time DESC', $limit = 1000);
43 * Removes engine-specific special characters from a string.
45 * @param string $string
47 public function removeSpecialCharacters($string);
50 * Searches for the given string and returns the data of the found messages.
53 * @param array $objectTypes
54 * @param boolean $subjectOnly
55 * @param \wcf\system\database\util\PreparedStatementConditionBuilder $searchIndexCondition
56 * @param array $additionalConditions
57 * @param string $orderBy
58 * @param integer $limit
61 public function search($q, array $objectTypes, $subjectOnly = false, PreparedStatementConditionBuilder
$searchIndexCondition = null, array $additionalConditions = array(), $orderBy = 'time DESC', $limit = 1000);