/contrib/solr_schema.xml
Relevant Search: With Applications for Solr and Elasticsearch
For more in depth reading about search, ranking and generally everything you could ever want to know about how lucene, elasticsearch or solr work under the hood I highly suggest this book. Easily one of the most interesting technical books I have read in a long time. If you are tasked with solving search relevance problems even if not in Solr or Elasticsearch it should be your first reference. Amazon Affiliate LinkXML | 33 lines | 30 code | 3 blank | 0 comment | 0 complexity | aa79d96905602cd18f0aa5b88d5fd9f6 MD5 | raw file
1<?xml version="1.0" encoding="UTF-8" ?> 2<schema name="ucengine_event" version="1.0"> 3 <types> 4 <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/> 5 <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> 6 7 <fieldtype class="solr.TextField" positionIncrementGap="100" name="text"> 8 <analyzer> 9 <tokenizer class="solr.StandardTokenizerFactory"/> 10 <filter class="solr.StandardFilterFactory"/> 11 <filter class="solr.LowerCaseFilterFactory"/> 12 <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> 13 <filter class="solr.ISOLatin1AccentFilterFactory"/> 14 <filter class="solr.TrimFilterFactory" /> 15 </analyzer> 16 </fieldtype> 17 </types> 18 19 20 <fields> 21 <field name="id" type="string" stored="true"/> 22 <field name="domain" type="string" stored="true"/> 23 <field name="to" type="string" stored="true"/> 24 <field name="datetime" type="slong" indexed="true" multiValued="false" /> 25 <field name="type" type="string" indexed="true" stored="true"/> 26 <field name="location" type="string" indexed="true" stored="true"/> 27 <field name="from" type="string" indexed="true" stored="true"/> 28 <field name="metadata" type="text" indexed="true" stored="true"/> 29 <dynamicField name="metadata_*" type="string" stored="true"/> 30 </fields> 31 <uniqueKey>id</uniqueKey> 32 <defaultSearchField>type</defaultSearchField> 33</schema>