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