Release GIL on searcher acquisition.

master
Moriyoshi Koizumi 2021-05-01 15:36:27 +09:00
parent 94fa02bf52
commit 57f01aac7a
1 changed files with 2 additions and 2 deletions

View File

@ -261,9 +261,9 @@ impl Index {
/// you probably should configure the Index to have a larger /// you probably should configure the Index to have a larger
/// searcher pool, or you are holding references to previous searcher /// searcher pool, or you are holding references to previous searcher
/// for ever. /// for ever.
fn searcher(&self) -> Searcher { fn searcher(&self, py: Python) -> Searcher {
Searcher { Searcher {
inner: self.reader.searcher(), inner: py.allow_threads(|| self.reader.searcher()),
} }
} }