# Class: PhraseQuery

## helma.Search.PhraseQuery(field, str)

Instances of this class represent a phrase query.

## Constructor

#### new PhraseQuery(field, str)

Constructs a new helma.Search.PhraseQuery instance that wraps a Lucene Phrase Query object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`field` | String | The name of the field
`str` | String | The phrase query string

Source:
  - helma/Search.js, line 974

##### Returns:

A newly created PhraseQuery instance

### Extends

- helma.Search.Query

### Members

#### query :org.apache.lucene.search.PhraseQuery

Contains the wrapped PhraseQuery instance

##### Type:

- org.apache.lucene.search.PhraseQuery

Overrides:
  - helma.Search.Query#query
Source:
  - helma/Search.js, line 979

### Methods

#### addTerm()

add a term to the end of the phrase query

Source:
  - helma/Search.js, line 984

#### getBoost()

Returns the boost factor of this query.

Inherited From:
  - helma.Search.Query#getBoost
Source:
  - helma/Search.js, line 845

#### getQuery()

Returns the wrapped Lucene Query object.

Inherited From:
  - helma.Search.Query#getQuery
Source:
  - helma/Search.js, line 832

##### Returns:

The wrapped query object

#### setBoost(fact)

Sets the boost factor of this query clause to the given number. Documents matching this query will have their score multiplied with the given factor

##### Parameters:

Name | Type | Description
--- | --- | ---
`fact` | Number | The factor to multiply the score of matching documents with.

Inherited From:
  - helma.Search.Query#setBoost
Source:
  - helma/Search.js, line 857