Live demo: judilibre.meilisearch.com

Key features
- Two corpora, one search bar: A switch toggles between Codes (one hit per article) and Décisions (one hit per ruling). Facets follow the corpus: code and subdivision for articles; chamber, solution, publication, and year for decisions.
- Search-as-you-type over long legal texts: Queries return in milliseconds across the full text of every article and decision, with highlighted matches and cropped snippets when the match is deep in the body.
- Exact references: Typo tolerance is disabled on article numbers, appeal numbers, and ECLI identifiers, so searching
L110-1never returnsL110-11, while typos in legal concepts are still forgiven. - French stop words: Common words such as “le”, “du”, or “des” are declared as stop words, so a query like “responsabilité du fait des choses” ranks on the words that carry meaning.
- Hybrid search with a legal embedder: The IA button enables hybrid search with a
semanticRatioof 0.6, using Voyage AI’svoyage-law-2model configured as a REST embedder. It finds relevant articles even when the user’s wording differs from the legislator’s. - Faceted navigation: Facet counts update with every query, with
ORinside a facet andANDacross facets, as described in build faceted navigation. - Articles linked to case law: Each article page lists the decisions that apply it, and each decision links to the articles it cites. Both directions are a simple filter on a normalized reference key (for example
code-du-travail:L1152-1) stored in a filterable attribute. - Conversational assistant: The Assistant tab answers questions in French, searches the codes and the case law on its own, and lists the retrieved documents as numbered sources.
Example queries
- “responsabilité du fait des choses” Returns article 1242 of the Code civil first, the founding text on liability for things in one’s custody.
- “L1152-1” Jumps straight to the Code du travail article on workplace harassment, then open it to see the Cour de cassation decisions applying it.
- “licenciement pour inaptitude” with Décisions selected, then filter on the social chamber and sort by date to read the latest rulings on dismissals for unfitness.
- “Mon propriétaire refuse de me rendre mon dépôt de garantie, que dit la loi ?” in the assistant searches the codes first, then the case law, and answers with citations.
How it works
The project has two parts. A Rust indexer exports decisions from the Judilibre API, streams the 5.25 million XML files of the LEGI archive without extracting them, and pushes the documents to Meilisearch. A Next.js application queries Meilisearch directly from the browser with a search-only API key, so no admin key is ever deployed. Each index is tuned for its documents. Thelegi index, for example, uses these settings:
/chats route. Meilisearch runs the retrieval loop itself: the LLM decides what to search and with which filters, Meilisearch executes the searches on the indexes that have a chat description, and the answer streams back as OpenAI-compatible server-sent events. The application reads the _meiliSearchProgress and _meiliSearchSources events to show each search step and the source documents behind the answer.
To build the same kind of assistant with your own data, follow the agentic search getting started guide.
Links
Try the demo
Search French codes and case law
Source code
Rust indexer and Next.js application on GitHub
Hybrid search
Combine keyword and semantic search
Agentic search
Build a conversational assistant on your indexes
Judilibre data is published by the Cour de cassation under the Licence Ouverte 2.0, and decisions are pseudonymized. This demo is a technical showcase, not legal advice.