コード例 #1
0
 @Override
 public void forEachValueInDoc(int docId, StringValueInDocProc proc) {
   int loc = ordinals[docId];
   if (loc == 0) {
     proc.onMissing(docId);
     return;
   }
   proc.onValue(docId, values[loc]);
 }
コード例 #2
0
 @Override
 public void forEachValueInDoc(int docId, StringValueInDocProc proc) {
   boolean found = false;
   for (int[] ordinal : ordinals) {
     int loc = ordinal[docId];
     if (loc != 0) {
       found = true;
       proc.onValue(docId, Double.toString(values[loc]));
     }
   }
   if (!found) {
     proc.onMissing(docId);
   }
 }