when asking for _source with script fields, the _source is not returned.

This commit is contained in:
Shay Banon 2012-02-16 21:21:12 +02:00
parent c5387be07c
commit 6823d50840
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ public class FetchPhase implements SearchPhase {
fieldSelectorMapper.add(SourceFieldMapper.NAME); fieldSelectorMapper.add(SourceFieldMapper.NAME);
} }
fieldSelector = fieldSelectorMapper; fieldSelector = fieldSelectorMapper;
} else if (extractFieldNames != null) { } else if (extractFieldNames != null || sourceRequested) {
fieldSelector = new UidAndSourceFieldSelector(); fieldSelector = new UidAndSourceFieldSelector();
} else { } else {
fieldSelector = UidFieldSelector.INSTANCE; fieldSelector = UidFieldSelector.INSTANCE;