gate.creole.ir.lucene
Class LuceneSearch

java.lang.Object
  extended bygate.creole.ir.lucene.LuceneSearch
All Implemented Interfaces:
Search

public class LuceneSearch
extends Object
implements Search

This class represents Lucene implementation of serching in index.


Field Summary
private  IndexedCorpus indexedCorpus
          An instance of indexed corpus
 
Constructor Summary
LuceneSearch()
           
 
Method Summary
 QueryResultList search(String query)
          Search in corpus with this query.
 QueryResultList search(String query, int limit)
          Search in corpus with this query.
 QueryResultList search(String query, int limit, List fieldNames)
          Search in corpus with this query.
 QueryResultList search(String query, List fieldNames)
          Search in corpus with this query.
 void setCorpus(IndexedCorpus ic)
          Set the indexed corpus resource for searching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indexedCorpus

private IndexedCorpus indexedCorpus
An instance of indexed corpus

Constructor Detail

LuceneSearch

public LuceneSearch()
Method Detail

setCorpus

public void setCorpus(IndexedCorpus ic)
Set the indexed corpus resource for searching.

Specified by:
setCorpus in interface Search

search

public QueryResultList search(String query)
                       throws IndexException,
                              SearchException
Search in corpus with this query. Unlimited result length.

Specified by:
search in interface Search
Throws:
IndexException
SearchException

search

public QueryResultList search(String query,
                              int limit)
                       throws IndexException,
                              SearchException
Search in corpus with this query. Size of the result list is limited.

Specified by:
search in interface Search
Throws:
IndexException
SearchException

search

public QueryResultList search(String query,
                              List fieldNames)
                       throws IndexException,
                              SearchException
Search in corpus with this query. In each QueryResult will be added values of theise fields. Result length is unlimited.

Specified by:
search in interface Search
Throws:
IndexException
SearchException

search

public QueryResultList search(String query,
                              int limit,
                              List fieldNames)
                       throws IndexException,
                              SearchException
Search in corpus with this query. In each QueryResult will be added values of theise fields. Result length is limited.

Specified by:
search in interface Search
Throws:
IndexException
SearchException