@Override public boolean sourceRequested() { return in.sourceRequested(); }
@Override public boolean sourceRequested() { return in.sourceRequested(); }
@Override public boolean sourceRequested() { return in.sourceRequested(); }
@Override public boolean sourceRequested() { return in.sourceRequested(); }
@Override public boolean hitExecutionNeeded(SearchContext context) { return context.sourceRequested(); }
@Override public boolean sourceRequested() { return in.sourceRequested(); }
final boolean needSource = context.sourceRequested() || context.highlight() != null; if (needSource || (context instanceof InnerHitsContext.InnerHitSubContext == false)) { FieldsVisitor rootFieldsVisitor = new FieldsVisitor(needSource);
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.sourceRequested() == false) { return;
context.fetchSourceContext(new FetchSourceContext(true)); fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else if (storedFieldsContext.fetchFields() == false) { boolean loadSource = context.sourceRequested(); if (storedToRequestedFields.isEmpty()) {
context.fetchSourceContext(new FetchSourceContext(true)); fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else if (context.fieldNames().isEmpty()) { fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else { for (String fieldName : context.fieldNames()) { fieldsVisitor = new AllFieldsVisitor(); // load everything, including _source } else if (fieldNames != null || fieldNamePatterns != null) { boolean loadSource = extractFieldNames != null || context.sourceRequested(); fieldsVisitor = new CustomFieldsVisitor(fieldNames == null ? Collections.<String>emptySet() : fieldNames, fieldNamePatterns == null ? Collections.<String>emptyList() : fieldNamePatterns, loadSource); } else { fieldsVisitor = new FieldsVisitor(extractFieldNames != null || context.sourceRequested());
final boolean needSource = context.sourceRequested() || context.highlight() != null; if (needSource || (context instanceof InnerHitsContext.InnerHitSubContext == false)) { FieldsVisitor rootFieldsVisitor = new FieldsVisitor(needSource);
final FieldsVisitor rootFieldsVisitor = new FieldsVisitor(context.sourceRequested() || context.highlight() != null); loadStoredFields(context, subReaderContext, rootFieldsVisitor, rootSubDocId); rootFieldsVisitor.postProcess(context.mapperService());
final boolean needSource = context.sourceRequested() || context.highlight() != null; if (needSource || (context instanceof InnerHitsContext.InnerHitSubContext == false)) { FieldsVisitor rootFieldsVisitor = new FieldsVisitor(needSource);
final FieldsVisitor rootFieldsVisitor = new FieldsVisitor(context.sourceRequested() || extractFieldNames != null || context.highlight() != null); loadStoredFields(context, subReaderContext, rootFieldsVisitor, rootSubDocId); rootFieldsVisitor.postProcess(context.mapperService());
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.sourceRequested() == false) { return;
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.sourceRequested() == false) { return;
context.fetchSourceContext(new FetchSourceContext(true)); fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else if (storedFieldsContext.fetchFields() == false) { boolean loadSource = context.sourceRequested(); if (fieldNames == null && fieldNamePatterns == null) {
context.fetchSourceContext(new FetchSourceContext(true)); fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else if (storedFieldsContext.fetchFields() == false) { boolean loadSource = context.sourceRequested(); if (storedToRequestedFields.isEmpty()) {
context.fetchSourceContext(new FetchSourceContext(true)); fieldsVisitor = new FieldsVisitor(context.sourceRequested()); } else if (storedFieldsContext.fetchFields() == false) { boolean loadSource = context.sourceRequested(); if (storedToRequestedFields.isEmpty()) {
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.sourceRequested() == false) { return;