Skip to content

Instantly share code, notes, and snippets.

@simonetripodi
Created October 20, 2011 13:52
Show Gist options
  • Save simonetripodi/1301194 to your computer and use it in GitHub Desktop.
Save simonetripodi/1301194 to your computer and use it in GitHub Desktop.
Specified dictionary does not exist issue
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<schema name="Catalogue" version="1.0">
<types>
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" />
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0" />
<fieldType name="generalText" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true" />
</analyzer>
</fieldType>
<fieldType name="tagsText" class="solr.TextField" sortMissingLast="true" omitNorms="false">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
catenateWords="1" catenateNumbers="1" catenateAll="0" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
catenateWords="0" catenateNumbers="0" catenateAll="0" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
</fieldType>
</types>
<fields>
<!-- general -->
<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true" />
<field name="DataSet" type="string" indexed="false" stored="true" multiValued="false" />
<field name="description" type="string" indexed="false" stored="true" multiValued="false" />
<field name="title" type="generalText" indexed="true" stored="true" multiValued="false" />
<field name="abstract" type="string" indexed="true" stored="true" multiValued="false" />
<field name="platform" type="string" indexed="true" stored="true" multiValued="false" />
<field name="dtstart" type="tdate" indexed="true" stored="true" multiValued="false" />
<field name="dtend" type="tdate" indexed="true" stored="true" multiValued="false" />
<field name="spatial" type="string" indexed="false" stored="true" multiValued="false" />
<field name="subject" type="generalText" indexed="true" stored="true" multiValued="true" />
<field name="rights" type="string" indexed="false" stored="true" multiValued="false" />
<field name="format" type="string" indexed="true" stored="true" multiValued="false" />
<field name="resolution" type="string" indexed="false" stored="true" multiValued="false" />
<field name="processingLevel" type="string" indexed="false" stored="true" multiValued="false" />
<field name="extent" type="string" indexed="true" stored="true" multiValued="false" />
<field name="created" type="tdate" indexed="false" stored="true" multiValued="false" />
<field name="modified" type="tdate" indexed="false" stored="true" multiValued="false" />
<field name="sensor" type="string" indexed="true" stored="true" multiValued="false" />
<field name="sensorType" type="string" indexed="true" stored="true" multiValued="false" />
<field name="publisher" type="string" indexed="false" stored="true" multiValued="false" />
<field name="mission" type="string" indexed="true" stored="true" multiValued="false" />
<field name="creator" type="string" indexed="false" stored="true" multiValued="false" />
<field name="projection" type="generalText" indexed="true" stored="true" multiValued="true" />
<field name="instrument" type="string" indexed="true" stored="true" multiValued="true" />
<field name="acquisitionStation" type="generalText" indexed="true" stored="true" multiValued="false" />
<field name="archivingCenter" type="string" indexed="false" stored="true" multiValued="false" />
<field name="processingCenter" type="generalText" indexed="false" stored="true" multiValued="false" />
<!-- spell checker -->
<field name="master-dictionary" type="tagsText" indexed="true" stored="true" multiValued="true" />
<copyField source="abstract" dest="master-dictionary" />
<copyField source="subject" dest="master-dictionary" />
</fields>
<!-- field to use to determine and enforce document uniqueness. -->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>subject</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="OR" />
</schema>
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<!--
| Optional, it is required when more than one spellchecker is configured.
| Select non-default name with spellcheck.dictionary in request handler.
-->
<str name="name">default</str>
<!--
| The classname is optional, defaults to IndexBasedSpellChecker
-->
<str name="classname">solr.IndexBasedSpellChecker</str>
<str name="field">master-dictionary</str>
<!--
| Optional, by default use in-memory index (RAMDirectory)
-->
<str name="spellcheckIndexDir">./spellchecker</str>
<!--
| Set the accuracy (float) to be used for the suggestions. Default is 0.5
-->
<str name="accuracy">0.7</str>
<!--
| Require terms to occur in 1/100th of 1% of documents in order to be included in the dictionary
-->
<float name="thresholdTokenFrequency">.0001</float>
<!--
| automatically (re)build indices based on fields in Solr index when a commit is done
-->
<str name="buildOnCommit">true</str>
<str name="buildOnOptimize">true</str>
</lst>
<!--
| a spellchecker that uses a different distance measure
-->
<!-- <lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">spell</str>
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
<str name="spellcheckIndexDir">./spellchecker2</str>
</lst> -->
<!--
| a file based spell checker
-->
<!-- <lst name="spellchecker">
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="name">file</str>
<str name="sourceLocation">spellings.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">./spellcheckerFile</str>
</lst> -->
</searchComponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment