1 year ago
#376081
Priyanka Agrawal
Is there any way to proportionate the old and new document in Apache Solr?
I have solr integration for billions of records and search is working, but the need is to enhance the search result output..
We need to have proportion between popular + old and new data And lower the ratio of data from same lot in the output result
For example-
- Popularity - 20%
- fresh data- taken in the last 6 months 30%)
- old data- Older than 6 months 30%
- same shoot (repeats) 10%
I have tried to integrate the "boost" but it only returns new data..
product(recip(ms(NOW,active_date),6.33e-11,1,1),log(popularity_score),image_boost_score,collection_boost_score,clusterboost)
Solarconfig.xml- Query handler
<requestHandler name="/query" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="wt">json</str>
<str name="indent">true</str>
<!-- Query settings -->
<str name="defType">edismax</str>
<str name="qf">
title^50 title_no_stemmer^50 keywords^40 title_stemmer^30 title_porter_stemmer^25 photographer_name^20 photographer_name_no_stemmer keywords_stemmer^4 keywords_porter_stemmer^3 file_name_phrase file_name media_id
</str>
<str name="boost">
product(recip(ms(NOW,active_date),6.33e-11,1,1),log(popularity_score),image_boost_score,collection_boost_score,clusterboost)
</str>
<str name="mm">100%</str>
<str name="q.alt">*:*</str>
<str name="rows">20</str>
<str name="fl">*,score</str>
<!-- Faceting defaults -->
<str name="facet">on</str>
<str name="facet.missing">false</str>
<str name="facet.mincount">1</str>
<str name="facet.field">media_type</str>
<str name="facet.field">orientation</str>
<str name="facet.field">people</str>
<str name="facet.field">style</str>
<str name="facet.field">collection_id</str>
<str name="facet.field">location</str>
</lst>
<arr name="last-components">
<str>elevator</str>
</arr>
</requestHandler>```
solr
solrj
solrcloud
solr8
0 Answers
Your Answer