public class TikaBridge extends Object implements MetadataProvidingFieldBridge, AppliedOnTypeAwareBridge
| Constructor and Description |
|---|
TikaBridge() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureFieldMetadata(String name,
FieldMetadataBuilder builder)
Allows this bridge to expose meta-data about the fields it creates.
|
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
void |
setAppliedOnType(Class<?> returnType)
Set the return type of the bridge (the type of the field linked to the bridge).
|
void |
setMetadataProcessorClass(Class<?> metadataProcessorClass) |
void |
setParseContextProviderClass(Class<?> parseContextProviderClass) |
void |
setParserProviderClass(Class<?> parserProviderClass) |
public void setAppliedOnType(Class<?> returnType)
AppliedOnTypeAwareBridgesetAppliedOnType in interface AppliedOnTypeAwareBridgereturnType - return typepublic void configureFieldMetadata(String name, FieldMetadataBuilder builder)
MetadataProvidingFieldBridgeconfigureFieldMetadata in interface MetadataProvidingFieldBridgename - The default field name; Should be used consistently with
FieldBridge.set(String, Object, org.apache.lucene.document.Document, LuceneOptions).builder - Builder for exposing field-related meta-datapublic void setParserProviderClass(Class<?> parserProviderClass)
public void setParseContextProviderClass(Class<?> parseContextProviderClass)
public void setMetadataProcessorClass(Class<?> metadataProcessorClass)
public void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
FieldBridge
A common implementation is to add a Field with the given name to document following
the parameters luceneOptions if the value is not null.
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
set in interface FieldBridgename - The field to add to the Lucene documentvalue - The actual value to indexdocument - The Lucene document into which we want to index the value.luceneOptions - Contains the parameters used for adding value to
the Lucene document.Copyright © 2006-2021 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.