Class ElementParserServiceImpl<T>
java.lang.Object
org.craftercms.search.commons.service.impl.ElementParserServiceImpl<T>
- Type Parameters:
T- the type of document for the search engine
- All Implemented Interfaces:
ElementParserService<T>
Default implementation of the
ElementParserService. Parses the element using a list of
ElementParsers. If first parser returns false (the element was not handled), it calls the second one and
so on. It also handles elements tagged with the "indexable" attribute. If the attribute is present, and it's
false, the element is not parsed.- Author:
- avasquez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidParses the given element, generating one or more fields and adding them to the given document.voidsetFieldNameSeparator(String fieldNameSeparator)
-
Field Details
-
DEFAULT_FIELD_NAME_SEPARATOR
- See Also:
-
DEFAULT_INDEXABLE_ATTRIBUTE_NAME
- See Also:
-
parsers
-
fieldNameSeparator
-
indexableAttributeName
-
-
Constructor Details
-
ElementParserServiceImpl
-
-
Method Details
-
setFieldNameSeparator
-
getIndexableAttributeName
-
parse
Description copied from interface:ElementParserServiceParses the given element, generating one or more fields and adding them to the given document.- Specified by:
parsein interfaceElementParserService<T>- Parameters:
element- the element to parseparentFieldName- the field name of the parentdoc- the document to add the generated fields
-