MarkLogic Server 11.0 Product Documentation
cts.columnRangeQuerycts.columnRangeQuery(
schema as String,
view as String,
column as String,
value as (String | Number | Boolean | null | Array | Object)[],
[operator as String?],
[options as String[]],
[weight as Number?]
) as cts.tripleRangeQuery
Summary
Returns a
cts.query
matching documents matching a TDE-view column equals to an value. Searches with the
cts.columnRangeQuery
constructor require the triple index;
if the triple index is not configured, then an exception is thrown.
Parameters |
schema |
The TDE schema name.
|
view |
The TDE view name.
|
column |
The TDE column name.
|
value |
One or more values used for querying.
|
operator |
Operator for the $value values. The default operator is "=".
Operators include:
- "<"
- Match range index values less than $value.
- "<="
- Match range index values less than or equal to $value.
- ">"
- Match range index values greater than $value.
- ">="
- Match range index values greater than or equal to $value.
- "="
- Match range index values equal to $value.
- "!="
- Match range index values not equal to $value.
|
options |
Options to this query. The default is ().
Options include:
- "cached"
- Cache the results of this query in the list cache.
- "uncached"
- Do not cache the results of this query in the list cache.
- "score-function=function"
- Use the selected scoring function. The score function may be:
- linear
- Use a linear function of the difference between the
specified query value and the matching value in the index to calculate
a score for this range query.
- reciprocal
- Use a reciprocal function of the difference
between the specified query value and the matching value in the
index to calculate a score for this range query.
- zero
- This range query does not contribute to the
score. This is the default.
- "slope-factor=number"
- Apply the given number as a scaling factor to the slope of the
scoring function. The default is 1.0.
|
weight |
A weight for this query. The default is 1.0.
|
Usage Notes
This function returns a cts:triple-range-query, and all functions which takes cts:triple-range-query as an input can be used (e.g. cts:triple-range-query-subject).
Example
'use strict';
const q=cts.columnRangeQuery("MySchema","MyView","value",xs.decimal(12), "<")
cts.uris(null,null,q)
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.