| <?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. |
| --> |
| |
| <!-- solrconfig.xml for a WFST phrase suggester --> |
| <config> |
| <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion> |
| <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| <dataDir>${solr.data.dir:}</dataDir> |
| <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/> |
| <requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler> |
| |
| <!-- WFSTLookup suggest component --> |
| <searchComponent class="solr.SpellCheckComponent" name="suggest_wfst"> |
| <lst name="spellchecker"> |
| <str name="name">suggest_wfst</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.WFSTLookupFactory</str> |
| <str name="storeDir">suggest_wfst</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| |
| <str name="sourceLocation">phrasesuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- AnalyzingLookup suggest component --> |
| <searchComponent class="solr.SpellCheckComponent" name="suggest_analyzing"> |
| <lst name="spellchecker"> |
| <str name="name">suggest_analyzing</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.AnalyzingLookupFactory</str> |
| <str name="storeDir">suggest_analyzing</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| <str name="suggestAnalyzerFieldType">ja_suggest</str> |
| <bool name="preserveSep">false</bool> |
| |
| <str name="sourceLocation">jasuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- FuzzyLookup suggest component (default)--> |
| <searchComponent class="solr.SpellCheckComponent" name="fuzzy_suggest_analyzing"> |
| <lst name="spellchecker"> |
| <str name="name">fuzzy_suggest_analyzing</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory</str> |
| <str name="storeDir">fuzzy_suggest_analyzing</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| <str name="suggestAnalyzerFieldType">text</str> |
| <bool name="preserveSep">false</bool> |
| |
| <str name="sourceLocation">fuzzysuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- FuzzyLookup suggest component with max edit 2--> |
| <searchComponent class="solr.SpellCheckComponent" name="fuzzy_suggest_analyzing_with_max_edit_2"> |
| <lst name="spellchecker"> |
| <str name="name">fuzzy_suggest_analyzing_with_max_edit_2</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory</str> |
| <str name="storeDir">fuzzy_suggest_analyzing_with_max_edit_2</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| <str name="suggestAnalyzerFieldType">text</str> |
| <bool name="preserveSep">false</bool> |
| <int name="maxEdits">2</int> |
| |
| <str name="sourceLocation">fuzzysuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- FuzzyLookup suggest component with 4 non_fuzzy_prefix --> |
| <searchComponent class="solr.SpellCheckComponent" name="fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4"> |
| <lst name="spellchecker"> |
| <str name="name">fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory</str> |
| <str name="storeDir">fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| <str name="suggestAnalyzerFieldType">text</str> |
| <bool name="preserveSep">false</bool> |
| <int name="nonFuzzyPrefix">4</int> |
| |
| <str name="sourceLocation">fuzzysuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- FuzzyLookup suggest component with 2 min_fuzzy_length --> |
| <searchComponent class="solr.SpellCheckComponent" name="fuzzy_suggest_analyzing_with_min_fuzzy_length_2"> |
| <lst name="spellchecker"> |
| <str name="name">fuzzy_suggest_analyzing_with_min_fuzzy_length_2</str> |
| <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> |
| <str name="lookupImpl">org.apache.solr.spelling.suggest.fst.FuzzyLookupFactory</str> |
| <str name="storeDir">fuzzy_suggest_analyzing_with_min_fuzzy_length_2</str> |
| <str name="buildOnCommit">false</str> |
| |
| <!-- Suggester properties --> |
| <bool name="exactMatchFirst">true</bool> |
| <str name="suggestAnalyzerFieldType">text</str> |
| <bool name="preserveSep">false</bool> |
| <int name="minFuzzyLength">2</int> |
| |
| <str name="sourceLocation">fuzzysuggest.txt</str> |
| </lst> |
| |
| <!-- specify a fieldtype using keywordtokenizer + lowercase + cleanup --> |
| <str name="queryAnalyzerFieldType">phrase_suggest</str> |
| </searchComponent> |
| |
| <!-- is this thing just configured globally or wtf is going on here?! --> |
| <queryConverter name="queryConverter" class="org.apache.solr.spelling.SuggestQueryConverter"/> |
| |
| <!-- wfst (finite state automaton based) --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest_wfst"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">suggest_wfst</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>suggest_wfst</str> |
| </arr> |
| </requestHandler> |
| |
| <!-- analyzing (finite state automaton based) --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest_analyzing"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">suggest_analyzing</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>suggest_analyzing</str> |
| </arr> |
| </requestHandler> |
| |
| <!-- Fuzzy analyzing handler with 1 max edit --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">fuzzy_suggest_analyzing</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>fuzzy_suggest_analyzing</str> |
| </arr> |
| </requestHandler> |
| |
| <!-- Fuzzy analyzing handler with 2 max edit --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing_with_max_edit_2"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">fuzzy_suggest_analyzing_with_max_edit_2</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>fuzzy_suggest_analyzing_with_max_edit_2</str> |
| </arr> |
| </requestHandler> |
| |
| <!-- Fuzzy analyzing handler with 4 non_fuzzy_prefix --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>fuzzy_suggest_analyzing_with_non_fuzzy_prefix_4</str> |
| </arr> |
| </requestHandler> |
| |
| <!-- Fuzzy analyzing handler with 2 min_fuzzy_length --> |
| <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing_with_min_fuzzy_length_2"> |
| <lst name="defaults"> |
| <str name="spellcheck">true</str> |
| <str name="spellcheck.dictionary">fuzzy_suggest_analyzing_with_min_fuzzy_length_2</str> |
| <str name="spellcheck.collate">false</str> |
| <!-- NOTE: if this is false, results are alpha-ordered, not by weight! --> |
| <str name="spellcheck.onlyMorePopular">true</str> |
| </lst> |
| <arr name="components"> |
| <str>fuzzy_suggest_analyzing_with_min_fuzzy_length_2</str> |
| </arr> |
| </requestHandler> |
| </config> |