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