Commit graph

14615 commits

Author SHA1 Message Date
Ekaterina Vaartis
102ebb42bd Make search a callback 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
119b2b847b Instead of checking string length, explicitly check for "" and "." 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e20f74c71b Remove duplicate function call 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
b150e6f15e Update meilisearch docs 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
84608be87e Change updateId to uid because apparently that's the new name 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
1e23f527e3 Change the meilisearch key auth to conform to 0.25.0 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
79225d9b0a Actually, unlisted posts are indexed 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
fd2cfc80d2 Change search_indexing = 10 and retries for indexing = 2 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3387935e83 Don't try removing deleted users and such from index as posts 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
d89dc5518b Fix meilisearch tests and jobs for oban 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2bc21c6f18 Use oban for search indexing 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
6f2f457751 Add a search backend behaviour 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
4f2637acc6 Add description for initial_indexing_chunk_size 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
571533ae26 Don't support meilisearch < 0.24.0, since it breaks things 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3179ed0921 Make chunk size configurable 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3412713c5b Update search.md documentation with meilisearch indexing steps 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3a11e79de0 Add config description for meilisearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a12f63bc81 Implement suggestions from the Meilisearch MR
- Index unlisted posts
- Move version check outside of the streaming and only do it once
- Use a PUT request instead of checking manually if there is need to insert
- Add error handling, sort of
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a6946048fb Rename Activity.Search to Search.DatabaseSearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
0fae71f88d Rename search.ex to database_search.ex and add search/2 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
39e596a5b5 Style fixes 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
7009ef5672 Move the search.ex file so credo doesn't complain 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
8898b5e927 Fix a typo in search docs 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
9c1a930707 Support reindexing meilisearch >=0.24.0
It has has a different error code key
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e928e307f3 Add a reindex option
Signed-off-by: Ekaterina Vaartis <vaartis@kotobank.ch>
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
4445421297 Only add local posts to index in activity_pub
Remote ones are already added in another place
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
0b4fd0d342 Set content-type to application/json 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e4b7a3f51f Modify some meilisearch variables 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
cf558208c2 Use proper deleted object for removing from index 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
95cb2bb694 Don't try removing from index again in common_api
It's already removed in the side effects of the pipeline
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
c569ad05b3 Add more documentation about rum to meilisearch docs 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
6beef2d117 Move add_to_index / remove_from_index to Pleroma.Actitivy.Search 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
40280cc273 Reorder ranking rules for (maybe) better results 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a5bb7f9345 Add private_key: nil to default meilisearch options 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
005947e9f7 Add tests for local post indexing for meilisearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
d9ef7e0758 Fix activity being passed to objec_to_search_data 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
07ccab9766 Add search/meilisearch documentation 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
09a1ae1b6e Add the meilisearch.stats command 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a67f9da5cc Add a message with a count of posts to index 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2c7d973af7 Implement meilisearch auth 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
410c8cb765 Make indexing logs rewrite themselves 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
35e9192ced Rework task indexing to share code with the main module
The code in the main module now scrubs new posts too
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3dedadf192 Adjust content indexing to skip more unneeded stuff 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
9f16ca80e0 Mark only content as searchable for meilisearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2b2e409ad7 Also index incoming federated posts 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e35d87ea54 Make the chunk size smaller 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
00c48a33ac Use content instead of source and scrub it 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
9beaebd97e Tweak search ordering to hopefully return newer results 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
38996f551a Make meilisearch sort on publish date converted to unix time 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
ea6a6a1287 Make the indexing batch differently and more, show number indexed 2022-10-10 20:19:08 +03:00