public class SolrContentIndexer extends AbstractLogEnabled implements Component, Serviceable, SolrFieldNames
Content
indexing into a Solr server.Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point
|
protected ContentTypesHelper |
_cTypesHelper
The content type helper
|
protected LanguagesManager |
_languagesManager
The manager for languages
|
protected OutgoingReferencesExtractor |
_outgoingReferencesExtractor
The outgoing references extractor
|
protected SAXParser |
_parser
The sax parser
|
protected AmetysObjectResolver |
_resolver
The Ametys objet resolver
|
protected SolrResourceIndexer |
_resourceIndexer
The resource indexer
|
protected SystemPropertyExtensionPoint |
_systemPropEP
The system property extension point.
|
protected Tika |
_tika
The Tika instance
|
protected UserHelper |
_userHelper
The users manager
|
static String |
ROLE
The component role.
|
ALL_CONTENT_TYPES, ALL_MIXIN_TYPES, ALL_TAGS, ATTACHMENT_CONTENT_ID, CONTENT_COMMENTS, CONTENT_COMMENTS_NONVALIDATED, CONTENT_COMMENTS_VALIDATED, CONTENT_CREATOR, CONTENT_LANGUAGE, CONTENT_LANGUAGES, CONTENT_LAST_CONTRIBUTOR, CONTENT_NAME, CONTENT_OUTGOING_REFEERENCES_RESOURCE_IDS, CONTENT_TITLES, CONTENT_TYPE_RESOURCE, CONTENT_TYPES, CREATION_DATE, DATE_FOR_SORTING, DATES_FACET, DC_CONTRIBUTOR, DC_COVERAGE, DC_CREATOR, DC_DATE, DC_DESCRIPTION, DC_FORMAT, DC_IDENTIFIER, DC_LANGUAGE, DC_PUBLISHER, DC_RELATION, DC_RIGHTS, DC_SOURCE, DC_SUBJECT, DC_TITLE, DC_TYPE, DOCUMENT_TYPE, EXCERPT, FILENAME, FULL_EXACT_WS, FULL_GENERAL, FULL_PREFIX, FULL_STEMMED_PREFIX, ID, IS_AMETYS_OBJECT, LAST_MAJOR_VALIDATION, LAST_MODIFIED, LAST_VALIDATION, LENGTH, MIME_TYPES, MIXIN_TYPES, PATH, REPEATER_ENTRY_POSITION, RESOURCE_ANCESTOR_IDS, RESOURCE_CREATOR, RESOURCE_DATE, RESOURCE_LAST_MODIFIED, RESOURCE_ROOT_ID, SIMPLE_CONTENT_PARENTS, SUB_CONTENT, TAGS, TITLE, TITLE_SORT, TYPE_CONTENT, TYPE_CONTENT_RESOURCE, TYPE_REPEATER, TYPE_RESOURCE, TYPE_WF_ENTRY, TYPE_WF_STEP, WORKFLOW_CURRENT_STEPS, WORKFLOW_CURRENT_STEPS_DV, WORKFLOW_ENTRY_STATE, WORKFLOW_HISTORY_STEPS, WORKFLOW_HISTORY_STEPS_DV, WORKFLOW_NAME, WORKFLOW_REF, WORKFLOW_REF_DV, WORKFLOW_STEP, WORKFLOW_STEP_ACTIONID, WORKFLOW_STEP_CALLER, WORKFLOW_STEP_DUEDATE, WORKFLOW_STEP_FINISHDATE, WORKFLOW_STEP_ID, WORKFLOW_STEP_OWNER, WORKFLOW_STEP_STARTDATE, WORKFLOW_STEP_STATUS
Constructor and Description |
---|
SolrContentIndexer() |
Modifier and Type | Method and Description |
---|---|
private void |
_indexOutgoingReferences(Content content,
SolrInputDocument document) |
protected String |
_richTextToString(InputStream is)
Gets a XML as a string and extract the text only
|
protected void |
findAndIndexMetadata(Content content,
String[] pathSegments,
CompositeMetadata metadata,
MetadataDefinition definition,
IndexingField field,
String fieldName,
SolrInputDocument document,
SolrInputDocument contentDoc,
List<SolrInputDocument> additionalDocuments)
Find the metadata to index from its path
|
protected void |
findAndIndexMetadataField(Content content,
String[] pathSegments,
CompositeMetadata metadata,
MetadataDefinition definition,
IndexingField field,
String fieldName,
SolrInputDocument document,
SolrInputDocument contentDoc,
List<SolrInputDocument> additionalDocuments)
Find and index a metadata.
|
protected void |
findAndIndexOverridingField(Content content,
IndexingModel indexingModel,
CustomMetadataIndexingField field,
String fieldName,
MetadataDefinition definition,
String[] pathSegments,
SolrInputDocument document,
SolrInputDocument contentDoc,
List<SolrInputDocument> additionalDocuments)
Find and index a property represented by an overriding field.
|
protected void |
indexAllContentTypes(String cTypeId,
SolrInputDocument document,
String fieldName)
Index the content type and all its supertypes in the given document (recursively).
|
void |
indexBinaryMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'binary' metadata
|
void |
indexBooleanMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'boolean' metadata
|
void |
indexBooleanValues(Boolean[] values,
SolrInputDocument document,
String fieldName)
Index 'boolean' values
|
void |
indexCompositeMetadata(Content content,
CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
MetadataDefinition definition,
List<SolrInputDocument> additionalDocuments)
Index a composite metadata, i.e.
|
void |
indexContent(Content content,
SolrInputDocument document,
List<SolrInputDocument> additionalDocuments)
Populate a solr input document by adding fields to index into it.
|
void |
indexContentMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'content' metadata
|
protected void |
indexContentTitle(Content content,
SolrInputDocument document)
Index the content title
|
void |
indexContentValues(String[] contentIds,
SolrInputDocument document,
String fieldName)
Index content values.
|
void |
indexDateMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'date' metadata
|
void |
indexDateTimeMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'datetime' metadata
|
void |
indexDateTimeValues(Date[] values,
SolrInputDocument document,
String fieldName)
Index 'datetime' values
|
void |
indexDateValues(Date[] values,
SolrInputDocument document,
String fieldName)
Index 'date' values
|
void |
indexDoubleMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'double' metadata
|
void |
indexDoubleValues(Double[] values,
SolrInputDocument document,
String fieldName,
boolean isFacetable)
Index 'double' values
|
void |
indexFileMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'file' metadata
|
void |
indexFileValue(Object[] values,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language)
Index a 'file' metadata
|
protected void |
indexFullTextBinary(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'binary' metadata
|
protected void |
indexFullTextBinaryValue(InputStream is,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language)
Index a 'binary' value
|
protected void |
indexFulltextValue(SolrInputDocument mainDocument,
SolrInputDocument contentDoc,
String text,
String language)
Index a full-text value.
|
static void |
indexFulltextValue(SolrInputDocument document,
String text,
Collection<String> languages)
Index a full-text value.
|
static void |
indexFulltextValue(SolrInputDocument document,
String text,
String language)
Index a full-text value.
|
void |
indexGeoCodeMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'geocode' metadata
|
void |
indexGeocodeValue(double latitude,
double longitude,
SolrInputDocument document,
String fieldName)
Index a 'geocode' metadata
|
protected static void |
indexLanguageFulltextValue(SolrInputDocument document,
String text,
String language)
Index a full-text value in the language-specific fields.
|
void |
indexLongMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'long' metadata
|
void |
indexLongValues(Long[] values,
SolrInputDocument document,
String fieldName,
boolean isFacetable)
Index 'long' values
|
void |
indexMetadata(Content content,
String metadataName,
CompositeMetadata metadata,
SolrInputDocument document,
SolrInputDocument contentDoc,
List<SolrInputDocument> additionalDocuments,
String fieldName,
MetadataDefinition definition)
Index a content metadata.
|
protected void |
indexModelFields(Content content,
SolrInputDocument document,
List<SolrInputDocument> additionalDocuments)
Index the fields specified in the indexation model.
|
void |
indexMultilingualStringMetadata(CompositeMetadata metadata,
String metadataName,
String contentId,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
MetadataDefinition definition)
Index a multilingual string metadata
|
void |
indexMultilingualStringValues(MultilingualString value,
String contentId,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName)
Index a multilingual string values
|
void |
indexMultilingualStringValues(String[] values,
String contentId,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language)
Index multilingual 'string' values
|
void |
indexMultilingualStringValuesForSorting(String value,
SolrInputDocument document,
String fieldName,
String language)
Index multilingual 'string' value in sort field
|
void |
indexOverridingField(CustomMetadataIndexingField field,
Content content,
String fieldName,
SolrInputDocument document,
SolrInputDocument contentDoc,
List<SolrInputDocument> additionalDocuments)
Index a property represented by an overriding field.
|
boolean |
indexPartialSystemProperty(Content content,
String propertyId,
SolrInputDocument document)
Populate a Solr input document by adding fields for a single system property.
|
void |
indexRepeaterMetadata(Content content,
CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
MetadataDefinition definition,
List<SolrInputDocument> additionalDocuments)
Index a repeater metadata, i.e.
|
protected void |
indexResourceContent(Resource resource,
SolrInputDocument document,
SolrInputDocument contentDoc,
String language)
Index the content of a resource.
|
protected void |
indexResourceContentValue(InputStream is,
String[] keywords,
String description,
String language,
SolrInputDocument document,
SolrInputDocument contentDoc)
Index the content of a resource.
|
void |
indexRichtextMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'richtext' metadata
|
void |
indexRichtextValue(RichText richText,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language)
Index 'richtext' values
|
void |
indexStringMetadata(CompositeMetadata metadata,
String metadataName,
String contentId,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'string' metadata
|
void |
indexStringValues(String[] values,
String contentId,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
boolean isFacetable)
Index 'string' values
|
void |
indexSubContentMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
String fieldName,
MetadataDefinition definition)
Index a 'sub_content' metadata
|
protected void |
indexSystemProperties(Content content,
SolrInputDocument document)
Index the system properties of a content.
|
void |
indexUserMetadata(CompositeMetadata metadata,
String metadataName,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language,
MetadataDefinition definition)
Index a 'user' metadata
|
void |
indexUserValues(UserIdentity[] users,
SolrInputDocument document,
SolrInputDocument contentDoc,
String fieldName,
String language)
Index 'user' values
|
void |
indexValues(Content content,
String fieldName,
MetadataType type,
Object[] values,
SolrInputDocument document,
SolrInputDocument contentDoc)
Index values
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected AmetysObjectResolver _resolver
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _cTypesHelper
protected UserHelper _userHelper
protected SolrResourceIndexer _resourceIndexer
protected SystemPropertyExtensionPoint _systemPropEP
protected ContentHelper _contentHelper
protected OutgoingReferencesExtractor _outgoingReferencesExtractor
protected LanguagesManager _languagesManager
public SolrContentIndexer()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void indexContent(Content content, SolrInputDocument document, List<SolrInputDocument> additionalDocuments) throws Exception
content
- The content to indexdocument
- The main solr document to index intoadditionalDocuments
- The additional documents for repeater instancesException
- if an error occurred while indexingprivate void _indexOutgoingReferences(Content content, SolrInputDocument document)
protected void indexContentTitle(Content content, SolrInputDocument document)
content
- The titledocument
- The main solr document to index intoprotected void indexSystemProperties(Content content, SolrInputDocument document)
content
- The content to index.document
- The solr document to index into.protected void indexAllContentTypes(String cTypeId, SolrInputDocument document, String fieldName)
cTypeId
- The ID of the content type to index.document
- The solr document to index into.fieldName
- The field name.protected void indexModelFields(Content content, SolrInputDocument document, List<SolrInputDocument> additionalDocuments)
content
- The content to index.document
- The main content solr document.additionalDocuments
- The additional documents for repeater instances.public boolean indexPartialSystemProperty(Content content, String propertyId, SolrInputDocument document) throws Exception
content
- The content to indexpropertyId
- The system property ID.document
- The solr documentException
- if an error occurredprotected void findAndIndexMetadata(Content content, String[] pathSegments, CompositeMetadata metadata, MetadataDefinition definition, IndexingField field, String fieldName, SolrInputDocument document, SolrInputDocument contentDoc, List<SolrInputDocument> additionalDocuments)
content
- the content currently being traversed.pathSegments
- The segments of path of metadata to indexmetadata
- The parent composite metadatadefinition
- The metadata definitionfield
- the current indexing field.fieldName
- the name of the field to index.document
- The main solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).additionalDocuments
- The additional documentsprotected void findAndIndexMetadataField(Content content, String[] pathSegments, CompositeMetadata metadata, MetadataDefinition definition, IndexingField field, String fieldName, SolrInputDocument document, SolrInputDocument contentDoc, List<SolrInputDocument> additionalDocuments)
content
- the current content being traversed.pathSegments
- the full metadata path segments.metadata
- the current metadata holder.definition
- the current metadata definition.field
- the current indexing field.fieldName
- the name of the field to index.document
- the solr main document.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).additionalDocuments
- the solr additional documents.protected void findAndIndexOverridingField(Content content, IndexingModel indexingModel, CustomMetadataIndexingField field, String fieldName, MetadataDefinition definition, String[] pathSegments, SolrInputDocument document, SolrInputDocument contentDoc, List<SolrInputDocument> additionalDocuments)
content
- the current content being traversed.indexingModel
- the current indexing model.pathSegments
- the full metadata path segments.definition
- the current metadata definition.field
- the current indexing field.fieldName
- the name of the field to index.document
- the solr main document.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).additionalDocuments
- the solr additional documents.public void indexMetadata(Content content, String metadataName, CompositeMetadata metadata, SolrInputDocument document, SolrInputDocument contentDoc, List<SolrInputDocument> additionalDocuments, String fieldName, MetadataDefinition definition)
content
- the current content being traversed.metadataName
- The name of metadata to indexmetadata
- The parent composite metadatadocument
- the solr document to index into.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).additionalDocuments
- The solr additional documents used for repeater instancefieldName
- the name of the indexed field.definition
- the metadata definition.public void indexOverridingField(CustomMetadataIndexingField field, Content content, String fieldName, SolrInputDocument document, SolrInputDocument contentDoc, List<SolrInputDocument> additionalDocuments)
field
- The overriding field.content
- The content of which to get the property.fieldName
- The name of the field to index.document
- the solr document to index into.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).additionalDocuments
- The solr additional documents used for repeater instancepublic void indexValues(Content content, String fieldName, MetadataType type, Object[] values, SolrInputDocument document, SolrInputDocument contentDoc)
content
- The content being indexed.fieldName
- The Solr field's nametype
- the type of values to indexvalues
- the valuesdocument
- the Solr documentcontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).public void indexStringMetadata(CompositeMetadata metadata, String metadataName, String contentId, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexcontentId
- The content id. For logging purposesdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionpublic void indexMultilingualStringMetadata(CompositeMetadata metadata, String metadataName, String contentId, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexcontentId
- The content id. For logging purposesdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namedefinition
- The metadata definitionpublic void indexMultilingualStringValues(MultilingualString value, String contentId, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName)
value
- The multilingual stringcontentId
- The content id. For logging purposesdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namepublic void indexMultilingualStringValues(String[] values, String contentId, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language)
values
- The valuescontentId
- The content id. For logging purposesdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The language for values.public void indexMultilingualStringValuesForSorting(String value, SolrInputDocument document, String fieldName, String language)
value
- The valuedocument
- The solr document to index intofieldName
- The index field namelanguage
- The languagepublic void indexStringValues(String[] values, String contentId, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, boolean isFacetable)
values
- The valuescontentId
- The content id. For logging purposesdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.isFacetable
- true if the field can be used as a facet.public void indexDateMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexDateValues(Date[] values, SolrInputDocument document, String fieldName)
values
- The valuesdocument
- The solr document to index intofieldName
- The index field namepublic void indexDateTimeMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexDateTimeValues(Date[] values, SolrInputDocument document, String fieldName)
values
- The valuesdocument
- The solr document to index intofieldName
- The index field namepublic void indexDoubleMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexDoubleValues(Double[] values, SolrInputDocument document, String fieldName, boolean isFacetable)
values
- The valuesdocument
- The solr document to index intofieldName
- The index field nameisFacetable
- true if the field can be used as a facet.public void indexLongMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexLongValues(Long[] values, SolrInputDocument document, String fieldName, boolean isFacetable)
values
- The valuesdocument
- The solr document to index intofieldName
- The index field nameisFacetable
- true if the field can be used as a facet.public void indexUserMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionpublic void indexUserValues(UserIdentity[] users, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language)
users
- The usersdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.public void indexBooleanMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexBooleanValues(Boolean[] values, SolrInputDocument document, String fieldName)
values
- The valuesdocument
- The solr document to index intofieldName
- The index field namepublic void indexRichtextMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionpublic void indexRichtextValue(RichText richText, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language)
richText
- The rich text to index.document
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field name.language
- The content language.protected String _richTextToString(InputStream is)
is
- The inputstream of XMLpublic void indexBinaryMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionpublic void indexFileMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionpublic void indexFileValue(Object[] values, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language)
values
- The values.document
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.protected void indexFullTextBinary(CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intocontentDoc
- The content document.fieldName
- The index field namelanguage
- The content language.definition
- The metadata definitionprotected void indexFullTextBinaryValue(InputStream is, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, String language)
is
- An InputStream on the binary data.document
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The index field namelanguage
- The content language.public void indexContentMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexContentValues(String[] contentIds, SolrInputDocument document, String fieldName)
contentIds
- The ID of the contents to index.document
- The solr document to index into.fieldName
- the field name.public void indexSubContentMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexGeoCodeMetadata(CompositeMetadata metadata, String metadataName, SolrInputDocument document, String fieldName, MetadataDefinition definition)
metadata
- The parent composite metadatametadataName
- The name of metadata to indexdocument
- The solr document to index intofieldName
- The index field namedefinition
- The metadata definitionpublic void indexGeocodeValue(double latitude, double longitude, SolrInputDocument document, String fieldName)
latitude
- the coord latitude.longitude
- the coord longitude.document
- The solr document to index intofieldName
- The index field namepublic void indexCompositeMetadata(Content content, CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, MetadataDefinition definition, List<SolrInputDocument> additionalDocuments)
content
- The content being indexed.metadata
- The parent metadata.metadataName
- The composite metadata name.document
- The solr document to index into.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The field name.definition
- The composite metadata definition.additionalDocuments
- The solr additional documents used for repeater instancepublic void indexRepeaterMetadata(Content content, CompositeMetadata metadata, String metadataName, SolrInputDocument document, SolrInputDocument contentDoc, String fieldName, MetadataDefinition definition, List<SolrInputDocument> additionalDocuments)
content
- The content being indexed.metadata
- The parent metadata.metadataName
- The repeater metadata name.document
- The solr document to index into.contentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).fieldName
- The field name.definition
- The repeater metadata definition.additionalDocuments
- The solr additional documents used for repeater instanceprotected void indexResourceContent(Resource resource, SolrInputDocument document, SolrInputDocument contentDoc, String language)
resource
- The resourcedocument
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).language
- The content language.protected void indexResourceContentValue(InputStream is, String[] keywords, String description, String language, SolrInputDocument document, SolrInputDocument contentDoc) throws IOException, TikaException
is
- An input stream on the resource content.keywords
- The resource keywords.description
- The resource description.language
- The content language.document
- The solr document to index intocontentDoc
- The parent content document to index into (can be null if the main document is the content doc itself).TikaException
- If an error occurs extracting the document's text content.IOException
- If an error occurs reading the document's text content.protected void indexFulltextValue(SolrInputDocument mainDocument, SolrInputDocument contentDoc, String text, String language)
mainDocument
- The document being used, can be either the content document itself or a repeater document.contentDoc
- The parent content document. If the mainDocument is the content document, this will be null.text
- The text to index.language
- The content language.public static void indexFulltextValue(SolrInputDocument document, String text, String language)
document
- The document to index into.text
- The text to index.language
- The content language.public static void indexFulltextValue(SolrInputDocument document, String text, Collection<String> languages)
document
- The document to index into.text
- The text to index.languages
- The languages.protected static void indexLanguageFulltextValue(SolrInputDocument document, String text, String language)
document
- The document to index into.text
- The text to index.language
- The content language.