From e5a11a6399bfeaf6342fc78079e4c7fda02c2488 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 16 Aug 2022 23:41:34 +0100 Subject: [PATCH] fix compatibility with meilisearch --- lib/mix/tasks/pleroma/search/meilisearch.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mix/tasks/pleroma/search/meilisearch.ex b/lib/mix/tasks/pleroma/search/meilisearch.ex index d4a83c3cd..27a31afcf 100644 --- a/lib/mix/tasks/pleroma/search/meilisearch.ex +++ b/lib/mix/tasks/pleroma/search/meilisearch.ex @@ -9,7 +9,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do import Ecto.Query import Pleroma.Search.Meilisearch, - only: [meili_post: 2, meili_put: 2, meili_get: 1, meili_delete!: 1] + only: [meili_put: 2, meili_get: 1, meili_delete!: 1] def run(["index"]) do start_pleroma() @@ -27,7 +27,7 @@ def run(["index"]) do end {:ok, _} = - meili_post( + meili_put( "/indexes/objects/settings/ranking-rules", [ "published:desc", @@ -41,7 +41,7 @@ def run(["index"]) do ) {:ok, _} = - meili_post( + meili_put( "/indexes/objects/settings/searchable-attributes", [ "content" @@ -91,7 +91,7 @@ def run(["index"]) do ) with {:ok, res} <- result do - if not Map.has_key?(res, "uid") do + if not Map.has_key?(res, "indexUid") do IO.puts("\nFailed to index: #{inspect(result)}") end else