Class AbstractQueryMaker
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
-
- All Implemented Interfaces:
QueryMaker
- Direct Known Subclasses:
EnwikiQueryMaker,FileBasedQueryMaker,ReutersQueryMaker,SimpleQueryMaker,SpatialFileQueryMaker
public abstract class AbstractQueryMaker extends Object implements QueryMaker
Abstract base query maker. Each query maker should just implement theprepareQueries()method.
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryMaker()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description QuerymakeQuery()Create the next queryQuerymakeQuery(int size)Create the next query, of the given size.protected intnextQnum()protected abstract Query[]prepareQueries()StringprintQueries()Print the queriesvoidresetInputs()Reset inputs so that the test run would behave, input wise, as if it just started.voidsetConfig(Config config)Set the properties
-
-
-
Method Detail
-
resetInputs
public void resetInputs() throws ExceptionDescription copied from interface:QueryMakerReset inputs so that the test run would behave, input wise, as if it just started.- Specified by:
resetInputsin interfaceQueryMaker- Throws:
Exception
-
setConfig
public void setConfig(Config config) throws Exception
Description copied from interface:QueryMakerSet the properties- Specified by:
setConfigin interfaceQueryMaker- Throws:
Exception
-
printQueries
public String printQueries()
Description copied from interface:QueryMakerPrint the queries- Specified by:
printQueriesin interfaceQueryMaker
-
makeQuery
public Query makeQuery() throws Exception
Description copied from interface:QueryMakerCreate the next query- Specified by:
makeQueryin interfaceQueryMaker- Throws:
Exception
-
nextQnum
protected int nextQnum()
-
makeQuery
public Query makeQuery(int size) throws Exception
Description copied from interface:QueryMakerCreate the next query, of the given size.- Specified by:
makeQueryin interfaceQueryMaker- Parameters:
size- the size of the query - number of terms, etc.- Throws:
Exception- if cannot make the query, or if size > 0 was specified but this feature is not supported.
-
-