|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.impl.DefaultCompassQuery
public class DefaultCompassQuery
| Nested Class Summary | |
|---|---|
static class |
DefaultCompassQuery.DefaultCompassSpanQuey
|
| Nested classes/interfaces inherited from interface org.compass.core.CompassQuery |
|---|
CompassQuery.CompassSpanQuery, CompassQuery.SortDirection, CompassQuery.SortImplicitType, CompassQuery.SortPropertyType |
| Constructor Summary | |
|---|---|
DefaultCompassQuery(SearchEngineQuery searchEngineQuery,
InternalCompassSession session)
|
|
| Method Summary | |
|---|---|
CompassQuery |
addSort(CompassQuery.SortImplicitType implicitType)
Adds sorting on implicit types, which are not direct properties values. |
CompassQuery |
addSort(CompassQuery.SortImplicitType implicitType,
CompassQuery.SortDirection direction)
Adds sorting on implicit types, which are not direct properties values. |
CompassQuery |
addSort(String name)
Adds sorting on the given property name. |
CompassQuery |
addSort(String name,
CompassQuery.SortDirection direction)
Adds sorting on the given property name. |
CompassQuery |
addSort(String name,
CompassQuery.SortPropertyType type)
Adds sorting on the given property name, and using the given property type. |
CompassQuery |
addSort(String name,
CompassQuery.SortPropertyType type,
CompassQuery.SortDirection direction)
Adds sorting on the given property name, and using the given property type. |
CompassQuery |
addSort(String propertyName,
Locale locale)
Adds sorting on the given property name, and using the given locale. |
CompassQuery |
addSort(String propertyName,
Locale locale,
CompassQuery.SortDirection direction)
Adds sorting on the given property name, and using the given locale. |
Object |
clone()
Clones the given query. |
long |
count()
Returns the count of hits that match this query. |
long |
count(float minimumScore)
Returns the count of hits that match this query and are higher than the given score. |
CompassQueryFilter |
getFilter()
Returns the filter set using CompassQuery.setFilter(CompassQueryFilter). |
SearchEngineQuery |
getSearchEngineQuery()
|
CompassQuery |
getSuggestedQuery()
Returns the suggested query (based on spell check). |
CompassHits |
hits()
Performs the search and returns the hits that match the qeury. |
boolean |
isSuggested()
Returns true if this is a suggested query. |
CompassQuery |
rewrite()
Causes the query to be rewritten before executed to search. |
CompassQuery |
setAliases(String... aliases)
Narrows down the query to be executed only against the given aliases. |
CompassQuery |
setBoost(float boost)
Sets the boost for this query to boost. |
CompassQuery |
setFilter(CompassQueryFilter filter)
Sets a filter to the query. |
CompassQuery |
setSubIndexes(String... subIndexes)
Narrows down the query to be executed only against the given sub indexes. |
CompassQuery |
setTypes(Class... types)
Narrows down the query to be executed only against the given types. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCompassQuery(SearchEngineQuery searchEngineQuery,
InternalCompassSession session)
| Method Detail |
|---|
public CompassQuery setBoost(float boost)
CompassQueryboost. Hits matching
this query will (in addition to the normal weightings) have their score
multiplied by boost.
setBoost in interface CompassQuerypublic CompassQuery addSort(String name)
CompassQueryCompassQuery.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).
addSort in interface CompassQueryname - The property name that will be sorted.
public CompassQuery addSort(String name,
CompassQuery.SortDirection direction)
CompassQueryCompassQuery.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).
addSort in interface CompassQueryname - The property name that will be sorted.direction - The direction for the sorting.
public CompassQuery addSort(String name,
CompassQuery.SortPropertyType type)
CompassQueryINT 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).
addSort in interface CompassQueryname - The property name that will be sorted.type - The type of the propert.
public CompassQuery addSort(String name,
CompassQuery.SortPropertyType type,
CompassQuery.SortDirection direction)
CompassQueryINT 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).
addSort in interface CompassQueryname - The property name that will be sorted.type - The type of the propert.direction - The direction of the sorting.
public CompassQuery addSort(CompassQuery.SortImplicitType implicitType)
CompassQuery
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
addSort in interface CompassQueryimplicitType - The implicit type to add sorting on.
public CompassQuery addSort(CompassQuery.SortImplicitType implicitType,
CompassQuery.SortDirection direction)
CompassQuery
Note, that the sort option will only work on the outer most query (i.e.
the one that the hits is called on).
addSort in interface CompassQueryimplicitType - The implicit type to add sorting on.direction - The direction of the sorting.
public CompassQuery addSort(String propertyName,
Locale locale,
CompassQuery.SortDirection direction)
CompassQueryhits is called on).
addSort in interface CompassQuerypropertyName - The property name that will be sorted.locale - The locale.direction - The direction of the sorting.
public CompassQuery addSort(String propertyName,
Locale locale)
CompassQuery
addSort in interface CompassQuerypropertyName - The property name that will be sorted.locale - The locale.
public CompassQuery setSubIndexes(String... subIndexes)
CompassQuerynull, will use all sub indexes.
setSubIndexes in interface CompassQuerysubIndexes - sub indexes the query will be executed against
public CompassQuery setAliases(String... aliases)
CompassQuerynull, will use all aliases.
setAliases in interface CompassQueryaliases - aliases the query will be executed against
public CompassQuery setTypes(Class... types)
CompassQueryCompassQuery.setAliases(String[]).
setTypes in interface CompassQuerytypes - class types the query will be executed against
public CompassQuery setFilter(CompassQueryFilter filter)
CompassQueryCompassQueryFilterBuilder.
setFilter in interface CompassQueryfilter - The filter for the query
public CompassQueryFilter getFilter()
CompassQueryCompassQuery.setFilter(CompassQueryFilter). null
if none is set.
getFilter in interface CompassQueryCompassQuery.setFilter(CompassQueryFilter)public CompassQuery rewrite()
CompassQuery
rewrite in interface CompassQuerypublic CompassQuery getSuggestedQuery()
CompassQueryIn order to know if the query was actually replaced with a suggested one, call
CompassQuery.isSuggested().
getSuggestedQuery in interface CompassQuerypublic boolean isSuggested()
CompassQuerytrue 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.
isSuggested in interface CompassQuerypublic long count()
CompassQueryCompassHitsOperations.length().
Same as calling count(0.0f).
count in interface CompassQuerypublic long count(float minimumScore)
CompassQueryCompassHitsOperations.length().
count in interface CompassQuery
public CompassHits hits()
throws CompassException
CompassQuery
hits in interface CompassQueryCompassExceptionpublic SearchEngineQuery getSearchEngineQuery()
public String toString()
toString in class Object
public Object clone()
throws CloneNotSupportedException
CompassQuery
clone in interface CompassQueryclone in class ObjectCloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||