<?php
/**** This file is part of the phpBB Forum Software package.** @copyright (c) phpBB Limited <https://www.phpbb.com>* @license GNU General Public License, version 2 (GPL-2.0)** For full copyright and license information, please see* the docs/CREDITS.txt file.**/namespace phpbb\search;/*** phpBB's own db driven fulltext search, version 2*/class fulltext_native extends \phpbb\search\base
{const UTF8_HANGUL_FIRST ="\xEA\xB0\x80";const UTF8_HANGUL_LAST ="\xED\x9E\xA3";const UTF8_CJK_FIRST ="\xE4\xB8\x80";const UTF8_CJK_LAST ="\xE9\xBE\xBB";const UTF8_CJK_B_FIRST ="\xF0\xA0\x80\x80";const UTF8_CJK_B_LAST ="\xF0\xAA\x9B\x96";/** * Associative array holding index stats * @var array */protected$stats=array();/** * Associative array stores the min and max word length to be searched * @var array */protected$word_length=array();/** * Contains tidied search query. * Operators are prefixed in search query and common words excluded * @var string */protected$search_query;/** * Contains common words. * Common words are words with length less/more than min/max length * @var array */protected$common_words=array();/** * Post ids of posts containing words that are to be included * @var array */protected$must_contain_ids=array();/** * Post ids of posts containing words that should not be included * @var array */protected$must_not_contain_ids=array();/** * Post ids of posts containing at least one word that needs to be excluded * @var array */protected$must_exclude_one_ids=array();/** * Relative path to board root * @var string */protected$phpbb_root_path;/** * PHP Extension * @var string */protected$php_ext;/** * Config object * @var \phpbb\config\config */protected$config;/** * Database connection * @var \phpbb\db\driver\driver_interface */protected$db;/** * phpBB event dispatcher object * @var \phpbb\event\dispatcher_interface */protected$phpbb_dispatcher;/** * User object * @var \phpbb\user */protected$user;/** * Initialises the fulltext_native search backend with min/max word length * * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object */