Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created March 17, 2010 14:39
Show Gist options
  • Save hubgit/335297 to your computer and use it in GitHub Desktop.
Save hubgit/335297 to your computer and use it in GitHub Desktop.
schema.xml for storing Wikipedia data in Solr
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="wikipedia" version="1.2">
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
</types>
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true"/>
<field name="title" type="text" indexed="true" stored="true" termVectors="true"/>
<field name="text" type="text" indexed="true" stored="false" termVectors="true"/>
</fields>
<uniqueKey>id</uniqueKey>
<defaultSearchField>text</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>
</schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment