From 58c3b5c9b8a1738bed592ed00baec20715d13fdd Mon Sep 17 00:00:00 2001 From: Steve Yen Date: Tue, 18 Oct 2016 14:32:58 -0700 Subject: [PATCH] revert optimization that trims search-disjunction child searchers This commit reverts a previous optimization attempt 3f588cd4a that tried to trim or shrink the array of child searchers in a search-disjunction. Although I am not sure why at the moment, that optimization incorrectly broke higher level boolean queries, but reverting so that functionality is restored. --- search/searcher/search_disjunction.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/search/searcher/search_disjunction.go b/search/searcher/search_disjunction.go index bd2ff68a..1d08803a 100644 --- a/search/searcher/search_disjunction.go +++ b/search/searcher/search_disjunction.go @@ -122,19 +122,6 @@ func (s *DisjunctionSearcher) updateMatches() error { for i := 0; i < len(s.currs); i++ { curr := s.currs[i] if curr == nil { - err := s.searchers[i].Close() - if err != nil { - return err - } - - last := len(s.searchers) - 1 - s.searchers[i] = s.searchers[last] - s.searchers = s.searchers[0:last] - s.currs[i] = s.currs[last] - s.currs = s.currs[0:last] - - i-- // To keep i the same for the next iteration. - continue }