public class TokenizedElementParser extends Object implements ElementParser
ElementParser that parses elements marked with a "tokenized" attribute. This attribute
indicates that the field should be tokenized and analyzed by Solr, and by definition it isn't (like _s fields)
so a copy of the field is created with a field name that can actualy be tokenized (like those ending with _t).| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TOKENIZED_ATTRIBUTE_NAME |
protected Map<String,String> |
fieldSuffixMappings |
protected String |
tokenizedAttributeName |
| Constructor and Description |
|---|
TokenizedElementParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
parse(org.dom4j.Element element,
String fieldName,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc,
ElementParserService parserService)
Parses the given element, generating one or more Solr fields and adding them to the given document.
|
void |
setFieldSuffixMappings(Map<String,String> fieldSuffixMappings) |
void |
setTokenizedAttributeName(String tokenizedAttributeName) |
public static final String DEFAULT_TOKENIZED_ATTRIBUTE_NAME
protected String tokenizedAttributeName
public void setTokenizedAttributeName(String tokenizedAttributeName)
public boolean parse(org.dom4j.Element element,
String fieldName,
String parentFieldName,
org.apache.solr.common.SolrInputDocument solrDoc,
ElementParserService parserService)
ElementParserparse in interface ElementParserelement - the element to parsefieldName - the field name that should be used for the main Solr field (by default will be the
path of the element in the tree plus the element name)parentFieldName - the field name of the parent elementsolrDoc - the Solr document to add the generated fieldsparserService - the parser service used normally to parse sub elementsCopyright © 2018 CrafterCMS. All rights reserved.