## helma.Search.BooleanQuery

    Object
       |
       +--helma.Search.Query
             |
             +--helma.Search.BooleanQuery

This class represents a Boolean Query, providing various methods for combining other Query instances using boolean operators.
Defined in Search.js

SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods

Constructor Summary
`helma.Search.BooleanQuery(field, str, clause, analyzer)` Creates a new instance of helma.Search.BooleanQuery

Properties Summary
`org.apache.lucene.search.BooleanQuery` | `query` Contains the wrapped BooleanQuery instance

Methods Summary
`void` | `addQuery(<helma.Search.Query> q, <String> clause)` Adds an additional query clause to this query.
`void` | `addTerm(<String|Array> field, <String> str, <String> clause, <org.apache.lucene.analysis.Analyzer> analyzer)` Adds a term to the wrapped query object.

Methods inherited from prototype helma.Search.Query
`getQuery, getBoost, setBoost`

Constructor Detail

### helma.Search.BooleanQuery

    helma.Search.BooleanQuery(field, str, clause, analyzer)

Creates a new instance of helma.Search.BooleanQuery

Parameters:

`String` - name of the field

`String` - query string

Returns:

Object BooleanQuery object

Properties Detail

### query

    org.apache.lucene.search.BooleanQuery query

Contains the wrapped BooleanQuery instance

Method Detail

### addQuery

    void addQuery(<helma.Search.Query> q, <String> clause)

Adds an additional query clause to this query.

Parameters:

`q` - The query to add

`clause` - Boolean clause ("or", "not", or "and", default is "and")

### addTerm

    void addTerm(<String|Array> field, <String> str, <String> clause, <org.apache.lucene.analysis.Analyzer> analyzer)

Adds a term to the wrapped query object. This method can be called with two, three or four arguments, eg.:

    addTerm("fieldname", "querystring")
     addTerm("fieldname", "querystring", "and")
     addTerm("fieldname", "querystring", helma.Search.getAnalyzer("de"))
     addTerm("fieldname", "querystring", "not", helma.Search.getAnalyzer("simple"))

Parameters:

`field` - Either a String or an Array containing Strings that determine the index field(s) to match

`str` - Query string to match

`clause` - Boolean clause ("or", "not" or "and", default is "and")

`analyzer` - An analyzer to use

SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods

Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007