You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Li Li <fa...@gmail.com> on 2012/05/04 01:41:45 UTC

Re: Sorting result first which come first in sentance

as for version below 4.0, it's not possible because lucene's score
model. position information is stored, but only used to support phrase
query. it just tell us whether a document is matched, but we can boost
a document. The similar problem is : how to implement proximity boost.
for 2 search terms, we need return all docs that contains this 2
terms. but if they are phrase, we give it a largest boost. if there is
a word between them, we give it a smaller one. if there are 2 words
between them, we will give it smaller score. ....
all this ranking algorithm need more flexible score model.
I don't know whether the latest trunk take this into consideration.

On Fri, May 4, 2012 at 3:43 AM, Jonty Rhods <jo...@gmail.com> wrote:
>> Hi all,
>>
>>
>>
>> I need suggetion:
>>
>>
>>
>> I
>>
>> Hi all,
>>
>>
>>
>> I need suggetion:
>>
>>
>>
>> I have many title like:
>>
>>
>>
>> 1 bomb blast in kabul
>>
>> 2 kabul bomb blast
>>
>> 3 3 people killed in serial bomb blast in kabul
>>
>>
>>
>> I want 2nd result should come first while user search by "kabul".
>>
>> Because kabul is on 1st postion in that sentance.  Similarly 1st result
>> should come on 2nd and 3rd should come last.
>>
>>
>>
>> Please suggest me hot to implement this..
>>
>>
>>
>> Regard
>>
>> Jonty
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Sorting result first which come first in sentance

Posted by Li Li <fa...@gmail.com>.
for this version, you may consider using payload for position boost.
you can save boost values in payload.
I have used it in lucene api where anchor text should weigh more than
normal text. but I haven't used it in solr.
some searched urls:
http://wiki.apache.org/solr/Payloads
http://digitalpebble.blogspot.com/2010/08/using-payloads-with-dismaxqparser-in.html


On Fri, May 4, 2012 at 9:51 AM, Jonty Rhods <jo...@gmail.com> wrote:
> I am using solr version 3.4

Re: Sorting result first which come first in sentance

Posted by Jonty Rhods <jo...@gmail.com>.
I am using solr version 3.4

Re: Sorting result first which come first in sentance

Posted by Jonty Rhods <jo...@gmail.com>.
I am using solr version 3.4