public class ResourceSearchIndexerImpl extends AbstractResourceSearchIndexer
ResourceSearchIndexer.| Modifier and Type | Field and Description |
|---|---|
private FileUtil |
fileUtil |
private ContentParserService |
parserService |
| Constructor and Description |
|---|
ResourceSearchIndexerImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MutableSearchEntry |
createEntry(SearchIndexer indexer,
DataResource resource,
String resourceUri)
This method creates a
MutableSearchEntry for a single DataResource. |
protected MutableSearchEntry |
createEntry(SearchIndexer indexer,
DataResource resource,
String resourceUri,
ContentParserOptions options) |
protected void |
doInitialize()
This method performs the actual
initialization. |
protected FileUtil |
getFileUtil() |
protected ContentParserService |
getParserService() |
void |
index(SearchIndexer indexer,
DataResource resource,
ChangeType changeType,
SearchIndexerDataLocation location,
EntryUpdateVisitor uriVisitor,
DataResource locationResource,
String nonUtfEncoding)
This method indexes a single
DataResource. |
void |
setFileUtil(FileUtil fileUtil) |
void |
setParserService(ContentParserService parserService) |
getEntryUri, getStringProperty, index, index, index, setResourceFactorycreateLogger, getLoggerdoInitialized, getInitializationState, initializeprivate ContentParserService parserService
getParserService()private FileUtil fileUtil
getFileUtil()protected ContentParserService getParserService()
@Inject public void setParserService(ContentParserService parserService)
parserService - the parserService to setprotected FileUtil getFileUtil()
@Inject public void setFileUtil(FileUtil fileUtil)
fileUtil - is the fileUtil to setprotected void doInitialize()
initialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractResourceSearchIndexerpublic MutableSearchEntry createEntry(SearchIndexer indexer, DataResource resource, String resourceUri)
MutableSearchEntry for a single DataResource. It may be used for
specific situations when the ConfiguredSearchIndexer is NOT suitable. You can
add additional fields before
adding it to the index. index the given resource.
You have to do that manually after calling this method.indexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.resourceUri - is the URI for the entry.MutableSearchEntry.protected MutableSearchEntry createEntry(SearchIndexer indexer, DataResource resource, String resourceUri, ContentParserOptions options)
indexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.resourceUri - is the URI for the entry.options - are the options.MutableSearchEntry.createEntry(SearchIndexer, DataResource, String)public void index(SearchIndexer indexer, DataResource resource, ChangeType changeType, SearchIndexerDataLocation location, EntryUpdateVisitor uriVisitor, DataResource locationResource, String nonUtfEncoding)
DataResource.indexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.changeType - indicates the change for resource. In case of add
it should be added, in case of
update it should be updated and in case of remove it should be
removed. The changeType can also be
null to indicate that the resource was already indexed and remains
untouched as it is not modified.location - is the SearchIndexerDataLocation where the resource comes from.uriVisitor - is the EntryUpdateVisitor.locationResource - is the DataResource for SearchIndexerDataLocation.getLocationUri().nonUtfEncoding - is the
non-UTF
encoding.Copyright © 2001–2016 mmm-Team. All rights reserved.