org.compass.core
Interface CompassQueryBuilder.CompassMultiPhraseQueryBuilder

All Superinterfaces:
CompassQueryBuilder.ToCompassQuery
All Known Implementing Classes:
DefaultCompassQueryBuilder.DefaultCompassMultiPhraseQueryBuilder
Enclosing interface:
CompassQueryBuilder

public static interface CompassQueryBuilder.CompassMultiPhraseQueryBuilder
extends CompassQueryBuilder.ToCompassQuery

A query builder that constructs a phrase query. A phrase query is used to locate hits with terms within a certain distance from one another. The distance is also called slop. For example, you can use it to search for the values: java and london, which are near one another. "Near" is measured using the slop, and a value of 1 means that they will be in a distance of 1 other value from one another.

The slop defaults to 0.

Author:
kimchy

Method Summary
 CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object value)
          Adds a single value to the next position in the phrase.
 CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object[] values)
          Adds several values to the next position in the phrase.
 CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object[] values, int position)
          Adds several values to the position given in the phrase.
 CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object value, int position)
          Adds a single value to the position given in the phrase.
 CompassQueryBuilder.CompassMultiPhraseQueryBuilder setSlop(int slop)
          Sets the slop for the phrase query.
 
Methods inherited from interface org.compass.core.CompassQueryBuilder.ToCompassQuery
toQuery
 

Method Detail

setSlop

CompassQueryBuilder.CompassMultiPhraseQueryBuilder setSlop(int slop)
Sets the slop for the phrase query.


add

CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object value)
Adds a single value to the next position in the phrase.


add

CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object value,
                                                       int position)
Adds a single value to the position given in the phrase.


add

CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object[] values)
Adds several values to the next position in the phrase.


add

CompassQueryBuilder.CompassMultiPhraseQueryBuilder add(Object[] values,
                                                       int position)
Adds several values to the position given in the phrase.



Copyright (c) 2004-2008 The Compass Project.