Status: | effective |
Progress: | 100% |
Version: | 3.0.0+ |
Table of Contents | |
---|---|
Full-text search for SQL (MySQL, MariaDB or SQLite) is not enabled by default since it is still considered experimental. Follow the following steps to enable, configure and fine-tune this feature on your wiki.
Check the requirements[edit]
- Support was added for MySQL/MariaDB1 and SQLite2 while PostgreSQL34 is currently not supported.
- Only
SMWSQLStore3
is supported since theSPARQLStore
would require the native support of full-text search capabilities by the triple-store.
- Semantic MediaWiki 2.5.0+
SMWSQLStore3
using MySQL 5.5+1, MariaDB 10.0.5+1 or SQLite 3.8+2- PHP 5.5+
Enable[edit]
To make full-text search available on your wiki, set Configuration parameter $smwgEnabledFulltextSearch
Sets whether full-text search support for properties may be used (default: false) to true.
$smwgEnabledFulltextSearch = true;
Configure[edit]
- Configuration parameter
$smwgFulltextDeferredUpdate
Sets the number of expected full-text search index updates − Allows to throttle the number of expected index updates - Configuration parameter
$smwgFulltextSearchTableOptions
Sets the full-text search table options to use during installation or update − Allows to set database related options - Configuration parameter
$smwgFulltextSearchMinTokenSize
Sets the minimum word/token length to help to decide whether MATCH or LIKE operators are to be used for a condition statement − Allows to describe the minimum word/token - Configuration parameter
$smwgFulltextLanguageDetection
Sets which languages to detect for the full-text search from an indexable text − Allows to detect a language (experimental setting) - Configuration parameter
$smwgFulltextSearchIndexableDataTypes
Sets which datatypes are allowed to be indexed using the full-text search − Allows to list datatypes that should be indexed - 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 - If the
SMW_FIELDT_CHAR_NOCASE
option to configuration parameter$smwgFieldTypeFeatures
Sets relational database specific field type features is enabled the full-text search only comes into effect for selections using the comparators~
and!~
.5
Update the database indexes[edit]
The next step is to run maintenance script "rebuildFulltextSearchTable.php"Allows to rebuild the full text search data table. This will create the necessary table for special full-text index operations.
Continue here for detailed instructions on how to do indexing.
Keep the database in shape[edit]
It is recommended to set up a cronjob to run rebuildFulltextSearchTable
on a regular basis. Note also that changes to any of the above settings requires to re-run maintenance script "rebuildFulltextSearchTable.php"Allows to rebuild the full text search data table.
References
- a b c | Semantic MediaWiki: GitHub pull request gh:smw:1481
- a b | Semantic MediaWiki: GitHub pull request gh:smw:1801
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:1956
- ^ | PostgreSQL, farklı bir dizin şeması nedeniyle desteklenmiyor (ör.
to_tsvector
,to_tsquery
) ancak bunu kullanıma sunmak isteyen kullanıcıların, PostgreSQL'e özgü bir uygulamanın nasıl oluşturulacağıyla ilgili "MySQLValueMatchConditionBuilder" ile bir göz atmaları önerilir. - ^ Semantic MediaWiki: GitHub issue comment gh:smw:2499:307624826