Help:Full-text search

Jump to: navigation, search

This is a placeholder for information regarding full-text search 1 in combination with Semantic MediaWiki. Full-text search on property of values of type "Text" or "URI" is an upcoming feature in SMW v2.5 and is not yet available in earlier versions.


  • MySQL 5.5+ / MariaDB 10.0.5+
  • ...

How to enable full-text search

Work in progress

(1) Add the following line to Localsettings.php:

$smwgEnabledFulltextSearch = true;

(more info: $smwgEnabledFulltextSearch)

(2) From the command line, execute the following scripts:




and to collect and rebuild the index table,


See Help:Maintenance script "rebuildFulltextSearchTable.php" for more options and information about this script.

(3) If necessary, you can adjust the following configuration settings in Localsettings.php:



In addition to the regular combination of tildes (~) and asterisk (*) wildcards, as explained elsewhere on this wiki, full-text search also offers some additional features.

Phrase matching (both uppercase and lowercase)

Phrase matching is done by putting double quotes on either side of the phrase ("..."). This works for both uppercase and lowercase characters.

example taken from [1]

text indexed with Property:Has text:

... The principles of definition, the law of contradiction, the fallacy of arguing in a circle, the distinction between the essence and accidents of a thing or notion, between means and ends, between causes and conditions; also the division of the mind into the rational, concupiscent, and irascible elements, or of pleasures and desires into necessary and unnecessary --these and other great forms of thought are all of them to be found in the Republic, and were probably first invented by Plato. The greatest of all logical truths, and the one of which writers on philosophy are most apt to lose sight, the difference between words and things, has been most strenuously insisted on by him, although he has not always avoided the confusion of them in his own writings. ...

example query:

{{#ask: [[Has text::~"probably first invented by plato"]]
 |?Has text

(note the difference between Plato (with an uppercase initial) in the original text and plato as part of the query string)


A collection of examples is available from the Sandbox site.

Tecnical notes

DB back-end full-text search

DB back-end full-text search solutions will bring a set of possible search modifiers and operators. Some information about how to use them can be found at:

See also