feat: Introduce a way to enable or disable query timeouts

This commit is contained in:
Clément Renault
2019-08-28 13:23:03 +02:00
parent 67302d09f3
commit 9c5ec110e5
3 changed files with 30 additions and 8 deletions

View File

@ -159,7 +159,7 @@ fn main() -> Result<(), Box<dyn Error>> {
Ok(query) => {
let start_total = Instant::now();
let builder = index.query_builder();
let builder = index.query_builder().with_fetch_timeout(Duration::from_millis(40));
let documents = builder.query(&query, 0..opt.number_results)?;
let mut retrieve_duration = Duration::default();