@@ -95,7 +95,7 @@ public class EnumerableBasedDocIdSetIterator : DocIdSetIterator
95
95
{
96
96
private readonly IEnumerable < int > items ;
97
97
private IEnumerator < int > iterator ;
98
- private int currentIndex = - 1 ;
98
+ private int currentDocId = - 1 ;
99
99
100
100
public EnumerableBasedDocIdSetIterator ( IEnumerable < int > items )
101
101
{
@@ -110,26 +110,26 @@ public EnumerableBasedDocIdSetIterator(IEnumerable<int> items)
110
110
111
111
public override int Advance ( int target )
112
112
{
113
- if ( target < currentIndex )
113
+ if ( target < currentDocId )
114
114
{
115
- throw new ArgumentOutOfRangeException ( "target" , target , "Iterator state past target: " + currentIndex ) ;
115
+ throw new ArgumentOutOfRangeException ( "target" , target , "Iterator state past target: " + currentDocId ) ;
116
116
}
117
117
118
118
// Relies on NO_MORE_DOCS being a big number
119
- while ( target > currentIndex )
119
+ while ( target > currentDocId )
120
120
{
121
121
if ( iterator . MoveNext ( ) )
122
- currentIndex = iterator . Current ;
122
+ currentDocId = iterator . Current ;
123
123
else
124
- currentIndex = NO_MORE_DOCS ;
124
+ currentDocId = NO_MORE_DOCS ;
125
125
}
126
126
127
- return currentIndex == NO_MORE_DOCS ? NO_MORE_DOCS : iterator . Current ;
127
+ return currentDocId == NO_MORE_DOCS ? NO_MORE_DOCS : iterator . Current ;
128
128
}
129
129
130
130
public override int DocID ( )
131
131
{
132
- if ( currentIndex == NO_MORE_DOCS || currentIndex == - 1 )
132
+ if ( currentDocId == NO_MORE_DOCS || currentDocId == - 1 )
133
133
{
134
134
return NO_MORE_DOCS ;
135
135
}
@@ -139,12 +139,12 @@ public override int DocID()
139
139
140
140
public override int NextDoc ( )
141
141
{
142
- if ( currentIndex == NO_MORE_DOCS )
142
+ if ( currentDocId == NO_MORE_DOCS )
143
143
{
144
144
return NO_MORE_DOCS ;
145
145
}
146
146
147
- return Advance ( currentIndex + 1 ) ;
147
+ return Advance ( currentDocId + 1 ) ;
148
148
}
149
149
}
150
150
}
0 commit comments