mirror of https://github.com/apache/lucene.git
SOLR-3711: Truncate long strings in /browse field facets
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1648041 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a7385bc29
commit
9159eede8f
|
@ -567,6 +567,8 @@ Other Changes
|
|||
* SOLR-6855: bin/solr -e dih launches, but has some path cruft issues preventing some of the
|
||||
imports don't work (Hossman, Timothy Potter)
|
||||
|
||||
* SOLR-3711: Truncate long strings in /browse field facets (ehatcher)
|
||||
|
||||
================== 4.10.3 ==================
|
||||
|
||||
Bug Fixes
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.velocity.VelocityContext;
|
|||
import org.apache.velocity.app.VelocityEngine;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
import org.apache.velocity.tools.generic.ComparisonDateTool;
|
||||
import org.apache.velocity.tools.generic.DisplayTool;
|
||||
import org.apache.velocity.tools.generic.EscapeTool;
|
||||
import org.apache.velocity.tools.generic.ListTool;
|
||||
import org.apache.velocity.tools.generic.MathTool;
|
||||
|
@ -87,6 +88,7 @@ public class VelocityResponseWriter implements QueryResponseWriter {
|
|||
context.put("math", new MathTool());
|
||||
context.put("number", new NumberTool());
|
||||
context.put("sort", new SortTool());
|
||||
context.put("display", new DisplayTool());
|
||||
|
||||
context.put("engine", engine); // for $engine.resourceExists(...)
|
||||
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
<span class="facet-field">$field.name</span>
|
||||
<ul>
|
||||
#foreach($facet in $field.values)
|
||||
<li><a href="#url_for_facet_filter($field.name, $facet.name)">#if($facet.name!=$null)$facet.name#else<em>missing</em>#end</a> ($facet.count)</li>
|
||||
<li>
|
||||
<a href="#url_for_facet_filter($field.name, $facet.name)" title="$esc.html($facet.name)">
|
||||
#if($facet.name!=$null)$esc.html($display.truncate($facet.name,20))#else<em>missing</em>#end</a> ($facet.count)
|
||||
</li>
|
||||
#end
|
||||
</ul>
|
||||
#end ## end if > 0
|
||||
|
|
Loading…
Reference in New Issue