feat: Make querying always return limited results

This commit is contained in:
Kerollmops
2018-06-24 15:36:24 +02:00
committed by Clément Renault
parent 8fab80048c
commit 0ce08c8790
3 changed files with 29 additions and 52 deletions

View File

@ -4,10 +4,8 @@ extern crate test;
extern crate fst;
extern crate raptor;
use std::path::Path;
use std::{fs, env, io};
use fst::Streamer;
use raptor::{load_map, DocIndexMap, RankedStream, LevBuilder};
use raptor::{load_map, RankedStream, LevBuilder};
#[bench]
fn chauve_souris(b: &mut test::Bencher) {
@ -23,7 +21,7 @@ fn chauve_souris(b: &mut test::Bencher) {
automatons.push(lev);
}
let mut stream = RankedStream::new(&map, &map.values(), automatons);
let mut stream = RankedStream::new(&map, &map.values(), automatons, 20);
while let Some(document_id) = stream.next() {
test::black_box(document_id);
}