fix getOrds on single array ords

This commit is contained in:
Shay Banon 2013-01-19 08:27:40 +01:00
parent fa363b2dca
commit 8c7e0f5ca1
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}