DEV Community

Cover image for Best Alternative to Algolia in China
21CloudBox
21CloudBox

Posted on • Updated on • Originally published at 21cloudbox.com

Best Alternative to Algolia in China

What is Algolia?

Algolia is an American startup company. They provide an easy-to-use search engine service that allows developers to quickly retrieve and search the content on their site.

Can Algolia be used in China?

Short answer: Yes, but it will be slow.

Long answer:

Algolia has a service node in Hong Kong, but there is not a service node in mainland China. As you can see in the figure below, the network delay is between 600-700ms, so it is very slow in mainland China.

Alt Text Algolia's Hong Kong node access network delay

MeiliSearch is the Open Source Alternative for Algolia

Alt Text MeiliSearch Official Website

What is MeiliSearch?

MeiliSearch is an open source search engine developed based on the Rust language. It aims to provide users with a powerful and customizable search experience. It includes out-of-the-box features such as spelling error tolerance, filtering, and synonyms for any type of project.

Why Choose MeiliSearch?

MeiliSearch is the ideal alternative to Algolia because is open source, supports Chinese, and their developer community is relatively active. In contrast, Algolia is closed source.

In terms of price, Algolia does offers a free plan but if the monthly search volume exceeds 10,000, then it will be $1 USD / 1,000 searches.

However, MeiliSearch does not have the problem of paying on a pay-per-use basis. This is because most the cost is for the server and traffic.

Alt Text Algolia official website product price

If you have privacy requirements, using Algolia may be more difficult. This is because Algolia knows what your users are searching and track the data.
The open source MeiliSearch can protect your search data, offering a more private solution.

How to Quick can I Install a MeiliSearch Server?

21YunBox provides an alternative to Algolia in China with their one-click hosting and operations and maintenances free MeiliSearch solution.

  1. Register as a 21YunBox Member
  2. Click "Hosted Application" in the menu of 21YunBox
  3. Select "MeiliSearch"
  4. Choose the appropriate server configuration
  5. Click "Create Now"

In moments, your MeiliSearch will be deployed online. You can then access it through <APP_ID>.21yunbox.com.

Alt Text MeiliSearch for the search index has not been loaded yet

You can test it in the MeiliSearch dashboard, and you will see that there are no results for the search now. This is because we have not added a search index.

How to Add Search Index to MeiliSearch?

You can load the official example movies.json data set through curl MeiliSearch, the operation is as follows:

curl \
  -X POST'https://<APP_ID>.21yunbox.com/indexes/movies/documents' \
  --data @movies.json
Enter fullscreen mode Exit fullscreen mode

For more information about MeiliSearch, please refer to MeiliSearch official document

How to Search with MeiliSearch?

MeiliSearch provides 6+ languages ​​SDK which can be used directly.
At the same time, MeiliSearch Server also provides a visual web interface, which can be used to test search results, just go to <APP_ID>.21yunbox.com to access.

The following is the result of searching for 'Spiderman 2'

Alt Text Search for 'Spiderman 2' returned results

Other related blogs:

Why Choose 21YunBox?

21YunBox is a Cloud Service platform based out of Beijing. Our services enable your team to be more effective in leveraging the growing opportunity within China by hosting your sites at blazing speeds with an operational and maintenance free, and low code solution.

21YunBox provides an easy and budget friendly, end-to-end web platform deployment service for all applications from small teams to large enterprises.
We also offer full support in obtaining your ICP license allowing you to legally host online content inside of Mainland China.

To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:



This article's content originated here

For additional detail and future modifications, refer the original post.

Top comments (0)