blob: 857fb1136870bece5209973dfaa8e8f604cb5742 [file] [log] [blame]
<?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.
-->
<config>
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based and not persistent. -->
<dataDir>${solr.data.dir:}</dataDir>
<directoryFactory name="DirectoryFactory" class="solr.NRTCachingDirectoryFactory"/>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<updateHandler class="solr.DirectUpdateHandler2"/>
<requestHandler name="/select" class="solr.SearchHandler" />
<searchComponent class="solr.SuggestComponent" name="suggest">
<!-- Suggest component (default index based dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_with_high_freq_dict</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="field">cat</str>
<str name="storeDir">suggest_fuzzy_with_high_freq_dict</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
<float name="threshold">0.0</float>
</lst>
<!-- Suggest component (default file based dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_file_based</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="sourceLocation">fuzzysuggest.txt</str>
<str name="storeDir">suggest_fuzzy_file_based</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
</lst>
<!-- Suggest component (Document Dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_doc_dict</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
<str name="buildOnStartup">false</str>
</lst>
<!-- Suggest component (Document Expression Dictionary) -->
<lst name="suggester">
<str name="name">suggest_fuzzy_doc_expr_dict</str>
<str name="dictionaryImpl">DocumentExpressionDictionaryFactory</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="field">cat</str>
<str name="weightExpression">((price * 2) + weight)</str>
<str name="sortField">weight</str>
<str name="sortField">price</str>
<str name="storeDir">suggest_fuzzy_doc_expr_dict</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
</lst>
<!-- Suggest component (Document Dictionary) that is built on startup-->
<lst name="suggester">
<str name="name">suggest_fuzzy_doc_dict_build_startup</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
<str name="buildOnStartup">true</str>
</lst>
<!-- Suggest component (Document Dictionary) only builds manually-->
<lst name="suggester">
<str name="name">suggest_fuzzy_doc_manal_build</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
<str name="buildOnStartup">false</str>
<str name="storeDir">suggest_fuzzy_doc_manal_build</str>
</lst>
<!-- Suggest component (Document Dictionary) only builds manually and
has the default buildOnStartup behavior -->
<lst name="suggester">
<str name="name">suggest_doc_default_startup</str>
<str name="lookupImpl">AnalyzingLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
<str name="storeDir">suggest_doc_default_startup</str>
</lst>
<!-- Suggest component (Document Dictionary) only builds manually and
has the default buildOnStartup behavior with no storeDir -->
<lst name="suggester">
<str name="name">suggest_doc_default_startup_no_store</str>
<str name="lookupImpl">AnalyzingLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">cat</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">false</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="org.apache.solr.handler.component.SearchHandler">
<lst name="defaults">
<str name="suggest">true</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
<query><useColdSearcher>false</useColdSearcher></query>
</config>