1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.search;
16  
17  import java.io.Serializable;
18  
19  import java.util.List;
20  
21  /**
22   * <a href="Hits.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   */
26  public interface Hits extends Serializable {
27  
28      public Document doc(int n);
29  
30      public Document[] getDocs();
31  
32      public int getLength();
33  
34      public String[] getQueryTerms();
35  
36      public float[] getScores();
37  
38      public float getSearchTime();
39  
40      public String[] getSnippets();
41  
42      public long getStart();
43  
44      public float score(int n);
45  
46      public void setDocs(Document[] docs);
47  
48      public void setLength(int length);
49  
50      public void setQueryTerms(String[] queryTerms);
51  
52      public void setScores(float[] scores);
53  
54      public void setScores(Float[] scores);
55  
56      public void setSearchTime(float time);
57  
58      public void setSnippets(String[] snippets);
59  
60      public void setStart(long start);
61  
62      public String snippet(int n);
63  
64      public List<Document> toList();
65  
66  }