public class FullTextBridge extends BridgeHelper
DetailsFieldBridge
, and further delegates to
classes as defined under "SearchBridges".Modifier and Type | Field and Description |
---|---|
protected Class<org.hibernate.search.bridge.FieldBridge>[] |
classes |
protected OriginalFilesService |
files |
protected Map<String,FileParser> |
parsers |
COMBINED, log, publisher
Constructor and Description |
---|
FullTextBridge()
Since this constructor provides the instance with no way of parsing
OriginalFile binaries, all files will be assumed to have blank
content. |
FullTextBridge(OriginalFilesService files,
Map<String,FileParser> parsers)
Constructor which provides an empty set of custom
bridges . |
FullTextBridge(OriginalFilesService files,
Map<String,FileParser> parsers,
Class<org.hibernate.search.bridge.FieldBridge>[] bridgeClasses)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
set_annotations(String name,
IObject object,
org.apache.lucene.document.Document document,
org.hibernate.search.bridge.LuceneOptions opts)
Walks the various
Annotation instances attached to the object
argument and adds various levels to the index. |
void |
set_custom(String name,
IObject object,
org.apache.lucene.document.Document document,
org.hibernate.search.bridge.LuceneOptions opts)
Loops over each
field bridge class and calls its
FieldBridge#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method. |
void |
set_details(String name,
IObject object,
org.apache.lucene.document.Document document,
org.hibernate.search.bridge.LuceneOptions opts)
Parses all ownership and time-based details to the index for the given
object.
|
void |
set_file(String name,
IObject object,
org.apache.lucene.document.Document document,
org.hibernate.search.bridge.LuceneOptions opts)
Uses
#parse(OriginalFile) to get a Reader for the given
file which is then passed to
#add(Document, String, Reader, Float) using the field name
"file". |
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
org.hibernate.search.bridge.LuceneOptions opts)
Default implementation of the
#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method which calls
#set_file(String, IObject, Document, Store, org.apache.lucene.document.Field.Index, Float)
#set_annotations(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) ,
#set_details(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) ,
and finally
#set_custom(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float) . |
add, addContents, getProxiedObject, logger, parse, reindex, reindexAll, setApplicationEventPublisher
protected final OriginalFilesService files
protected final Map<String,FileParser> parsers
protected final Class<org.hibernate.search.bridge.FieldBridge>[] classes
public FullTextBridge()
OriginalFile
binaries, all files will be assumed to have blank
content. Further, no custom bridges are provided and so only the default
indexing will take place.public FullTextBridge(OriginalFilesService files, Map<String,FileParser> parsers)
bridges
.public FullTextBridge(OriginalFilesService files, Map<String,FileParser> parsers, Class<org.hibernate.search.bridge.FieldBridge>[] bridgeClasses)
files
- OriginalFileServce
for getting access to binary files.parsers
- List of FileParser
instances which are currently
configured.bridgeClasses
- set of bridge classes
which will be
instantiated via a no-arg constructor.public void set(String name, Object value, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions opts)
#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method which calls
#set_file(String, IObject, Document, Store, org.apache.lucene.document.Field.Index, Float)
#set_annotations(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
,
#set_details(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
,
and finally
#set_custom(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
.
as well as all annotations
.set
in interface org.hibernate.search.bridge.FieldBridge
set
in class BridgeHelper
public void set_file(String name, IObject object, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions opts)
#parse(OriginalFile)
to get a Reader
for the given
file which is then passed to
#add(Document, String, Reader, Float)
using the field name
"file".name
- object
- document
- store
- index
- boost
- public void set_annotations(String name, IObject object, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions opts)
Annotation
instances attached to the object
argument and adds various levels to the index.name
- object
- document
- store
- index
- boost
- public void set_details(String name, IObject object, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions opts)
name
- object
- document
- store
- index
- boost
- public void set_custom(String name, IObject object, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions opts)
field bridge class
and calls its
FieldBridge#set(String, Object, Document, Store, org.apache.lucene.document.Field.Index, Float)
method. Any exceptions are logged but do not cancel execution.name
- object
- document
- store
- index
- boost
-
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.