001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.search;
016    
017    import java.io.Serializable;
018    
019    import java.util.List;
020    import java.util.Map;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    public interface Hits extends Serializable {
026    
027            public void addGroupedHits(String groupValue, Hits hits);
028    
029            public void addStatsResults(StatsResults statsResults);
030    
031            public void copy(Hits hits);
032    
033            public Document doc(int n);
034    
035            public String getCollatedSpellCheckResult();
036    
037            public Document[] getDocs();
038    
039            public Map<String, Hits> getGroupedHits();
040    
041            public int getLength();
042    
043            public Query getQuery();
044    
045            public String[] getQuerySuggestions();
046    
047            public String[] getQueryTerms();
048    
049            public float[] getScores();
050    
051            public float getSearchTime();
052    
053            public String[] getSnippets();
054    
055            public Map<String, List<String>> getSpellCheckResults();
056    
057            public long getStart();
058    
059            public Map<String, StatsResults> getStatsResults();
060    
061            public boolean hasGroupedHits();
062    
063            public float score(int n);
064    
065            public void setCollatedSpellCheckResult(String collatedSpellCheckResult);
066    
067            public void setDocs(Document[] docs);
068    
069            public void setLength(int length);
070    
071            public void setQuery(Query query);
072    
073            public void setQuerySuggestions(String[] querySuggestions);
074    
075            public void setQueryTerms(String[] queryTerms);
076    
077            public void setScores(float[] scores);
078    
079            public void setSearchTime(float time);
080    
081            public void setSnippets(String[] snippets);
082    
083            public void setSpellCheckResults(
084                    Map<String, List<String>> spellCheckResults);
085    
086            public void setStart(long start);
087    
088            public String snippet(int n);
089    
090            public List<Document> toList();
091    
092    }