我已经 Solr版本5.2.1 启动并运行,我正在尝试为我的搜索字段设置特定的提升参数。只要我指定 edismax defType和 qf 参数,我就不会获得任何搜索结果。
这是我的例子:
没有提升
http://localhost:8983/solr/test/select?q=test&fl=title,description,score&wt=json&indent=true&defType=edismax
{
"responseHeader":{
"status":0,
"QTime":2,
"params":{
"fl":"title,description,score",
"indent":"true",
"q":"test",
"wt":"json",
"defType":"edismax"}},
"response":{"numFound":11,"start":0,"maxScore":0.4290576,"docs":[
{
"title":"Link-Test",
"score":0.4290576},
{
"title":"Auth-Test",
"score":0.4290576},
{
"title":"test",
"description":"Description for the search result page",
"score":0.3754254},
{
"title":"Footer Test",
"score":0.3217932},
{
"title":"Slider-Test",
"score":0.268161},
{
"title":"Credit card TEST",
"description":"This is the description of the credit card page test",
"score":0.1608966},
{
"title":"Service",
"score":0.15169477},
{
"title":"Linklist",
"score":0.13273293},
{
"title":"My target page",
"score":0.13273293},
{
"title":"Some download page",
"score":0.094809234}]
}}
使用edismax提升
http://localhost:8983/solr/test/select?q=test&fl=title,description,score&wt=json&indent=true&defType=edismax&qf=title^20+description
{
"responseHeader":{
"status":0,
"QTime":2,
"params":{
"fl":"title,description,score",
"indent":"true",
"q":"test",
"qf":"title^20 description",
"wt":"json",
"defType":"edismax"}},
"response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]
}}
我是否必须以某种方式激活ExtendedDisMax查询解析器? 这是我的solrconfig.xml