Package org.dspace.discovery.indexobject
Class DSpaceObjectIndexFactoryImpl<T extends IndexableDSpaceObject,S extends DSpaceObject>
java.lang.Object
org.dspace.discovery.indexobject.IndexFactoryImpl<T,S>
org.dspace.discovery.indexobject.DSpaceObjectIndexFactoryImpl<T,S>
- All Implemented Interfaces:
DSpaceObjectIndexFactory<T,,S> IndexFactory<T,S>
- Direct Known Subclasses:
CollectionIndexFactoryImpl,CommunityIndexFactoryImpl,ItemIndexFactoryImpl
public abstract class DSpaceObjectIndexFactoryImpl<T extends IndexableDSpaceObject,S extends DSpaceObject>
extends IndexFactoryImpl<T,S>
implements DSpaceObjectIndexFactory<T,S>
Factory implementation for indexing/retrieving DSpaceObjects in the search core
- Author:
- Kevin Van de Velde (kevin at atmire dot com)
-
Field Summary
Fields inherited from class org.dspace.discovery.indexobject.IndexFactoryImpl
solrSearchCore, solrServiceIndexPlugins -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContainerMetadataField(org.apache.solr.common.SolrInputDocument doc, List<String> highlightedMetadataFields, List<String> toIgnoreMetadataFields, String metadataField, String value) Add the metadata value of the community/collection to the solr document IF needed highlighting is added !org.apache.solr.common.SolrInputDocumentbuildDocument(Context context, T indexableObject) Create solr document with all the shared fields initialized.voidstoreCommunityCollectionLocations(org.apache.solr.common.SolrInputDocument doc, List<String> locations) Store the provided locations in the solr documentMethods inherited from class org.dspace.discovery.indexobject.IndexFactoryImpl
addFacetIndex, addFacetIndex, addNamedResourceTypeIndex, buildNewDocument, delete, delete, deleteAll, writeDocument, writeDocumentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.discovery.indexobject.factory.DSpaceObjectIndexFactory
getLocationsMethods inherited from interface org.dspace.discovery.indexobject.factory.IndexFactory
buildNewDocument, delete, delete, deleteAll, findAll, findIndexableObject, getIndexableObjects, getType, supports, writeDocument
-
Constructor Details
-
DSpaceObjectIndexFactoryImpl
public DSpaceObjectIndexFactoryImpl()
-
-
Method Details
-
buildDocument
public org.apache.solr.common.SolrInputDocument buildDocument(Context context, T indexableObject) throws SQLException, IOException Description copied from interface:IndexFactoryCreate solr document with all the shared fields initialized.- Specified by:
buildDocumentin interfaceIndexFactory<T extends IndexableDSpaceObject,S extends DSpaceObject> - Overrides:
buildDocumentin classIndexFactoryImpl<T extends IndexableDSpaceObject,S extends DSpaceObject> indexableObject- the indexableObject that we want to index- Returns:
- initialized solr document
- Throws:
SQLExceptionIOException
-
addContainerMetadataField
protected void addContainerMetadataField(org.apache.solr.common.SolrInputDocument doc, List<String> highlightedMetadataFields, List<String> toIgnoreMetadataFields, String metadataField, String value) Add the metadata value of the community/collection to the solr document IF needed highlighting is added !- Parameters:
doc- the solr documenthighlightedMetadataFields- the list of metadata fields that CAN be highlightedtoIgnoreMetadataFields- the list of metadata fields to skip adding to SolrmetadataField- the metadata field addedvalue- the value (can be NULL !)
-
storeCommunityCollectionLocations
public void storeCommunityCollectionLocations(org.apache.solr.common.SolrInputDocument doc, List<String> locations) Description copied from interface:DSpaceObjectIndexFactoryStore the provided locations in the solr document- Specified by:
storeCommunityCollectionLocationsin interfaceDSpaceObjectIndexFactory<T extends IndexableDSpaceObject,S extends DSpaceObject> - Parameters:
doc- The solr input documentlocations- The locations to be stored
-