<%@ page import="org.apache.lucene.document.Document, java.util.Enumeration, org.apache.lucene.document.Field, org.apache.lucene.index.IndexReader, java.io.IOException, java.net.URLEncoder, com.opensymphony.util.TextUtils, com.atlassian.jira.issue.index.DocumentConstants" %> <% IndexReader reader = null; String indexDir = null; if (session.getAttribute("index.dir") != null) { indexDir = (String)session.getAttribute("index.dir"); try { reader = IndexReader.open(indexDir); } catch (IOException e) { out.println("Error: Could not open index: " + e); } } int documentNumber = Integer.parseInt(request.getParameter("doc")); %> <webwork:text name="'admin.viewdocument.view.document'"/> <% if (reader != null) { %> : <%= indexDir %>
: <%= indexDir %>
: <%= reader.numDocs() %>
<% Document doc = reader.document(documentNumber); %>

<%= doc.get(DocumentConstants.ISSUE_KEY) %>
<% Enumeration fields = doc.fields(); while (fields.hasMoreElements()) { Field f = (Field) fields.nextElement(); %> <% } %>
<%= f.name() %> <%= f.isIndexed() %> <%= f.isStored() %> <%= f.isTokenized() %> <%= TextUtils.htmlEncode(f.stringValue()) %>

<% } %>