Difference between revisions of "Elasticsearch"
Jump to navigation
Jump to search
m (→Video: replace badly encoded character) |
|||
(48 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | This site uses Elasticsearch for it's search functionality under the hood. | ||
{{Feature | {{Feature | ||
− | | | + | |explains= Search |
− | + | |description= This site uses Elasticsearch for the best possible search experience [[File:System-search.svg|link=Search|thumb|64px]] | |
− | | | + | |notes= |
− | + | |tests= | |
− | + | |examples= | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
− | |||
− | |||
− | |||
− | == | + | == About == |
− | + | Elasticsearch is a distributed RESTful search engine built for the cloud. Features include: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | * Distributed and Highly Available Search Engine. | ||
+ | ** Each index is fully sharded with a configurable number of shards. | ||
+ | ** Each shard can have one or more replicas. | ||
+ | ** Read / Search operations performed on either one of the replica shard. | ||
+ | * Multi Tenant with Multi Types. | ||
+ | ** Support for more than one index. | ||
+ | ** Support for more than one type per index. | ||
+ | ** Index level configuration (number of shards, index storage, ...). | ||
+ | * Various set of APIs | ||
+ | ** HTTP RESTful API | ||
+ | ** Native Java API. | ||
+ | ** All APIs perform automatic node operation rerouting. | ||
+ | * Document oriented | ||
+ | ** No need for upfront schema definition. | ||
+ | ** Schema can be defined per type for customization of the indexing process. | ||
+ | * Reliable, Asynchronous Write Behind for long term persistency. | ||
+ | * (Near) Real Time Search. | ||
+ | * Built on top of Lucene | ||
+ | ** Each shard is a fully functional Lucene index | ||
+ | ** All the power of Lucene easily exposed through simple configuration / plugins. | ||
+ | * Per operation consistency | ||
+ | ** Single document level operations are atomic, consistent, isolated and durable. | ||
+ | * Open Source under the Apache License, version 2 ("ALv2") | ||
− | == | + | == Video == |
− | + | * [https://vimeo.com/136326424 Building Elasticsearch: From Idea to {code} to Adoption] The back side of a napkin, a pen, and a few beverages are often the ingredients that yield good ideas. Elasticsearch had a different origin. It started with a need for a simple search box for a collection of recipes. '''Shay Banon''', creator of Elasticsearch and CTO at Elastic, shares the history behind pushing the code for his first open source project that led to the creation of Elasticsearch | |
+ | * https://www.elastic.co/about | ||
− | + | == Elasticsearch for MediaWiki == | |
+ | To improve the out-of-the-box search experience with MediaWiki, you should install the [[mw:Extension:CirrusSearch]]. CirrusSearch is just a connector to the Elasticsearch engine. Thus, to use CirrusSearch, first install the [[Elasticsearch]] system (you can use [https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html the repositories for that]). | ||
This system has three components: Elastica, CirrusSearch, and Elasticsearch. | This system has three components: Elastica, CirrusSearch, and Elasticsearch. | ||
+ | ; Elastica : Elastica is a MediaWiki extension that provides the library to interface with Elasticsearch. It wraps the [https://github.com/ruflin/Elastica Elastica] library. It has no configuration. | ||
+ | ; CirrusSearch : CirrusSearch is a MediaWiki extension that provides search support backed by Elasticsearch. | ||
+ | ; Elasticsearch : is a Java application, so you need [[Java]] installed as well. At the time of this writing, there is a version mismatch. Elasticsearch is at version 2.1.1 in the repositories, but CirrusSearch is only compatible with the older 1.7 version. | ||
− | + | == Installation == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ==Installation== | ||
Here's a quick example of how we got all the parts installed on an [[Ubuntu]] server. | Here's a quick example of how we got all the parts installed on an [[Ubuntu]] server. | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 290: | Line 92: | ||
Checking if elasticsearch is running | Checking if elasticsearch is running | ||
<source lang="bash"> | <source lang="bash"> | ||
− | curl http://localhost:9200/ | + | curl -X GET http://localhost:9200/ |
</source> | </source> | ||
<source lang="javascript"> | <source lang="javascript"> | ||
Line 321: | Line 123: | ||
</source> | </source> | ||
− | ==Resources== | + | == Resources == |
− | + | * https://phabricator.wikimedia.org/diffusion/ECIR/browse/master/CirrusSearch.php | |
− | + | * https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FCirrusSearch.git/HEAD/README | |
− | *https://phabricator.wikimedia.org/diffusion/ECIR/browse/master/CirrusSearch.php | + | * https://wikitech.wikimedia.org/wiki/Search |
− | *https:// | ||
− | *https://wikitech.wikimedia.org/wiki/Search | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Search]] | [[Category:Search]] | ||
− | |||
− | |||
− |