The Query package provides JSword with the ability to construct a search request against an Index. The specific syntax of a query is an implementation detail.
The search request consists of one of the following:
Query
: search for a single atom, orBinaryQuery
: search consisting of a left query and a right query joined by an operator, orNullQuery
: search for nothing, returning nothing.Note: an atom is the smallest unit of search that can be handled directly by the index.
The typical binary operators are:
AndQuery
: All that is common between the left and the right.OrQuery
: All that is in both the left and the right.AndNotQuery
: All that is in the left minus what is in the right.The uncommon binary operators are:
RangeQuery
: There are two types of ranges: within a and without.
BlurQuery
: Like an AndQuery except that the right query is first blurred by a requested amount.
The QueryBuilder
takes a search request as a string and generates a Query from it.
The primary characteristic of the Query builder is to determine the atoms of search and construct
a Query appropriately.
Beyond the above queries, most modern query languages allow for specialized
searching using notation that is peculiar to it. The QueryDecorator
allows for phrases to be decorated in a way that is appropriate for the Index.
The following are the decorations that are currently defined: