From 0a9b0992f3f8cf5a7cea1553c78a3d57636fad31 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 26 Apr 2013 02:26:38 +0200 Subject: [PATCH] RinkingSolr_p: include warning if boost field not in local index --- htroot/RankingSolr_p.html | 3 ++- htroot/RankingSolr_p.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htroot/RankingSolr_p.html b/htroot/RankingSolr_p.html index d19398a00..255f73049 100644 --- a/htroot/RankingSolr_p.html +++ b/htroot/RankingSolr_p.html @@ -70,7 +70,8 @@ onclick="if (document.getElementById('#[field]#').checked) document.getElementById('boost_#[field]#').value='1.0'; else document.getElementById('boost_#[field]#').value='';"/>
- + + #(notinindexwarning)#::field not in local index (boost has no effect)#(/notinindexwarning)#
#{/boosts}#
diff --git a/htroot/RankingSolr_p.java b/htroot/RankingSolr_p.java index 9d6efabaf..fe2ac34ae 100644 --- a/htroot/RankingSolr_p.java +++ b/htroot/RankingSolr_p.java @@ -114,9 +114,11 @@ public class RankingSolr_p { 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++; }