From 57f01aac7acfc5507e8bfc7f6a8063861a97c1c8 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sat, 1 May 2021 15:36:27 +0900 Subject: [PATCH] Release GIL on searcher acquisition. --- src/index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.rs b/src/index.rs index 8c8c9fa..8934753 100644 --- a/src/index.rs +++ b/src/index.rs @@ -261,9 +261,9 @@ impl Index { /// you probably should configure the Index to have a larger /// searcher pool, or you are holding references to previous searcher /// for ever. - fn searcher(&self) -> Searcher { + fn searcher(&self, py: Python) -> Searcher { Searcher { - inner: self.reader.searcher(), + inner: py.allow_threads(|| self.reader.searcher()), } }