|Provides information about using Elasticsearch|
|Table of Contents|
|Search feature information|
|ElasticStore the component to establish a connection between Semantic MediaWiki and a Elasticsearch cluster.|
The ElasticStore was introduced as part of Semantic MediaWiki 3.01 to provide a powerful and scalable Query Engine that can serve enterprise users and wiki-farm users better by moving query heavy computation to an external entity (meaning separated from the main DB master/replica) known as Elasticsearch.2.
ElasticStore provides a framework to replicate Semantic MediaWiki related data to an Elasticsearch cluster and enable its
QueryEngine to send
#ask requests and retrieve information from Elasticsearch (aka ES) instead of the default
The objective is to provide an interface to Elasticsearch to:
- improve structured (and allow unstructured) content searches
- extend and improve full-text query support (including sorting of results by relevancy)
- provide means for a scalability strategy by relying on the ES infrastructure
- Elasticsearch: Recommended 6.1+, Tested with 5.6.6
- Semantic MediaWiki: 3.0+
~6.0or PHP ^5.6.6
ElasticStore relies on the elasticsearch php-api to communicate with Elasticsearch directly and is therefore independent from any other vendor or MediaWiki extension that may use Elasticsearch as search backend (e.g.
It is recommended to:
- Use Elasticsearch 6+ due to improvements to its sparse field handling
- Consult the official hardware guide on specific Elasticsearch requirements
ElasticStore provides the same query features (given those are tested) as the
SQLStore making its functionality equivalent to the
SQLStore but provides better support for free text matches or for unstructured text (if enabled) when retrieved from an article or file. Furthermore, improved performance and scalability is expected especially when the document count becomes significant larger than 50000 articles or a lot of fulltext queries are executed.
- Active replication monitoring to inform user about the replication state of a document
- Handling of active property type changes without the need to rebuild the entire index itself after it is ensured that all
ChangePropagationjobs have been processed
- Support of inverse queries such as
- Support of property chain and path queries (e.g.
- Support of category and property hierarchies
Before the ElasticStore (hereby Elasticsearch) can be used as drop-in replacement for the existing
QueryEngine the following settings and operations are required:
$GLOBALS['smwgDefaultStore'] = 'SMWElasticStore';(see
$GLOBALS['smwgElasticsearchEndpoints'] = [ ... ];(see
- Rebuild the index using
Elasticsearch is not expected to be used as data store replacement which means a RDMBS backend (MySQL, SQLite, or Postgres) is still required.
ElasticStore provides a customized serialization format to transform and transfer the required data to Elasticsearch. The
QueryEngine provides a #ask-ES DSL interpreter (see domain language) which ensures that any existing
#ask query can be answered by the Elasticsearch cluster without changing its syntax when switching from a
SQLStore (given that index process has been completed).