Make chunk size configurable
This commit is contained in:
parent
426cff3372
commit
cc3319ac1d
2 changed files with 5 additions and 2 deletions
|
@ -858,7 +858,10 @@ config :pleroma, :search, provider: Pleroma.Search.Builtin
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.Meilisearch, url: "http://127.0.0.1:7700/", private_key: nil
|
config :pleroma, Pleroma.Search.Meilisearch,
|
||||||
|
url: "http://127.0.0.1:7700/",
|
||||||
|
private_key: nil,
|
||||||
|
initial_indexing_chunk_size: 100_000
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
|
|
|
@ -38,7 +38,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
||||||
|
|
||||||
IO.puts("Created indices. Starting to insert posts.")
|
IO.puts("Created indices. Starting to insert posts.")
|
||||||
|
|
||||||
chunk_size = 10_000
|
chunk_size = Pleroma.Config.get([Pleroma.Search.Meilisearch, :initial_indexing_chunk_size])
|
||||||
|
|
||||||
Pleroma.Repo.transaction(
|
Pleroma.Repo.transaction(
|
||||||
fn ->
|
fn ->
|
||||||
|
|
Loading…
Reference in a new issue