$smwgFulltextSearchMinTokenSize
Configuration parameter details: | |
Name | $smwgFulltextSearchMinTokenSize |
Description | Sets the minimum word/token length to help to decide whether MATCH or LIKE operators are to be used for a condition statement |
Default setting | 3 |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Full-text search · Experimental |
Keyword | full-text search · data store · relational database · sql store · sql database · experimental |
$smwgFulltextSearchMinTokenSize
is a configuration parameter that sets the minimum word/token length to help to decide whether MATCH or LIKE operators are to be used for a condition statement of the full-text search. This helps to switch back to LIKE in cases where the minimum threshold is not applicable. The configuration parameter is specific to the relational data stores MySQL and MariaDB. The higher the number set for this configuration parameter the faster the queries will be. However the default setting appears to be the most pragmatic in most cases when querying for meaningful content. The configuration parameter was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..1
$smwgEnabledFulltextSearch
Sets whether full-text search support for properties may be used.
Default setting[edit]
$smwgFulltextSearchMinTokenSize = 3;
This means that the minimum length of words stored in the InnoDB FULLTEXT
index is "3".
Changing the default setting[edit]
1
" and "16
" corresponding to either MySQL's configuration parameter innodb_ft_min_token_size
(integer between "0
" and "16
") or configuration parameter ft_min_word_len
(integer higher than "1
").
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics()
call:
- Increase the the minimum length of words stored
$smwgFulltextSearchMinTokenSize = 5;
This means that the minimum length of words stored in the InnoDB FULLTEXT
index is "5". This reduces the size of the index, thus speeding up queries, by omitting common words that are unlikely to be significant in a search context, such as the English words "a", "to" and "and".
- Reduce the the minimum length of words stored
$smwgFulltextSearchMinTokenSize = 1;
This means that the minimum length of words stored in the InnoDB FULLTEXT
index is "1". Only recommended for a CJK languages (Chinese, Japanese, Korean).
See also[edit]
- General information
- Help page on full-text search
- Help page on how to use full-text search
- Related configuration parameters
- Help page on configuration parameter
$smwgEnabledFulltextSearch
Sets whether full-text search support for properties may be used − Allows to enable the full-text search feature - Help page on configuration parameter
$smwgFulltextDeferredUpdate
Sets the number of expected full-text search index updates − Allows to throttle the number of expected index updates - Help page on configuration parameter
$smwgFulltextSearchTableOptions
Sets the full-text search table options to use during installation or update − Allows to set database related options - Help page on configuration parameter
$smwgFulltextLanguageDetection
Sets which languages to detect for the full-text search from an indexable text − Allows to detect a language (experimental setting) - Help page on configuration parameter
$smwgFulltextSearchIndexableDataTypes
Sets which datatypes are allowed to be indexed using the full-text search − Allows to list datatypes that should be indexed - Help page on configuration parameter
$smwgFulltextSearchPropertyExemptionList
Sets the property keys for which value assignments are being exempted from the full-text indexing − Allows to list properties that should be not be indexed - Help page on option
SMW_FIELDT_CHAR_LONG
to configuration parameter$smwgDVFeatures
− Allows to extend the searchable field length to 300 characters without the need to enable the
References
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:1481