PhraseIndexSearch
Table of Contents
Constants
- SEARCH_METHOD_CASE_SENSITIVE = 'case_sensitive'
- SEARCH_METHOD_END_WITH = 'end_with'
- SEARCH_METHOD_ENTRY_WORD = 'entry_word'
- SEARCH_METHOD_EQUAL = 'equal'
- SEARCH_METHOD_EXACT = 'exact'
- SEARCH_METHOD_START_WITH = 'start_with'
Methods
- disallowFtsIndex() : bool
- Allow use fulltext index for phrase searching.
- getCount() : int
- Counts rows in search result.
- getFullTextMinLength() : int
- The minimum and maximum lengths of words to be indexed are defined by the innodb_ft_min_token_size and innodb_ft_max_token_size for InnoDB search indexes, and ft_min_word_len and ft_max_word_len for MyISAM ones.
- getList() : Result
- Searches phrase by index.
- getPathCodeEntity() : Entity
- getPathCodeEntityClass() : DataManager|string
- prepareTextForFulltextSearch() : string
- Prepares searching text to use with fulltext index to help like operator.
- query() : Query
- Performs search query and returns result.
Constants
SEARCH_METHOD_CASE_SENSITIVE
public
mixed
SEARCH_METHOD_CASE_SENSITIVE
= 'case_sensitive'
SEARCH_METHOD_END_WITH
public
mixed
SEARCH_METHOD_END_WITH
= 'end_with'
SEARCH_METHOD_ENTRY_WORD
public
mixed
SEARCH_METHOD_ENTRY_WORD
= 'entry_word'
SEARCH_METHOD_EQUAL
public
mixed
SEARCH_METHOD_EQUAL
= 'equal'
SEARCH_METHOD_EXACT
public
mixed
SEARCH_METHOD_EXACT
= 'exact'
SEARCH_METHOD_START_WITH
public
mixed
SEARCH_METHOD_START_WITH
= 'start_with'
Methods
disallowFtsIndex()
Allow use fulltext index for phrase searching.
public
static disallowFtsIndex(string $langId) : bool
todo: preg_replace has bug when replaces Thai unicode Non-spacing mark
Parameters
- $langId : string
Return values
boolgetCount()
Counts rows in search result.
public
static getCount(array<string|int, mixed> $filterIn) : int
Parameters
- $filterIn : array<string|int, mixed>
-
Filter params.
Return values
intgetFullTextMinLength()
The minimum and maximum lengths of words to be indexed are defined by the innodb_ft_min_token_size and innodb_ft_max_token_size for InnoDB search indexes, and ft_min_word_len and ft_max_word_len for MyISAM ones.
public
static getFullTextMinLength() : int
https://dev.mysql.com/doc/refman/8.0/en/fulltext-fine-tuning.html#fulltext-word-length
Return values
intgetList()
Searches phrase by index.
public
static getList(array<string|int, mixed> $params) : Result
Parameters
- $params : array<string|int, mixed>
-
Orm type params for the query.
Return values
ResultgetPathCodeEntity()
public
static getPathCodeEntity() : Entity
Tags
Return values
EntitygetPathCodeEntityClass()
public
static getPathCodeEntityClass() : DataManager|string
Tags
Return values
DataManager|stringprepareTextForFulltextSearch()
Prepares searching text to use with fulltext index to help like operator.
public
static prepareTextForFulltextSearch(string $text) : string
todo: preg_replace has bug when replaces Thai unicode Non-spacing mark
Parameters
- $text : string
Return values
stringquery()
Performs search query and returns result.
public
static query([array<string|int, mixed> $params = [] ]) : Query
Parameters
- $params : array<string|int, mixed> = []
-
Orm type params for the query.