|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.lucene.LuceneSearchThread
public class LuceneSearchThread
Given a boolean query, it is translated into one or more AND normalized queries. For example: (A|B)C is translated into AC and BC. For each such query an instance of LuceneSearchThread is created. Here, each query is issued separately and results are submitted to main instance of LuceneSearch.
| Field Summary | |
|---|---|
boolean |
finished
Indicates if searching process is finished. |
| Constructor Summary | |
|---|---|
LuceneSearchThread()
|
|
| Method Summary | |
|---|---|
String |
getQuery()
Gets the query. |
List<Pattern> |
next(int numberOfResults)
This method returns a list containing instances of Pattern |
boolean |
search(String query,
int patternWindow,
String indexLocation,
String corpusToSearchIn,
String annotationSetToSearchIn,
LuceneSearcher luceneSearcher)
This method collects the necessary information from lucene and uses it when the next method is called |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean finished
| Constructor Detail |
|---|
public LuceneSearchThread()
| Method Detail |
|---|
public boolean search(String query,
int patternWindow,
String indexLocation,
String corpusToSearchIn,
String annotationSetToSearchIn,
LuceneSearcher luceneSearcher)
throws SearchException
limit - limit indicates the number of patterns to retrievequery - query supplied by the userpatternWindow - number of tokens to refer on left and right
contextindexLocation - location of the index the searcher should
search inluceneSearcher - an instance of lucene search from where the
instance of SearchThread is invoked
SearchException
public List<Pattern> next(int numberOfResults)
throws Exception
numberOfResults - the number of results to fetch
Exceptionpublic String getQuery()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||