Learning resourcesReviewed · Mistral AI

Mistral Search Index: create and query an index

This Mistral quickstart teaches Python developers to create and search a document index, but it requires a workspace with search indexes enabled. Its six-part example defines document fields, embeds three articles, combines keyword and vector search, applies a product filter and requests index deletion at the end.

Researched 15 Nov 2026

In short.

This Mistral quickstart shows Python developers how to build searchable document collections, but it requires a workspace with search indexes enabled. It demonstrates schema creation, document embedding, ingestion and filtered hybrid retrieval through the Search Toolkit. Document embeddings must be supplied before ingestion, while Mistral query embeddings are generated by the server. The example requests deletion of its index when finished. Its displayed results are documentation examples; execution, retrieval quality, performance and costs were not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete documentation page at [https://docs.mistral.ai/studio/search/search-index/quickstarts/create-and-query-an-index.md], including prerequisites, permission notices, all six code blocks, expected output and further-reading links. Linked pages and their contents are excluded. No code was executed. Runtime compatibility, retrieval quality, performance, production readiness, pricing and licensing are not independently established.

The overview

Identity

Quickstart: create and query an index is a Mistral documentation tutorial for Search Index and its Python Search Toolkit. It covers creating an index, adding three inline articles and retrieving matching chunks for potential use by an agent or workflow. The source is [https://docs.mistral.ai/studio/search/search-index/quickstarts/create-and-query-an-index.md].

Assessment

The guide is useful for understanding the path from typed Python document models to filtered search results. It supplies the complete example, including asynchronous provisioning and cleanup. Its three short articles demonstrate API usage; they do not establish retrieval quality or suitability for a production collection.

Users

Python developers adding document search to support tools, agents or retrieval-augmented generation applications are the clearest audience. Beginners receive an ordered sequence and expected output, but familiarity with Python classes, type annotations, asynchronous functions and environment variables will help. Experienced developers can inspect schema inference, replacement behavior and retrieval composition directly.

Capabilities

The example creates a schema from Document and DocumentChunk subclasses, adds title and product fields, and declares an indexed integer page_number. The product field uses KEYWORD for exact filtering. Ingesting an existing source_id replaces the document, deleting its previous chunks and inserting the new ones in one transaction.

Search combines keyword and nearest-neighbour retrieval, with top_k=5 configured for each component and the combined result. A product filter applies to both retrieval methods. The script prints scores and source identifiers; answer generation is outside the demonstrated sequence.

Using it

Requirements

The page requires a Mistral API key, uv, Python 3.12 through 3.14 and a workspace with search indexes enabled. It explicitly excludes Python 3.15. Creating an index also requires the workspace create_search_indexes permission; missing permission returns 403. Accessing an existing index without access returns 404.

The creator owns the index and can view, query, ingest into, modify and delete it. Index names must be unique within a workspace, so the example adds a random suffix.

Mechanism

The toolkit derives the collection schema from the Article model and provisions storage asynchronously. The script polls until the index becomes READY. Its MISTRAL_EMBED_DIM_1024 embedding preset determines the vector column type and operator class; the embedding model cannot be changed after creation.

Ingestion does not generate embeddings. The example embeds all three article texts in one call, then attaches each vector to a single document chunk. During retrieval, the server embeds the query for the Mistral embedding model. RRFRetriever combines keyword and vector rankings using reciprocal rank fusion.

Setup

Create an API key at [https://console.mistral.ai/api-keys] and export it as MISTRAL_API_KEY. The page notes that the full key appears only once. Initialize the project with uv init --python 3.12 search-index-quickstart, enter that directory, and add the dependency with uv add "mistralai-search-toolkit>=0.1.0".

Assemble quickstart.py from the six supplied blocks in order, then follow the documented invocation uv run quickstart.py. The script creates the index, ingests articles, prints two sets of search results and requests index deletion through its finally block. These instructions were not executed.

Example

The sample contains articles about API keys, billing and member invitations. Each is an inline string stored as one chunk with a source identifier, title and product. The first query, "how do I rotate an api key", is documented as returning all three articles.

The second query, "add a colleague", filters product to console and is documented as returning only the member-invitation and API-key articles. The page supplies expected score-and-source output and warns that scores can differ. Those values are illustrative documentation output, not independently observed results.

Assessment & evidence

Limitations

The example uses one chunk per very short article. It does not demonstrate large-document splitting, realistic collection sizes, latency, throughput or relevance evaluation. The fixed embedding model also makes the initial preset choice consequential.

The provisioning loop has no timeout. Index creation occurs before the try/finally block, so an exception during provisioning does not reach the shown deletion call. Deletion is asynchronous, and the script does not wait for the index to disappear. These observations follow from the supplied code; runtime behavior was not verified.

Reasoning

The guide makes two useful distinctions explicit: applications supply document embeddings before ingestion, while the server can embed search queries; exact metadata filtering applies across both retrieval methods. These details help developers understand where preparation and filtering occur.

The unfiltered API-key query is expected to include billing and member-invitation articles. Consequently, returned hits and numerical scores alone provide no evidence of sufficient relevance for a particular application. The page offers no comparison showing that hybrid retrieval improves on either component.

Alternatives

The page links to a broader RAG pipeline quickstart [https://docs.mistral.ai/studio/search/search-toolkit/quickstart] and a library question-answering quickstart [https://docs.mistral.ai/studio/search/libraries/quickstart]. Their titles suggest adjacent learning paths, but their contents and comparative suitability are not established by this page. No competing products are evaluated.

Evidence

The complete documentation page provides prerequisites, access-permission notices, six code blocks, an invocation and expected output. Its claims and example output are first-party documentation evidence. It contains no independent benchmark or execution log, and its further-reading links do not establish the contents of those linked resources.

Access & freshness

Costs

Prices, billing units, quotas and free allowances are not stated. The example creates an index, embeds documents and sends queries before requesting deletion, but its total cost cannot be determined. The timing and billing consequences of asynchronous deletion are also unknown.

Rights

The page supplies no documentation license, sample-code reuse terms or Search Toolkit license. Permission to redistribute those materials cannot be established from this evidence. Service terms, document-retention rules and data-processing commitments are also not provided.

Freshness

The source was captured at 2026-11-15T01:10:19.810Z. No publication or update date is shown. Its installation command specifies mistralai-search-toolkit>=0.1.0 rather than a pinned package version, and its stated Python support is 3.12 through 3.14. Compatibility with a particular resolved toolkit version or later service changes is unknown.

Actions

To follow the guide, confirm workspace access and creation permission, use a supported Python version, and choose the embedding preset before creating the index. Assemble the supplied blocks and account for the automatic deletion at the end.

For an application beyond the example, add bounded provisioning waits and cleanup for creation failures, confirm deletion completion, and evaluate retrieval against representative documents and queries. Obtain current pricing and applicable terms separately; this page does not supply them.

Evidence for this report

selected-page.txtselected · checked 2026-11-15