Author: tommaso
Date: Mon Nov 16 11:56:02 2015
New Revision: 1714565
URL: http://svn.apache.org/viewvc?rev=1714565&view=rev
Log:
OAK-3331 - fixed multiword spellcheck config
Modified:
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/schema.xml
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/solrconfig.xml
Modified:
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/schema.xml
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/schema.xml?rev=1714565&r1=1714564&r2=1714565&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/schema.xml
(original)
+++
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/schema.xml
Mon Nov 16 11:56:02 2015
@@ -79,6 +79,18 @@
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
+ <fieldtype name="spellcheck" class="solr.TextField">
+ <analyzer type="index">
+ <tokenizer class="solr.ClassicTokenizerFactory"/>
+ <filter class="solr.LowerCaseFilterFactory"/>
+ <filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="3"
+ outputUnigrams="true"
outputUnigramsIfNoShingles="true" tokenSeparator=" " fillerToken="*"/>
+ </analyzer>
+ <analyzer type="query">
+ <tokenizer class="solr.KeywordTokenizerFactory"/>
+ <filter class="solr.LowerCaseFilterFactory"/>
+ </analyzer>
+ </fieldtype>
<fieldType name="boolean" class="solr.BoolField"
sortMissingLast="true"/>
@@ -118,6 +130,7 @@
<field name=":indexed" type="tdate" indexed="true" stored="false"
default="NOW" docValues="true"/>
<field name=":suggest-weight" type="tint" indexed="false"
stored="false" default="1" docValues="true"/>
<field name=":suggest" type="string" indexed="true" stored="true"
multiValued="true" />
+ <field name=":spellcheck" type="spellcheck" indexed="true"
stored="false" multiValued="true" />
<field name="path_collapsed" type="string" indexed="true"
stored="false"/>
<field name="path_depth" type="tint" indexed="true" stored="false"/>
<field name="_version_" type="long" indexed="true" stored="true"/>
@@ -136,6 +149,8 @@
<copyField source="path_exact" dest="path_child"/>
<copyField source="path_exact" dest=":path"/>
<copyField source="*" dest="catch_all"/>
+ <copyField source="jcr:title" dest=":spellcheck"/>
+ <copyField source="jcr:description" dest=":spellcheck"/>
<copyField source="jcr:title" dest=":suggest"/>
<copyField source="jcr:description" dest=":suggest"/>
Modified:
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/solrconfig.xml
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/solrconfig.xml?rev=1714565&r1=1714564&r2=1714565&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/solrconfig.xml
(original)
+++
jackrabbit/oak/branches/1.2/oak-solr-core/src/main/resources/solr/oak/conf/solrconfig.xml
Mon Nov 16 11:56:02 2015
@@ -1176,13 +1176,14 @@
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
- <str name="queryAnalyzerFieldType">text_general</str>
+ <str name="queryAnalyzerFieldType">spellcheck</str>
<!-- a spellchecker built from a field of the main index -->
<lst name="spellchecker">
<str name="name">default</str>
- <str name="field">catch_all</str>
+ <str name="field">:spellcheck</str>
<str name="classname">solr.DirectSolrSpellChecker</str>
+ <!-- the spellcheck distance measure used, the default is the
internal levenshtein -->
<str name="distanceMeasure">internal</str>
<!-- minimum accuracy needed to be considered a valid spellcheck
suggestion -->
<float name="accuracy">0.5</float>