| org.compass.core.CompassQuery
All known Subclasses: org.compass.core.impl.DefaultCompassQuery,
Inner Class :public static interface CompassSpanQuery extends CompassQuery | |
Inner Class :final public static class SortDirection extends Parameter | |
Inner Class :final public static class SortPropertyType extends Parameter | |
Inner Class :final public static class SortImplicitType extends Parameter | |
addSort | CompassQuery addSort(String propertyName)(Code) | | Adds sorting on the given property name. The type of sorting will be
identified automatically (though it is preferable to specify it in
advance using the
CompassQuery.addSort(String,SortPropertyType) .
Note that the property must be UN_TOKENIZED , and stored.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: propertyName - The property name that will be sorted. |
addSort | CompassQuery addSort(String propertyName, SortDirection direction)(Code) | | Adds sorting on the given property name. The type of sorting will be
identified automatically (though it is preferable to specify it in
advance using the
CompassQuery.addSort(String,SortPropertyType) .
Note that the property must be UN_TOKENIZED , and stored.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: propertyName - The property name that will be sorted. Parameters: direction - The direction for the sorting. the query |
addSort | CompassQuery addSort(String propertyName, SortPropertyType type)(Code) | | Adds sorting on the given property name, and using the given property
type. Note that INT has the lowest memorty requirements
and STRING the most.
Note that the property must be UN_TOKENIZED , and stored.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: propertyName - The property name that will be sorted. Parameters: type - The type of the propert. the query |
addSort | CompassQuery addSort(String propertyName, SortPropertyType type, SortDirection direction)(Code) | | Adds sorting on the given property name, and using the given property
type. Note that INT has the lowest memorty requirements
and STRING the most.
Note that the property must be UN_TOKENIZED , and stored.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: propertyName - The property name that will be sorted. Parameters: type - The type of the propert. Parameters: direction - The direction of the sorting. the query |
addSort | CompassQuery addSort(SortImplicitType implicitType)(Code) | | Adds sorting on implicit types, which are not direct properties values.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: implicitType - The implicit type to add sorting on. |
addSort | CompassQuery addSort(SortImplicitType implicitType, SortDirection direction)(Code) | | Adds sorting on implicit types, which are not direct properties values.
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
Parameters: implicitType - The implicit type to add sorting on. Parameters: direction - The direction of the sorting. |
getSuggestedQuery | CompassQuery getSuggestedQuery()(Code) | | Returns the suggested query (based on spell check). If spell check is disabled
the same query is returned.
In order to know if the query was actually replaced with a suggested one, call
CompassQuery.isSuggested .
|
isSuggested | boolean isSuggested()(Code) | | Returns true if this is a suggested query. For example, when performing
a search query with spell check enabled, then it will return true if the
query was modified to correct some spelling mistakes.
|
rewrite | CompassQuery rewrite()(Code) | | Causes the query to be rewritten before executed to search.
|
setAliases | CompassQuery setAliases(String... aliases)(Code) | | Narrows down the query to be executed only against the given aliases.
If set to null , will use all aliases.
Parameters: aliases - aliases the query will be executed against th query |
setBoost | CompassQuery setBoost(float boost)(Code) | | Sets the boost for this query to boost . Hits matching
this query will (in addition to the normal weightings) have their score
multiplied by boost .
|
setSubIndexes | CompassQuery setSubIndexes(String... subIndexes)(Code) | | Narrows down the query to be executed only against the given sub indexes.
If set to null , will use all sub indexes.
Parameters: subIndexes - sub indexes the query will be executed against The query |
setTypes | CompassQuery setTypes(Class... types)(Code) | | Narrows down the query to be executed only against the given types.
Internally will translate the classes to the relevant root
aliases and call
CompassQuery.setAliases(String[]) .
Parameters: types - class types the query will be executed against the query |
|
|