org.apache.lucene.benchmark.byTask.feeds

## Class AbstractQueryMaker

- java.lang.Object
- - org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

- All Implemented Interfaces:
    QueryMaker
  Direct Known Subclasses:
    EnwikiQueryMaker, FileBasedQueryMaker, ReutersQueryMaker, SimpleQueryMaker

      public abstract class AbstractQueryMaker
      extends java.lang.Object
      implements QueryMaker

  Abstract base query maker. Each query maker should just implement the `prepareQueries()` method.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Config` | `config`
    `protected int` | `qnum`
    `protected Query[]` | `queries`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractQueryMaker()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Query` | `makeQuery()` Create the next query
    `Query` | `makeQuery(int size)` Create the next query, of the given size.
    `protected int` | `nextQnum()`
    `protected abstract Query[]` | `prepareQueries()`
    `java.lang.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`

- - ### Field Detail

    - #### qnum

          protected int qnum

    - #### queries

          protected Query[] queries

    - #### config

          protected Config config

  - ### Constructor Detail

    - #### AbstractQueryMaker

          public AbstractQueryMaker()

  - ### Method Detail

    - #### 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`

    - #### prepareQueries

          protected abstract Query[] prepareQueries()
                                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setConfig

          public void setConfig(Config config)
                         throws java.lang.Exception

      Description copied from interface: `QueryMaker`
      Set the properties
      Specified by:
        `setConfig` in interface `QueryMaker`
      Throws:
        `java.lang.Exception`

    - #### printQueries

          public java.lang.String printQueries()

      Description copied from interface: `QueryMaker`
      Print the queries
      Specified by:
        `printQueries` in interface `QueryMaker`

    - #### makeQuery

          public Query makeQuery()
                          throws java.lang.Exception

      Description copied from interface: `QueryMaker`
      Create the next query
      Specified by:
        `makeQuery` in interface `QueryMaker`
      Throws:
        `java.lang.Exception`

    - #### nextQnum

          protected int nextQnum()

    - #### makeQuery

          public Query makeQuery(int size)
                          throws java.lang.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:
        `java.lang.Exception`

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