Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 107 lines (90 sloc) 4.44 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!--
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.
-->
<!-- This is a sample solrconfig for AutoComplete / AutoSuggest as a Solr core.
By Cominvent AS, see www.cominvent.com -->
<config>
<luceneMatchVersion>LUCENE_35</luceneMatchVersion>
<!-- Default request handler config for auto complete
Tune the weights and boosts to adjust behaviour
-->
<requestHandler class="solr.SearchHandler" name="ac" default="true" >
<lst name="defaults">
<str name="defType">edismax</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
<str name="qf">textsuggest^30 extrasearch^30.0 textng^50.0 phonetic^10</str>
<str name="pf">textnge^50.0</str>
<str name="bf">product(log(sum(popularity,1)),100)^20</str>
<!-- Define relative importance between types. May be overridden per request by e.g. &personboost=120 -->
<str name="boost">product(map(query($type1query),0,0,1,$type1boost),map(query($type2query),0,0,1,$type2boost),map(query($type3query),0,0,1,$type3boost),map(query($type4query),0,0,1,$type4boost),$typeboost)</str>
<double name="typeboost">1.0</double>
<str name="type1query">type:"Countries"</str>
<double name="type1boost">0.9</double>
<str name="type2query">type:"Cities"</str>
<double name="type2boost">0.5</double>
<str name="type3query">type:"NA"</str>
<double name="type3boost">0.0</double>
<str name="type4query">type:"NA"</str>
<double name="type4boost">0.0</double>
<str name="debugQuery">false</str>
</lst>
</requestHandler>
<requestHandler name="/browse" class="solr.SearchHandler">
<lst name="defaults">
<!-- Browse specific stuff -->
<str name="echoParams">all</str>
<str name="wt">velocity</str>
<str name="v.template">browse</str>
<str name="v.layout">layout</str>
<str name="title">Autocomplete demo</str>
<str name="q.alt">*:*</str>
<str name="facet">on</str>
<str name="facet.field">type</str>
<!-- Everything below should be identical to "ac" handler above -->
<str name="defType">edismax</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
<str name="qf">textsuggest^30 extrasearch^30.0 textng^50.0 phonetic^10</str>
<str name="pf">textnge^50.0</str>
<str name="bf">product(log(sum(popularity,1)),100)^20</str>
<!-- Define relative importance between types. May be overridden per request by e.g. &personboost=120 -->
<str name="boost">product(map(query($type1query),0,0,1,$type1boost),map(query($type2query),0,0,1,$type2boost),map(query($type3query),0,0,1,$type3boost),map(query($type4query),0,0,1,$type4boost),$typeboost)</str>
<double name="typeboost">1.0</double>
<str name="type1query">type:"Countries"</str>
<double name="type1boost">0.9</double>
<str name="type2query">type:"Cities"</str>
<double name="type2boost">0.5</double>
<str name="type3query">type:"NA"</str>
<double name="type3boost">0.0</double>
<str name="type4query">type:"NA"</str>
<double name="type4boost">0.0</double>
<str name="debugQuery">false</str>
</lst>
</requestHandler>
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
<requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler"/>
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
<jmx />
<updateHandler class="solr.DirectUpdateHandler2" />
<admin>
<defaultQuery>*:*</defaultQuery>
</admin>
<!-- Temp -->
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" enable="${solr.velocity.enabled:true}"/>
</config>