public class ConnectedSpatialContext extends Object implements SpatialContext
Constructor and Description |
---|
ConnectedSpatialContext(QueryBuildingContext context) |
Modifier and Type | Method and Description |
---|---|
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(Filter filter)
Filter the query results with the Filter instance
|
SpatialMatchingContext |
onField(String fieldName)
Used to select the spatial field/coordinates used for this query.
|
SpatialContext |
withConstantScore()
All results matching the query have a constant score equals to the boost
FIXME is that true?
|
WithinContext |
within(double distance,
Unit unit) |
public ConnectedSpatialContext(QueryBuildingContext context)
public SpatialMatchingContext onField(String fieldName)
SpatialContext
Spatial.COORDINATES_DEFAULT_FIELD
) is used.
Note: 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 specify the targeted coordinate field.
onField
in interface SpatialContext
fieldName
- The name of the set of coordinates to target for the querySpatialMatchingContext
instance for continuationpublic SpatialContext boostedTo(float boost)
QueryCustomization
boostedTo
in interface QueryCustomization<SpatialContext>
boost
- the value to use as boostpublic SpatialContext withConstantScore()
QueryCustomization
withConstantScore
in interface QueryCustomization<SpatialContext>
public SpatialContext filteredBy(Filter filter)
QueryCustomization
filteredBy
in interface QueryCustomization<SpatialContext>
filter
- the filter to usepublic WithinContext within(double distance, Unit unit)
within
in interface SpatialMatchingContext
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved