A Boost Function can combine numeric values from the result document to produce a number which is either added or multiplied with the other boost value from the query result.
A Boost Function can combine numeric values from the result document to produce a number which is multiplied with the score value from the query result.
To see all available fields, see the <ahref="IndexSchema_p.html">YaCy Solr Schema</a> and look for numeric values (these are names with suffix '_i').
To see all available fields, see the <ahref="IndexSchema_p.html">YaCy Solr Schema</a> and look for numeric values (these are names with suffix '_i').
To find out which kind of operations are possible, see the <ahref="http://wiki.apache.org/solr/FunctionQuery">Solr Function Query</a> documentation.
To find out which kind of operations are possible, see the <ahref="http://wiki.apache.org/solr/FunctionQuery">Solr Function Query</a> documentation.
Example: to order by date, use "recip(ms(NOW,last_modified),3.16e-11,1,1)", to order by clickdepth, use "div(100,add(clickdepth_i,1))".
Example: to order by date, use "recip(rord(last_modified),1,1000,1000)", to order by clickdepth, use "div(100,add(clickdepth_i,1))".
if(bq.length()>0)post.put("bq",bq);// a boost query that moves double content to the back
if(bq.length()>0)post.put("bq",bq);
if(bf.length()>0)post.put(ranking.getMethod()==Ranking.BoostFunctionMode.add?"bf":"boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29
if(bf.length()>0)post.put("boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29
if(!post.containsKey("bq")&&bq.length()>0)post.put("bq",bq);// a boost query that moves double content to the back
if(bq.length()>0)post.put("bq",bq);
if(!(post.containsKey("bf")||post.containsKey("boost"))&&bf.length()>0)post.put(ranking.getMethod()==Ranking.BoostFunctionMode.add?"bf":"boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29
if(bf.length()>0)post.put("boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29
Rankingranking=indexSegment.fulltext().getDefaultConfiguration().getRanking(rankingProfile);// for a by-date ranking select different ranking profile
//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
Stringbq=ranking.getBoostQuery();
Stringbq=ranking.getBoostQuery();
Stringbf=ranking.getBoostFunction();
Stringbf=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);
if(bf.length()>0)params.setParam(ranking.getMethod()==Ranking.BoostFunctionMode.add?"bf":"boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29
if(bf.length()>0)params.setParam("boost",bf);// a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29