Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (127 sloc) 7.1 KB
<?xml version="1.0" encoding="UTF-8"?>
<!-- Basic schema for AEM by dev-eth0.de -->
<schema name="example-data-driven-schema" version="1.6">
<!-- The actual field definitions -->
<uniqueKey>path_exact</uniqueKey>
<field name="_version_" type="long" indexed="true" stored="true"/>
<!-- General attributes -->
<field name="path_exact" type="string" indexed="true" stored="true"/>
<field name="path_child" type="children_path" indexed="true" stored="false"/>
<field name="path_anc" type="parent_path" indexed="true" stored="false"/>
<field name="path_des" type="descendent_path" indexed="true" stored="false"/>
<field name="path_collapsed" type="string" indexed="true" stored="false"/>
<field name="path_depth" type="tint" indexed="true" stored="false"/>
<copyField source="path_exact" dest="path_anc"/>
<copyField source="path_exact" dest="path_des"/>
<copyField source="path_exact" dest="path_child"/>
<!-- JCR & sling attributes -->
<field name="jcr_title" type="string"/>
<field name="jcr_created" type="date"/>
<field name="jcr_description" type="string"/>
<field name="jcr_lastModified" type="date"/>
<field name="jcr_name" type="string"/>
<field name="jcr_primaryType" type="string"/>
<field name="sling_resourceType" type="string"/>
<!-- DAM attributes -->
<field name="jcr_mimeType" type="string"/>
<field name="dam:MIMEtype" type="string"/>
<!-- Content attributes -->
<field name="headline" type="string"/>
<field name="title" type="string"/>
<field name="text" type="text_en"/>
<!-- Additional attributes for suggestions, spellchecking etc -->
<field name="suggest" type="text_suggest" indexed="true" stored="false"/>
<copyField source="text" dest="suggest"/>
<!-- catch all -->
<dynamicField name="*" type="text_general" indexed="false" stored="false" />
<fieldType name="descendent_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/"/>
<filter class="solr.PatternCaptureGroupFilterFactory" pattern="((/).*)" preserve_original="false"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="children_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.ReverseStringFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="2147483647"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="([^\/]+)(\/)" replacement="$2" replace="first"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="(\/)(.+)" replacement="$2" replace="first"/>
<filter class="solr.ReverseStringFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="parent_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.ReverseStringFilterFactory"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="[^\/]+\/" replacement="" replace="first"/>
<filter class="solr.ReverseStringFilterFactory"/>
</analyzer>
</fieldType>
<!-- Fieldtype for spellchecking etc. performing minimal analysis -->
<fieldType name="text_suggest" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.UAX29URLEmailTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="int" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
<fieldType name="date" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
<fieldType name="dates" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
<fieldType name="strings" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true"/>
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
</schema>
You can’t perform that action at this time.