final Map params = context.getRequestParameters();
final HitDetails [] details = (HitDetails[]) params.get(NUTCH_INPUT_HIT_DETAILS_ARRAY);
final String [] summaries = (String[]) params.get(NUTCH_INPUT_SUMMARIES_ARRAY);
if (details == null)
throw new ProcessingException("Details array must not be null.");
if (summaries == null)
throw new ProcessingException("Summaries array must not be null.");
if (summaries.length != details.length)
throw new ProcessingException("Summaries and details must be of the same length.");
// produce 'documents' for successor components.
final RawDocumentsConsumer consumer = (RawDocumentsConsumer) next;
for (int i = 0; i < summaries.length; i++) {
consumer.addDocument(new NutchDocument(i, details[i], summaries[i], defaultLanguage));