ThatGuySam / doesitarm

🦾 A list of reported app support for Apple Silicon as well as Apple M4 and M3 Ultra Macs
https://doesitarm.com/
Other
3.76k stars 204 forks source link

Implement Meilisearch for search engine #891

Closed ppamorim closed 2 years ago

ppamorim commented 2 years ago

Hi!

I been analysing the source code of the project and I noticed that the search functionality used is done all in the browser. Would you like to migrate it to a full text search like Meilisearch? I could help you to implement that in the project.

I can see this code here: This can be very expensive to process, in some situations it can take up to 1 second on my M1 Pro: https://github.com/ThatGuySam/doesitarm/blob/master/components/search.vue#L556

We can either use the self hosted version running in the same server or used the cloud solution. It's up to you.

Thank you

ThatGuySam commented 2 years ago

Thanks for the offer!

One of the engineering goals I have for Does It ARM is to stay as static as possible, but it's getting to be tricky to load 3k apps into a browser.

If we can keep the app as static as possible it won't be susceptible to computing providers being sold and/or shut down which doesn't always happen but I like to account for.

My questions would be:

ppamorim commented 2 years ago

Hi @ThatGuySam, thank you for the answer! Answering some of the questions:

- Can Meilisearch be implemented without a Database?

Meilisearch creates the database for you, it uses LMDB (Lightning Memory-Mapped Database) internally. You only store that in a disk on AWS if you want. Since the payload if small I believe that restarting the service and reindexing could be as fast as loading the snapshot.

- What is the infrastructure required for Self-hosted?

You can read that here: https://docs.meilisearch.com/faq.html#what-are-the-recommended-requirements-for-hosting-a-meilisearch-instance For this database, I would suspect that a single core machine + 1GB could be testable and very I believe that it can handle without problems. Meilisearch also offers the cloud service, but it's on beta at the moment.

Can it be implemented while maintaining the current UI?

Yes we can, there is no need to use any specific UI for that, we can use the JS library for that: https://github.com/meilisearch/meilisearch-js

There is a series of tutorials explaining how to deploy the server:

AWS: https://docs.meilisearch.com/learn/cookbooks/aws.html GCP: https://docs.meilisearch.com/learn/cookbooks/gcp.html Kubernetes: https://github.com/meilisearch/meilisearch-kubernetes

If you want to test it locally, you can try this: https://docs.meilisearch.com/learn/getting_started/quick_start.html#step-1-setup-and-installation

ThatGuySam commented 2 years ago

This looks like it will be decent amount of setup so let's convert this into a discussion