<% //Print title w/ link
if (results.get(i).getFieldValue("meta_reader") != null)
out.print(""
+ results.get(i).getFieldValue("meta_title")
+ "");
else // Title w/o link
out.print(results.get(i).getFieldValue("meta_title"));
//Note : meta_title is allocated with EDEAL object's title in IndexSearch.java
//basing on object's ID. For non EDEAL objects null is replaced by "[x]"
%>
<% //Print text field(s)
String str = results.get(i).getFieldValue("all").toString();
//Add highlighting
if ((highlight.get(results.get(i).getFieldValue("id")) != null)
&& highlight.get(results.get(i).getFieldValue("id")).get("all") != null)
{
for (String hl : highlight.get(results.get(i).getFieldValue("id")).get("all")) {
str = str.replace(hl, "" + hl + "");
}
}
int len=str.length();
str=str.substring(0,(len<250)?len:250);
int startSubstr=(str.startsWith("["))?1:0;
int lenSubstr=(str.endsWith("]"))?1:0;
%>
<%=str.substring(startSubstr,str.length()-lenSubstr)%>
|