{"id":13722463,"url":"https://github.com/meilisearch/milli","last_synced_at":"2025-05-07T15:30:41.937Z","repository":{"id":37751026,"uuid":"268274269","full_name":"meilisearch/milli","owner":"meilisearch","description":"Search engine library for Meilisearch ⚡️","archived":true,"fork":false,"pushed_at":"2023-04-04T11:21:46.000Z","size":6596,"stargazers_count":467,"open_issues_count":5,"forks_count":82,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-04T04:09:36.969Z","etag":null,"topics":["lmdb","meilisearch","search-engine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meilisearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-31T12:21:55.000Z","updated_at":"2025-04-08T23:40:02.000Z","dependencies_parsed_at":"2024-11-14T11:33:07.694Z","dependency_job_id":"edab28ca-5696-4441-bfa3-c6aa7a3363b3","html_url":"https://github.com/meilisearch/milli","commit_stats":null,"previous_names":["kerollmops/milli"],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fmilli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fmilli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fmilli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fmilli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meilisearch","download_url":"https://codeload.github.com/meilisearch/milli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252905552,"owners_count":21822823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lmdb","meilisearch","search-engine"],"created_at":"2024-08-03T01:01:29.036Z","updated_at":"2025-05-07T15:30:40.547Z","avatar_url":"https://github.com/meilisearch.png","language":"Rust","funding_links":[],"categories":["Resources","others","Rust","Search"],"sub_categories":["Repositories"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"the milli logo\" src=\"assets/logo-black.svg\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003ea concurrent indexer combined with fast and relevant search algorithms\u003c/p\u003e\n\n---\n\n⚠️ ARCHIVED REPOSITORY ⚠️\n\nThe content of this repository is now available in the [Meilisearch repository in the workspace `milli`](https://github.com/meilisearch/meilisearch/tree/main/milli).\n\n---\n\n## Introduction\n\nThis repository contains the core engine used in [Meilisearch].\n\nIt contains a library that can manage one and only one index. Meilisearch\nmanages the multi-index itself. Milli is unable to store updates in a store:\nit is the job of something else above and this is why it is only able\nto process one update at a time.\n\nThis repository contains crates to quickly debug the engine:\n\n- There are benchmarks located in the `benchmarks` crate.\n- The `cli` crate is a simple command-line interface that helps run [flamegraph] on top of it.\n- The `filter-parser` crate contains the parser for the Meilisearch filter syntax.\n- The `flatten-serde-json` crate contains the library that flattens serde-json `Value` objects like Elasticsearch does.\n- The `json-depth-checker` crate is used to indicate if a JSON must be flattened.\n\n## How to use it?\n\nMilli is a library that does search things, it must be embedded in a program.\nYou can compute the documentation of it by using `cargo doc --open`.\n\nHere is an example usage of the library where we insert documents into the engine\nand search for one of them right after.\n\n```rust\nlet path = tempfile::tempdir().unwrap();\nlet mut options = EnvOpenOptions::new();\noptions.map_size(10 * 1024 * 1024); // 10 MB\nlet index = Index::new(options, \u0026path).unwrap();\n\nlet mut wtxn = index.write_txn().unwrap();\nlet content = documents!([\n    {\n        \"id\": 2,\n        \"title\": \"Prideand Prejudice\",\n        \"author\": \"Jane Austin\",\n        \"genre\": \"romance\",\n        \"price$\": \"3.5$\",\n    },\n    {\n        \"id\": 456,\n        \"title\": \"Le Petit Prince\",\n        \"author\": \"Antoine de Saint-Exupéry\",\n        \"genre\": \"adventure\",\n        \"price$\": \"10.0$\",\n    },\n    {\n        \"id\": 1,\n        \"title\": \"Wonderland\",\n        \"author\": \"Lewis Carroll\",\n        \"genre\": \"fantasy\",\n        \"price$\": \"25.99$\",\n    },\n    {\n        \"id\": 4,\n        \"title\": \"Harry Potter ing fantasy\\0lood Prince\",\n        \"author\": \"J. K. Rowling\",\n        \"genre\": \"fantasy\\0\",\n    },\n]);\n\nlet config = IndexerConfig::default();\nlet indexing_config = IndexDocumentsConfig::default();\nlet mut builder =\n    IndexDocuments::new(\u0026mut wtxn, \u0026index, \u0026config, indexing_config.clone(), |_| ())\n        .unwrap();\nbuilder.add_documents(content).unwrap();\nbuilder.execute().unwrap();\nwtxn.commit().unwrap();\n\n\n// You can search in the index now!\nlet mut rtxn = index.read_txn().unwrap();\nlet mut search = Search::new(\u0026rtxn, \u0026index);\nsearch.query(\"horry\");\nsearch.limit(10);\n\nlet result = search.execute().unwrap();\nassert_eq!(result.documents_ids.len(), 1);\n```\n\n## Contributing\n\nWe're glad you're thinking about contributing to this repository! Feel free to pick an issue, and to ask any question you need. Some points might not be clear and we are available to help you!\n\nAlso, we recommend following the [CONTRIBUTING.md](/CONTRIBUTING.md) to create your PR.\n\n[Meilisearch]: https://github.com/meilisearch/meilisearch\n[flamegraph]: https://github.com/flamegraph-rs/flamegraph\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilisearch%2Fmilli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeilisearch%2Fmilli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilisearch%2Fmilli/lists"}