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