public class CmsSolrFieldConfiguration extends CmsSearchFieldConfiguration
LAZY_FIELDS, STR_STANDARD
构造器和说明 |
---|
CmsSolrFieldConfiguration()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addAdditionalFields()
Add the additional fields to the configuration.
|
protected void |
addAdditionalFields(java.util.List<CmsSolrField> additionalFields)
Adds the additional fields to the configuration, if they are not null.
|
protected I_CmsSearchDocument |
appendDates(I_CmsSearchDocument document,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extractionResult,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Extends the given document by fields for date of creation, content and last modification.
|
protected I_CmsSearchDocument |
appendFieldMapping(I_CmsSearchDocument document,
CmsSearchField sfield,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extractionResult,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Extends the given document by the mappings for the given field.
|
protected I_CmsSearchDocument |
appendFieldMappings(I_CmsSearchDocument document,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extractionResult,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Extends the given document by the configured field mappings.
|
I_CmsSearchDocument |
appendFields(I_CmsSearchDocument document,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extractionResult,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Appends the Solr specific search fields to the document.
|
protected I_CmsSearchDocument |
appendLocales(I_CmsSearchDocument document,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extraction,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Extends the given document by the "res_locales" field.
|
protected I_CmsSearchDocument |
appendProperties(I_CmsSearchDocument document,
CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extraction,
java.util.List<CmsProperty> properties,
java.util.List<CmsProperty> propertiesSearched)
Appends all direct properties, that are not empty or white space only to the document.
|
protected java.util.List<java.util.Locale> |
getContentLocales(CmsObject cms,
CmsResource resource,
I_CmsExtractionResult extraction)
Retrieves the locales for an content, that is whether an XML content nor an XML page.
|
java.util.Map<java.lang.String,CmsSolrField> |
getSolrFields()
Returns all configured Solr fields.
|
protected java.util.Set<CmsSearchField> |
getXSDMappings(CmsObject cms,
CmsResource resource)
Returns the search field mappings declared within the XSD.
|
addField, addFields, appendCategories, appendContentBlob, appendFileSize, appendPath, appendType, compareTo, createDocument, equals, getDescription, getField, getFieldNames, getFields, getIndex, getLocaleExtendedName, getLocaleExtendedName, getName, getParentFolderTokens, hashCode, init, setBoost, setDescription, setIndex, setName
public void addAdditionalFields()
I_CmsSearchFieldAppdender
public I_CmsSearchDocument appendFields(I_CmsSearchDocument document, CmsObject cms, CmsResource resource, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
appendFields
在接口中 I_CmsSearchFieldAppdender
appendFields
在类中 CmsSearchFieldConfiguration
document
- the document to append field(s)cms
- the CMS object used during indexing processresource
- the resource that is currently indexedextractionResult
- the extraction result of this resourceproperties
- CmsObject.readPropertyObjects(CmsResource, boolean)
with falsepropertiesSearched
- CmsObject.readPropertyObjects(CmsResource, boolean)
with trueI_CmsSearchFieldAppdender.appendFields(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
public java.util.Map<java.lang.String,CmsSolrField> getSolrFields()
protected void addAdditionalFields(java.util.List<CmsSolrField> additionalFields)
additionalFields
- the additional fields to addprotected I_CmsSearchDocument appendDates(I_CmsSearchDocument document, CmsObject cms, CmsResource resource, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
CmsSearchFieldConfiguration
appendDates
在类中 CmsSearchFieldConfiguration
document
- the document to extendcms
- the OpenCms context used for building the search indexresource
- the resource that is indexedextractionResult
- the plain text extraction result from the resourceproperties
- the list of all properties directly attached to the resource (not searched)propertiesSearched
- the list of all searched properties of the resourceCmsSearchFieldConfiguration.appendDates(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
protected I_CmsSearchDocument appendFieldMapping(I_CmsSearchDocument document, CmsSearchField sfield, CmsObject cms, CmsResource resource, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
CmsSearchFieldConfiguration
appendFieldMapping
在类中 CmsSearchFieldConfiguration
document
- the document to extendsfield
- the field to create the mappings forcms
- the OpenCms context used for building the search indexresource
- the resource that is indexedextractionResult
- the plain text extraction result from the resourceproperties
- the list of all properties directly attached to the resource (not searched)propertiesSearched
- the list of all searched properties of the resourceCmsSearchFieldConfiguration.appendFieldMapping(org.opencms.search.I_CmsSearchDocument, org.opencms.search.fields.CmsSearchField, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
protected I_CmsSearchDocument appendFieldMappings(I_CmsSearchDocument document, CmsObject cms, CmsResource resource, I_CmsExtractionResult extractionResult, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
CmsSearchFieldConfiguration
appendFieldMappings
在类中 CmsSearchFieldConfiguration
document
- the document to extendcms
- the OpenCms context used for building the search indexresource
- the resource that is indexedextractionResult
- the plain text extraction result from the resourceproperties
- the list of all properties directly attached to the resource (not searched)propertiesSearched
- the list of all searched properties of the resourceCmsSearchFieldConfiguration.appendFieldMappings(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
protected I_CmsSearchDocument appendLocales(I_CmsSearchDocument document, CmsObject cms, CmsResource resource, I_CmsExtractionResult extraction, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
CmsSearchFieldConfiguration
appendLocales
在类中 CmsSearchFieldConfiguration
document
- the document to extendcms
- the OpenCms context used for building the search indexresource
- the resource that is indexedextraction
- the plain text extraction result from the resourceproperties
- the list of all properties directly attached to the resource (not searched)propertiesSearched
- the list of all searched properties of the resourceCmsSearchFieldConfiguration.appendLocales(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
protected I_CmsSearchDocument appendProperties(I_CmsSearchDocument document, CmsObject cms, CmsResource resource, I_CmsExtractionResult extraction, java.util.List<CmsProperty> properties, java.util.List<CmsProperty> propertiesSearched)
CmsSearchFieldConfiguration
appendProperties
在类中 CmsSearchFieldConfiguration
document
- the document to extendcms
- the OpenCms context used for building the search indexresource
- the resource that is indexedextraction
- the plain text extraction result from the resourceproperties
- the list of all properties directly attached to the resource (not searched)propertiesSearched
- the list of all searched properties of the resourceCmsSearchFieldConfiguration.appendProperties(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)
protected java.util.List<java.util.Locale> getContentLocales(CmsObject cms, CmsResource resource, I_CmsExtractionResult extraction)
Uses following strategy:
cms
- the current CmsObjectresource
- the resource to get the content locales forextraction
- the extraction resultprotected java.util.Set<CmsSearchField> getXSDMappings(CmsObject cms, CmsResource resource)
cms
- the CmsObjectresource
- the resource