org.apache.lucene.demo.xmlparser.index.jsp Maven / Gradle / Ivy
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
import="org.apache.lucene.search.*,org.apache.lucene.document.*"
pageEncoding="ISO-8859-1"%>
XML Query Parser demo
Job Search
<%
// Load form variables
String description=request.getParameter("description");
String type=request.getParameter("type");
String salaryRange=request.getParameter("salaryRange");
%>
<%
Document[] results=(Document[])request.getAttribute("results");
if(results!=null)
{
%>
Type
Location
Salary
Description
<%
for (int i = 0; i < results.length; i++)
{
Document doc = results[i];
%>
<%=doc.get("type")%>
<%=doc.get("location")%>
<%=doc.get("salary")%>,000
<%=doc.get("description")%>
<%
}
%>
<%
}//end if has results
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy