001    /**
002     * Copyright (c) 2000-2013 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 copy(Hits hits);
028    
029            public Document doc(int n);
030    
031            public String getCollatedSpellCheckResult();
032    
033            public Document[] getDocs();
034    
035            public int getLength();
036    
037            public Query getQuery();
038    
039            public String[] getQuerySuggestions();
040    
041            public String[] getQueryTerms();
042    
043            public float[] getScores();
044    
045            public float getSearchTime();
046    
047            public String[] getSnippets();
048    
049            public Map<String, List<String>> getSpellCheckResults();
050    
051            public long getStart();
052    
053            public float score(int n);
054    
055            public void setCollatedSpellCheckResult(String collatedSpellCheckResult);
056    
057            public void setDocs(Document[] docs);
058    
059            public void setLength(int length);
060    
061            public void setQuery(Query query);
062    
063            public void setQuerySuggestions(String[] querySuggestions);
064    
065            public void setQueryTerms(String[] queryTerms);
066    
067            public void setScores(float[] scores);
068    
069            public void setScores(Float[] scores);
070    
071            public void setSearchTime(float time);
072    
073            public void setSnippets(String[] snippets);
074    
075            public void setSpellCheckResults(
076                    Map<String, List<String>> spellCheckResults);
077    
078            public void setStart(long start);
079    
080            public String snippet(int n);
081    
082            public List<Document> toList();
083    
084    }