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