| org.compass.core.CompassQueryBuilder
All known Subclasses: org.compass.core.impl.DefaultCompassQueryBuilder,
Inner Class :public static interface ToCompassQuery | |
Inner Class :public static interface CompassBooleanQueryBuilder extends ToCompassQuery | |
Inner Class :public static interface CompassMultiPhraseQueryBuilder extends ToCompassQuery | |
Inner Class :public static interface CompassQueryStringBuilder extends ToCompassQuery | |
Inner Class :public static interface CompassMultiPropertyQueryStringBuilder extends ToCompassQuery | |
Inner Class :public static interface CompassQuerySpanNearBuilder | |
Inner Class :public static interface CompassQuerySpanOrBuilder | |
Inner Class :public static interface CompassMoreLikeThisQuery extends ToCompassQuery | |
Method Summary | |
CompassQuery | alias(String aliasValue) Returns a query that exactly match the given alias.
Parameters: aliasValue - The alias value to match to. | CompassQuery | between(String name, Object low, Object high, boolean inclusive, boolean constantScore) Creates a query where the resource property is between the given values.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: low - The low value limit Parameters: high - The high value limit Parameters: inclusive - If the values are inclusive or exclusive. Parameters: constantScore - If the query will affect the score of the results. | CompassQuery | between(String name, Object low, Object high, boolean inclusive) Creates a query where the resource property is between the given values.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: low - The low value limit Parameters: high - The high value limit Parameters: inclusive - If the values are inclusive or exclusive. | CompassBooleanQueryBuilder | bool() Constructs a boolean query builder. | CompassBooleanQueryBuilder | bool(boolean disableCoord) Constructs a boolean query builder, with coord disabled. | CompassQuery | fuzzy(String name, String value) Creates a fuzzy query for the given resource property and the value. | CompassQuery | fuzzy(String name, String value, float minimumSimilarity) Creates a fuzzy query for the given resource property and the value. | CompassQuery | fuzzy(String name, String value, float minimumSimilarity, int prefixLength) Creates a fuzzy query for the given resource property and the value. | CompassQuery | ge(String name, Object value) Creates a query where the resource property is greater or equal (>=) to
the given value. | CompassQuery | gt(String name, Object value) Creates a query where the resource property is greater than (>) to the
given value. | CompassQuery | le(String name, Object value) Creates a query where the resource property is less or equal (<=) to the
given value. | CompassQuery | lt(String name, Object value) Creates a query where the resource property is less than (<) the given
value. | CompassQuery | matchAll() Creates a query that match all documents. | CompassMoreLikeThisQuery | moreLikeThis(String alias, Serializable id) Constructs a more like this query. | CompassMoreLikeThisQuery | moreLikeThis(Reader reader) Constructs a more like this query to find hits that are similar to
the give text represented by the reader. | CompassMultiPhraseQueryBuilder | multiPhrase(String name) Constructs a multi phrase query builder for the given resource property /
meta-data name.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name of the resource property / meta-data. | CompassMultiPropertyQueryStringBuilder | multiPropertyQueryString(String queryString) Constructs a multi property query string builder, allowing to execute query strings
against several resource property names.
Parameters: queryString - The query string (i.e. | CompassQuery | polyAlias(String aliasValue) Returns a query that match the given alias or any extedning aliases.
Parameters: aliasValue - The alias value to match to or any extending aliases. | CompassQuery | prefix(String name, String prefix) Creates a query where the resource property values starts with the given
prefix. | CompassQueryStringBuilder | queryString(String queryString) Constructs a query string query builder.
Parameters: queryString - The query string (i.e. | CompassSpanQuery | spanEq(String name, Object value) Creates a span query where the resource property must match the given
value. | CompassSpanQuery | spanFirst(String name, Object value, int end) Creates a span query where the span occur within the first
end positions.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value Parameters: end - The limit on the position from the start. | CompassSpanQuery | spanFirst(CompassSpanQuery spanQuery, int end) Creates a span query.
Parameters: end - The limit on the position from the start. | CompassQuerySpanNearBuilder | spanNear(String name) Constructs a span near query builder. | CompassSpanQuery | spanNot(CompassSpanQuery include, CompassSpanQuery exclude) Creates a span query that excludes matches where one
org.compass.core.CompassQuery.CompassSpanQuery overlaps
with another.
Construct a span query matching spans from include which
have no overlap with spans from exclude .
Parameters: include - The span query to include. Parameters: exclude - The span query to exclude. | CompassQuerySpanOrBuilder | spanOr() Constructs a span or query builder. | CompassQuery | term(String name, Object value) Creates a query where the resource property must have the given value.
Note, that the value itself will not be analyzed, but the text that was
indexed might have been (if indexed ). | CompassQuery | wildcard(String name, String wildcard) Creates a query where the resource property values match the given
wildcard. |
alias | CompassQuery alias(String aliasValue)(Code) | | Returns a query that exactly match the given alias.
Parameters: aliasValue - The alias value to match to. The generated query. |
between | CompassQuery between(String name, Object low, Object high, boolean inclusive, boolean constantScore)(Code) | | Creates a query where the resource property is between the given values.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: low - The low value limit Parameters: high - The high value limit Parameters: inclusive - If the values are inclusive or exclusive. Parameters: constantScore - If the query will affect the score of the results. With all other range queriesit will default to true . The generated query |
between | CompassQuery between(String name, Object low, Object high, boolean inclusive)(Code) | | Creates a query where the resource property is between the given values.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: low - The low value limit Parameters: high - The high value limit Parameters: inclusive - If the values are inclusive or exclusive. The generated query |
bool | CompassBooleanQueryBuilder bool()(Code) | | Constructs a boolean query builder.
|
bool | CompassBooleanQueryBuilder bool(boolean disableCoord)(Code) | | Constructs a boolean query builder, with coord disabled.
|
fuzzy | CompassQuery fuzzy(String name, String value)(Code) | | Creates a fuzzy query for the given resource property and the value. The
similiarity measurement is based on the Levenshtein (edit distance)
algorithm. The minimumSimilarity defaults to 0.5 and prefixLength
defaults to 0.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value The generated query |
fuzzy | CompassQuery fuzzy(String name, String value, float minimumSimilarity)(Code) | | Creates a fuzzy query for the given resource property and the value. The
similiarity measurement is based on the Levenshtein (edit distance)
algorithm. The prefixLength defaults to 0.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value Parameters: minimumSimilarity - The minimum similarity, a value between 0.0 and 1.0 The generated query |
fuzzy | CompassQuery fuzzy(String name, String value, float minimumSimilarity, int prefixLength)(Code) | | Creates a fuzzy query for the given resource property and the value. The
similiarity measurement is based on the Levenshtein (edit distance)
algorithm.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value Parameters: minimumSimilarity - The minimum similarity, a value between 0.0 and 1.0 Parameters: prefixLength - The length of common (non-fuzzy) prefix The generated query |
ge | CompassQuery ge(String name, Object value)(Code) | | Creates a query where the resource property is greater or equal (>=) to
the given value.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: value - The low limit value The generated query |
gt | CompassQuery gt(String name, Object value)(Code) | | Creates a query where the resource property is greater than (>) to the
given value.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: value - The low limit value The generated query |
le | CompassQuery le(String name, Object value)(Code) | | Creates a query where the resource property is less or equal (<=) to the
given value.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: value - The high limit value The generated query |
lt | CompassQuery lt(String name, Object value)(Code) | | Creates a query where the resource property is less than (<) the given
value.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: value - The high limit value The generated query |
matchAll | CompassQuery matchAll()(Code) | | Creates a query that match all documents.
The generated query |
moreLikeThis | CompassMoreLikeThisQuery moreLikeThis(String alias, Serializable id)(Code) | | Constructs a more like this query. The id can be an object of
the class (with the id attributes set), an array of id objects, or the
actual id object. Throws an exception if the resource is not found.
|
moreLikeThis | CompassMoreLikeThisQuery moreLikeThis(Reader reader)(Code) | | Constructs a more like this query to find hits that are similar to
the give text represented by the reader.
|
multiPhrase | CompassMultiPhraseQueryBuilder multiPhrase(String name)(Code) | | Constructs a multi phrase query builder for the given resource property /
meta-data name.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name of the resource property / meta-data. The multi phrase query builder. |
multiPropertyQueryString | CompassMultiPropertyQueryStringBuilder multiPropertyQueryString(String queryString)(Code) | | Constructs a multi property query string builder, allowing to execute query strings
against several resource property names.
Parameters: queryString - The query string (i.e. +jack +london) The multi property string query builder. |
polyAlias | CompassQuery polyAlias(String aliasValue)(Code) | | Returns a query that match the given alias or any extedning aliases.
Parameters: aliasValue - The alias value to match to or any extending aliases. The generated query. |
prefix | CompassQuery prefix(String name, String prefix)(Code) | | Creates a query where the resource property values starts with the given
prefix.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - the resource property name Parameters: prefix - The prefix value The generated query |
queryString | CompassQueryStringBuilder queryString(String queryString)(Code) | | Constructs a query string query builder.
Parameters: queryString - The query string (i.e. +jack +london). The query string query builder. |
spanEq | CompassSpanQuery spanEq(String name, Object value)(Code) | | Creates a span query where the resource property must match the given
value.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value The span query |
spanFirst | CompassSpanQuery spanFirst(String name, Object value, int end)(Code) | | Creates a span query where the span occur within the first
end positions.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name Parameters: value - The value Parameters: end - The limit on the position from the start. The span query |
spanFirst | CompassSpanQuery spanFirst(CompassSpanQuery spanQuery, int end)(Code) | | Creates a span query.
Parameters: end - The limit on the position from the start. The span query |
spanNear | CompassQuerySpanNearBuilder spanNear(String name)(Code) | | Constructs a span near query builder.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The name The span near query builder |
spanNot | CompassSpanQuery spanNot(CompassSpanQuery include, CompassSpanQuery exclude)(Code) | | Creates a span query that excludes matches where one
org.compass.core.CompassQuery.CompassSpanQuery overlaps
with another.
Construct a span query matching spans from include which
have no overlap with spans from exclude .
Parameters: include - The span query to include. Parameters: exclude - The span query to exclude. The span query |
spanOr | CompassQuerySpanOrBuilder spanOr()(Code) | | Constructs a span or query builder.
The span query builder |
term | CompassQuery term(String name, Object value)(Code) | | Creates a query where the resource property must have the given value.
Note, that the value itself will not be analyzed, but the text that was
indexed might have been (if indexed ). The search is case
sensative.
The name can either be the actual resource property or meta-data value,
or the path to the given resource property (alias.rProperty), or the
class property (alias.cProperty) or the path to the meta-data
(alias.cProperty.metaData)
Parameters: name - The resource property name Parameters: value - The value that must match The generated query |
wildcard | CompassQuery wildcard(String name, String wildcard)(Code) | | Creates a query where the resource property values match the given
wildcard. Supported wildcards are * , which matches any
character sequence (including the empty one), and ? ,
which matches any single character. Note this query can be slow, as it
needs to iterate over many terms. In order to prevent extremely slow
WildcardQueries, a Wildcard term should not start with one of the
wildcards * or ? .
Parameters: name - The name Parameters: wildcard - The wildcard expression The generated query |
|
|