Apache Solr cat:iphone^2 name:iphone^2 是什么意思?
Apache Solr what does cat:iphone^2 name:iphone^2 mean?
我正在阅读“apache solr 搜索模式”一书,有疑问:
q=text:iphone cat:iphone^2 name:iphone^2
brand:iphone^2&facet=true&facet.mincount=1&facet.field=clothes_
gender&facet.field=clothes_type&facet.field=clothes_size&facet.
field=clothes_color&facet.field=brand&facet.field=mobile_os&facet.
field=mobile_screen_size&facet.field=laptop_processor&facet.
field=laptop_memory&facet.field=laptop_hard_disk&defType=edismax
和
q=pink sweater&qf=text cat^2 name^2 brand^2 clothes_type^2 clothes_
color^2 clothes_occassion^2&pf=text cat^3 name^3 brand^3 clothes_
type^3 clothes_color^3 clothes_occassion^3&fl=*,score&defType=edi
smax&facet=true&facet.mincount=1&facet.field=clothes_gender&facet.
field=clothes_type&facet.field=clothes_size&facet.field=clothes_
color&facet.field=brand&facet.field=mobile_os&facet.field=mobile_
screen_size&facet.field=laptop_processor&facet.field=laptop_
memory&facet.field=laptop_hard_disk
^2 和 ^3 是什么意思?
这意味着如果在这些字段中找到这些字词,则将其提高 2 倍或 3 倍。语法是 field:term^<weight>
。请参阅参考指南中的 Boosting a term with ^。
Lucene/Solr provides the relevance level of matching documents based
on the terms found. To boost a term use the caret symbol ^ with a
boost factor (a number) at the end of the term you are searching. The
higher the boost factor, the more relevant the term will be.
Boosting allows you to control the relevance of a document by boosting
its term. For example, if you are searching for jakarta apache
and you want the term jakarta
to be more relevant,
you can boost it by adding the ^ symbol along with the boost factor
immediately after the term. For example, you could type:
jakarta^4 apache
将 qf
与 edismax
一起使用时,它会将相同的规则应用于这些字段中的任何命中。
The qf
parameter introduces a list of fields, each of which is
assigned a boost factor to increase or decrease that particular
field’s importance in the query. For example, the query below:
qf=fieldOne^2.3 fieldTwo fieldThree^0.4
assigns fieldOne
a boost of 2.3
, leaves fieldTwo
with the default
boost (because no boost factor is specified), and fieldThree
a boost
of 0.4
. These boost factors make matches in fieldOne
much more
significant than matches in fieldTwo
, which in turn are much more
significant than matches in fieldThree
.
我正在阅读“apache solr 搜索模式”一书,有疑问:
q=text:iphone cat:iphone^2 name:iphone^2
brand:iphone^2&facet=true&facet.mincount=1&facet.field=clothes_
gender&facet.field=clothes_type&facet.field=clothes_size&facet.
field=clothes_color&facet.field=brand&facet.field=mobile_os&facet.
field=mobile_screen_size&facet.field=laptop_processor&facet.
field=laptop_memory&facet.field=laptop_hard_disk&defType=edismax
和
q=pink sweater&qf=text cat^2 name^2 brand^2 clothes_type^2 clothes_
color^2 clothes_occassion^2&pf=text cat^3 name^3 brand^3 clothes_
type^3 clothes_color^3 clothes_occassion^3&fl=*,score&defType=edi
smax&facet=true&facet.mincount=1&facet.field=clothes_gender&facet.
field=clothes_type&facet.field=clothes_size&facet.field=clothes_
color&facet.field=brand&facet.field=mobile_os&facet.field=mobile_
screen_size&facet.field=laptop_processor&facet.field=laptop_
memory&facet.field=laptop_hard_disk
^2 和 ^3 是什么意思?
这意味着如果在这些字段中找到这些字词,则将其提高 2 倍或 3 倍。语法是 field:term^<weight>
。请参阅参考指南中的 Boosting a term with ^。
Lucene/Solr provides the relevance level of matching documents based on the terms found. To boost a term use the caret symbol ^ with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.
Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for
jakarta apache
and you want the termjakarta
to be more relevant, you can boost it by adding the ^ symbol along with the boost factor immediately after the term. For example, you could type:
jakarta^4 apache
将 qf
与 edismax
一起使用时,它会将相同的规则应用于这些字段中的任何命中。
The
qf
parameter introduces a list of fields, each of which is assigned a boost factor to increase or decrease that particular field’s importance in the query. For example, the query below:qf=fieldOne^2.3 fieldTwo fieldThree^0.4
assigns
fieldOne
a boost of2.3
, leavesfieldTwo
with the default boost (because no boost factor is specified), andfieldThree
a boost of0.4
. These boost factors make matches infieldOne
much more significant than matches infieldTwo
, which in turn are much more significant than matches infieldThree
.