subsequent calls to advance on the same key
should keep returning the same thing only increment on initial call
This commit is contained in:
parent
55644a695d
commit
0be5cffd21
|
@ -183,7 +183,9 @@ func (reader *mockTermFieldReader) Next() (*index.TermFieldDoc, error) {
|
|||
|
||||
func (reader *mockTermFieldReader) Advance(ID string) (*index.TermFieldDoc, error) {
|
||||
|
||||
reader.curr += 1
|
||||
if reader.curr < 0 {
|
||||
reader.curr += 1
|
||||
}
|
||||
if reader.curr >= len(reader.sortedDocIds) {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue