01 /*
02 * Search.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Rosen Marinov, 19/Apr/2002
13 *
14 */
15
16 package gate.creole.ir;
17
18 import java.util.List;
19
20 public interface Search{
21
22 /** Sets coprus in which will doing search operations. */
23 public void setCorpus(IndexedCorpus ic);
24
25 /** Search in corpus with this query. Unlimited result length.*/
26 public QueryResultList search(String query)
27 throws IndexException, SearchException;
28
29 /** Search in corpus with this query.
30 * Size of the result list is limited. */
31 public QueryResultList search(String query, int limit)
32 throws IndexException, SearchException;
33
34 /** Search in corpus with this query.
35 * In each QueryResult will be added values of theise fields.
36 * Result length is unlimited. */
37 public QueryResultList search(String query, List fieldNames)
38 throws IndexException, SearchException;
39
40 /** Search in corpus with this query.
41 * In each QueryResult will be added values of theise fields.
42 * Result length is limited. */
43 public QueryResultList search(String query, int limit, List fieldNames)
44 throws IndexException, SearchException;
45
46 }
|