Loading TOC...

cts:column-range-query

cts:column-range-query(
   schema as xs:string,
   view as xs:string,
   column as xs:string,
   value as xs:anyAtomicType*,
   [operator as xs:string?],
   [options as xs:string*],
   [weight as xs:double?]
) as cts:triple-range-query

Summary

Returns a cts:query matching documents matching a TDE-view column equals to an value. Searches with the cts:column-range-query 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

xquery version "1.0-ml"; 
let $query:=cts:column-range-query("MySchema","MyView","value",xs:decimal(200), "<")  
return cts:uris((),(),$query)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.