[opencms-dev] Lucene Search Engine Problems
Kamrul Islam
Kamrul.Islam at icr.ac.uk
Tue Jun 8 11:22:00 CEST 2004
Hi
I am using opencms 5.01 running on tomcat 4.1.30 and installed the
lucene module from the site. Can someone please help me set it up as I
am getting a blank page when doing a search.
I have got a search field that passes the value to a search jsp page
which has the lucene include taken from the documentation. It comes back
with a blank page? I have followed the documentation in setting up the
module.
I also need help with implementing navigation from the opencms site. I
have been able to create a menu 2 levels down but it does not work when
I try another level down.
############ CODE ####################
ArrayList nav1pages =
CmsJspNavBuilder.getNavigationForFolder(cmsObject, uri, 1);
Iterator i = nav1pages.iterator();
while (i.hasNext()) {
CmsJspNavElement nav1 = (CmsJspNavElement)i.next();
String target1 = nav1.getResourceName();
if (nav1.isFolderLink()) {
//if (level < 1) continue; - I am not sure what this
does?
target1 = target1 + "index.html";
}
if (! uri.equals(target1)) {
target1 = cms.link(target1);
%><tr><td><a class="nav" href="<%= target1 %>"><span
class="nav"><!--htdig_noindex--><%= nav1.getNavText()
%><!--/htdig_noindex--></span></a></td></tr>
<%
} else {
%>
<tr><td><span class="navcurrent"><span
class="nav"><!--htdig_noindex--><%= nav1.getNavText()
%><!--/htdig_noindex--></span></span></td></tr>
<%
}
if ((level == 2) &&
(currentnav.getParentFolderName().equals(nav1.getResourceName()))) {
ArrayList nav2pages =
CmsJspNavBuilder.getNavigationForFolder(cmsObject, uri, level);
Iterator j = nav2pages.iterator();
while (j.hasNext()) {
CmsJspNavElement nav2 =
(CmsJspNavElement)j.next();
String target2 = nav2.getResourceName();
if (nav2.isFolderLink()) {
target2 = target2 + "index.html";
}
if (! uri.equals(target2)) {
target2 = cms.link(target2);
%>
<tr><td class="nav2"><a class="nav2" href="<%= target2 %>"><span
class="nav2"><!--htdig_noindex--><%= nav2.getNavText()
%><!--/htdig_noindex--></span></a></td></tr>
<%
} else {
%>
<tr><td class="nav2"><span class="nav2current"><span
class="nav2"><!--htdig_noindex--><%= nav2.getNavText()
%><!--/htdig_noindex--></span></span></td></tr>
<%
}
/*NEW CODE This is with the while loop above */
if ((level == 3) &&
(currentnav.getParentFolderName().equals(nav2.getResourceName()))) {
ArrayList nav3pages =
CmsJspNavBuilder.getNavigationForFolder(cmsObject, uri, level);
Iterator k = nav3pages.iterator();
while (k.hasNext()) {
CmsJspNavElement nav3 =
(CmsJspNavElement)k.next();
String target3 = nav3.getResourceName();
if (nav3.isFolderLink()) {
target3 = target3 + "index.html";
}
if (! uri.equals(target3)) {
target3 = cms.link(target3);
%>
<tr><td><%= nav3.getNavText()
%></td></tr>
<%
}
}
}
/*NEW CODE*/
}
}
}
######################################
Any help will be appreciated.
More information about the opencms-dev
mailing list