apache/lucene-solr — pull request #98 by cpoerschke (2014-10-08 16:05:26+00:00)
Title: distributed expand=true&fl=key NPE fix, expand=true&distrib.singlePass=true consideration

https://issues.apache.org/jira/i#browse/SOLR-6604

scenario:
* select?expand=true&fl=key hit NPE in ExpandComponent.handleResponse when the responses of the EXECUTE_QUERY contained no expanded element despite the requests' purpose including PURPOSE_GET_FIELDS
* select?expand=true&distrib.singlePass=true worked but relied on other preceding components triggering a GET_FIELDS stage

changes:
* add TestExpandComponent and DistributedExpandComponentTest test cases
* change code to fix NPE
* change code to avoid distrib.singlePass reliance on other components
* tweak test cases to randomly alternate between docValues=false and docValues=true collapse fields