|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.indexer.lucene.LuceneSearch
public class LuceneSearch
Search implementation based on Lucene.
| Constructor Summary | |
|---|---|
LuceneSearch()
|
|
| Method Summary | |
|---|---|
int |
executeQuery(IQuery query)
Executes the given query, returning the number of hits. |
java.util.List<IResult> |
getAllResults()
Gets all results. |
java.util.List<IResult> |
getNextResults()
Gets the next results, at most pageSize results. |
int |
getNumHits()
Returns the number of hits for the current search after it has been executed. |
int |
getPageSize()
Gets the pageSize for getNextResults(). |
java.util.List<IResult> |
getSpecifiedResults(int startIndex,
int numResults)
Gets the specified range of results. |
boolean |
hasMoreResults()
Determine if there are more results. |
void |
initialize(java.util.Properties properties)
Initializes the Lucene index. |
void |
initialize(java.lang.String location)
Initializes the Lucene index. |
void |
postQuery()
Should be called when all results have been obtained. |
void |
preQuery()
Should be called before a query is executed. |
void |
setPageSize(int pageSize)
Sets the pageSize for getNextResults(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneSearch()
| Method Detail |
|---|
public void initialize(java.util.Properties properties)
throws IndexerException
initialize in interface ISearchproperties - configuration properties for this search object
IndexerException
public void initialize(java.lang.String location)
throws IndexerException
location - the location of the directory containing the index
IndexerExceptionpublic void setPageSize(int pageSize)
ISearch
setPageSize in interface ISearchpageSize - maximum number of results returned when getNextResults() is calledpublic int getPageSize()
ISearch
getPageSize in interface ISearchpublic int getNumHits()
ISearch
getNumHits in interface ISearch
public int executeQuery(IQuery query)
throws IndexerException
ISearch
executeQuery in interface ISearchquery - text of query to run
IndexerExceptionpublic boolean hasMoreResults()
ISearch
hasMoreResults in interface ISearch
public java.util.List<IResult> getNextResults()
throws IndexerException
ISearch
getNextResults in interface ISearchIndexerException
public java.util.List<IResult> getAllResults()
throws IndexerException
ISearch
getAllResults in interface ISearchIndexerException
public void preQuery()
throws IndexerException
ISearch
preQuery in interface ISearchIndexerException
public void postQuery()
throws IndexerException
ISearch
postQuery in interface ISearchIndexerException
public java.util.List<IResult> getSpecifiedResults(int startIndex,
int numResults)
throws IndexerException
ISearch
getSpecifiedResults in interface ISearchstartIndex - Index of the first result to fetchnumResults - Number of results to return
IndexerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||