Example #1
0
 private void loadStoredFields(
     SearchContext searchContext,
     LeafReaderContext readerContext,
     FieldsVisitor fieldVisitor,
     int docId) {
   fieldVisitor.reset();
   try {
     readerContext.reader().document(docId, fieldVisitor);
   } catch (IOException e) {
     throw new FetchPhaseExecutionException(
         searchContext, "Failed to fetch doc id [" + docId + "]", e);
   }
 }
Example #2
0
 public FieldsVisitor(boolean loadSource) {
   this.loadSource = loadSource;
   requiredFields = new HashSet<>();
   reset();
 }