Enabling and configuring full-text search

From semantic-mediawiki.org
< Full-text search
Semantic searchSelecting pagesFull-text searchEnabling and configuring full-text search
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 the SPARQLStore would require the native support of full-text search capabilities by the triple-store.

Enable[edit]

To make full-text search available on your wiki, set Configuration parameter $smwgEnabledFulltextSearchSets whether full-text search support for properties may be used (default: false) to true.

$smwgEnabledFulltextSearch = true;

Configure[edit]

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

  1. a b c  |  Semantic MediaWiki: GitHub pull request gh:smw:1481
  2. a b  |  Semantic MediaWiki: GitHub pull request gh:smw:1801
  3. ^  |  Semantic MediaWiki: GitHub pull request 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. ^  Semantic MediaWiki: GitHub issue comment gh:smw:2499:307624826