use appropriate ranking for each search situation:

- when using the /date modifier, a date ranking profile is used
- when using a site: modifier, a ranking profile supporting longer urls
is used
pull/1/head
Michael Peter Christen 12 years ago
parent b8ed66a55d
commit 4af0839be2

@ -963,18 +963,18 @@ search.ranking.solr.collection.boostfunction.tmp.0=
search.ranking.solr.collection.boostfunctionmode.tmp.0=add search.ranking.solr.collection.boostfunctionmode.tmp.0=add
search.ranking.solr.collection.boostname.tmp.1=_date search.ranking.solr.collection.boostname.tmp.1=_date
search.ranking.solr.collection.boostfields.tmp=text_t^1.0 search.ranking.solr.collection.boostfields.tmp=text_t^1.0
search.ranking.solr.collection.boostquery.tmp.1= search.ranking.solr.collection.boostquery.tmp.1=fuzzy_signature_unique_b:true^100000.0
search.ranking.solr.collection.boostfunction.tmp.1=recip(ms(NOW,last_modified),3.16e-11,1,1) search.ranking.solr.collection.boostfunction.tmp.1=recip(ms(NOW,last_modified),3.16e-11,1,1)
search.ranking.solr.collection.boostfunctionmode.tmp.1=multiply search.ranking.solr.collection.boostfunctionmode.tmp.1=multiply
search.ranking.solr.collection.boostname.tmp.2=_unused2 search.ranking.solr.collection.boostname.tmp.2=_intranet
search.ranking.solr.collection.boostfields.tmp.2=text_t^1.0 search.ranking.solr.collection.boostfields.tmp.2=text_t^2.0,url_paths_sxt^20.0,title^10000.0,h1_txt^10000.0,h2_txt^1000.0,synonyms_sxt^1.0
search.ranking.solr.collection.boostquery.tmp.2= search.ranking.solr.collection.boostquery.tmp.2=fuzzy_signature_unique_b:true^100000.0
search.ranking.solr.collection.boostfunction.tmp.2=div(add(1,references_i),add(url_chars_i,pow(clickdepth_i,3))) search.ranking.solr.collection.boostfunction.tmp.2=pow(url_chars_i,2)
search.ranking.solr.collection.boostfunctionmode.tmp.2=multiply search.ranking.solr.collection.boostfunctionmode.tmp.2=add
search.ranking.solr.collection.boostname.tmp.3=_unused3 search.ranking.solr.collection.boostname.tmp.3=_unused3
search.ranking.solr.collection.boostfields.tmp.3=text_t^1.0 search.ranking.solr.collection.boostfields.tmp.3=text_t^1.0
search.ranking.solr.collection.boostquery.tmp.3= search.ranking.solr.collection.boostquery.tmp.3=fuzzy_signature_unique_b:true^100000.0
search.ranking.solr.collection.boostfunction.tmp.3= search.ranking.solr.collection.boostfunction.tmp.3=div(add(1,references_i),add(url_chars_i,pow(clickdepth_i,3)))
search.ranking.solr.collection.boostfunctionmode.tmp.3=multiply search.ranking.solr.collection.boostfunctionmode.tmp.3=multiply
# the following values are used to identify duplicate content # the following values are used to identify duplicate content

@ -398,7 +398,7 @@ public final class QueryParams {
final SolrQuery params = new SolrQuery(); final SolrQuery params = new SolrQuery();
params.setQuery(this.queryGoal.collectionQueryString(this.indexSegment.fulltext().getDefaultConfiguration()).toString()); params.setQuery(this.queryGoal.collectionQueryString(this.indexSegment.fulltext().getDefaultConfiguration()).toString());
params.setParam("defType", "edismax"); params.setParam("defType", "edismax");
Ranking ranking = indexSegment.fulltext().getDefaultConfiguration().getRanking(0); Ranking ranking = indexSegment.fulltext().getDefaultConfiguration().getRanking(this.ranking.coeff_date == RankingProfile.COEFF_MAX ? 1 : (this.modifier.sitehash != null || this.modifier.sitehost != null) ? 2 : 0); // for a by-date ranking select different ranking profile
String bq = ranking.getBoostQuery(); String bq = ranking.getBoostQuery();
String bf = ranking.getBoostFunction(); String bf = ranking.getBoostFunction();
if (bq.length() > 0) params.setParam("bq", bq); // a boost query that moves double content to the back if (bq.length() > 0) params.setParam("bq", bq); // a boost query that moves double content to the back

Loading…
Cancel
Save