0
0
Fork 0

Initialize the return value as late as possible

This commit is contained in:
Silvan Jegen 2016-10-26 15:20:40 +02:00
parent 3dd363afaa
commit 33e2432fc6
1 changed files with 3 additions and 1 deletions

View File

@ -102,11 +102,13 @@ func (s *PhraseSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch,
freq := 0
firstTerm := s.terms[0]
for field, termLocMap := range s.currMust.Locations {
rvtlm := make(search.TermLocationMap, 0)
locations, ok := termLocMap[firstTerm]
if !ok {
continue
}
rvtlm := make(search.TermLocationMap, 0)
OUTER:
for _, location := range locations {
crvtlm := make(search.TermLocationMap, 0)