Package org.codelibs.fess.ingest
Class Ingester
java.lang.Object
org.codelibs.fess.ingest.Ingester
Abstract base class for document ingesters that process and transform documents
before they are indexed. Ingesters can be used to modify document content,
extract additional metadata, or perform other transformations during the
indexing process.
Ingesters are processed in priority order, with lower numbers having higher priority.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intPriority of this ingester (lower numbers = higher priority) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IngestFactoryGets the ingest factory instance for managing ingesters.intGets the priority of this ingester.Basic processing method that other process methods delegate to.process(Map<String, Object> target, org.codelibs.fess.crawler.entity.AccessResult<String> accessResult) Processes a document map for web/file crawling with access result.process(Map<String, Object> target, DataStoreParams params) Processes a document map for datastore operations.org.codelibs.fess.crawler.entity.ResultDataprocess(org.codelibs.fess.crawler.entity.ResultData target, org.codelibs.fess.crawler.entity.ResponseData responseData) Processes a result data object for web/file crawling.voidregister()Registers this ingester with the ingest factory.voidsetPriority(int priority) Sets the priority of this ingester.
-
Field Details
-
priority
protected int priorityPriority of this ingester (lower numbers = higher priority)
-
-
Constructor Details
-
Ingester
public Ingester()Default constructor.
-
-
Method Details
-
getPriority
public int getPriority()Gets the priority of this ingester. Lower numbers indicate higher priority.- Returns:
- the priority value
-
setPriority
public void setPriority(int priority) Sets the priority of this ingester. Lower numbers indicate higher priority.- Parameters:
priority- the priority value to set
-
register
public void register()Registers this ingester with the ingest factory. This makes the ingester available for processing documents. -
getIngestFactory
Gets the ingest factory instance for managing ingesters.- Returns:
- the ingest factory instance
-
process
public org.codelibs.fess.crawler.entity.ResultData process(org.codelibs.fess.crawler.entity.ResultData target, org.codelibs.fess.crawler.entity.ResponseData responseData) Processes a result data object for web/file crawling. Default implementation returns the target unchanged.- Parameters:
target- the result data to processresponseData- the response data from crawling- Returns:
- the processed result data
-
process
public Map<String,Object> process(Map<String, Object> target, org.codelibs.fess.crawler.entity.AccessResult<String> accessResult) Processes a document map for web/file crawling with access result. Default implementation delegates to the basic process method.- Parameters:
target- the document data to processaccessResult- the access result from crawling- Returns:
- the processed document data
-
process
Processes a document map for datastore operations. Default implementation delegates to the basic process method.- Parameters:
target- the document data to processparams- the data store parameters- Returns:
- the processed document data
-
process
Basic processing method that other process methods delegate to. Default implementation returns the target unchanged. Subclasses should override this method to implement specific processing logic.- Parameters:
target- the document data to process- Returns:
- the processed document data
-