diff --git a/config/redirects.json b/config/redirects.json index 522b8dbdbf..17b1a469d3 100644 --- a/config/redirects.json +++ b/config/redirects.json @@ -16,8 +16,7 @@ }, { "source": "/docs/learn/contributing/overview", - "destination": - "/docs/learn/contributing/contributing_docs#contributing-to-meilisearch", + "destination": "/docs/learn/contributing/contributing_docs#contributing-to-meilisearch", "permanent": true }, { @@ -154,6 +153,131 @@ "source": "/docs/learn/async/managing_tasks", "destination": "/docs/learn/async/working_with_tasks" }, + { + "source": "/docs/learn/cookbooks/aws", + "destination": "/docs/guides/deployment/aws", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/azure", + "destination": "/docs/guides/deployment/azure", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/gcp", + "destination": "/docs/guides/deployment/gcp", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/koyeb", + "destination": "/docs/guides/deployment/koyeb", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/qovery", + "destination": "/docs/guides/deployment/qovery", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/railway", + "destination": "/docs/guides/deployment/railway", + "permanent": true + }, + { + "source": "/docs/learn/front_end/front_end_integration", + "destination": "/docs/guides/front_end/front_end_integration", + "permanent": true + }, + { + "source": "/docs/learn/front_end/react_instantsearch", + "destination": "/docs/guides/front_end/react_instantsearch", + "permanent": true + }, + { + "source": "/docs/learn/front_end/pagination", + "destination": "/docs/guides/front_end/pagination", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/running_production", + "destination": "/docs/guides/deployment/running_production", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/postman_collection", + "destination": "/docs/guides/misc/postman_collection", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/docker", + "destination": "/docs/guides/misc/docker", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/search_bar_for_docs", + "destination": "/docs/guides/front_end/search_bar_for_docs", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/http2_ssl", + "destination": "/docs/guides/security/http2_ssl", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/vercel", + "destination": "/docs/guides/integrations/vercel", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/meilisync_mysql", + "destination": "/docs/guides/database/meilisync_mysql", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/meilisync_postgresql", + "destination": "/docs/guides/database/meilisync_postgresql", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/laravel_scout", + "destination": "/docs/guides/back_end/laravel_scout", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/laravel_multitenancy", + "destination": "/docs/guides/security/laravel_multitenancy", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/multitenancy_nodejs", + "destination": "/docs/guides/security/multitenancy_nodejs", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/indexing_best_practices", + "destination": "/docs/guides/performance/indexing_best_practices", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/computing_hugging_face_embeddings_gpu", + "destination": "/docs/guides/ai/computing_hugging_face_embeddings_gpu", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/strapi_v4", + "destination": "/docs/guides/back_end/strapi_v4", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/large_documents", + "destination": "/docs/guides/performance/large_documents", + "permanent": true + }, + { + "source": "/docs/learn/cookbooks/langchain", + "destination": "/docs/guides/ai/langchain", + "permanent": true + }, { "source": "/docs/learn/advanced/concat", "destination": "/docs/learn/engine/concat" diff --git a/config/sidebar-guides.json b/config/sidebar-guides.json index fe51488c70..931dd359a8 100644 --- a/config/sidebar-guides.json +++ b/config/sidebar-guides.json @@ -1 +1,227 @@ -[] +[ + { + "title": "Front end", + "slug": "front_end", + "routes": [ + { + "source": "guides/front_end/front_end_integration.mdx", + "label": "Front-end integration", + "slug": "front_end_integration" + }, + { + "source": "guides/front_end/react_instantsearch.mdx", + "label": "Integrate with React InstantSearch", + "slug": "react_instantsearch" + }, + { + "source": "guides/front_end/search_bar_for_docs.mdx", + "label": "Add a search bar to your docs", + "slug": "search_bar_for_docs" + }, + { + "source": "guides/front_end/pagination.mdx", + "label": "Search result pagination", + "slug": "pagination" + } + ] + }, + { + "title": "Back end", + "slug": "back_end", + "routes": [ + { + "source": "guides/laravel_scout.mdx", + "label": "Laravel Scout guide", + "slug": "laravel_scout" + }, + { + "source": "guides/strapi_v4.mdx", + "label": "Strapi v4 guide", + "slug": "strapi_v4" + } + ] + }, + { + "title": "Artificial Intelligence", + "slug": "ai", + "routes": [ + { + "source": "guides/langchain.mdx", + "label": "Implementing semantic search with LangChain", + "slug": "langchain" + }, + { + "source": "guides/computing_hugging_face_embeddings_gpu.mdx", + "label": "Computing Hugging Face embeddings with the GPU", + "slug": "computing_hugging_face_embeddings_gpu" + } + ] + }, + { + "title": "Performance", + "slug": "performance", + "routes": [ + { + "source": "guides/indexing_best_practices.mdx", + "label": "Indexing best practices", + "slug": "indexing_best_practices" + }, + { + "source": "guides/improve_relevancy_large_documents.mdx", + "label": "Improve relevancy when working with large documents", + "slug": "large_documents" + } + ] + }, + { + "title": "Security", + "slug": "security", + "routes": [ + { + "source": "guides/http2_ssl.mdx", + "label": "Set up HTTP/2 SSL", + "slug": "http2_ssl" + }, + { + "source": "guides/laravel_multitenancy.mdx", + "label": "Multitenancy with Laravel", + "slug": "laravel_multitenancy" + }, + { + "source": "guides/multitenancy_nodejs.mdx", + "label": "Multitenancy with Node.js", + "slug": "multitenancy_nodejs" + } + ] + }, + { + "title": "Database", + "slug": "database", + "routes": [ + { + "source": "guides/database/meilisync_mysql.mdx", + "label": "Syncing databases with MySQL and meilisync", + "slug": "meilisync_mysql" + }, + { + "source": "guides/database/meilisync_postgresql.mdx", + "label": "Syncing databases with PostgreSQL and meilisync", + "slug": "meilisync_postgresql" + } + ] + }, + { + "title": "Deployment", + "slug": "deployment", + "routes": [ + { + "source": "guides/running_production.mdx", + "label": "Run in production", + "slug": "running_production" + }, + { + "source": "guides/deployment/aws.mdx", + "label": "Deploy on AWS", + "slug": "aws" + }, + { + "source": "guides/deployment/azure.mdx", + "label": "Deploy on Azure", + "slug": "azure" + }, + { + "source": "guides/deployment/digitalocean.mdx", + "label": "Deploy on DigitalOcean", + "slug": "digitalocean" + }, + { + "source": "guides/deployment/gcp.mdx", + "label": "Deploy on GCP", + "slug": "gcp" + }, + { + "source": "guides/deployment/koyeb.mdx", + "label": "Deploy on Koyeb", + "slug": "koyeb" + }, + { + "source": "guides/deployment/qovery.mdx", + "label": "Deploy on Qovery", + "slug": "qovery" + }, + { + "source": "guides/deployment/railway.mdx", + "label": "Deploy on Railway", + "slug": "railway" + } + ] + }, + { + "title": "Integrations", + "slug": "integrations", + "routes": [ + { + "source": "guides/vercel.mdx", + "label": "Integrate Meilisearch Cloud with Vercel", + "slug": "vercel" + } + ] + }, + { + "title": "Miscellaneous", + "slug": "misc", + "routes": [ + { + "source": "guides/postman_collection.mdx", + "label": "Use with Postman", + "slug": "postman_collection" + }, + { + "source": "guides/docker.mdx", + "label": "Use with Docker", + "slug": "docker" + } + ] + }, + { + "title": "Deployment", + "slug": "deployment", + "routes": [ + { + "source": "guides/deployment/aws.mdx", + "label": "Deploy on AWS", + "slug": "aws" + }, + { + "source": "guides/deployment/azure.mdx", + "label": "Deploy on Azure", + "slug": "azure" + }, + { + "source": "guides/deployment/digitalocean.mdx", + "label": "Deploy on DigitalOcean", + "slug": "digitalocean" + }, + { + "source": "guides/deployment/gcp.mdx", + "label": "Deploy on GCP", + "slug": "gcp" + }, + { + "source": "guides/deployment/koyeb.mdx", + "label": "Deploy on Koyeb", + "slug": "koyeb" + }, + { + "source": "guides/deployment/qovery.mdx", + "label": "Deploy on Qovery", + "slug": "qovery" + }, + { + "source": "guides/deployment/railway.mdx", + "label": "Deploy on Railway", + "slug": "railway" + } + ] + } +] diff --git a/config/sidebar-learn.json b/config/sidebar-learn.json index 570aa02d5f..343dfc3507 100644 --- a/config/sidebar-learn.json +++ b/config/sidebar-learn.json @@ -378,154 +378,6 @@ } ] }, - { - "title": "Building a front end", - "slug": "front_end", - "routes": [ - { - "source": "learn/front_end/front_end_integration.mdx", - "label": "Front-end integration", - "slug": "front_end_integration" - }, - { - "source": "learn/front_end/react_instantsearch.mdx", - "label": "Integrate with React InstantSearch", - "slug": "react_instantsearch" - }, - { - "source": "learn/front_end/pagination.mdx", - "label": "Search result pagination", - "slug": "pagination" - } - ] - }, - { - "title": "Cookbooks", - "slug": "cookbooks", - "routes": [ - { - "source": "learn/cookbooks/running_production.mdx", - "label": "Run in production", - "slug": "running_production" - }, - { - "source": "learn/cookbooks/postman_collection.mdx", - "label": "Use with Postman", - "slug": "postman_collection" - }, - { - "source": "learn/cookbooks/docker.mdx", - "label": "Use with Docker", - "slug": "docker" - }, - { - "source": "learn/cookbooks/search_bar_for_docs.mdx", - "label": "Add a search bar to your docs", - "slug": "search_bar_for_docs" - }, - { - "source": "learn/cookbooks/http2_ssl.mdx", - "label": "Set up HTTP/2 SSL", - "slug": "http2_ssl" - }, - { - "source": "learn/cookbooks/vercel.mdx", - "label": "Integrate Meilisearch Cloud with Vercel", - "slug": "vercel" - }, - { - "source": "learn/primary_db_sync/meilisync_mysql.mdx", - "label": "Syncing databases with MySQL and meilisync", - "slug": "meilisync_mysql" - }, - { - "source": "learn/primary_db_sync/meilisync_postgresql.mdx", - "label": "Syncing databases with PostgreSQL and meilisync", - "slug": "meilisync_postgresql" - }, - { - "source": "learn/cookbooks/laravel_scout.mdx", - "label": "Laravel Scout guide", - "slug": "laravel_scout" - }, - { - "source": "learn/cookbooks/laravel_multitenancy.mdx", - "label": "Multitenancy with Laravel", - "slug": "laravel_multitenancy" - }, - { - "source": "learn/cookbooks/multitenancy_nodejs.mdx", - "label": "Multitenancy with Node.js", - "slug": "multitenancy_nodejs" - }, - { - "source": "learn/cookbooks/indexing_best_practices.mdx", - "label": "Indexing best practices", - "slug": "indexing_best_practices" - }, - { - "source": "learn/cookbooks/computing_hugging_face_embeddings_gpu.mdx", - "label": "Computing Hugging Face embeddings with the GPU", - "slug": "computing_hugging_face_embeddings_gpu" - }, - { - "source": "learn/cookbooks/strapi_v4.mdx", - "label": "Strapi v4 guide", - "slug": "strapi_v4" - }, - { - "source": "learn/cookbooks/improve_relevancy_large_documents.mdx", - "label": "Improve relevancy when working with large documents", - "slug": "large_documents" - }, - { - "source": "learn/cookbooks/langchain.mdx", - "label": "Implementing semantic search with LangChain", - "slug": "langchain" - } - ] - }, - { - "title": "Deployment", - "slug": "cookbooks", - "routes": [ - { - "source": "learn/deployment/aws.mdx", - "label": "Deploy on AWS", - "slug": "aws" - }, - { - "source": "learn/deployment/azure.mdx", - "label": "Deploy on Azure", - "slug": "azure" - }, - { - "source": "learn/deployment/digitalocean.mdx", - "label": "Deploy on DigitalOcean", - "slug": "digitalocean" - }, - { - "source": "learn/deployment/gcp.mdx", - "label": "Deploy on GCP", - "slug": "gcp" - }, - { - "source": "learn/deployment/koyeb.mdx", - "label": "Deploy on Koyeb", - "slug": "koyeb" - }, - { - "source": "learn/deployment/qovery.mdx", - "label": "Deploy on Qovery", - "slug": "qovery" - }, - { - "source": "learn/deployment/railway.mdx", - "label": "Deploy on Railway", - "slug": "railway" - } - ] - }, { "title": "Experimental", "slug": "experimental", diff --git a/learn/cookbooks/computing_hugging_face_embeddings_gpu.mdx b/guides/computing_hugging_face_embeddings_gpu.mdx similarity index 100% rename from learn/cookbooks/computing_hugging_face_embeddings_gpu.mdx rename to guides/computing_hugging_face_embeddings_gpu.mdx diff --git a/learn/primary_db_sync/meilisync_mysql.mdx b/guides/database/meilisync_mysql.mdx similarity index 100% rename from learn/primary_db_sync/meilisync_mysql.mdx rename to guides/database/meilisync_mysql.mdx diff --git a/learn/primary_db_sync/meilisync_postgresql.mdx b/guides/database/meilisync_postgresql.mdx similarity index 100% rename from learn/primary_db_sync/meilisync_postgresql.mdx rename to guides/database/meilisync_postgresql.mdx diff --git a/learn/deployment/aws.mdx b/guides/deployment/aws.mdx similarity index 100% rename from learn/deployment/aws.mdx rename to guides/deployment/aws.mdx diff --git a/learn/deployment/azure.mdx b/guides/deployment/azure.mdx similarity index 100% rename from learn/deployment/azure.mdx rename to guides/deployment/azure.mdx diff --git a/learn/deployment/digitalocean.mdx b/guides/deployment/digitalocean.mdx similarity index 100% rename from learn/deployment/digitalocean.mdx rename to guides/deployment/digitalocean.mdx diff --git a/learn/deployment/gcp.mdx b/guides/deployment/gcp.mdx similarity index 100% rename from learn/deployment/gcp.mdx rename to guides/deployment/gcp.mdx diff --git a/learn/deployment/koyeb.mdx b/guides/deployment/koyeb.mdx similarity index 100% rename from learn/deployment/koyeb.mdx rename to guides/deployment/koyeb.mdx diff --git a/learn/deployment/qovery.mdx b/guides/deployment/qovery.mdx similarity index 100% rename from learn/deployment/qovery.mdx rename to guides/deployment/qovery.mdx diff --git a/learn/deployment/railway.mdx b/guides/deployment/railway.mdx similarity index 100% rename from learn/deployment/railway.mdx rename to guides/deployment/railway.mdx diff --git a/learn/cookbooks/docker.mdx b/guides/docker.mdx similarity index 100% rename from learn/cookbooks/docker.mdx rename to guides/docker.mdx diff --git a/learn/front_end/front_end_integration.mdx b/guides/front_end/front_end_integration.mdx similarity index 100% rename from learn/front_end/front_end_integration.mdx rename to guides/front_end/front_end_integration.mdx diff --git a/learn/front_end/pagination.mdx b/guides/front_end/pagination.mdx similarity index 95% rename from learn/front_end/pagination.mdx rename to guides/front_end/pagination.mdx index 7014fc3540..02052a7538 100644 --- a/learn/front_end/pagination.mdx +++ b/guides/front_end/pagination.mdx @@ -13,7 +13,7 @@ In this guide, we discuss two different approaches to pagination supported by Me There are many UI patterns that help your users navigate through search results. One common and efficient solution in Meilisearch is using `offset` and `limit` to create interfaces centered around ["Previous" and "Next" buttons](#previous-and-next-buttons). -Other solutions, such as [creating a page selector](/learn/front_end/pagination#numbered-page-selectors) allowing users to jump to any search results page, make use of `hitsPerPage` and `page` to obtain the exhaustive total number of matched documents. These tend to be less efficient and may result in decreased performance. +Other solutions, such as [creating a page selector](/guides/front_end/pagination#numbered-page-selectors) allowing users to jump to any search results page, make use of `hitsPerPage` and `page` to obtain the exhaustive total number of matched documents. These tend to be less efficient and may result in decreased performance. Whatever UI pattern you choose, there is a limited maximum number of search results Meilisearch will return for any given query. You can use [the `maxTotalHits` index setting](/reference/api/settings#pagination) to configure this, but be aware that higher limits will negatively impact search performance. @@ -97,7 +97,7 @@ function updatePageNumber(elem) { // Add data to our HTML element stating the user is on the first page document.querySelector('.pagination').dataset.pageNumber = 0 -// Each time a user clicks on the previous or next buttons, update the page number +// Each time a user clicks on the previous or next buttons, update the page number document.querySelector('#previous_button').onclick = function () { updatePageNumber(this) } document.querySelector('#next_button').onclick = function () { updatePageNumber(this) } ``` @@ -122,18 +122,18 @@ function updatePageNumber() { // If offset equals 0, we're on the first results page if (offset === 0 ) { document.querySelector('#previous_button').disabled = true; - } + } // If offset is bigger than 0, we're not on the first results page if (offset > 0 ) { document.querySelector('#previous_button').disabled = false; } - // If Meilisearch returns 20 items or less, + // If Meilisearch returns 20 items or fewer, // we are on the last page if (results.hits.length < 21 ) { document.querySelector('#next_button').disabled = true; - } + } // If Meilisearch returns exactly 21 results // and our page can only show 20 items at a time, @@ -183,9 +183,9 @@ The following example returns the first 25 search results for a query: ```js const results = await index.search( - "tarkovsky", - { - hitsPerPage: 25, + "tarkovsky", + { + hitsPerPage: 25, } ); ``` @@ -194,10 +194,10 @@ To navigate through pages of search results, use the `page` search parameter. If ```js const results = await index.search( - "tarkovsky", - { - hitsPerPage: 25, - page: 2 + "tarkovsky", + { + hitsPerPage: 25, + page: 2 } ); ``` @@ -218,10 +218,10 @@ In the following example, we create a list of page buttons dynamically and highl const pageNavigation = document.querySelector('#page-navigation'); const listContainer = pageNavigation.querySelector('#page-list'); const results = await index.search( - "tarkovsky", - { - hitsPerPage: 25, - page: 1 + "tarkovsky", + { + hitsPerPage: 25, + page: 1 } ); diff --git a/learn/front_end/react_instantsearch.mdx b/guides/front_end/react_instantsearch.mdx similarity index 100% rename from learn/front_end/react_instantsearch.mdx rename to guides/front_end/react_instantsearch.mdx diff --git a/learn/cookbooks/search_bar_for_docs.mdx b/guides/front_end/search_bar_for_docs.mdx similarity index 98% rename from learn/cookbooks/search_bar_for_docs.mdx rename to guides/front_end/search_bar_for_docs.mdx index 266bd3e2e0..336f034f92 100644 --- a/learn/cookbooks/search_bar_for_docs.mdx +++ b/guides/front_end/search_bar_for_docs.mdx @@ -231,4 +231,4 @@ For more concrete examples, you can check out this [basic HTML file](https://git ## What's next? At this point, you should have a working search engine on your website, congrats! 🎉 -You can check [this tutorial](/learn/cookbooks/running_production) if you now want to run Meilisearch in production! +You can check [this tutorial](/guides/deployment/running_production) if you now want to run Meilisearch in production! diff --git a/learn/cookbooks/http2_ssl.mdx b/guides/http2_ssl.mdx similarity index 100% rename from learn/cookbooks/http2_ssl.mdx rename to guides/http2_ssl.mdx diff --git a/learn/cookbooks/improve_relevancy_large_documents.mdx b/guides/improve_relevancy_large_documents.mdx similarity index 100% rename from learn/cookbooks/improve_relevancy_large_documents.mdx rename to guides/improve_relevancy_large_documents.mdx diff --git a/learn/cookbooks/indexing_best_practices.mdx b/guides/indexing_best_practices.mdx similarity index 100% rename from learn/cookbooks/indexing_best_practices.mdx rename to guides/indexing_best_practices.mdx diff --git a/learn/cookbooks/langchain.mdx b/guides/langchain.mdx similarity index 100% rename from learn/cookbooks/langchain.mdx rename to guides/langchain.mdx diff --git a/learn/cookbooks/laravel_multitenancy.mdx b/guides/laravel_multitenancy.mdx similarity index 99% rename from learn/cookbooks/laravel_multitenancy.mdx rename to guides/laravel_multitenancy.mdx index f655314647..4ada463edd 100644 --- a/learn/cookbooks/laravel_multitenancy.mdx +++ b/guides/laravel_multitenancy.mdx @@ -284,7 +284,7 @@ And ta-da! All views now have access to the `meilisearchToken` variable. You use ## Building the search UI -This guide uses **Vue InstantSearch** to build your search interface. Vue InstantSearch is a set of components and helpers to build a search UI in Vue applications. If you prefer other flavours of JavaScript, check out our other [front-end integrations](/learn/front_end/front_end_integration). +This guide uses **Vue InstantSearch** to build your search interface. Vue InstantSearch is a set of components and helpers to build a search UI in Vue applications. If you prefer other flavours of JavaScript, check out our other [front-end integrations](/guides/front_end/front_end_integration). First, install the dependencies: diff --git a/learn/cookbooks/laravel_scout.mdx b/guides/laravel_scout.mdx similarity index 99% rename from learn/cookbooks/laravel_scout.mdx rename to guides/laravel_scout.mdx index f764937043..56045fffae 100644 --- a/learn/cookbooks/laravel_scout.mdx +++ b/guides/laravel_scout.mdx @@ -71,7 +71,7 @@ For production use cases, we recommend using a managed Meilisearch via [Meilisea Read the [Meilisearch Cloud quick start](/learn/getting_started/cloud_quick_start). -If you prefer to self-host, read our guide for [running Meilisearch in production](/learn/cookbooks/running_production). +If you prefer to self-host, read our guide for [running Meilisearch in production](/guides/deployment/running_production). ## Making Eloquent models searchable diff --git a/learn/cookbooks/multitenancy_nodejs.mdx b/guides/multitenancy_nodejs.mdx similarity index 97% rename from learn/cookbooks/multitenancy_nodejs.mdx rename to guides/multitenancy_nodejs.mdx index 4c02f6703f..73fe101369 100644 --- a/learn/cookbooks/multitenancy_nodejs.mdx +++ b/guides/multitenancy_nodejs.mdx @@ -138,7 +138,7 @@ This code creates an endpoint at `http://localhost:3000/token` that accepts an ` ### Making a search -Now that we have an endpoint, you will use it to retrieve the tenant token in your front-end application. This guide uses [InstantSearch.js](/learn/front_end/front_end_integration) to create a search interface. You will use CDN links to include InstantSearch.js and the Meilisearch InstantSearch.js connector in your HTML file. +Now that we have an endpoint, you will use it to retrieve the tenant token in your front-end application. This guide uses [InstantSearch.js](/guides/front_end/front_end_integration) to create a search interface. You will use CDN links to include InstantSearch.js and the Meilisearch InstantSearch.js connector in your HTML file. Create `client.html` file and insert this code: diff --git a/learn/cookbooks/postman_collection.mdx b/guides/postman_collection.mdx similarity index 100% rename from learn/cookbooks/postman_collection.mdx rename to guides/postman_collection.mdx diff --git a/learn/cookbooks/running_production.mdx b/guides/running_production.mdx similarity index 100% rename from learn/cookbooks/running_production.mdx rename to guides/running_production.mdx diff --git a/learn/cookbooks/strapi_v4.mdx b/guides/strapi_v4.mdx similarity index 93% rename from learn/cookbooks/strapi_v4.mdx rename to guides/strapi_v4.mdx index f23ea65d9c..ae464aad89 100644 --- a/learn/cookbooks/strapi_v4.mdx +++ b/guides/strapi_v4.mdx @@ -10,8 +10,8 @@ This tutorial will show you how to integrate Meilisearch with [Strapi](https://s ## Prerequisites - [Node.js](https://nodejs.org/): active LTS or maintenance LTS versions, currently Node.js >=18.0.0 \<=20.x.x -- npm >=6.0.0 (installed with Node.js) -- A running instance of Meilisearch (v >= 1.x). If you need help with this part, you can consult the [Installation section](/learn/getting_started/installation). +- npm >=6.0.0 (installed with Node.js) +- A running instance of Meilisearch (v >= 1.x). If you need help with this part, you can consult the [Installation section](/learn/getting_started/installation). ## Create a back end using Strapi @@ -51,19 +51,19 @@ After finishing those steps of Strapi's quick start guide, two new collections n Add the following three restaurants, one by one. For each restaurant, you need to press `Save` and then `Publish`. -- Name: `The Butter Biscotte` +- Name: `The Butter Biscotte` - Description: `All about butter, nothing about health.` Next, add the `French food` category on the bottom right corner of the page. ![Strapi dashboard: create an entry form, arrow indicating the location of the categorie's location in the right side menu](/assets/images/strapi-v4/strapi-add-category.png) -- Name: `The Slimy Snail` -- Description: `Gastronomy is made of garlic and butter.` +- Name: `The Slimy Snail` +- Description: `Gastronomy is made of garlic and butter.` - Category: `French food` -- Name: `The Smell of Blue` -- Description: `Blue Cheese is not expired, it is how you eat it. With a bit of butter and a lot of happiness.` +- Name: `The Smell of Blue` +- Description: `Blue Cheese is not expired, it is how you eat it. With a bit of butter and a lot of happiness.` - Category: `French food` Your Strapi back-end is now up and running. Strapi automatically creates a REST API for your Restaurants collection. Check Strapi's documentation for all available [API endpoints](https://strapi.io/documentation/developer-docs/latest/developer-resources/content-api/content-api.html#api-endpoints). @@ -94,7 +94,7 @@ Once connected, you should see the new `meilisearch` plugin on the left side of ![Strapi dashboard with plugins side menu: arrow pointing at the 'meilisearch' option](/assets/images/strapi-v4/strapi-meilisearch-plugin.png) -Add your Meilisearch credentials on the Settings tab of the `meilisearch` plugin page. +Add your Meilisearch credentials on the Settings tab of the `meilisearch` plugin page. ![Strapi dashboard with Meilisearch plugin selected: arrow pointing to the location of the settings tab](/assets/images/strapi-v4/strapi-meilisearch-credentials.png) @@ -114,6 +114,6 @@ Your Strapi entries are sent to Meilisearch as is. You can modify the data befor ## What's next -This tutorial showed you how to add your Strapi collections to Meilisearch. +This tutorial showed you how to add your Strapi collections to Meilisearch. -In most real-life scenarios, you'll typically build a custom search interface and fetch results using Meilisearch's API. To learn how to quickly build a front-end interface of your own, check out the [Front-end integration page](https://www.meilisearch.com/docs/learn/front_end/front_end_integration) guide. +In most real-life scenarios, you'll typically build a custom search interface and fetch results using Meilisearch's API. To learn how to quickly build a front-end interface of your own, check out the [Front-end integration page](/guides/front_end/front_end_integration) guide. diff --git a/learn/cookbooks/vercel.mdx b/guides/vercel.mdx similarity index 100% rename from learn/cookbooks/vercel.mdx rename to guides/vercel.mdx diff --git a/learn/configuration/instance_options.mdx b/learn/configuration/instance_options.mdx index 0a01e0845c..6878ea520e 100644 --- a/learn/configuration/instance_options.mdx +++ b/learn/configuration/instance_options.mdx @@ -135,7 +135,7 @@ Specifying the `config_file_path` option within the configuration file will thro ## Configuring cloud-hosted instances -To configure Meilisearch with command-line options in a cloud-hosted instance, edit its [service file](/learn/cookbooks/running_production#step-4-run-meilisearch-as-a-service). The default location of the service file is `/etc/systemd/system/meilisearch.service`. +To configure Meilisearch with command-line options in a cloud-hosted instance, edit its [service file](/guides/deployment/running_production#step-4-run-meilisearch-as-a-service). The default location of the service file is `/etc/systemd/system/meilisearch.service`. To configure Meilisearch with environment variables in a cloud-hosted instance, modify Meilisearch's `env` file. Its default location is `/var/opt/meilisearch/env`. diff --git a/learn/core_concepts/indexes.mdx b/learn/core_concepts/indexes.mdx index 4e20dfa09e..40f27ac612 100644 --- a/learn/core_concepts/indexes.mdx +++ b/learn/core_concepts/indexes.mdx @@ -113,7 +113,7 @@ Before filtering on any document attribute, you must add it to `filterableAttrib To protect your database from malicious scraping, Meilisearch only returns up to `1000` results for a search query. You can change this limit using the [update settings endpoint](/reference/api/settings#update-settings) or the [update pagination settings endpoint](/reference/api/settings#update-pagination-settings). -[Learn more about pagination.](/learn/front_end/pagination) +[Learn more about pagination.](/guides/front_end/pagination) ### Ranking rules diff --git a/learn/experimental/vector_search.mdx b/learn/experimental/vector_search.mdx index 544ce6a2a3..660bba6adb 100644 --- a/learn/experimental/vector_search.mdx +++ b/learn/experimental/vector_search.mdx @@ -81,7 +81,7 @@ It is mandatory to pass an OpenAI API key through the `OPENAI_API_KEY` environme -The Hugging Face embedder computes embeddings locally. This is a resource-intensive operation and might affect indexing performance. You may be able to significantly improve performance by [compiling a CUDA-compatible Meilisearch binary](/learn/cookbooks/computing_hugging_face_embeddings_gpu). +The Hugging Face embedder computes embeddings locally. This is a resource-intensive operation and might affect indexing performance. You may be able to significantly improve performance by [compiling a CUDA-compatible Meilisearch binary](/guides/ai/computing_hugging_face_embeddings_gpu). Use the `embedders` index setting of the [update `/settings` endpoint](/reference/api/settings) to configure one or more embedders for an index: @@ -179,7 +179,7 @@ curl \ Any field you refer to in this way must exist in all documents or an error will be raised at indexing time. -For best results, use short strings indicating the type of document in that index, only include highly relevant document fields, and truncate long fields. +For best results, use short strings indicating the type of document in that index, only include highly relevant document fields, and truncate long fields. #### Generate custom embeddings manually @@ -253,7 +253,7 @@ Perform searches with `q` and `hybrid` to retrieve search results using both key ```sh curl -X POST -H 'content-type: application/json' \ 'localhost:7700/indexes/products/search' \ - --data-binary '{ + --data-binary '{ "q": "kitchen utensils", "hybrid": { "semanticRatio": 0.9, @@ -284,7 +284,7 @@ curl -X POST -H 'content-type: application/json' \ ### Vector search with user-provided embeddings -Use the `vector` search parameter to perform vector searches: +Use the `vector` search parameter to perform vector searches: ```sh curl -X POST -H 'content-type: application/json' \ diff --git a/learn/getting_started/installation.mdx b/learn/getting_started/installation.mdx index af89c08e5e..031cf9c210 100644 --- a/learn/getting_started/installation.mdx +++ b/learn/getting_started/installation.mdx @@ -65,7 +65,7 @@ docker run -it --rm \ # Use ${pwd} instead of $(pwd) in PowerShell ``` -You can learn more about [using Meilisearch with Docker in our dedicated guide](/learn/cookbooks/docker). +You can learn more about [using Meilisearch with Docker in our dedicated guide](/guides/misc/docker). @@ -159,13 +159,13 @@ chmod +x meilisearch To deploy Meilisearch on a cloud service, follow one of our dedicated guides: -- [AWS](/learn/cookbooks/aws) -- [Azure](/learn/cookbooks/azure) -- [DigitalOcean](/learn/cookbooks/digitalocean) -- [GCP](/learn/cookbooks/gcp) -- [Koyeb](/learn/cookbooks/koyeb) -- [Qovery](/learn/cookbooks/qovery) -- [Railway](/learn/cookbooks/railway) +- [AWS](/guides/deployment/aws) +- [Azure](/guides/deployment/azure) +- [DigitalOcean](/guides/deployment/digitalocean) +- [GCP](/guides/deployment/gcp) +- [Koyeb](/guides/deployment/koyeb) +- [Qovery](/guides/deployment/qovery) +- [Railway](/guides/deployment/railway) ## Installing older versions of Meilisearch @@ -212,7 +212,7 @@ docker run -it --rm \ # Use ${pwd} instead of $(pwd) in PowerShell ``` -Learn more about [using Meilisearch with Docker in our dedicated guide](/learn/cookbooks/docker). +Learn more about [using Meilisearch with Docker in our dedicated guide](/guides/misc/docker). diff --git a/learn/getting_started/quick_start.mdx b/learn/getting_started/quick_start.mdx index ac442182d8..6fced7f53b 100644 --- a/learn/getting_started/quick_start.mdx +++ b/learn/getting_started/quick_start.mdx @@ -186,6 +186,6 @@ By default, Meilisearch only returns the first 20 results for a search query. Yo You now know how to install Meilisearch, create an index, add documents, check the status of an asynchronous task, and make a search request. -If you'd like to search through the documents you just added using a clean browser interface rather than the terminal, you can do so with [our built-in search preview](/learn/getting_started/search_preview). You can also [learn how to quickly build a front-end interface](/learn/front_end/front_end_integration) of your own. +If you'd like to search through the documents you just added using a clean browser interface rather than the terminal, you can do so with [our built-in search preview](/learn/getting_started/search_preview). You can also [learn how to quickly build a front-end interface](/guides/front_end/front_end_integration) of your own. For a more advanced approach, consult the [API reference](/reference/api/overview). diff --git a/learn/meilisearch_101/customizing_relevancy.mdx b/learn/meilisearch_101/customizing_relevancy.mdx index 6caa3f7364..99c7f76c18 100644 --- a/learn/meilisearch_101/customizing_relevancy.mdx +++ b/learn/meilisearch_101/customizing_relevancy.mdx @@ -181,6 +181,6 @@ The code sample below sets this limit to 500: Now, users won't be able to access search results beyond 500. -You can read more about pagination in our [dedicated guide](/learn/front_end/pagination). +You can read more about pagination in our [dedicated guide](/guides/front_end/pagination). The next chapter tackles more advanced topics, including security and data backup. diff --git a/learn/what_is_meilisearch/sdks.mdx b/learn/what_is_meilisearch/sdks.mdx index dbfc8d6234..1f176f830f 100644 --- a/learn/what_is_meilisearch/sdks.mdx +++ b/learn/what_is_meilisearch/sdks.mdx @@ -42,11 +42,11 @@ You can use Meilisearch API wrappers in your favorite language. These libraries ## DevOps tools - [meilisearch-aws](https://github.com/meilisearch/cloud-providers/) - - Guide: [How to deploy a Meilisearch instance on Amazon Web Services](/learn/cookbooks/aws) + - Guide: [How to deploy a Meilisearch instance on Amazon Web Services](/guides/deployment/aws) - [meilisearch-digitalocean](https://github.com/meilisearch/cloud-providers/) - - Guide: [How to deploy a Meilisearch instance on DigitalOcean](/learn/cookbooks/digitalocean) + - Guide: [How to deploy a Meilisearch instance on DigitalOcean](/guides/deployment/digitalocean) - [meilisearch-gcp](https://github.com/meilisearch/cloud-providers/) - - Guide: [How to deploy a Meilisearch instance on Google Cloud Platform](/learn/cookbooks/gcp) + - Guide: [How to deploy a Meilisearch instance on Google Cloud Platform](/guides/deployment/gcp) - [meilisearch-kubernetes](https://github.com/meilisearch/meilisearch-kubernetes) ## Platform plugins diff --git a/reference/api/search.mdx b/reference/api/search.mdx index 01cb745e5a..f5344eb9c6 100644 --- a/reference/api/search.mdx +++ b/reference/api/search.mdx @@ -82,7 +82,7 @@ If you require the total number of search results, use the `hitsPerPage` and `pa Neither `estimatedTotalHits` nor `totalHits` can exceed the limit configured in [the `maxTotalHits` index setting](/reference/api/settings#pagination). -You can [read more about pagination in our dedicated guide](/learn/front_end/pagination). +You can [read more about pagination in our dedicated guide](/guides/front_end/pagination). ### Example @@ -341,7 +341,7 @@ Sets the starting point in the search results, effectively skipping over a given Queries using `offset` and `limit` only return an estimate of the total number of search results. -You can [paginate search results](/learn/front_end/pagination) by making queries combining both `offset` and `limit`. +You can [paginate search results](/guides/front_end/pagination) by making queries combining both `offset` and `limit`. Setting `offset` to a value greater than an [index's `maxTotalHits`](/reference/api/settings#update-pagination-settings) returns an empty array. @@ -361,7 +361,7 @@ If you want to skip the **first** result in a query, set `offset` to `1`: Sets the maximum number of documents returned by a single query. -You can [paginate search results](/learn/front_end/pagination) by making queries combining both `offset` and `limit`. +You can [paginate search results](/guides/front_end/pagination) by making queries combining both `offset` and `limit`. A search query cannot return more results than configured in [`maxTotalHits`](/reference/api/settings#pagination-object), even if the value of `limit` is greater than the value of `maxTotalHits`. @@ -385,7 +385,7 @@ Queries containing `hitsPerPage` are exhaustive and do not return an `estimatedT If you set `hitsPerPage` to `0`, Meilisearch processes your request, but does not return any documents. In this case, the response body will include the exhaustive value for `totalHits`. The response body will also include `totalPages`, but its value will be `0`. -You can use `hitsPerPage` and `page` to [paginate search results](/learn/front_end/pagination). +You can use `hitsPerPage` and `page` to [paginate search results](/guides/front_end/pagination). `hitsPerPage` and `page` take precedence over `offset` and `limit`. If a query contains either `hitsPerPage` or `page`, any values passed to `offset` and `limit` are ignored. @@ -413,7 +413,7 @@ Queries containing `page` are exhaustive and do not return an `estimatedTotalHit If you set `page` to `0`, Meilisearch processes your request, but does not return any documents. In this case, the response body will include the exhaustive values for `totalPages` and `totalHits`. -You can use `hitsPerPage` and `page` to [paginate search results](/learn/front_end/pagination). +You can use `hitsPerPage` and `page` to [paginate search results](/guides/front_end/pagination). `hitsPerPage` and `page` take precedence over `offset` and `limit`. If a query contains either `hitsPerPage` or `page`, any values passed to `offset` and `limit` are ignored. @@ -1027,20 +1027,20 @@ The code sample below returns the `_rankingScoreDetail` when searching for `drag "overview": "In a desperate attempt to save her kingdom…", … "_rankingScoreDetails": { - "words": { - "order": 0, - "matchingWords": 4, - "maxMatchingWords": 4, - "score": 1.0 + "words": { + "order": 0, + "matchingWords": 4, + "maxMatchingWords": 4, + "score": 1.0 }, "typo": { - "order": 2, - "typoCount": 1, - "maxTypoCount": 4, - "score": 0.75 + "order": 2, + "typoCount": 1, + "maxTypoCount": 4, + "score": 0.75 }, "name:asc": { - "order": 1, + "order": 1, "value": "Dragon" } } diff --git a/reference/api/settings.mdx b/reference/api/settings.mdx index d0f944baaa..0653698a3a 100644 --- a/reference/api/settings.mdx +++ b/reference/api/settings.mdx @@ -793,7 +793,7 @@ To protect your database from malicious scraping, Meilisearch has a default limi For example, if you set `maxTotalHits` to 100, you will not be able to access search results beyond 100 no matter the value configured for `offset`. -[To learn more about paginating search results with Meilisearch, refer to our dedicated guide.](/learn/front_end/pagination) +[To learn more about paginating search results with Meilisearch, refer to our dedicated guide.](/guides/front_end/pagination) ### Pagination object @@ -1574,7 +1574,7 @@ Get the sortable attributes of an index. ```json [ - "price", + "price", "author.surname" ] ```