discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
385 stars 40 forks source link

Feature: integrate meilisearch for searching #56

Open Codycody31 opened 2 months ago

Codycody31 commented 2 months ago

Adds support for the use of meilisearch for quick indexing and searching of discuit communities.

Required

If Possible

General

After this is merged, someone who is better at UI stuff than me should probably make the searching be nice lol

Known Issues

Related Issues:

Codycody31 commented 2 months ago

A new issue has been found! batching of data, as currently, it would attempt to dump the entire posts table to the index, however, the posts table has over 27K records sooooo. I'll need to batch the data, good thing is I already have code for it, just need to convert it over.

Codycody31 commented 2 months ago

@previnder, the indexing logic along with everything else is finished. Now when pulling data to index it takes it in batches of 5000 records (I'll change it if you want it to be higher or lower, probably higher around 10,000 or 15,000). When pushing the data over to meilisearch we chunk it into batches of 50MiB (or less if we don't have that much data). By default, the searching ability is disabled and still makes use of the Google search to allow for the hoster to fully configure everything without having to worry about meilisearch till they are ready.

Codycody31 commented 2 weeks ago

Merged latest, and now configured to also work with environment variables