Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.index.lucene
Class LuceneQueryBuilder

    java.lang.Object
      org.crosswire.jsword.index.lucene.LuceneQueryBuilder

All Implemented Interfaces:
  QueryBuilder

    public final class LuceneQueryBuilder

extends Object
implements QueryBuilder

A query can have a optional range specifier and an optional blur specifier. The range specifier can be +[range], -[range] or just [range]. This must stand at the beginning of the query and may be surrounded by whitespace. The blur specifier is either ~ or ~n, where ~ means adjacent verses, but ~n means to blur by n verses.

Author:
  DM Smith
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`private static Pattern` | `BLUR_PATTERN` The pattern of a blur.
`private static Query` | `NULL_QUERY` A query that returns nothing.
`private static Pattern` | `RANGE_PATTERN` The pattern of a range.

Constructor Summary
`LuceneQueryBuilder()`

Method Summary
`Query` | `parse(String aSearch)` Construct a query from a string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RANGE_PATTERN

    private static final Pattern RANGE_PATTERN

  The pattern of a range. This is anything that is contained between a leading [] (but not containing a [ or ]), with a + or - optional prefix, perhaps surrounded by whitespace.

### BLUR_PATTERN

    private static final Pattern BLUR_PATTERN

  The pattern of a blur. A '~', optionally followed by a number, representing the number of verses.

### NULL_QUERY

    private static final Query NULL_QUERY

  A query that returns nothing.

Constructor Detail

### LuceneQueryBuilder

    public LuceneQueryBuilder()

Method Detail

### parse

    public Query parse(String aSearch)

  Description copied from interface: `QueryBuilder`
  Construct a query from a string.

  Specified by:
    `parse` in interface `QueryBuilder`
  Parameters:
    `aSearch` - The text to convert
  Returns:
    a query.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD