Github mirror of MediaWiki extension Elastica - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing
转到文件
Translation updater bot 69a85f339e Localisation updates from https://translatewiki.net.
Change-Id: I577f6dfbe2e90ecdb5ab746ff6f41b5a828eebb0
2024-05-16 09:26:07 +02:00
.phan Use RuntimeException instead of Exception 2024-02-23 20:58:54 +01:00
i18n Localisation updates from https://translatewiki.net. 2024-05-16 09:26:07 +02:00
includes Use RuntimeException instead of Exception 2024-02-23 20:58:54 +01:00
tests/phpunit tests: Use assertInstanceOf instead of get_class 2023-12-12 13:34:28 +01:00
.eslintrc.json build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 11:56:40 +00:00
.gitignore Replace jshint with eslint 2019-11-04 12:57:41 +00:00
.gitreview .gitreview: Remove defaultrebase/defaultbranch 2023-09-08 20:49:10 +01:00
.phpcs.xml build: Updating ansi-regex to 5.0.1 2021-10-04 20:29:08 +00:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 12:06:43 +00:00
COPYING Add COPYING 2014-03-01 16:24:01 +00:00
Gruntfile.js build: Updating dependencies 2021-01-29 10:57:36 +00:00
Makefile Move iterateOverScroll from Cirrus to Elastica 2016-05-16 13:29:49 +02:00
README Use https URLs in MediaWiki:Elastica-desc 2024-02-20 16:49:10 +01:00
composer.json build: Updating composer dependencies 2024-05-05 16:19:32 +00:00
extension.json build: Update MediaWiki requirement to 1.42 2024-01-12 14:10:38 -05:00
package-lock.json build: Updating grunt-banana-checker to 0.12.0 2024-05-10 04:17:48 +00:00
package.json build: Updating grunt-banana-checker to 0.12.0 2024-05-10 04:17:48 +00:00

README

MediaWiki extension: Elastica
----------------------------------
Provides basic Elasticsearch functionality used by other extensions.


What this provides
------------------
First and foremost this provides Elastica, a PHP library used to access
Elasticsearch, and the configuration to get it working with MediaWiki's
autoloader.

Secondly this provides ElasticsearchConnection, a base type from which
extensions can inherit that forms and caches connections in a MediaWiki friendly
way.  It contains support for indexes that have the concept of "type" and
"identifier" in the way that CirrusSearch uses these concepts.


"Type" and "identifier"
-----------------------
Index "type" in the CirrusSearch sense is used to the search corpus into
different "types" of index so those indecies can be configured with different
sharding and replication configuration, and so suggestions, which are based on
term frequency, are more accurate.  For example, CirrusSearch has a "content"
index type which stores just content articles and a "general" index type which
stores all other articles.

Index "identifier" in the CirrusSearch sense is just a string appended to the
un-identified name of the index.  The full name of the index includes the
identifier and that index is aliased to the un-identified name.  The applicate
refers to the un-identified index (the alias) so that the index can be rebuilt
with a different identifier and then the alias can be atomically swapped to the
new index.

This extension currently doesn't include support for building or maintaining
indices but CirrusSearch's updateOneSearchIndexConfig.php can be used as a
model.


Installation
------------
Fetch this plugin plugin into your extensions directory.
Make sure you have the curl php library installed (sudo apt-get install
php-curl in Debian.)
Fetch the elastica library by running "composer install".
Add this to LocalSettings.php:
 wfLoadExtension( 'Elastica' );


Licensing information
---------------------
CirrusSearch makes use of the Elastica library to connect to Elasticsearch
<https://elastica.io/>.
It is Apache licensed and you can read its LICENSE.txt for
more information.