|
| 1 | +<p align="center"> |
| 2 | + <img src="https://raw.githubusercontent.com/meilisearch/integration-guides/master/assets/logos/logo.svg" alt="Meilisearch" width="200" height="200" /> |
| 3 | +</p> |
| 4 | +<h1 align="center">Meilisearch matching strategy demo</h1> |
| 5 | + |
| 6 | +<h4 align="center"> |
| 7 | + <a href="https://github.com/meilisearch/MeiliSearch">MeiliSearch</a> | |
| 8 | + <a href="https://docs.meilisearch.com">Documentation</a> | |
| 9 | + <a href="https://www.meilisearch.com">Website</a> | |
| 10 | + <a href="https://blog.meilisearch.com">Blog</a> | |
| 11 | + <a href="https://twitter.com/meilisearch">Twitter</a> | |
| 12 | + <a href="https://docs.meilisearch.com/faq">FAQ</a> |
| 13 | +</h4> |
| 14 | + |
| 15 | +<p align="center"> |
| 16 | + <a href="https://github.com/meilisearch/MeiliSearch/discussions" alt="Discussions"><img src="https://img.shields.io/badge/github-discussions-red" /></a> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Requirements |
| 20 | + |
| 21 | + - [yarn](https://yarnpkg.com/) |
| 22 | + - [Docker](https://docs.docker.com/get-docker/) |
| 23 | + |
| 24 | +## Demo |
| 25 | + |
| 26 | +This demo showcases Meilisearch's v0.30 new pagination mode: numbered pagination. |
| 27 | + |
| 28 | +v0.30 introduces a numbered pagination mode for users who need pagination interfaces. |
| 29 | + |
| 30 | +You can find more information about this pagination mode in [our documentation](https://docs.meilisearch.com/learn/advanced/pagination.html#numbered-page-selectors) |
| 31 | + |
| 32 | +If you want to replicate this demo using your own Meilisearch instance, you have to follow these steps: |
| 33 | + |
| 34 | +### 1. Download and launch Meilisearch |
| 35 | + |
| 36 | +[Download and launch Meilisearch](https://docs.meilisearch.com/learn/getting_started/quick_start.html) using the basic configuration. For example, by using [Docker](https://docs.docker.com/get-docker/) in your terminal. |
| 37 | + |
| 38 | +```bash |
| 39 | + |
| 40 | +# Fetch the latest version of Meilisearch image from DockerHub |
| 41 | +docker pull getmeili/meilisearch:v0.30 |
| 42 | + |
| 43 | +# Launch Meilisearch in development mode with a master key |
| 44 | +docker run -it --rm \ |
| 45 | + -p 7700:7700 \ |
| 46 | + -e MEILI_MASTER_KEY='MASTER_KEY'\ |
| 47 | + -v $(pwd)/meili_data:/meili_data \ |
| 48 | + getmeili/meilisearch:v0.30 \ |
| 49 | + meilisearch --env="development" |
| 50 | +``` |
| 51 | + |
| 52 | +There are many other easy ways to [download and run a Meilisearch instance](https://docs.meilisearch.com/learn/getting_started/quick_start.html#download-and-launch). |
| 53 | + |
| 54 | + |
| 55 | +### 2. Set your credentials |
| 56 | + |
| 57 | +Set the credentials of the Meilisearch instance as environment variables. |
| 58 | +``` |
| 59 | +VITE_MEILI_HOST="<yourMeilisearchInstanceAddress>" |
| 60 | +VITE_MEILI_SEARCH_API_KEY="<yourMeilisearchSearchAPIKey>" |
| 61 | +VITE_MEILI_ADMIN_API_KEY="<yourMeilisearchAdminAPIKey>" |
| 62 | +``` |
| 63 | + |
| 64 | +You can learn more about master and API keys in [the dedicated section of our documentation](https://docs.meilisearch.com/learn/security/master_api_keys.html). |
| 65 | + |
| 66 | +### 3. Install the dependencies |
| 67 | + |
| 68 | +```bash |
| 69 | + |
| 70 | +yarn |
| 71 | + |
| 72 | +``` |
| 73 | + |
| 74 | +### 4. Run the setup |
| 75 | + |
| 76 | +```bash |
| 77 | + |
| 78 | +yarn setup |
| 79 | + |
| 80 | +``` |
| 81 | + |
| 82 | +This does the following: |
| 83 | + |
| 84 | +- Creates an index called `movies` in your Meilisearch instance. |
| 85 | + |
| 86 | +- Adds documents to the index |
| 87 | + |
| 88 | + |
| 89 | +### 5. Run the project |
| 90 | + |
| 91 | +You can now run the project. The front-end client is now communicating with your Meilisearch instance. |
| 92 | + |
| 93 | +```bash |
| 94 | + |
| 95 | +yarn dev |
| 96 | + |
| 97 | +``` |
| 98 | + |
| 99 | + Visit `http://localhost:5173` in your browser and start searching with Meilisearch! |
| 100 | + |
| 101 | +<hr> |
| 102 | + |
| 103 | +**Meilisearch** provides and maintains many **SDKs and Integration tools** like the ones used in this project. We want to provide everyone with an **amazing search experience for any kind of project**. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the [integration-guides](https://github.com/meilisearch/integration-guides) repository. |
0 commit comments