Help:Configuration parameter "$smwgFulltextSearchIndexableDataTypes"

Jump to: navigation, search
edit with form (experimental)

Title $smwgFulltextSearchIndexableDataTypes
Description Sets which datatypes are allowed to be indexed using the full-text search
Default setting See below
Software Semantic MediaWiki
First version supported 2.5.0
Last version supported still available
Configuration Full-text search
Keyword Full-text search

$smwgFulltextLanguageDetection is a configuration parameter that sets which datatypes are allowed to be indexed using the full-text search. It was introduced in Semantic MediaWiki

NoteNote: This setting only takes effect if the full-text search feature was enabled.

Default setting

$smwgFulltextSearchIndexableDataTypes = SMW_FT_BLOB | SMW_FT_URI;

This means that by default properties which use storage engine data types strings of characters or text to store their database tables (Blob, URI), e.g. "Text" or "URL", etc. but not "Page". These datatypes use either CHAR, VARCHAR, or TEXT to store their data in the database tables.

  • Option SMW_FT_WIKIPAGE is not added as default value as no performance impact analysis is available as to how indexing and search performance would be affected by a wiki with a large pool of pages (10,000+) or extended page type value assignments on a full-text index.
  • Datatypes provided by the "Semantic Extra Special Properties", "Semantic Cite" and "Semantic Interlanguage Links" extensions which also use the storage engine data types Blob (Text) or URI are also indexed.2

Available options

  • SMW_FT_BLOB: Allows property values to database data type Blob (Text) to be indexed
  • SMW_FT_URI: Allows property values to database data type URI to be indexed
  • SMW_FT_WIKIPAGE: Allows property values to database data type Blob (Text) as semantic datatype "Page" to be indexed

Changing the default setting

Important noteImportant Note: The "rebuildFulltextSearchTable.php" maintenance script has to be run after changing the setting of this configuration parameter.

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

Also enable properties of datatype "Page" to be indexed
$smwgFulltextSearchIndexableDataTypes = $smwgFulltextSearchIndexableDataTypes | SMW_FT_WIKIPAGE;
NoteNote: Enabling SMW_FT_WIKIPAGE will support the same search features (case insensitivity, phrase matching etc.) as available for Text or URI values when searches are executed using the ~/!~.

See also


  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2122
  2. ^  Semantic MediaWiki: GitHub pull request #2122 comment