Skip to content

Commit

Permalink
RinkingSolr_p: include warning if boost field not in local index
Browse files Browse the repository at this point in the history
  • Loading branch information
reger committed Apr 26, 2013
1 parent e1bfe9d commit 0a9b099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htroot/RankingSolr_p.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ <h2>Solr Ranking Configuration</h2>
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 name="boost_#[field]#" id="boost_#[field]#" type="text" align="right" size="10" value="#[boost]#" />
<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)#
</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;">
Expand Down
2 changes: 2 additions & 0 deletions htroot/RankingSolr_p.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ public static serverObjects respond(@SuppressWarnings("unused") final RequestHea
if (boost == null || boost.floatValue() <= 0.0f) {
prop.put("boosts_" + i + "_checked", 0);
prop.put("boosts_" + i + "_boost", "");
prop.put("boosts_" + i + "_notinindexwarning", "0");
} else {
prop.put("boosts_" + i + "_checked", 1);
prop.put("boosts_" + i + "_boost", boost.toString());
prop.put("boosts_" + i + "_notinindexwarning", (sb.index.fulltext().getDefaultConfiguration().contains(field.name())? "0" : "1") );
}
i++;
}
Expand Down

0 comments on commit 0a9b099

Please sign in to comment.