mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Put the documents into an MTBL database
This commit is contained in:
parent
d5a356902a
commit
fae694a102
5 changed files with 61 additions and 34 deletions
|
@ -5,7 +5,7 @@ use std::time::Instant;
|
|||
|
||||
use heed::EnvOpenOptions;
|
||||
use log::debug;
|
||||
use milli::{Index, BEU32};
|
||||
use milli::Index;
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
@ -67,9 +67,11 @@ fn main() -> anyhow::Result<()> {
|
|||
let mut stdout = io::stdout();
|
||||
stdout.write_all(&headers)?;
|
||||
|
||||
let documents = index.documents(&rtxn)?.unwrap();
|
||||
for id in &documents_ids {
|
||||
if let Some(content) = index.documents.get(&rtxn, &BEU32::new(*id))? {
|
||||
stdout.write_all(&content)?;
|
||||
let id_bytes = id.to_be_bytes();
|
||||
if let Some(content) = documents.clone().get(&id_bytes)? {
|
||||
stdout.write_all(content.as_ref())?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue