diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 3f85fcf6e8..4513bc6674 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -1327,18 +1327,6 @@ distinct_attribute_guide_distinct_parameter_1: |- "q": "white shirt", "distinct": "sku" }' -get_similar_post_1: |- - curl \ - -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \ - -H 'Content-Type: application/json' \ - -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ - --data-binary '{ - "id": TARGET_DOCUMENT_ID, - "embedder": "EMBEDDER_NAME" - }' -get_similar_get_1: |- - curl \ - -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME' search_parameter_reference_ranking_score_threshold_1: |- curl \ -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ @@ -1372,12 +1360,22 @@ reset_localized_attribute_settings_1: |- -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' get_all_batches_1: |- curl \ - -X GET 'http://localhost:7700/batches' + -X GET 'http://MEILISEARCH_URL/batches' get_batch_1: |- curl \ - -X GET 'http://localhost:7700/batches/BATCH_UID' - -### Code samples for experimental features + -X GET 'http://MEILISEARCH_URL/batches/BATCH_UID' +get_similar_post_1: |- + curl \ + -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/similar' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \ + --data-binary '{ + "id": TARGET_DOCUMENT_ID, + "embedder": "EMBEDDER_NAME" + }' +get_similar_get_1: |- + curl \ + -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME' get_embedders_1: |- curl \ -X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' @@ -1388,7 +1386,7 @@ update_embedders_1: |- --data-binary '{ "default": { "source": "openAi", - "apiKey": "anOpenAiApiKey", + "apiKey": "OPEN_AI_API_KEY", "model": "text-embedding-3-small", "documentTemplate": "A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}" } @@ -1397,7 +1395,7 @@ reset_embedders_1: |- curl \ -X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' search_parameter_guide_hybrid_1: |- - curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \ + curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ -H 'content-type: application/json' \ --data-binary '{ "q": "kitchen utensils", @@ -1407,14 +1405,14 @@ search_parameter_guide_hybrid_1: |- } }' search_parameter_guide_vector_1: |- - curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \ + curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ -H 'content-type: application/json' \ --data-binary '{ "vector": [0, 1, 2], "embedder": "EMBEDDER_NAME" }' search_parameter_reference_retrieve_vectors_1: |- - curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \ + curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \ -H 'content-type: application/json' \ --data-binary '{ "q": "kitchen utensils", @@ -1423,6 +1421,8 @@ search_parameter_reference_retrieve_vectors_1: |- "embedder": "EMBEDDER_NAME" } }' + +### Code samples for experimental features experimental_get_metrics_1: |- curl \ -X GET 'MEILISEARCH_URL/metrics' diff --git a/config/redirects.json b/config/redirects.json index 30c1e25e7f..687571cc91 100644 --- a/config/redirects.json +++ b/config/redirects.json @@ -633,5 +633,10 @@ "source": "/docs/guides/deployment/gcp", "destination": "/guides/deployment/running_production", "permanent": true + }, + { + "source": "/docs/learn/ai_powered_search/deactivate_ai_powered_search", + "destination": "/docs/learn/ai_powered_search/getting_started_with_ai_search", + "permanent": true } ] diff --git a/config/sidebar-learn.json b/config/sidebar-learn.json index f487ea6cad..d2d7f294bf 100644 --- a/config/sidebar-learn.json +++ b/config/sidebar-learn.json @@ -49,11 +49,6 @@ "label": "Use AI-powered search with user-provided embeddings", "slug": "search_with_user_provided_embeddings" }, - { - "source": "learn/ai_powered_search/deactivate_ai_powered_search.mdx", - "label": "Deactivate AI-powered search", - "slug": "deactivate_ai_powered_search" - }, { "source": "learn/ai_powered_search/difference_full_text_ai_search.mdx", "label": "Differences between full-text and AI-powered search", diff --git a/guides/computing_hugging_face_embeddings_gpu.mdx b/guides/computing_hugging_face_embeddings_gpu.mdx index 20c2f86cee..ab5ea6da70 100644 --- a/guides/computing_hugging_face_embeddings_gpu.mdx +++ b/guides/computing_hugging_face_embeddings_gpu.mdx @@ -47,7 +47,7 @@ cargo build --release --features cuda This might take a few moments. Once the compiler is done, you should have a CUDA-compatible Meilisearch binary. -## Enable vector search +## Configure the Hugging Face embedder Run your freshly compiled binary: @@ -55,15 +55,6 @@ Run your freshly compiled binary: ./meilisearch ``` -Next, enable the vector store experimental feature: - -```sh -curl \ - -X PATCH 'MEILISEARCH_URL/experimental-features/' \ - -H 'Content-Type: application/json' \ - --data-binary '{ "vectorStore": true }' -``` - Then add the Hugging Face embedder to your index settings: ```sh diff --git a/guides/embedders/cloudflare.mdx b/guides/embedders/cloudflare.mdx index 049147f936..57f4f1dcfe 100644 --- a/guides/embedders/cloudflare.mdx +++ b/guides/embedders/cloudflare.mdx @@ -13,14 +13,13 @@ This guide will walk you through the process of setting up Meilisearch with Clou To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=vector-search&utm_source=docs&utm_medium=cloudflare-embeddings-guide) project running version 1.10 or above with the Vector store activated. -- A Cloudflare account with access to Worker AI and an API key. You can sign up for a Cloudflare account at [Cloudflare](https://www.cloudflare.com/). -- Your Cloudflare account ID. -- No backend required. +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 +- A Cloudflare account with access to Worker AI and an API key. You can sign up for a Cloudflare account at [Cloudflare](https://www.cloudflare.com/) +- Your Cloudflare account ID ## Setting up Meilisearch -To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=cloudflare-embeddings-guide#update-embedder-settings) for more details on updating the embedder settings. +To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings) for more details on updating the embedder settings. Cloudflare Worker AI offers the following embedding models: @@ -66,7 +65,7 @@ Once you've configured the embedder settings, Meilisearch will automatically gen Please note that Cloudflare may have rate limiting, which is managed by Meilisearch. If you have a free account, the indexation process may take some time, but Meilisearch will handle it with a retry strategy. -It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks?utm_campaign=vector-search&utm_source=docs&utm_medium=cloudflare-embeddings-guide#get-tasks). +It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks). ## Testing semantic search @@ -96,4 +95,4 @@ You can use the Meilisearch API or client libraries to perform searches and retr By following this guide, you should now have Meilisearch set up with Cloudflare Worker AI embedding, enabling you to leverage semantic search capabilities in your application. Meilisearch's auto-batching and efficient handling of embeddings make it a powerful choice for integrating semantic search into your project. -To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=cloudflare-embeddings-guide#embedders-experimental). +To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings). diff --git a/guides/embedders/cohere.mdx b/guides/embedders/cohere.mdx index 76235e5e0e..f4ca181c9f 100644 --- a/guides/embedders/cohere.mdx +++ b/guides/embedders/cohere.mdx @@ -13,13 +13,13 @@ This guide will walk you through the process of setting up Meilisearch with Cohe To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=vector-search&utm_source=docs&utm_medium=cohere-embeddings-guide) project running version 1.10 or above with the Vector store activated. +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 - A Cohere account with an API key for embedding generation. You can sign up for a Cohere account at [Cohere](https://cohere.com/). - No backend required. ## Setting up Meilisearch -To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=cohere-embeddings-guide#update-embedder-settings) for more details on updating the embedder settings. +To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings) for more details on updating the embedder settings. Cohere offers multiple embedding models: - `embed-english-v3.0` and `embed-multilingual-v3.0`: 1024 dimensions @@ -67,7 +67,7 @@ Once you've configured the embedder settings, Meilisearch will automatically gen Please note that most third-party tools have rate limiting, which is managed by Meilisearch. If you have a free account, the indexation process may take some time, but Meilisearch will handle it with a retry strategy. -It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](https://www.meilisearch.com/docs/reference/api/tasks?utm_campaign=vector-search&utm_source=docs&utm_medium=cohere-embeddings-guide#get-tasks). +It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](https://www.meilisearch.com/docs/reference/api/tasks). ## Testing semantic search @@ -97,5 +97,4 @@ You can use the Meilisearch API or client libraries to perform searches and retr By following this guide, you should now have Meilisearch set up with Cohere embedding, enabling you to leverage semantic search capabilities in your application. Meilisearch's auto-batching and efficient handling of embeddings make it a powerful choice for integrating semantic search into your project. -To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=cohere-embeddings-guide#embedders-experimental). - +To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings). diff --git a/guides/embedders/huggingface.mdx b/guides/embedders/huggingface.mdx index 1bd2f6f31a..a03c3caea9 100644 --- a/guides/embedders/huggingface.mdx +++ b/guides/embedders/huggingface.mdx @@ -17,7 +17,7 @@ You can use Hugging Face and Meilisearch in two ways: running the model locally To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version 1.10 or above with the Vector store activated +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 - A [Hugging Face account](https://huggingface.co/) with a deployed inference endpoint - The endpoint URL and API key of the deployed model on your Hugging Face account @@ -83,4 +83,4 @@ In this request: You have set up with an embedder using Hugging Face Inference Endpoints. This allows you to use pure semantic search capabilities in your application. -Consult the [embedder setting documentation](/reference/api/settings#embedders-experimental) for more information on other embedder configuration options. +Consult the [embedder setting documentation](/reference/api/settings) for more information on other embedder configuration options. diff --git a/guides/embedders/mistral.mdx b/guides/embedders/mistral.mdx index f4b832768b..f218bc946e 100644 --- a/guides/embedders/mistral.mdx +++ b/guides/embedders/mistral.mdx @@ -13,13 +13,13 @@ This guide will walk you through the process of setting up Meilisearch with Mist To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=vector-search&utm_source=docs&utm_medium=mistral-embeddings-guide) project running version 1.10 or above with the Vector store activated. +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 - A Mistral account with an API key for embedding generation. You can sign up for a Mistral account at [Mistral](https://mistral.ai/). - No backend required. ## Setting up Meilisearch -To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=mistral-embeddings-guide#update-embedder-settings) for more details on updating the embedder settings. +To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings) for more details on updating the embedder settings. While using Mistral to generate embeddings, you'll need to use the model `mistral-embed`. Unlike some other services, Mistral currently offers only one embedding model. @@ -63,7 +63,7 @@ Once you've configured the embedder settings, Meilisearch will automatically gen Please note that most third-party tools have rate limiting, which is managed by Meilisearch. If you have a free account, the indexation process may take some time, but Meilisearch will handle it with a retry strategy. -It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks?utm_campaign=vector-search&utm_source=docs&utm_medium=mistral-embeddings-guide#get-tasks) +It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks) ## Testing semantic search @@ -93,5 +93,4 @@ You can use the Meilisearch API or client libraries to perform searches and retr By following this guide, you should now have Meilisearch set up with Mistral embedding, enabling you to leverage semantic search capabilities in your application. Meilisearch's auto-batching and efficient handling of embeddings make it a powerful choice for integrating semantic search into your project. -To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=mistral-embeddings-guide#embedders-experimental). - +To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings). diff --git a/guides/embedders/openai.mdx b/guides/embedders/openai.mdx index b774aa5eee..f8235ca825 100644 --- a/guides/embedders/openai.mdx +++ b/guides/embedders/openai.mdx @@ -13,13 +13,13 @@ This guide will walk you through the process of setting up Meilisearch with Open To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=vector-search&utm_source=docs&utm_medium=openai-embeddings-guide) project running version 1.10 or above with the Vector store activated. +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 - An OpenAI account with an API key for embedding generation. You can sign up for an OpenAI account at [OpenAI](https://openai.com/). - No backend required. ## Setting up Meilisearch -To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=openai-embeddings-guide#update-embedder-settings) for more details on updating the embedder settings. +To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings) for more details on updating the embedder settings. OpenAI offers three main embedding models: @@ -53,7 +53,7 @@ Once you've configured the embedder settings, Meilisearch will automatically gen Please note that OpenAI has rate limiting, which is managed by Meilisearch. If you have a free account, the indexation process may take some time, but Meilisearch will handle it with a retry strategy. -It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks?utm_campaign=vector-search&utm_source=docs&utm_medium=openai-embeddings-guide#get-tasks) +It's recommended to monitor the tasks queue to ensure everything is running smoothly. You can access the tasks queue using the Cloud UI or the [Meilisearch API](/reference/api/tasks) ## Testing semantic search @@ -83,4 +83,4 @@ You can use the Meilisearch API or client libraries to perform searches and retr By following this guide, you should now have Meilisearch set up with OpenAI embedding, enabling you to leverage semantic search capabilities in your application. Meilisearch's auto-batching and efficient handling of embeddings make it a powerful choice for integrating semantic search into your project. -To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=openai-embeddings-guide#embedders-experimental). +To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings). diff --git a/guides/embedders/voyage.mdx b/guides/embedders/voyage.mdx index 4c1d80b29a..7a7d06ac40 100644 --- a/guides/embedders/voyage.mdx +++ b/guides/embedders/voyage.mdx @@ -13,13 +13,13 @@ This guide will walk you through the process of setting up Meilisearch with Voya To follow this guide, you'll need: -- A [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=vector-search&utm_source=docs&utm_medium=voyage-embeddings-guide) project running version 1.10 or above with the Vector store activated. +- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13 - A Voyage AI account with an API key for embedding generation. You can sign up for a Voyage AI account at [Voyage AI](https://www.voyageai.com/). - No backend required. ## Setting up Meilisearch -To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=voyage-embeddings-guide#update-embedder-settings) for more details on updating the embedder settings. +To set up an embedder in Meilisearch, you need to configure it to your settings. You can refer to the [Meilisearch documentation](/reference/api/settings) for more details on updating the embedder settings. Voyage AI offers the following embedding models: @@ -98,4 +98,4 @@ You can use the Meilisearch API or client libraries to perform searches and retr By following this guide, you should now have Meilisearch set up with Voyage AI embedding, enabling you to leverage semantic search capabilities in your application. Meilisearch's auto-batching and efficient handling of embeddings make it a powerful choice for integrating semantic search into your project. -To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=voyage-embeddings-guide#embedders-experimental). +To explore further configuration options for embedders, consult the [detailed documentation about the embedder setting possibilities](/reference/api/settings). diff --git a/guides/langchain.mdx b/guides/langchain.mdx index 53f5911435..616f9ceb16 100644 --- a/guides/langchain.mdx +++ b/guides/langchain.mdx @@ -15,13 +15,6 @@ This guide assumes a basic understanding of Python and LangChain. Beginners to L - A [Meilisearch >= 1.6 project](/learn/getting_started/cloud_quick_start) - An [OpenAI API key](https://platform.openai.com/account/api-keys) - -On Meilisearch Cloud, enable the vector store feature via your project’s Settings page. - -![A section of the project overview interface titled "Experimental features". There are two options: "Score details" and "Vector store". "Vector store" is turned on.](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/vector-search/01-cloud-vector-store.png) - -If you are working with a self-hosted Meilisearch instance, activate the vector store with the [API route](/reference/api/experimental_features). - ## Creating the application Create a folder for your application with an empty `setup.py` file. diff --git a/learn/ai_powered_search/deactivate_ai_powered_search.mdx b/learn/ai_powered_search/deactivate_ai_powered_search.mdx deleted file mode 100644 index c591498391..0000000000 --- a/learn/ai_powered_search/deactivate_ai_powered_search.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Deactivate AI-powered search — Meilisearch documentation -description: This guide shows how to disable Meilisearch's AI-powered search. ---- - -# Deactivate vector search - -This guide shows how to disable Meilisearch's AI-powered search. - -## Remove embedder configuration - -Manually remove all embedder configuration from your index: - - - - -If you don't remove all configured embedders, Meilisearch will continue auto-generating embeddings for you documents. This will happen even if `vectorStore` has been set to `false` and may lead to unexpected expenses when using OpenAI's paid tiers. - - -## Disable the vector store - -If using Meilisearch Cloud, navigate to your project overview and find "Experimental features", then uncheck the "Vector store" box. - -Alternatively, use [the `/experimental` route](/reference/api/experimental_features?utm_campaign=vector-search&utm_source=docs&utm_medium=vector-search-guide): - -```sh -curl \ - -X PATCH 'MEILISEARCH_URL/experimental-features/' \ - -H 'Content-Type: application/json' \ - --data-binary '{ - "vectorStore": false - }' -``` diff --git a/learn/ai_powered_search/difference_full_text_ai_search.mdx b/learn/ai_powered_search/difference_full_text_ai_search.mdx index dbc0120d27..7c9fc9eb52 100644 --- a/learn/ai_powered_search/difference_full_text_ai_search.mdx +++ b/learn/ai_powered_search/difference_full_text_ai_search.mdx @@ -3,7 +3,7 @@ title: Differences between full-text and AI-powered search — Meilisearch docum description: "Meilisearch offers two types of search: full-text search and AI-powered search. This article explains their differences and intended use cases." --- -# Differences between full-text and AI-powered search +# Differences between full-text and AI-powered search Meilisearch offers two types of search: full-text search and AI-powered search. This article explains their differences and intended use cases. diff --git a/learn/ai_powered_search/getting_started_with_ai_search.mdx b/learn/ai_powered_search/getting_started_with_ai_search.mdx index 9a3ea8626c..fcd2eb6dcf 100644 --- a/learn/ai_powered_search/getting_started_with_ai_search.mdx +++ b/learn/ai_powered_search/getting_started_with_ai_search.mdx @@ -1,13 +1,13 @@ --- title: Getting started with AI-powered search — Meilisearch documentation -description: AI-powered search is an experimental technology that uses LLMs to retrieve search results. This tutorial shows you how to configure an OpenAI embedder and perform your first search. +description: AI-powered search uses LLMs to retrieve search results. This tutorial shows you how to configure an OpenAI embedder and perform your first search. --- -# Getting started with AI-powered search +# Getting started with AI-powered search -[AI-powered search](https://meilisearch.com/solutions/vector-search), sometimes also called vector search or hybrid search, is an experimental technology that uses [large language models (LLMs)](https://en.wikipedia.org/wiki/Large_language_model) to retrieve search results based on the meaning and context of a query. +[AI-powered search](https://meilisearch.com/solutions/vector-search), sometimes also called vector search or hybrid search, uses [large language models (LLMs)](https://en.wikipedia.org/wiki/Large_language_model) to retrieve search results based on the meaning and context of a query. -This tutorial will walk you through configuring AI-powered search in your Meilisearch project. You will see how to activate this feature, generate document embeddings with OpenAI, and perform your first search. +This tutorial will walk you through configuring AI-powered search in your Meilisearch project. You will see how to set up an embedder with OpenAI, generate document embeddings, and perform your first search. ## Requirements @@ -21,35 +21,6 @@ First, create a new Meilisearch project. If this is your first time using Meilis Next, create a `kitchenware` index and add [this kitchenware products dataset](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/datasets/kitchenware.json) to it. It will take Meilisearch a few moments to process your request, but you can continue to the next step while your data is indexing. -## Activate AI-powered search - -AI-powered search is an experimental feature and is disabled by default. You must manually activate it either via the Meilisearch Cloud UI, or with the experimental features endpoint. - - -To use AI-powered search with Meilisearch Cloud, you must first enter the waitlist. You will not be able to activate vector search until your sign-up has been approved. - - -### Meilisearch Cloud UI - -Navigate to your project overview and find "Experimental features". Then click on the "AI-powered search" box. - -![A section of the project overview interface titled "Experimental features". The image shows a few options, including "Vector store".](https://raw.githubusercontent.com/meilisearch/documentation/main/assets/images/vector-search/01-cloud-vector-store.png) - -### Experimental features endpoint - -Use [the `/experimental-features` route](/reference/api/experimental_features) to activate vector search during runtime: - -```sh -curl \ - -X PATCH 'MEILISEARCH_URL/experimental-features/' \ - -H 'Content-Type: application/json' \ - --data-binary '{ - "vectorStore": true - }' -``` - -Replace `MEILISEARCH_URL` with your project's URL. In most cases, this should look like `https://ms-000xx00x000-xx.xxx.meilisearch.io` if you're using Meilisearch Cloud, or `http://localhost:7700` if you are running Meilisearch in your local machine. - ## Generate embeddings with OpenAI In this step, you will configure an OpenAI embedder. Meilisearch uses **embedders** to translate documents into **embeddings**, which are mathematical representations of a document's meaning and context. @@ -194,4 +165,4 @@ Now you have a basic overview of the basic steps required for setting up and per For practical information on implementing AI-powered search with other services, consult our [guides section](/guides/ai/openai). There you will find specific instructions for embedders such as [LangChain](/guides/ai/langchain) and [Cloudflare](/guides/ai/cloudflare). -For more in-depth information, consult the API reference for [embedder settings](/reference/api/settings#embedders-experimental) and [the `hybrid` search parameter](/reference/api/search#hybrid-search-experimental). +For more in-depth information, consult the API reference for [embedder settings](/reference/api/settings#embedders) and [the `hybrid` search parameter](/reference/api/search#hybrid-search). diff --git a/learn/ai_powered_search/search_with_user_provided_embeddings.mdx b/learn/ai_powered_search/search_with_user_provided_embeddings.mdx index 400f3fc30b..681c3f794f 100644 --- a/learn/ai_powered_search/search_with_user_provided_embeddings.mdx +++ b/learn/ai_powered_search/search_with_user_provided_embeddings.mdx @@ -3,7 +3,7 @@ title: Use AI-powered search with user-provided embeddings — Meilisearch docum description: This guide shows how to perform AI-powered searches with user-generated embeddings instead of relying on a third-party tool. --- -# Use AI-powered search with user-provided embeddings +# Use AI-powered search with user-provided embeddings This guide shows how to perform AI-powered searches with user-generated embeddings instead of relying on a third-party tool. diff --git a/learn/resources/experimental_features_overview.mdx b/learn/resources/experimental_features_overview.mdx index d90ef6ca1f..f800a1d1f4 100644 --- a/learn/resources/experimental_features_overview.mdx +++ b/learn/resources/experimental_features_overview.mdx @@ -50,6 +50,5 @@ Activating or deactivating experimental features this way does not require you t | [Reduce indexing memory usage](/learn/self_hosted/configure_meilisearch_at_launch) | Optimizes indexing performance | At launch with a CLI flag or environment variable | | [Replication parameters](/learn/self_hosted/configure_meilisearch_at_launch) | Alters task processing for clustering compatibility | At launch with a CLI flag or environment variable | | [Search queue size](/learn/self_hosted/configure_meilisearch_at_launch) | Configure maximum number of concurrent search requests | At launch with a CLI flag or environment variable | -| [Vector store](/learn/ai_powered_search/getting_started_with_ai_search) | Allows Meilisearch to function as a vector embedding store | During runtime with the API route | | [`CONTAINS` filter operator](/learn/filtering_and_sorting/filter_expression_reference#contains) | Enables usage of `CONTAINS` with the `filter` search parameter | During runtime with the API route | | [Edit documents with function](/reference/api/documents#update-documents-with-function) | Use a RHAI function to edit documents directly in the Meilisearch database | During runtime with the API route | diff --git a/reference/api/experimental_features.mdx b/reference/api/experimental_features.mdx index a91c6160b0..ceb787a893 100644 --- a/reference/api/experimental_features.mdx +++ b/reference/api/experimental_features.mdx @@ -19,7 +19,8 @@ The experimental API route is not compatible with all experimental features. Con { "metrics": false, "logsRoute": true, - "vectorStore": false, + "containsFilter": false, + "editDocumentsByFunction": false } ``` @@ -27,7 +28,6 @@ The experimental API route is not compatible with all experimental features. Con | :---------------------------- | :------ | :--------------------------------------------- | | **`metrics`** | Boolean | `true` if feature is active, `false` otherwise | | **`logsRoute`** | Boolean | `true` if feature is active, `false` otherwise | -| **`vectorStore`** | Boolean | `true` if feature is active, `false` otherwise | | **`containsFilter`** | Boolean | `true` if feature is active, `false` otherwise | | **`editDocumentsByFunction`** | Boolean | `true` if feature is active, `false` otherwise | @@ -47,7 +47,8 @@ Get a list of all experimental features that can be activated via the `/experime { "metrics": false, "logsRoute": true, - "vectorSearch": false, + "containsFilter": false, + "editDocumentsByFunction": false } ``` @@ -73,6 +74,7 @@ Setting a field to `null` leaves its value unchanged. { "metrics": false, "logsRoute": true, - "vectorSearch": false, + "containsFilter": false, + "editDocumentsByFunction": false } ``` diff --git a/reference/api/search.mdx b/reference/api/search.mdx index 9dae9ff542..6836772a30 100644 --- a/reference/api/search.mdx +++ b/reference/api/search.mdx @@ -56,9 +56,9 @@ By default, [this endpoint returns a maximum of 1000 results](/learn/resources/k | **[`showRankingScoreDetails`](#ranking-score-details)** | Boolean | `false` | Adds a detailed global ranking score field | | **[`rankingScoreThreshold`](#ranking-score-threshold)** | Number | `null` | Excludes results with low ranking scores | | **[`attributesToSearchOn`](#customize-attributes-to-search-on-at-search-time)** | Array of strings | `["*"]` | Restrict search to the specified attributes | -| **[`hybrid`](#hybrid-search-experimental)** | Object | `null` | Return results based on query keywords and meaning | -| **[`vector`](#vector-experimental)** | Array of numbers | `null` | Search using a custom query vector | -| **[`retrieveVectors`](#display-_vectors-in-response-experimental)** | Boolean | `false` | Return document vector data | +| **[`hybrid`](#hybrid-search)** | Object | `null` | Return results based on query keywords and meaning | +| **[`vector`](#vector)** | Array of numbers | `null` | Search using a custom query vector | +| **[`retrieveVectors`](#display-_vectors-in-response)** | Boolean | `false` | Return document vector data | | **[`locales`](#query-locales)** | Array of strings | `null` | Explicitly specify languages used in a query | [Learn more about how to use each search parameter](#search-parameters). @@ -170,9 +170,9 @@ By default, [this endpoint returns a maximum of 1000 results](/learn/resources/k | **[`showRankingScoreDetails`](#ranking-score-details)** | Boolean | `false` | Adds a detailed global ranking score field | | **[`rankingScoreThreshold`](#ranking-score-threshold)** | Number | `null` | Excludes results with low ranking scores | | **[`attributesToSearchOn`](#customize-attributes-to-search-on-at-search-time)** | Array of strings | `["*"]` | Restrict search to the specified attributes | -| **[`hybrid`](#hybrid-search-experimental)** | Object | `null` | Return results based on query keywords and meaning | -| **[`vector`](#vector-experimental)** | Array of numbers | `null` | Search using a custom query vector | -| **[`retrieveVectors`](#display-_vectors-in-response-experimental)** | Boolean | `false` | Return document vector data | +| **[`hybrid`](#hybrid-search)** | Object | `null` | Return results based on query keywords and meaning | +| **[`vector`](#vector)** | Array of numbers | `null` | Search using a custom query vector | +| **[`retrieveVectors`](#display-_vectors-in-response)** | Boolean | `false` | Return document vector data | | **[`locales`](#query-locales)** | Array of strings | `null` | Explicitly specify languages used in a query | [Learn more about how to use each search parameter](#search-parameters). @@ -261,9 +261,9 @@ This is not necessary when using the `POST` route or one of our [SDKs](/learn/re | **[`matchingStrategy`](#matching-strategy)** | String | `last` | Strategy used to match query terms within documents | | **[`showRankingScore`](#ranking-score)** | Boolean | `false` | Display the global ranking score of a document | | **[`attributesToSearchOn`](#customize-attributes-to-search-on-at-search-time)** | Array of strings | `["*"]` | Restrict search to the specified attributes | -| **[`hybrid`](#hybrid-search-experimental)** | Object | `null` | Return results based on query keywords and meaning | -| **[`vector`](#vector-experimental)** | Array of numbers | `null` | Search using a custom query vector | -| **[`retrieveVectors`](#display-_vectors-in-response-experimental)** | Boolean | `false` | Return document vector data | +| **[`hybrid`](#hybrid-search)** | Object | `null` | Return results based on query keywords and meaning | +| **[`vector`](#vector)** | Array of numbers | `null` | Search using a custom query vector | +| **[`retrieveVectors`](#display-_vectors-in-response)** | Boolean | `false` | Return document vector data | | **[`locales`](#query-locales)** | Array of strings | `null` | Explicitly specify languages used in a query | ### Query (q) @@ -1172,7 +1172,7 @@ The following query returns documents whose `overview` includes `"adventure"`: Results would not include documents containing `"adventure"` in other fields such as `title` or `genre`, even if these fields were present in the `searchableAttributes` list. -### Hybrid search (experimental) +### Hybrid search **Parameter**: `hybrid`
**Expected value**: An object with two fields: `embedder` and `semanticRatio`
@@ -1186,15 +1186,11 @@ Configures Meilisearch to return search results based on a query's meaning and c `semanticRatio` must be a number between `0.0` and `1.0` indicating the proportion between keyword and semantic search results. `0.0` causes Meilisearch to only return keyword results. `1.0` causes Meilisearch to only return meaning-based results. Defaults to `0.5`. - -Meilisearch will return an error if you use `hybrid` before activating your instance's `vectorStore` and [configuring an embedder](/reference/api/settings#embedders-experimental). - - #### Example -### Vector (experimental) +### Vector **Parameter**: `vector`
**Expected value**: an array of numbers
@@ -1216,11 +1212,7 @@ If `q` is missing and `semanticRatio` is explicitly set to `0`, Meilisearch perf - -Meilisearch will return an error if you use `vector` before activating your instance's `vectorStore` and [configuring a custom embedder](/reference/api/settings#embedders-experimental). - - -### Display `_vectors` in response (experimental) +### Display `_vectors` in response **Parameter**: `retrieveVectors`
**Expected value**: `true` or `false`
diff --git a/reference/api/settings.mdx b/reference/api/settings.mdx index 79789542f8..f2d91b7fb6 100644 --- a/reference/api/settings.mdx +++ b/reference/api/settings.mdx @@ -61,7 +61,8 @@ By default, the settings object looks like this. All fields are modifiable. "proximityPrecision": "byWord", "facetSearch": true, "prefixSearch": "indexingTime", - "searchCutoffMs": null + "searchCutoffMs": null, + "embedders": {} } ``` @@ -130,7 +131,8 @@ Get the settings of an index. "proximityPrecision": "byWord", "facetSearch": true, "prefixSearch": "indexingTime", - "searchCutoffMs": null + "searchCutoffMs": null, + "embedders": {} } ``` @@ -174,7 +176,7 @@ If the provided index does not exist, it will be created. | **[`stopWords`](#stop-words)** | Array of strings | Empty | List of words ignored by Meilisearch when present in search queries | | **[`synonyms`](#synonyms)** | Object | Empty | List of associated words treated similarly | | **[`typoTolerance`](#typo-tolerance)** | Object | [Default object](#typo-tolerance-object) | Typo tolerance settings | -| **[`embedders`](#embedders-experimental)** | Object of objects | [Default object](#embedders-object) | Embedder required for performing meaning-based search queries | +| **[`embedders`](#embedders)** | Object of objects | [Default object](#embedders-object) | Embedder required for performing meaning-based search queries | #### Example @@ -2352,7 +2354,7 @@ Reset an index's typo tolerance settings to their [default value](#typo-toleranc You can use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task). -## Embedders (experimental) +## Embedders Embedders translate documents and queries into vector embeddings. You must configure at least one embedder to use AI-powered search. @@ -2482,7 +2484,7 @@ Meilisearch queries `url` to generate vector embeddings for queries and document This field is mandatory when using `rest` embedders. -This field is optional when using `ollama` and `openAi` embedders. +This field is optional when using `ollama` and `openAi` embedders. `ollama` URLs must end with either `/api/embed` or `/api/embeddings`. This field is incompatible with `huggingFace` and `userProvided` embedders. diff --git a/reference/api/similar.mdx b/reference/api/similar.mdx index 5dfa9892ab..6fa98ad8c4 100644 --- a/reference/api/similar.mdx +++ b/reference/api/similar.mdx @@ -3,16 +3,12 @@ title: Similar documents — Meilisearch API reference description: The /similar route accepts one search result and uses AI-powered search to return a number of similar documents. --- -# Similar documents +# Similar documents The `/similar` route uses AI-powered search to return a number of documents similar to a target document. Meilisearch exposes two routes for retrieving similar documents: `POST` and `GET`. In the majority of cases, `POST` will offer better performance and ease of use. - -This is an experimental feature. To use it, you must first [enable and configure AI-powered search](/learn/ai_powered_search/getting_started_with_ai_search). - - ## Get similar documents with `POST` @@ -30,7 +26,7 @@ Retrieve documents similar to a specific search result. | Parameter | Type | Default value | Description | | ---------------------------------------------------------------------------- | ---------------- | ------------- | ---------------------------------------------- | | **`id`** | String or number | `null` | Identifier of the target document (mandatory) | -| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory | +| **[`embedder`](/reference/api/search#hybrid-search)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory | | **[`attributesToRetrieve`](/reference/api/search#attributes-to-retrieve)** | Array of strings | `["*"]` | Attributes to display in the returned documents| | **[`offset`](/reference/api/search#offset)** | Integer | `0` | Number of documents to skip | | **[`limit`](/reference/api/search#limit)** | Integer | `20` | Maximum number of documents returned | @@ -38,7 +34,7 @@ Retrieve documents similar to a specific search result. | **[`showRankingScore`](/reference/api/search#ranking-score)** | Boolean | `false` | Display the global ranking score of a document | | **[`showRankingScoreDetails`](/reference/api/search#ranking-score-details)** | Boolean | `false` | Display detailed ranking score information | | **[`rankingScoreThreshold`](/reference/api/search#ranking-score-threshold)** | Number | `null` | Exclude results with low ranking scores | -| **[`retrieveVectors`](/reference/api/search#display-_vectors-in-response-experimental)** | Boolean | `false` | Return document vector data | +| **[`retrieveVectors`](/reference/api/search#display-_vectors-in-response)** | Boolean | `false` | Return document vector data | ### Example @@ -87,7 +83,7 @@ Retrieve documents similar to a specific search result. | Parameter | Type | Default value | Description | | ---------------------------------------------------------------------------- | ---------------- | ------------- | ---------------------------------------------- | | **`id`** | String or number | `null` | Identifier of the target document (mandatory) | -| **[`embedder`](/reference/api/search#hybrid-search-experimental)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory | +| **[`embedder`](/reference/api/search#hybrid-search)** | String | `"default"` | Embedder to use when computing recommendations. Mandatory | | **[`attributesToRetrieve`](/reference/api/search#attributes-to-retrieve)** | Array of strings | `["*"]` | Attributes to display in the returned documents| | **[`offset`](/reference/api/search#offset)** | Integer | `0` | Number of documents to skip | | **[`limit`](/reference/api/search#limit)** | Integer | `20` | Maximum number of documents returned | @@ -95,7 +91,7 @@ Retrieve documents similar to a specific search result. | **[`showRankingScore`](/reference/api/search#ranking-score)** | Boolean | `false` | Display the global ranking score of a document | | **[`showRankingScoreDetails`](/reference/api/search#ranking-score-details)** | Boolean | `false` | Display detailed ranking score information | | **[`rankingScoreThreshold`](/reference/api/search#ranking-score-threshold)** | Number | `null` | Exclude results with low ranking scores | -| **[`retrieveVectors`](/reference/api/search#display-_vectors-in-response-experimental)** | Boolean | `false` | Return document vector data | +| **[`retrieveVectors`](/reference/api/search#display-_vectors-in-response)** | Boolean | `false` | Return document vector data | ### Example diff --git a/reference/errors/error_codes.mdx b/reference/errors/error_codes.mdx index 4e6b14f6da..8afb1b11c7 100644 --- a/reference/errors/error_codes.mdx +++ b/reference/errors/error_codes.mdx @@ -269,6 +269,10 @@ The [`cropLength`](/reference/api/search#crop-length) parameter is invalid. It s The [`cropMarker`](/reference/api/search#crop-marker) parameter is invalid. It should be a string or set to `null`. +### `invalid_search_embedder` + +[`embedder`](/reference/api/search#hybrid-search) is invalid. It should be a string corresponding to the name of a configured embedder. + ## `invalid_search_facets` This error occurs if: @@ -296,6 +300,10 @@ The [`highlightPreTag`](/reference/api/search#highlight-tags) parameter is inval The [`hitsPerPage`](/reference/api/search#number-of-results-per-page) parameter is invalid. It should be an integer. +## `invalid_search_hybrid_query` + +The [`hybrid`](/reference/api/search#hybrid-search) parameter is neither `null` nor an object, or it is an object with unknown keys. + ## `invalid_search_limit` The [`limit`](/reference/api/search#limit) parameter is invalid. It should be an integer. @@ -423,6 +431,10 @@ Meilisearch could not find the target document. Make sure your target document i [`attributesToRetrieve`](/reference/api/search#attributes-to-retrieve) is invalid. It should be an array of strings, a string, or set to null. +### `invalid_similar_embedder` + +[`embedder`](/reference/api/similar#body) is invalid. It should be a string corresponding to the name of a configured embedder. + ### `invalid_similar_filter` [`filter`](/reference/api/search#filter) is invalid or contains a filter expression with a missing or invalid operator. Filter expressions must be a string, array of strings, or array of array of strings for the POST endpoint. It must be a string for the GET endpoint. @@ -445,10 +457,6 @@ Meilisearch also throws this error if the attribute used for filtering is not de [`ranking_score_details`](/reference/api/search#ranking-score-details) is invalid. It should be a boolean. -### `invalid_embedder` - -[`embedder`](/reference/api/search#hybrid-search-experimental) is invalid. It should be a string corresponding to the name of a configured embedder. - ## `invalid_similar_ranking_score_threshold` The [`rankingScoreThreshold`](/reference/api/search#ranking-score-threshold) in a similar documents request is not a number between `0.0` and `1.0`.