diff --git a/executor.go b/executor.go index e842b3acd..b817e3718 100644 --- a/executor.go +++ b/executor.go @@ -779,7 +779,6 @@ func (e *Executor) mapper(ctx context.Context, ch chan mapResponse, nodes []*Nod resp.result, resp.err = e.mapperLocal(ctx, nodeSlices, mapFn, reduceFn) } else if !opt.Remote { results, err := e.exec(ctx, n, db, &pql.Query{Calls: pql.Calls{c}}, nodeSlices, opt) - if len(results) > 0 { resp.result = results[0] } diff --git a/fragment.go b/fragment.go index ac4d63926..e203dd711 100644 --- a/fragment.go +++ b/fragment.go @@ -563,12 +563,7 @@ func (f *Fragment) Top(opt TopOptions) ([]Pair, error) { // Retrieve the lowest count we have. // If it's too low then don't try finding anymore pairs. - //threshold := results[len(results)-1].Count - threshold := results.Pairs[0].Count - //if threshold < MinThreshold { - //break - //} // If the bitmap doesn't have enough bits set before the intersection // then we can assume that any remaing bitmaps also have a count too low.