Changes

Jump to navigation Jump to search
1,365 bytes added ,  14:51, 24 December 2011
Created page with "This module is introduced with BaseX {{Mark|Version 7.1}} and contains XQuery functions for handling informations coming directly from the indexes within X..."
This module is introduced with BaseX {{Mark|Version 7.1}} and contains [[Querying#Functions|XQuery functions]] for handling informations coming directly from the indexes within XQuery. All functions are introduced with the {{Mono|index:}} prefix, which is linked to the {{Mono|http://www.basex.org/modules/index}} namespace.

=General Functions=

==index:facets==
{|
|-
| valign='top' width='90' | '''Signatures'''
|{{Mono|<b>index:facets</b>($db as item()) as xs:string}}<br/>{{Mono|<b>index:facets</b>($db as item(), $type as xs:string) as xs:string}}
|-
| valign='top' | '''Summary'''
|Returns information about possible facets and facet values on a database in document structure format. {{Mono|$db}} may either be a string or a node stored in a database.<br/>If {{Mono|$type}} is specified as {{Mono|flat}}, the function returns this information in a flat summarized version.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors|BASX0021]]</b> is raised if the index is not available or doesn't have the needed information.<br/>
|-
| valign='top' | '''Examples'''
|
* {{Mono|index:facets("DB")}} returns information about facets and facet values on the database {{Mono|DB}} in document structure.
* {{Mono|index:facets("DB", "flat")}} returns information about facets and facet values on the database {{Mono|DB}} in a summarized flat structure.
|}
bueraucrat, Bureaucrats, editor, reviewer, Administrators
907

edits

Navigation menu