|
||||||||||
| 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. |
CompassQueryFilter |
getFilter()
Returns the filter set using CompassQuery.setFilter(CompassQueryFilter). |
SearchEngineQuery |
getSearchEngineQuery()
|
CompassHits |
hits()
Performs the search and returns the hits that match the qeury. |
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 |
|---|
clone, 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 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 CompassHits hits()
throws CompassException
CompassQuery
hits in interface CompassQueryCompassExceptionpublic SearchEngineQuery getSearchEngineQuery()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||