X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2Fconfiguration%2Fsearch.md;h=3c5611309b05fe50af43f4d5b31ca14bec8c272b;hb=a9c82b62f2b73a79613bb23c3153ccf015733c52;hp=f131948a72f1dda86a6ef4d7d63e27fa875d21bd;hpb=69d5d1a01bd43593dc0e194929c068740945843e;p=akkoma diff --git a/docs/configuration/search.md b/docs/configuration/search.md index f131948a7..3c5611309 100644 --- a/docs/configuration/search.md +++ b/docs/configuration/search.md @@ -121,3 +121,45 @@ This will clear **all** the posts from the search index. Note, that deleted post there is no need to actually clear the whole index, unless you want **all** of it gone. That said, the index does not hold any information that cannot be re-created from the database, it should also generally be a lot smaller than the size of your database. Still, the size depends on the amount of text in posts. + +## Elasticsearch + +**Note: This requires at least ElasticSearch 7** + +As with meilisearch, this can be rather memory-hungry, but it is very good at what it does. + +To use [elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`: + +> config :pleroma, Pleroma.Search, module: Pleroma.Search.Elasticsearch + +You then need to set the URL and authentication credentials if relevant. + +> config :pleroma, Pleroma.Search.Elasticsearch.Cluster, +> url: "http://127.0.0.1:9200/", +> username: "elastic", +> password: "changeme", + +### Initial indexing + +After setting up the configuration, you'll want to index all of your already existsing posts. Only public posts are indexed. You'll only +have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. + +The sequence of actions is as follows: + +1. First, change the configuration to use `Pleroma.Search.Elasticsearch` as the search backend +2. Restart your instance, at this point it can be used while the search indexing is running, though search won't return anything +3. Start the initial indexing process (as described below with `index`), + and wait until the task says it sent everything from the database to index +4. Wait until the index tasks exits + +To start the initial indexing, run the `build` command: + +=== "OTP" +```sh +./bin/pleroma_ctl search import activities +``` + +=== "From Source" +```sh +mix pleroma.search import activities +```