org.hibernate.search.query.dsl.impl
Class ConnectedSpatialContext

java.lang.Object
  extended by org.hibernate.search.query.dsl.impl.ConnectedSpatialContext
All Implemented Interfaces:
QueryCustomization<SpatialContext>, SpatialContext

public class ConnectedSpatialContext
extends Object
implements SpatialContext

Author:
Emmanuel Bernard

Constructor Summary
ConnectedSpatialContext(QueryBuildingContext context, ConnectedQueryBuilder queryBuilder)
           
 
Method Summary
 SpatialContext boostedTo(float boost)
          Boost the query to a given value Most of the time positive float: - lower than 1 to diminish the weight - higher than 1 to increase the weight Could be negative but not unless you understand what is going on (advanced)
 SpatialContext filteredBy(org.apache.lucene.search.Filter filter)
          Filter the query results with the Filter instance
 SpatialMatchingContext onCoordinates(String field)
          An entity can have multiple Spatial annotations defining different sets of coordinates.
 SpatialMatchingContext onDefaultCoordinates()
          Used to create Spatial Queries on the default coordinates of an entity.
 SpatialContext withConstantScore()
          All results matching the query have a constant score equals to the boost FIXME is that true?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectedSpatialContext

public ConnectedSpatialContext(QueryBuildingContext context,
                               ConnectedQueryBuilder queryBuilder)
Method Detail

onCoordinates

public SpatialMatchingContext onCoordinates(String field)
Description copied from interface: SpatialContext
An entity can have multiple Spatial annotations defining different sets of coordinates. Each non-default Spatial instance has a name to identify it, use this method to pick one of these non-default coordinate fields.

Specified by:
onCoordinates in interface SpatialContext
Parameters:
field - The name of the set of coordinates to target for the query
Returns:

onDefaultCoordinates

public SpatialMatchingContext onDefaultCoordinates()
Description copied from interface: SpatialContext
Used to create Spatial Queries on the default coordinates of an entity. This is the one to use when Spatial is being used without defining a custom value for Spatial.name().

Specified by:
onDefaultCoordinates in interface SpatialContext
Returns:

boostedTo

public SpatialContext boostedTo(float boost)
Description copied from interface: QueryCustomization
Boost the query to a given value Most of the time positive float: - lower than 1 to diminish the weight - higher than 1 to increase the weight Could be negative but not unless you understand what is going on (advanced)

Specified by:
boostedTo in interface QueryCustomization<SpatialContext>

withConstantScore

public SpatialContext withConstantScore()
Description copied from interface: QueryCustomization
All results matching the query have a constant score equals to the boost FIXME is that true?

Specified by:
withConstantScore in interface QueryCustomization<SpatialContext>

filteredBy

public SpatialContext filteredBy(org.apache.lucene.search.Filter filter)
Description copied from interface: QueryCustomization
Filter the query results with the Filter instance

Specified by:
filteredBy in interface QueryCustomization<SpatialContext>


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved