} else if (s1MV ||
s2MV) {
//if one is a MultiValueSource, than the other one needs to be too.
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Illegal number of sources. There must be an even number of sources");
} else {
mvr.mv1 = new VectorValueSource(Collections.singletonList(sources.get(0)));
mvr.mv2 = new VectorValueSource(Collections.singletonList(sources.get(1)));
}
} else {
int dim = sources.size() / 2;
List<ValueSource> sources1 = new ArrayList<ValueSource>(dim);
List<ValueSource> sources2 = new ArrayList<ValueSource>(dim);
//Get dim value sources for the first vector
splitSources(dim, sources, sources1, sources2);
mvr.mv1 = new VectorValueSource(sources1);
mvr.mv2 = new VectorValueSource(sources2);
}
return mvr;
}