mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-27 07:16:26 +00:00
feat: Make the Stream return a Document
This commit is contained in:
@ -20,10 +20,10 @@ fn search(map: &DocIndexMap, lev_builder: &LevBuilder, db: &DB, query: &str) {
|
||||
}
|
||||
|
||||
let mut stream = RankedStream::new(&map, map.values(), automatons, 20);
|
||||
while let Some(document_id) = stream.next() {
|
||||
print!("{:?} ", document_id);
|
||||
while let Some(document) = stream.next() {
|
||||
print!("{:?} ", document.document_id);
|
||||
|
||||
let title_key = format!("{}-title", document_id);
|
||||
let title_key = format!("{}-title", document.document_id);
|
||||
let title = db.get(title_key.as_bytes()).unwrap().unwrap();
|
||||
let title = unsafe { from_utf8_unchecked(&title) };
|
||||
print!("{:?}", title);
|
||||
|
Reference in New Issue
Block a user