lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kydryavtsev Andrey <werde...@yandex.ru>
Subject Re: Boosting results on value of field different from query
Date Thu, 26 Dec 2013 20:05:33 GMT
Hi, Puneet

I think you can try of provided advice from there : http://wiki.apache.org/solr/SolrRelevancyFAQ


Like this one  : http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_increase_the_score_for_specific_documents
: set index time boos "per document", so set big boos for documents with type:compact and
type:sedan

Or this one http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_change_the_score_of_a_document_based_on_the_.2Avalue.2A_of_a_field_.28say.2C_.22popularity.22.29
and  http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29   : use
query time function for boosting, you can implement your own function query, called for example
"typeBoosting", which will convert "type" value per document from string into boost number
and use it like "typeBoosting(type)".

26.12.2013, 06:28, "Puneet Pawaia" <puneet.pawaia@gmail.com>:
> Hi Manju
> Would this query not be searching for and thus restricting results to type
> sedan and compact?
> I would like the results to include other types but only show up lower down
> the list.
> Regards
> Puneet
> On 26 Dec 2013 07:15, "manju16832003" <manju16832003@gmail.com> wrote:
>
>>  Hi Puneet,
>>  if you type field is pre-determined text field ex type [compact, sedan,
>>  hatchback], I think you have to boost with query type field (q) to
>>  get more accurate boosting.
>>
>>  Ex: http://localhost:8983/solr/my/select?q=type:sedan^100 type:compact^10
>>
>>  (:*)^1&wt=json&indent=true&fl=,score&debug=results&bf=recip(rord(publish_date),1,2,3)^1.5&sort=score
>>  desc
>>
>>  For publish_date, replace with the date you use for getting latest
>>  resultes.
>>
>>  In the above query, things to note is that
>>   - fl=,score -> The result set would display score value for each document
>>   - sort by score as first sort field that will give you the documents with
>>  the highest boost value (score) on top
>>
>>   Play around with the boosting values ^100 ^10 (perhaps 5,10,20 ) and
>>  observe how the score value will change the documents.
>>
>>   I'm not really sure how solr calculation works, however the above query
>>  must give you the accurate boosted documents.
>>
>>  --
>>  View this message in context:
>>  http://lucene.472066.n3.nabble.com/Boosting-results-on-value-of-field-different-from-query-tp4108180p4108190.html
>>  Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message