@Override
public Explanation explain(AtomicReader indexReader, int docid, Explanation innerExplaination)
throws IOException {
if (!(indexReader instanceof BoboSegmentReader)) throw new IllegalArgumentException(
"IndexReader is not BoboSegmentReader");
BoboSegmentReader reader = (BoboSegmentReader) indexReader;
Explanation exp = new Explanation();
exp.setDescription("FacetBasedBoost");
float boost = 1.0f;
for (Map.Entry<String, Map<String, Float>> boostEntry : _boostMaps.entrySet()) {
String facetName = boostEntry.getKey();
FacetHandler<?> handler = reader.getFacetHandler(facetName);
if (!(handler instanceof FacetScoreable)) throw new IllegalArgumentException(facetName
+ " does not implement FacetScoreable");
FacetScoreable facetScoreable = (FacetScoreable) handler;
BoboDocScorer scorer = facetScoreable.getDocScorer(reader, _scoringFunctionFactory,