$smwgFulltextSearchTableOptions

From Linux Web Expert


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgFulltextSearchTableOptions
Description Sets the full-text search table options to use during installation or update
Default setting See below
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


__NOBREADCRUMBLINKS__

$smwgFulltextSearchTableOptions is a configuration parameter that sets the full-text search table options to use during installation or update. It is specific to a relational data store and currently supports MySQL/MariaDB1 and SQLite2 while PostgreSQL34 is currently not supported. The configuration parameter was introduced in Semantic MediaWiki 2.5.0Released on an unknown date unknown versions of MediaWiki and is similar to configuration parameter $wgDBTableOptions (MediaWiki.org).1

This configuration parameter only takes effect if the full-text search feature was enabled.

Default setting

$smwgFulltextSearchTableOptions = array(
	'mysql' => array( 'ENGINE=MyISAM, DEFAULT CHARSET=utf8' ),
	'sqlite' => array( 'FTS4' )
);

This means that by default either the storage engine "MyISAM" with character encoding "UTF8" for MySQL/MariaDB or "FTS4" for SQLite.

Changing the default setting

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Switching to InnoDB as the default storage engine for MySQL
$smwgFulltextSearchTableOptions = array(
	'mysql' => array( 'ENGINE=InnoDB, DEFAULT CHARSET=utf8' )
);
This may be necessary if you would like to use Azure Database for MySQL.5


Extending the option description (MySQL 5.7+)
$smwgFulltextSearchTableOptions = array(
	'mysql' => array( 'ENGINE=MyISAM, DEFAULT CHARSET=utf8', 'WITH PARSER ngram' )
);
If your are using MySQL as relational database there is no need to set options for SQLite.


Specify extra arguments for the storage engine (SQLite 3.7.4+)
$smwgFulltextSearchTableOptions = array(
	'sqlite' => array( 'FTS4', 'tokenize=porter' )
);
#scite could not render a citation text for reference "gh:smw:2661" because type "issue" was not assigned to a template.
If your are using SQLite as relational database there is no need to set options for MySQL.


Full-text search support by database management systems

According to sources full-text search support is available by:

  • MySQL version 5.6 or later with only "MyISAM" and "InnoDB" storage engines
  • MariaDB only with "MyISAM" and "Aria" storage engines, from MariaDB 10.0.5 also with the "InnoDB" storage engine and and from MariaDB 10.0.15 with the "Mroonga" storage engine
  • SQLite "FTS3" has been available since version 3.5.0, "FTS4" was added with version 3.7.4, and "FTS5" is available with version 3.9.0

See also

References

  1. a b gh:smw:1481 
  2. ^ gh:smw:1801 
  3. ^ gh:smw:1956 
  4. ^  |  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.
  5. ^ gh:smw:2661