Help:ElasticStore/Index setup

From semantic-mediawiki.org

Before the ElasticStore (and hereby Elasticsearch) can be used as drop-in replacement for the existing SQLStore and its QueryEngine, the following settings and operations are necessary:

  • Set $smwgDefaultStoreSets the storage backend to be used for the semantic data to 'SMWElasticStore';`
  • Set $smwgElasticsearchEndpoints to [ ... ];`
  • Run `php setupStore.php` or `php update.php`
  • Rebuild the index using `php rebuildElasticIndex.php`

It is required to run the rebuildElasticIndex.php (or rebuildData.php) script to grant access to any preexisting data and enable the query answering.

Using rebuildElasticIndex.php over rebuildData.php has the advantage that it will read the data directly from the SQL backend (SQLStore) without parsing any wikitext allowing it to be faster when building the Elasticsearch index.

Index[edit]

The data index in Elasticsearch will contain documents with each document representing the data assigned to a subject (i.e a wikipage or subobject) in Semantic MediaWiki. The ID assigned to a subject in Semantic MediaWiki will be reused as the ID for the document in Elasticsearch.

See also[edit]