Make search result order match the order of objects received from Meilisearch #579

Open
AdamK2003 wants to merge 1 commit from AdamK2003/akkoma:meilisearch-result-order into develop
First-time contributor

The search results are normally sorted by published date before getting to the client, which makes the result order not match the Meilisearch result order if you tweak your Meilisearch ranking settings. This PR sorts the results back into the initial Meilisearch order after fetching them from the repo.

The search results are normally sorted by published date before getting to the client, which makes the result order not match the Meilisearch result order if you tweak your Meilisearch ranking settings. This PR sorts the results back into the initial Meilisearch order after fetching them from the repo.
AdamK2003 added 1 commit 2023-07-04 10:04:41 +00:00
Fix search result order for Meilisearch
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
7dd439807f
Member

@AdamK2003 can you test whether f32335742d also works for you? It directly fetches results in the correct order instead of using a O(n²) resort afterwards, but i don’t have Meilisearch set up.

EDIT: i was now able to confirm this works myself, see #772

@AdamK2003 can you test whether https://akkoma.dev/Oneric/akkoma/commit/f32335742daf8b037b136584f859cb59666edf65 also works for you? It directly fetches results in the correct order instead of using a O(n²) resort afterwards, but i don’t have Meilisearch set up. **EDIT:** i was now able to confirm this works myself, see #772
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
This pull request has changes conflicting with the target branch.
  • lib/pleroma/search/meilisearch.ex
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u meilisearch-result-order:AdamK2003-meilisearch-result-order
git checkout AdamK2003-meilisearch-result-order
Sign in to join this conversation.
No description provided.