yacy_search_server/htroot/RankingSolr_p.html
orbiter 9d5d86cd03 Added filter query options to the ranking servlet /RankingSolr_p.html.
Filter queries are not actually related to ranking, but user requests
have pointed out that specific boost queries to move results to the end
of the result list are not sufficient. Such boost filters may be better
executed as actual filter and therefore such a filter can now be
statically applied to every search request. A typical use could be the
expression "http_unique_b:true AND www_unique_b:true" which uses the
recently introduced fields http_unique_b and www_unique_b which are true
only for one of the alternatives with/without http(s) and with/without
prefix 'www.' in host names.
2014-06-15 12:38:30 +02:00

107 lines
7.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Solr Ranking Configuration</title>
#%env/templates/metas.template%#
</head>
<body id="RankingSolr_p">
#%env/templates/header.template%#
#%env/templates/submenuRanking.template%#
<h2>Solr Ranking Configuration</h2>
<p>These are ranking attributes for Solr. This ranking applies for internal and remote (P2P or shard) Solr access.</p>
<form action="RankingSolr_p.html" method="get" enctype="multipart/form-data" accept-charset="UTF-8">
Select a profile:
<select id="profile" name="profileNr" onchange='submit()'>
#{profiles}#
<option value="#[nr]#" #(selected)#::selected="selected"#(/selected)#>#[name]#</option>
#{/profiles}#
</select>
</form>
<form class="dsearch" action="RankingSolr_p.html" method="post" enctype="multipart/form-data">
<fieldset>
<input type="hidden" name="profileNr" value="#[profileNr]#" />
<legend>Boost Function</legend>
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 <a href="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 <a href="http://wiki.apache.org/solr/FunctionQuery" target="_blank">Solr Function Query</a> documentation.
Example: to order by date, use "recip(ms(NOW,last_modified),3.16e-11,1,1)", to order by crawldepth, use "div(100,add(crawldepth_i,1))".
<dl>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"><label for="bf" id="bf_label">boost=</label></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;" id="bf_dd">
<input name="bf" id="bf" type="text" align="left" size="100" value="#[bf]#" />
</dd>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;">
<input type="submit" name="EnterBF" value="Set Boost Function" />
<input type="submit" name="ResetBF" value="Re-Set to default" />
</dd>
</dl>
</fieldset>
</form>
<form class="dsearch" action="RankingSolr_p.html" method="post" enctype="multipart/form-data">
<fieldset>
<input type="hidden" name="profileNr" value="#[profileNr]#" />
<legend>Boost Query</legend>
The Boost Query is attached to every query. Use this to statically boost specific content in the index.
Example: "fuzzy_signature_unique_b:true^100000.0f" means that documents, identified as 'double' are ranked very bad and appended to the end of all results (because the unique are ranked high).
To find appropriate fields for this query, see the <a href="IndexSchema_p.html">YaCy Solr Schema</a> and look for boolean values (with suffix '_b') or tags inside string fields (with suffix '_s' or '_sxt').
<dl>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"><label for="bq" id="bq_label">bq=</label></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;" id="bq_dd">
<input name="bq" id="bq" type="text" align="left" size="100" value="#[bq]#" />
</dd>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;">
<input type="submit" name="EnterBQ" value="Set Boost Query" />
<input type="submit" name="ResetBQ" value="Re-Set to default" />
</dd>
</dl>
</fieldset>
</form>
<form class="dsearch" action="RankingSolr_p.html" method="post" enctype="multipart/form-data">
<fieldset>
<input type="hidden" name="profileNr" value="#[profileNr]#" />
<legend>Filter Query</legend>
The Filter Query is attached to every query. Use this to statically add a selection criteria to reduce the set of results.
Example: "http_unique_b:true AND www_unique_b:true" will filter out all results where urls appear also with/without http(s) and/or with/without 'www.' prefix.
To find appropriate fields for this query, see the <a href="IndexSchema_p.html">YaCy Solr Schema</a>. Warning: bad expressions here will cause that you don't have any search result!
<dl>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"><label for="fq" id="fq_label">fq=</label></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;" id="fq_dd">
<input name="fq" id="fq" type="text" align="left" size="100" value="#[fq]#" />
</dd>
<dt style="width:260px;margin:0;padding:0;height:1.8em;"></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;">
<input type="submit" name="EnterFQ" value="Set Filter Query" />
<input type="submit" name="ResetFQ" value="Re-Set to default" />
</dd>
</dl>
</fieldset>
</form>
<form class="dsearch" action="RankingSolr_p.html" method="post" enctype="multipart/form-data">
<fieldset>
<input type="hidden" name="profileNr" value="#[profileNr]#" />
<legend>Solr Boosts</legend>
This is the set of searchable fields. Entries without a boost value are not searched. Boost values make hits inside the corresponding field more important.
<dl style="margin:0;">#{boosts}#
<dt style="width:260px;margin:0;padding:0;height:1.8em;"><label for="boost_#[field]#">#[field]#</label>
<input type="checkbox" id="#[field]#" name="#[field]#"#(checked)#:: checked="checked"#(/checked)#
onclick="if (document.getElementById('#[field]#').checked) document.getElementById('boost_#[field]#').value='1.0'; else document.getElementById('boost_#[field]#').value='';"/>
</dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;" id="boost_dd_#[field]#">
<input #(notinindexwarning)#::class="TableCellActive"#(/notinindexwarning)# name="boost_#[field]#" id="boost_#[field]#" type="text" align="right" size="10" value="#[boost]#" />
#(notinindexwarning)#::field not in local index (boost has no effect)#(/notinindexwarning)#&nbsp;#[comment]#
</dd>#{/boosts}#
<dt style="width:260px;margin:0;padding:0;height:1.8em;"></dt>
<dd style="width:360px;margin:0;padding:0;height:1.8em;float:left;display:inline;">
<input type="submit" name="EnterBoosts" value="Set Field Boosts" />
<input type="submit" name="ResetBoosts" value="Re-Set to default" />
</dd>
</dl>
</fieldset>
</form>
#%env/templates/footer.template%#
</body>
</html>