All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.digitalcollections.solrocr.lucene.fieldloader.ExternalFieldLoader Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 0.7.0
Show newest version
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy