org.apache.lucene.benchmark.byTask.feeds
Class SimpleQueryMaker

java.lang.Object
  extended byorg.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
All Implemented Interfaces:
QueryMaker
Direct Known Subclasses:
SimpleSloppyPhraseQueryMaker

public class SimpleQueryMaker
extends Object
implements QueryMaker

A QueryMaker that makes queries for a collection created using SimpleDocMaker.


Constructor Summary
SimpleQueryMaker()
           
 
Method Summary
 Query makeQuery()
          Create the next query
 Query makeQuery(int size)
          Create the next query, of the given size.
protected  Query[] prepareQueries()
          Prepare the queries for this test.
 String printQueries()
          Print the queries
 void resetInputs()
          Reset inputs so that the test run would behave, input wise, as if it just started.
 void setConfig(Config config)
          Set the properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleQueryMaker

public SimpleQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Prepare the queries for this test. Extending classes can overide this method for preparing different queries.

Returns:
prepared queries.
Throws:
Exception - if canot prepare the queries.

makeQuery

public Query makeQuery()
                throws Exception
Description copied from interface: QueryMaker
Create the next query

Specified by:
makeQuery in interface QueryMaker
Throws:
Exception

setConfig

public void setConfig(Config config)
               throws Exception
Description copied from interface: QueryMaker
Set the properties

Specified by:
setConfig in interface QueryMaker
Throws:
Exception

resetInputs

public void resetInputs()
Description copied from interface: QueryMaker
Reset inputs so that the test run would behave, input wise, as if it just started.

Specified by:
resetInputs in interface QueryMaker

printQueries

public String printQueries()
Description copied from interface: QueryMaker
Print the queries

Specified by:
printQueries in interface QueryMaker

makeQuery

public Query makeQuery(int size)
                throws Exception
Description copied from interface: QueryMaker
Create the next query, of the given size.

Specified by:
makeQuery in interface QueryMaker
Parameters:
size - the size of the query - number of terms, etc.
Throws:
Exception


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.