public class Key
extends net.sf.saxon.lib.ExtensionFunctionDefinition
function lux:key($field-name as xs:string, $node as node()) as xs:anyAtomicItem*
function lux:key($field-name as xs:string) as xs:anyAtomicItem*
Accepts the name of a lucene field and optionally, a node, and returns any stored value(s) of the field for the document containing the node, or the context item if no node is specified. Analogous to the XSLT key() function.
If the node (or context item) is not a node drawn from the index, lux:key will return the empty sequence.
Order by expressions containing lux:key calls are subject to special optimization and are often able to be implemented by index-optimized sorting in Lucene (for fields whose values are string-, integer-, or long-valued only). An error results if an attempt is made to sort by a field that has multiple values for any of the documents in the sequence.
| Constructor and Description |
|---|
Key() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dependsOnFocus() |
net.sf.saxon.value.SequenceType[] |
getArgumentTypes() |
net.sf.saxon.om.StructuredQName |
getFunctionQName() |
int |
getMaximumNumberOfArguments() |
int |
getMinimumNumberOfArguments() |
net.sf.saxon.value.SequenceType |
getResultType(net.sf.saxon.value.SequenceType[] suppliedArgumentTypes) |
net.sf.saxon.lib.ExtensionFunctionCall |
makeCallExpression() |
boolean |
trustResultType() |
public net.sf.saxon.om.StructuredQName getFunctionQName()
getFunctionQName in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic net.sf.saxon.value.SequenceType[] getArgumentTypes()
getArgumentTypes in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic int getMinimumNumberOfArguments()
getMinimumNumberOfArguments in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic int getMaximumNumberOfArguments()
getMaximumNumberOfArguments in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic boolean trustResultType()
trustResultType in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic boolean dependsOnFocus()
dependsOnFocus in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic net.sf.saxon.value.SequenceType getResultType(net.sf.saxon.value.SequenceType[] suppliedArgumentTypes)
getResultType in class net.sf.saxon.lib.ExtensionFunctionDefinitionpublic net.sf.saxon.lib.ExtensionFunctionCall makeCallExpression()
makeCallExpression in class net.sf.saxon.lib.ExtensionFunctionDefinitionCopyright © 2013. All Rights Reserved.