In that case documents 1 and 2 will not be in the results. We need them also be 
shown in the results but be ranked after those docs with exact match.
I think omitting term frequency in calculating ranking in phrase queries will 
solve this issue, but I do not see that such a parameter in configs.
I see omitTermFreqAndPositions="true" but not sure if it is the setting I need, 
because its description is too vague.

Thanks.
Alex.


 

 

 

-----Original Message-----
From: Erick Erickson <erickerick...@gmail.com>
To: solr-user <solr-user@lucene.apache.org>
Sent: Wed, Apr 11, 2012 8:23 am
Subject: Re: term frequency outweighs exact phrase match


Consider boosting on phrase with a SHOULD clause, something
like field:"apache solr"^2..

Best
Erick


On Tue, Apr 10, 2012 at 12:46 PM,  <alx...@aim.com> wrote:
> Hello,
>
> I use solr 3.5 with edismax. I have the following issue with phrase search. 
For example if I have three documents with content like
>
> 1.apache apache
> 2. solr solr
> 3.apache solr
>
> then search for apache solr displays documents in the order 1,.2,3 instead of 
3, 2, 1 because term frequency in the first and second documents is higher than 
in the third document. We want results be displayed in the order as  3,2,1 
since 
the third document has exact match.
>
> My request handler is as follows.
>
> <requestHandler name="search" class="solr.SearchHandler" >
> <lst name="defaults">
> <str name="defType">edismax</str>
> <str name="echoParams">explicit</str>
> <float name="tie">0.01</float>
> <str name="qf">host^30  content^0.5 title^1.2</str>
> <str name="pf">host^30  content^20 title^22 </str>
> <str name="fl">url,id, site ,title</str>
> <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
> <int name="ps">1</int>
> <bool name="hl">true</bool>
> <str name="q.alt">*:*</str>
> <str name="hl.fl">content</str>
> <str name="f.title.hl.fragsize">0</str>
> <str name="hl.fragsize">165</str>
> <str name="f.title.hl.alternateField">title</str>
> <str name="f.url.hl.fragsize">0</str>
> <str name="f.url.hl.alternateField">url</str>
> <str name="f.content.hl.fragmenter">regex</str>
> <str name="spellcheck">true</str>
> <str name="spellcheck.collate">true</str>
> <str name="spellcheck.count">5</str>
> <str name="group">true</str>
> <str name="group.field">site</str>
> <str name="group.ngroups">true</str>
> </lst>
> <arr name="last-components">
>  <str>spellcheck</str>
> </arr>
> </requestHandler>
>
> Any ideas how to fix this issue?
>
> Thanks in advance.
> Alex.

 

Reply via email to