1、关于默认搜索域
<str name="qf"> text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0 </str>由于content不占任何的权重,因此如果某个文档只在content中包含关键字的话,搜索结果并不会返回这个文档。因此,对于nutch提取的索引来说,要增加content的权重,以及url的权重(如果需要的话):
<str name="qf"> content^1.0 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0 </str>
二、Search Handler
- <requestHandlername="/browse"class="solr.SearchHandler">
- lstname="defaults">
- strname="echoParams">explicit</str
- <!--VelocityResponseWritersettings-->
- strname="wt">velocitystrname="v.template">browsestrname="v.layout">layoutstrname="title">Solritas_test<!--Querysettings-->
- strname="defType">edismaxstrname="qf" text^0.5features^1.0name^1.2sku^1.5id^10.0manu^1.1cat^1.4
- title^10.0description^5.0keywords^5.0author^2.0resourcename^1.0
- strname="df">contentstrname="mm">100%strname="q.alt">*:*strname="rows">10strname="fl">*,score <!--morelikethissetting-->
- strname="mlt.qf"strname="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcenameintname="mlt.count">3int
- <!--Facetingdefaults-->
- strname="facet">onstrname="facet.field">cat>manu_exact>content_type>author_sstrname="facet.query">ipod>GBstrname="facet.mincount">1strname="facet.pivot">cat,inStockstrname="facet.range.other">afterstrname="facet.range">priceintname="f.price.facet.range.start">0intname="f.price.facet.range.end">600intname="f.price.facet.range.gap">50>popularityintname="f.popularity.facet.range.start"intname="f.popularity.facet.range.end"intname="f.popularity.facet.range.gap">manufacturedate_dtstrname="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARSstrname="f.manufacturedate_dt.facet.range.end">NOWstrname="f.manufacturedate_dt.facet.range.gap">+1YEARstrname="f.manufacturedate_dt.facet.range.other">before<!--Highlightingdefaults-->
- strname="hl"strname="hl.fl">contentfeaturestitlenamestrname="hl.encoder">htmlstrname="hl.simple.pre">strname="hl.simple.post"strname="f.title.hl.fragsize"strname="f.title.hl.alternateField">titlestrname="f.name.hl.fragsize"strname="f.name.hl.alternateField">namestrname="f.content.hl.snippets"strname="f.content.hl.fragsize">200strname="f.content.hl.alternateField"strname="f.content.hl.maxAlternateFieldLength">750<!--Spellcheckingdefaults-->
- strname="spellcheck"strname="spellcheck.extendedResults">falsestrname="spellcheck.count">5strname="spellcheck.alternativeTermCount">2strname="spellcheck.maxResultsForSuggest"strname="spellcheck.collate">truestrname="spellcheck.collateExtendedResults"strname="spellcheck.maxCollationTries"strname="spellcheck.maxCollations"lst<!--appendspellcheckingtoourlistofcomponents-->
- arrname="last-components">spellcheckarrrequestHandler>
2、二级元素包括first-components,last-components,defautls等。
3、Velocity的配置
- >