|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor
public abstract class AbstractSolrMetadataExtractor
Abstract implementation for a metadata extractor.
Field Summary | |
---|---|
protected DocumentAccessBridge |
documentAccessBridge
DocumentAccessBridge component. |
protected Execution |
execution
Execution component. |
protected EntityReferenceSerializer<String> |
localSerializer
Reference to String serializer. |
protected org.slf4j.Logger |
logger
Logging framework. |
protected EntityReferenceSerializer<String> |
serializer
Reference to String serializer. |
Constructor Summary | |
---|---|
AbstractSolrMetadataExtractor()
|
Method Summary | |
---|---|
protected void |
addDocumentFields(DocumentReference documentReference,
SolrInputDocument solrDocument)
Adds to a Solr document the fields that are specific to the XWiki document that contains the entity to be indexed. |
protected void |
addObjectContent(SolrInputDocument solrDocument,
BaseObject object,
String language)
Adds the properties of a given object to a Solr document inside the multiValued field Fields.OBJECT_CONTENT . |
protected XWikiDocument |
getDocument(DocumentReference documentReference)
Utility method. |
String |
getId(EntityReference reference)
|
protected String |
getLanguage(DocumentReference documentReference)
|
protected XWikiDocument |
getTranslatedDocument(DocumentReference documentReference)
Fetch translated document. |
protected XWikiContext |
getXWikiContext()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xwiki.search.solr.internal.metadata.SolrMetadataExtractor |
---|
getSolrDocument |
Field Detail |
---|
@Inject protected org.slf4j.Logger logger
@Inject protected Execution execution
@Inject protected EntityReferenceSerializer<String> serializer
@Inject @Named(value="local") protected EntityReferenceSerializer<String> localSerializer
@Inject protected DocumentAccessBridge documentAccessBridge
Constructor Detail |
---|
public AbstractSolrMetadataExtractor()
Method Detail |
---|
public String getId(EntityReference reference) throws SolrIndexException
getId
in interface SolrMetadataExtractor
reference
- reference to an entity.
SolrIndexException
- if problems occur.protected XWikiContext getXWikiContext()
protected XWikiDocument getDocument(DocumentReference documentReference) throws XWikiException
documentReference
- reference to a document.
XWikiDocument
instance referenced.
XWikiException
- if problems occur.protected XWikiDocument getTranslatedDocument(DocumentReference documentReference) throws SolrIndexException
documentReference
- reference to the document to be translated.
SolrIndexException
- if problems occur.protected void addDocumentFields(DocumentReference documentReference, SolrInputDocument solrDocument) throws Exception
documentReference
- reference to document.solrDocument
- the Solr document to which to add the fields.
Exception
- if problems occur.protected String getLanguage(DocumentReference documentReference) throws SolrIndexException
documentReference
- reference to the document.
SolrIndexException
- if problems occur.protected void addObjectContent(SolrInputDocument solrDocument, BaseObject object, String language)
Fields.OBJECT_CONTENT
.
solrDocument
- the document where to add the properties.object
- the object whose properties to add.language
- the language of the indexed document. In case of translations, this will obviously be different
than the original document's language.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |