org.compass.core
Interface CompassQueryBuilder.CompassQuerySpanNearBuilder

All Known Implementing Classes:
DefaultCompassQueryBuilder.DefaultCompassQuerySpanNearBuilder
Enclosing interface:
CompassQueryBuilder

public static interface CompassQueryBuilder.CompassQuerySpanNearBuilder

A span near query builder. Matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.

slop defauls to 0 and inOrder defaults to true.

Author:
kimchy

Method Summary
 CompassQueryBuilder.CompassQuerySpanNearBuilder add(CompassQuery.CompassSpanQuery query)
          Adds a single span query to the next span match.
 CompassQueryBuilder.CompassQuerySpanNearBuilder add(Object value)
          Adds a single value to the next span match.
 CompassQueryBuilder.CompassQuerySpanNearBuilder setInOrder(boolean inOrder)
          Sets if the spans need to be in order.
 CompassQueryBuilder.CompassQuerySpanNearBuilder setSlop(int slop)
          Sets the slop which is the distance allowed between spans.
 CompassQuery.CompassSpanQuery toQuery()
          Returns the span near generated query.
 

Method Detail

setSlop

CompassQueryBuilder.CompassQuerySpanNearBuilder setSlop(int slop)
Sets the slop which is the distance allowed between spans.


setInOrder

CompassQueryBuilder.CompassQuerySpanNearBuilder setInOrder(boolean inOrder)
Sets if the spans need to be in order.


add

CompassQueryBuilder.CompassQuerySpanNearBuilder add(Object value)
Adds a single value to the next span match.


add

CompassQueryBuilder.CompassQuerySpanNearBuilder add(CompassQuery.CompassSpanQuery query)
Adds a single span query to the next span match.


toQuery

CompassQuery.CompassSpanQuery toQuery()
Returns the span near generated query.



Copyright (c) 2004-2009 The Compass Project.