public class LuceneSearchThread extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
finished
Indicates if searching process is finished.
|
Constructor and Description |
---|
LuceneSearchThread() |
Modifier and Type | Method and Description |
---|---|
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
|
public boolean search(String query, int patternWindow, String indexLocation, String corpusToSearchIn, String annotationSetToSearchIn, LuceneSearcher luceneSearcher) throws SearchException
query
- 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 invokedSearchException
public List<Pattern> next(int numberOfResults) throws Exception
numberOfResults
- the number of results to fetchException
public String getQuery()
Copyright © 2024 GATE. All rights reserved.