Fix false error in meilisearch index (#221)

the schema changed

https://docs.meilisearch.com/reference/api/documents.html#add-or-update-documents

this wasn't breaking anything, it would just report errors that were actually successes

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/221
This commit is contained in:
floatingghost 2022-09-20 10:36:21 +00:00
parent 9b2c169cef
commit b2aa82cee5
5 changed files with 23 additions and 6 deletions

View file

@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- **Breaking**: `/api/v1/pleroma/backups` endpoints now requires `read:backups` scope instead of `read:accounts`
### Fixed
- prevent false-errors from meilisearch
## 2022.09
### Added

View file

@ -141,8 +141,7 @@ You then need to set the URL and authentication credentials if relevant.
### 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.
After setting up the configuration, you'll want to index all of your already existsing posts. 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:

View file

@ -7,6 +7,20 @@ It actually consists of two components: a backend, named simply Akkoma, and a us
It's part of what we call the fediverse, a federated network of instances which speak common protocols and can communicate with each other.
One account on an instance is enough to talk to the entire fediverse!
## Community Channels
### IRC
For support or general questions, pop over to #akkoma and #akkoma-dev at [irc.akkoma.dev](https://irc.akkoma.dev) (port 6697, SSL)
### Discourse
For more general meta-discussion, for example discussion of potential future features, head on over to [meta.akkoma.dev](https://meta.akkoma.dev)
### Dev diaries and release notifications
will be posted via [@akkoma@ihba](https://ihatebeinga.live/users/akkoma)
## How can I use it?
Akkoma instances are already widely deployed, a list can be found at <https://the-federation.info/pleroma> and <https://fediverse.network/pleroma>.
@ -26,3 +40,4 @@ Just add a "/web" after your instance url (e.g. <https://pleroma.soykaf.com/web>
The Mastodon interface is from the Glitch-soc fork. For more information on the Mastodon interface you can check the [Mastodon](https://docs.joinmastodon.org/) and [Glitch-soc](https://glitch-soc.github.io/docs/) documentation.
Remember, what you see is only the frontend part of Mastodon, the backend is still Akkoma.

View file

@ -153,7 +153,7 @@ defmodule Pleroma.Search.Meilisearch do
)
with {:ok, res} <- result,
true <- Map.has_key?(res, "uid") do
true <- Map.has_key?(res, "taskUid") do
# Do nothing
else
_ ->

View file

@ -47,7 +47,7 @@ defmodule Pleroma.Search.MeilisearchTest do
Jason.decode!(body)
)
json(%{updateId: 1})
json(%{taskUid: 1})
end)
{:ok, activity} =
@ -100,11 +100,11 @@ defmodule Pleroma.Search.MeilisearchTest do
Jason.decode!(body)
)
json(%{updateId: 1})
json(%{taskUid: 1})
%{method: :delete, url: "http://127.0.0.1:7700/indexes/objects/documents/" <> id} ->
assert String.length(id) > 1
json(%{updateId: 2})
json(%{taskUid: 2})
end)
{:ok, activity} =