Semantic MediaWiki and related extensions
FAQ

Why Elasticsearch?

Why not combine the SQLStore and ES search where ES only handles the text search?

The need to support ordering of results requires that the sorting needs to happen over the entire set of results that match a condition. It is not possible to split a search between two systems while retaining consistency for the offset (from where result starts and end) pointer.

Why not use ES as a replacement?

Because at this point of implementation ES is used search engine and not a storage backend therefore the data storage and management remains part of the SQLStore. The SQLStore is responsible for creating IDs, storing data objects, and provide answers to requests that doesn't involve the QueryEngine.

Elasticsearch

Limit of total fields [3000] in index [...] has been exceeded

If the rebuilder or ES returns with a similar message then the preconfigured limit needs to be changed which is most likely caused by an excessive use of property declarations. The user should question such usage patterns and analyze why so many properties are used and whether or not some can be merged or properties are in fact misused as fact statements.

The limit is set to prevent mapping explosion but can be readjusted using the index.mapping.total_fields.limit (maximum number of fields in an index) setting.

$GLOBALS['smwgElasticsearchConfig']['settings']['data'] = [
    'index.mapping.total_fields.limit' => 6000
];

After changing those settings, ensure to run php rebuildElasticIndex.php --update-settings.

Your version of PHP / json-ext does not support the constant 'JSON_PRESERVE_ZERO_FRACTION', which is important for proper type mapping in Elasticsearch. Please upgrade your PHP or json-ext.

elasticsearch-php#534 has some details about the issue. Please check the version matrix to see which version is compatible with your PHP environment.

"Connection.php: {"error":{"root_cause":[{"type":"parse_exception","reason":"No processor type exists with name [attachment]","header":{"processor_type":"attachment"}}] ..."

The file indexer (experimental.file.ingest) was enabled but the required ES ingest-plugin was not installed.

MediaWiki, Semantic MediaWiki, and Elasticsearch

I use CirrusSearch, can I search SMW (or its data) via CirrusSearch?

No, because first of all SMW doesn't rely on CirrusSearch at all and even if a user has CirrusSearch installed both extensions have different requirements and different indices and are not designed to share content with each other.

Can I use Special:Search together with SMW and CirrusSearch?

Yes, by adding `$wgSearchType = 'SMWSearch';one can use the#ask<tt>syntax (e.g.[[Has date::>1970]]) and execute structured or unstructured searches. Using the [extended profile](https://www.semantic-mediawiki.org/wiki/Help:SMWSearch/Extended_profile) or#ask` constructs a search input that will retrieved results via Semantic MediaWiki (and hereby ES).

Glossary

Other recommendations


About | General disclaimer | Privacy policy