*
* @throws IngesterException if there was an error processing a specific
* content, but the Solr server is probably fine.
*/
private void ingestExtract(ContentStream cs, Map<String, String> fields, final long size) throws IngesterException {
final ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); //NON-NLS
up.addContentStream(cs);
setFields(up, fields);
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
final String contentType = cs.getContentType();
if (contentType != null && !contentType.trim().equals("")) {
up.setParam("stream.contentType", contentType); //NON-NLS
}
//logger.log(Level.INFO, "Ingesting " + fields.get("file_name"));
up.setParam("commit", "false"); //NON-NLS
final Future<?> f = upRequestExecutor.submit(new UpRequestTask(up));
try {
f.get(getTimeout(size), TimeUnit.SECONDS);