<%@ page import="org.apache.log4j.*" %> <%@ page import="com.ecyrd.jspwiki.*" %> <%@ page import="java.util.*" %> <%! public void jspInit() { wiki = WikiEngine.getInstance( getServletConfig() ); } Category log = Category.getInstance("JSPWikiSearch"); WikiEngine wiki; %> <% String query = request.getParameter("query"); Collection list = null; if( query != null ) { log.info("Searching for string "+query); list = wiki.findPages( query ); log.info("Found "+list.size()+" pages"); } %> <%=wiki.getApplicationName()%> Search <%@ include file="cssinclude.js" %>
<%@ include file="LeftMenu.jsp" %>

<%@ include file="LeftMenuFooter.jsp" %>

Find pages

<% if( list != null ) { %>

Search results for '<%=query%>'

<% if( list.size() > 0 ) { for( Iterator i = list.iterator(); i.hasNext(); ) { SearchResult pageref = (SearchResult) i.next(); %> <% } } else { %> <% } %>
Page Score
<%=pageref.getName()%> <%=pageref.getScore()%>
No results
<% } %>

Use '+' to require a word, '-' to forbid a word. For example:

          +java -emacs jsp
      
finds pages that MUST include the word "java", and MAY NOT include the word "emacs". Also, pages that contain the word "jsp" are ranked before the pages that don't.

All searches are case insensitive. If a page contains both forbidden and required keywords, it is not shown.