<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is schema file for TTMServer using Solr as backend -->
<schema name="ttmserver" version="1.5">
	<types>
		<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
		<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
		<fieldType name="tint" class="solr.TrieIntField" precisionStep="50" positionIncrementGap="0"/>
		<!-- Our input can basically be in any language, so we use either
		     language agnostic processing or something that can adapt to
		     the language in question. -->
		<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
			<analyzer>
				<!-- Consider using solr.ICUTokenizerFactory -->
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<!-- Consider using solr.ICUNormalizer2FilterFactory -->
				<filter class="solr.LowerCaseFilterFactory"/>
			</analyzer>
		</fieldType>
	</types>

	<fields>
		<field name="_version_" type="long" indexed="true" stored="true" />

		<!-- If multiple wikis are using the same server, this will tell which one
		     owns this document. Maps to MediaWiki wfWikiId(). -->
		<field name="wiki" type="string" indexed="true" stored="true" required="true" />
		<!-- Title::getPrefixedText() of the message definition page. -->
		<field name="messageid" type="string" indexed="true" stored="true" required="true" />
		<!-- Consists of concatenation of wiki and messageid. -->
		<field name="globalid" type="string" indexed="true" stored="true" required="true" />
		<!-- URL or something to the translation in the wiki. -->
		<field name="uri" type="string" indexed="true" stored="true" required="true" />

		<!-- FACETs: Language and groups. -->
		<field name="language" type="string" indexed="true" stored="true" required="true" />
		<field name="group" multiValued="true" indexed="true" stored="true" type="string" />

		<field name="content" type="string" indexed="true" stored="true" required="true" />

		<field name="text" type="text_ws" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
		<copyField source="content" dest="text"/>
	</fields>
	<defaultSearchField>text</defaultSearchField>
	<uniqueKey>globalid</uniqueKey>
</schema>
