Class AuthoringOpenSearchBinaryFileWithMetadataBatchIndexer
java.lang.Object
org.craftercms.search.metadata.impl.AbstractMetadataCollector
org.craftercms.search.batch.impl.AbstractBinaryFileWithMetadataBatchIndexer
org.craftercms.search.opensearch.batch.OpenSearchBinaryFileWithMetadataBatchIndexer
org.craftercms.search.opensearch.batch.authoring.AuthoringOpenSearchBinaryFileWithMetadataBatchIndexer
- All Implemented Interfaces:
BatchIndexer
public class AuthoringOpenSearchBinaryFileWithMetadataBatchIndexer
extends OpenSearchBinaryFileWithMetadataBatchIndexer
Implementation of
OpenSearchBinaryFileWithMetadataBatchIndexer
for OpenSearch of authoring.
Override method AbstractBinaryFileWithMetadataBatchIndexer.doUpdates(String, String, ContentStoreService, Context, UpdateSet, UpdateStatus)
and method AbstractBinaryFileWithMetadataBatchIndexer.doDeletes(String, String, ContentStoreService, Context, List, UpdateStatus)
to support authoring binary indexing- Author:
- Phil Nguyen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.craftercms.search.batch.impl.AbstractBinaryFileWithMetadataBatchIndexer
AbstractBinaryFileWithMetadataBatchIndexer.EmptyContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.craftercms.search.opensearch.batch.OpenSearchBinaryFileWithMetadataBatchIndexer
searchService
Fields inherited from class org.craftercms.search.batch.impl.AbstractBinaryFileWithMetadataBatchIndexer
childBinaryPathPatterns, DEFAULT_INTERNAL_NAME_FIELD_NAME, DEFAULT_LOCAL_ID_FIELD_NAME, DEFAULT_METADATA_PATH_FIELD_NAME, excludeMetadataProperties, excludePropertyPatterns, includePropertyPatterns, internalNameFieldName, itemProcessor, localIdFieldName, metadataPathFieldName, metadataPathPatterns, mimeTypesMap, referenceXPaths, remoteBinaryPathPatterns, remoteFileResolver, supportedMimeTypes
Fields inherited from class org.craftercms.search.metadata.impl.AbstractMetadataCollector
metadataExtractors
-
Constructor Summary
ConstructorsConstructorDescriptionAuthoringOpenSearchBinaryFileWithMetadataBatchIndexer
(OpenSearchService openSearchService) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doDeletes
(String indexId, String siteName, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context, List<String> deletePaths, UpdateStatus updateStatus) protected void
doUpdates
(String indexId, String siteName, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context, UpdateSet updateSet, UpdateStatus updateStatus) protected boolean
Check if a path is binary or notprotected boolean
isBinarySearchable
(String path) Check if a path could be searched for any binaryvoid
setBinaryPathPatterns
(List<String> binaryPathPatterns) Setter method for binary path patternsvoid
setBinarySearchablePathPatterns
(List<String> binarySearchablePathPatterns) Setter method for binary searchable patternsMethods inherited from class org.craftercms.search.opensearch.batch.OpenSearchBinaryFileWithMetadataBatchIndexer
doDelete, doUpdateContent, doUpdateContent, doUpdateContent, metadataPathFieldNameWithKeyword, searchBinaryPathsFromMetadataPath, searchMetadataPathFromBinaryPath
Methods inherited from class org.craftercms.search.batch.impl.AbstractBinaryFileWithMetadataBatchIndexer
collectRemoteAssetMetadata, extractMetadata, extractMetadataFromChildren, getBinaryFilePaths, isChildBinary, isMetadata, isRemoteBinary, loadMetadata, setChildBinaryPathPatterns, setExcludeMetadataProperties, setExcludePropertyPatterns, setIncludePropertyPatterns, setInternalNameFieldName, setItemProcessor, setItemProcessors, setLocalIdFieldName, setMetadataPathFieldName, setMetadataPathPatterns, setReferenceXPaths, setRemoteBinaryPathPatterns, setRemoteFileResolver, setSupportedMimeTypes, shouldIncludeProperty, updateBinary, updateBinaryWithMetadata, updateIndex, updatePreviousBinaries
Methods inherited from class org.craftercms.search.metadata.impl.AbstractMetadataCollector
collectMetadata, setMetadataExtractors
-
Field Details
-
binaryPathPatterns
-
binarySearchablePathPatterns
-
-
Constructor Details
-
AuthoringOpenSearchBinaryFileWithMetadataBatchIndexer
-
-
Method Details
-
doUpdates
protected void doUpdates(String indexId, String siteName, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context, UpdateSet updateSet, UpdateStatus updateStatus) - Overrides:
doUpdates
in classAbstractBinaryFileWithMetadataBatchIndexer
-
doDeletes
protected void doDeletes(String indexId, String siteName, org.craftercms.core.service.ContentStoreService contentStoreService, org.craftercms.core.service.Context context, List<String> deletePaths, UpdateStatus updateStatus) - Overrides:
doDeletes
in classAbstractBinaryFileWithMetadataBatchIndexer
-
isBinary
Check if a path is binary or not- Parameters:
path
- the path to check- Returns:
- true if matched binary pattern and is a supported mime-type, false otherwise
-
isBinarySearchable
Check if a path could be searched for any binary- Parameters:
path
- to check- Returns:
- true if matched the defined pattern, false otherwise
-
setBinaryPathPatterns
Setter method for binary path patterns- Parameters:
binaryPathPatterns
- binary path patterns
-
setBinarySearchablePathPatterns
Setter method for binary searchable patterns- Parameters:
binarySearchablePathPatterns
- binary searchable patterns
-