fix getOrds on single array ords
This commit is contained in:
parent
fa363b2dca
commit
8c7e0f5ca1
|
@ -112,7 +112,7 @@ public class SingleArrayOrdinals implements Ordinals {
|
|||
public IntArrayRef getOrds(int docId) {
|
||||
int ordinal = ordinals[docId];
|
||||
if (ordinal == 0) return IntArrayRef.EMPTY;
|
||||
intsScratch.values[0] = docId;
|
||||
intsScratch.values[0] = ordinal;
|
||||
return intsScratch;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public class SinglePackedOrdinals implements Ordinals {
|
|||
public IntArrayRef getOrds(int docId) {
|
||||
int ordinal = (int) reader.get(docId);
|
||||
if (ordinal == 0) return IntArrayRef.EMPTY;
|
||||
intsScratch.values[0] = docId;
|
||||
intsScratch.values[0] = ordinal;
|
||||
return intsScratch;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue