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); } }
public FieldsVisitor(boolean loadSource) { this.loadSource = loadSource; requiredFields = new HashSet<>(); reset(); }