Functions to access the range index.
range:contains($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:ends-with($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:eq($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:field($fields as xs:string+, $operators as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$operators+ | The operators to use as strings: eq, lt, gt, contains ... |
$keys* | The keys to look up for each field. |
range:field-contains($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
Used by optimizer to optimize a contains() function call
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-ends-with($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
Used by optimizer to optimize a ends-with() function call
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-eq($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on equality comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-ge($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on greater-than-equal comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-gt($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on greater-than comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-le($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on less-than-equal comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-lt($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on less-than comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-matches($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
Used by optimizer to optimize a matches() function call
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-ne($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
General field lookup function based on non-equality comparison. Normally this will be used by the query optimizer.
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:field-starts-with($fields as xs:string+, $keys as xs:anyAtomicType*) as node()*
Used by optimizer to optimize a starts-with() function call
$fields+ | The name of the field(s) to search |
$keys* | The keys to look up for each field. |
range:ge($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:gt($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:index-keys-for-field($field as xs:string, $function-reference as function(*), $max-number-returned as xs:int?) as item()*
Retrieve all index keys contained in a range index which has been defined with a field name. Similar toutil:index-keys, but works with fields.
$field | The field to use |
$function-reference | The function reference as created by the util:function function. It can be an arbitrary user-defined function, but it should take exactly 2 arguments: 1) the current index key as found in the range index as an atomic value, 2) a sequence containing three int values: a) the overall frequency of the key within the node set, b) the number of distinct documents in the node set the key occurs in, c) the current position of the key in the whole list of keys returned. |
$max-number-returned? | The maximum number of returned keys |
range:index-keys-for-field($field as xs:string, $start-value as xs:anyAtomicType?, $function-reference as function(*), $max-number-returned as xs:int?) as item()*
Retrieve all index keys contained in a range index which has been defined with a field name. Similar toutil:index-keys, but works with fields.
$field | The field to use |
$start-value? | Only index keys of the same type but being greater than $start-value will be reported for non-string types. For string types, only keys starting with the given prefix are reported. |
$function-reference | The function reference as created by the util:function function. It can be an arbitrary user-defined function, but it should take exactly 2 arguments: 1) the current index key as found in the range index as an atomic value, 2) a sequence containing three int values: a) the overall frequency of the key within the node set, b) the number of distinct documents in the node set the key occurs in, c) the current position of the key in the whole list of keys returned. |
$max-number-returned? | The maximum number of returned keys |
range:le($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:lt($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:matches($nodes as node()*, $regex as xs:string*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$regex* | The regular expression. |
range:ne($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |
range:optimize() as empty-sequence()
Calls Lucene's optimize method to merge all index segments into a single one. This is a costly operation and should not be used except for data sets which can be expected to remain unchanged for a while. The optimize will block the index for other write operations and may take some time. You need to be a user in group dba to call this function.
range:starts-with($nodes as node()*, $key as xs:anyAtomicType*) as node()*
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
$nodes* | The node set to search using a range index which is defined on those nodes |
$key* | The key to look up. |