de.digitalcollections.solrocr.lucene.fieldloader.ExternalFieldLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solr-ocrhighlighting Show documentation
Show all versions of solr-ocrhighlighting Show documentation
Solr plugin to add support for highlighting directly from various OCR formats (hOCR/ALTO/MiniOCR)
without having to store the OCR documents in the index.
package de.digitalcollections.solrocr.lucene.fieldloader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Map;
import java.util.Set;
import de.digitalcollections.solrocr.util.IterableCharSequence;
/** Allows loading field values from arbitrary sources outside of Solr/Lucene */
public interface ExternalFieldLoader {
/** Check if the field content is located in an external source */
boolean isExternalField(String fieldName);
/** Get the names of the fields that are required for {@link #loadField(Map, String)} */
Set getRequiredFields();
/** Load the field content from an external source */
IterableCharSequence loadField(Map fields, String fieldName) throws IOException;
/** Get the charset that field values will be encoded in */
Charset getCharset();
}