milli
v0.41.3

並發索引與快速和相關的搜索算法相結合
現在,該存儲庫的內容可在Workspace milli的Meilisearch存儲庫中找到。
該存儲庫包含Meilisearch中使用的核心引擎。
它包含一個可以管理一個且僅一個索引的庫。 Meilisearch管理多指數本身。 Milli無法將更新存儲在商店中:這是上面其他事物的工作,這就是為什麼它一次一次可以處理一個更新的原因。
該存儲庫包含板條箱快速調試引擎:
benchmarks板條箱中有基準測試。cli板條箱是一個簡單的命令行界面,有助於在其頂部運行FlameGraph。filter-parser板條箱包含Meilisearch Filter語法的解析器。flatten-serde-json板條箱包含像Elasticsearch一樣使Serde-Json Value對像變平的庫。json-depth-checker CRATE用於指示是否必須將JSON扁平化。 Milli是一個搜索事物的庫,必須嵌入程序中。您可以使用cargo doc --open來計算其文檔。
這是圖書館的示例用法,我們將文檔插入引擎並在此之後搜索其中一個。
let path = tempfile :: tempdir ( ) . unwrap ( ) ;
let mut options = EnvOpenOptions :: new ( ) ;
options . map_size ( 10 * 1024 * 1024 ) ; // 10 MB
let index = Index :: new ( options , & path ) . unwrap ( ) ;
let mut wtxn = index . write_txn ( ) . unwrap ( ) ;
let content = documents ! ( [
{
"id" : 2 ,
"title" : "Prideand Prejudice" ,
"author" : "Jane Austin" ,
"genre" : "romance" ,
"price$" : "3.5$" ,
} ,
{
"id" : 456 ,
"title" : "Le Petit Prince" ,
"author" : "Antoine de Saint-Exupéry" ,
"genre" : "adventure" ,
"price$" : "10.0$" ,
} ,
{
"id" : 1 ,
"title" : "Wonderland" ,
"author" : "Lewis Carroll" ,
"genre" : "fantasy" ,
"price$" : "25.99$" ,
} ,
{
"id" : 4 ,
"title" : "Harry Potter ing fantasy