$smwgFulltextSearchIndexableDataTypes

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgFulltextSearchIndexableDataTypes
Description Sets which datatypes are allowed to be indexed using the full-text search
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


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

NoteNote: This setting only takes effect if the full-text search feature was enabled.
Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter accepts an array of plain string keys instead of the SMW_FT_* constants. The constant form still works but is deprecated and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki..2

Default setting[edit]

$smwgFulltextSearchIndexableDataTypes = [ 'blob', '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.

NoteNote:
  • Option 'wikipage' (formerly 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.3

Available options[edit]

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

Changing the default setting[edit]

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

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

Also enable properties of datatype "Page" to be indexed
$smwgFulltextSearchIndexableDataTypes = [ 'blob', 'uri', 'wikipage' ];
NoteNote: Enabling '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 ~/!~.

Legacy constant form (deprecated since 7.0.0)[edit]

The constant form below is deprecated since Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki.. Use the string-array form shown above instead. It is documented here for wikis still running the constant form.

The default expressed with constants:

$smwgFulltextSearchIndexableDataTypes = SMW_FT_BLOB | SMW_FT_URI;

An option can be added with a bit-operation, e.g. to also index "Page" values:

$smwgFulltextSearchIndexableDataTypes = $smwgFulltextSearchIndexableDataTypes | SMW_FT_WIKIPAGE;

See also[edit]


References

  1. ^  |  Semantic MediaWiki: GitHub pull request gh:smw:2122
  2. ^  | | | | | | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6793
  3. ^  Semantic MediaWiki: GitHub issue comment gh:smw:2122:267830544