XQuery Function Documentation
http://exist-db.org/xquery/range
java:org.exist.xquery.modules.range.RangeIndexModule
Functions to access the range index.
range:contains
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:ends-with
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:eq
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:field
General field lookup function. Normally this will be used by the query optimizer.
- Parameters:
-
$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. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-contains
Used by optimizer to optimize a contains() function call
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-ends-with
Used by optimizer to optimize a ends-with() function call
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-eq
General field lookup function based on equality comparison. Normally this will be used by the query optimizer.
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-ge
General field lookup function based on greater-than-equal comparison. Normally this will be used by the query optimizer.
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-gt
General field lookup function based on greater-than comparison. Normally this will be used by the query optimizer.
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-le
General field lookup function based on less-than-equal comparison. Normally this will be used by the query optimizer.
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-lt
General field lookup function based on less-than comparison. Normally this will be used by the query optimizer.
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:field-matches
Used by optimizer to optimize a matches() function call
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value matches the regular expression.
range:field-starts-with
Used by optimizer to optimize a starts-with() function call
- Parameters:
-
$fields+ The name of the field(s) to search $keys* The keys to look up for each field. - Returns:
- node()* : all nodes from the field set whose node value is equal to the key.
range:ge
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:gt
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:index-keys-for-field
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.
- Parameters:
-
$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 - Returns:
- item()* : the results of the eval of the $function-reference
range:index-keys-for-field
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.
- Parameters:
-
$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 - Returns:
- item()* : the results of the eval of the $function-reference
range:le
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:lt
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.
range:matches
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $regex* The regular expression. - Returns:
- node()* : all nodes from the input node set whose node value matches the regular expression. Regular expression syntax is limited to what Lucene supports. See http://lucene.apache.org/core/4_5_1/core/org/apache/lucene/util/automaton/RegExp.html
range:optimize
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.
- Returns:
- empty() :
range:starts-with
Search for nodes matching the given keys in the range index. Normally this function will be called by the query optimizer.
- Parameters:
-
$nodes* The node set to search using a range index which is defined on those nodes $key* The key to look up. - Returns:
- node()* : all nodes from the input node set whose node value is equal to the key.