Results.java revision 1461
340N/A * The contents of this file are subject to the terms of the 340N/A * Common Development and Distribution License (the "License"). 340N/A * You may not use this file except in compliance with the License. 340N/A * language governing permissions and limitations under the License. 340N/A * When distributing Covered Code, include this CDDL HEADER in each 340N/A * If applicable, add the following below this CDDL HEADER, with the 340N/A * fields enclosed by brackets "[]" replaced with your own identifying 340N/A * information: Portions Copyright [yyyy] [name of copyright owner] 340N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 340N/A * Portions Copyright 2011 Jens Elkner. 340N/A * @author Chandan slightly rewritten by Lubos Kosco 340N/A // Util class, should not be constructed 434N/A * Create a has map keyed by the directory of the document found. 340N/A * @param searcher searcher to use. 340N/A * @param hits hits produced by the given searcher's search 340N/A * @param startIdx the index of the first hit to check 340N/A * @param stopIdx the index of the last hit to check 340N/A * @return a (directory, hitDocument) hashmap 340N/A * @throws CorruptIndexException 368N/A // Grrrrrrrrrrrrr - TagFilter takes Readers, only!!!! 375N/A // Why? Is it CS sensible? 340N/A * Prints out results in html form. The following search helper fields are 459N/A * required to be properly initialized: 460N/A * <li>{@link SearchHelper#dataRoot}</li> 460N/A * <li>{@link SearchHelper#contextPath}</li> 460N/A * <li>{@link SearchHelper#searcher}</li> 459N/A * <li>{@link SearchHelper#hits}</li> 459N/A * <li>{@link SearchHelper#historyContext} (ignored if {@code null})</li> 340N/A * <li>{@link SearchHelper#sourceContext} (ignored if {@code null})</li> 459N/A * <li>{@link SearchHelper#summerizer} (if sourceContext is not {@code null})</li> 459N/A * <li>{@link SearchHelper#sourceRoot} (if sourceContext or historyContext 459N/A * is not {@code null})</li> 459N/A * @param out write destination 459N/A * @param sh search helper which has all required fields set 340N/A * @param start index of the first hit to print 340N/A * @param end index of the last hit to print 340N/A * @throws HistoryException 420N/A * @throws ClassNotFoundException 340N/A out.
write(
"<tr class=\"rsd\"><td colspan=\"3\" class=\"rsdl\"><a href=\"");
340N/A // FIXME use Highlighter from lucene contrib here, 340N/A // instead of summarizer, we'd also get rid of 340N/A // apache lucene in whole source ...