Changes

Jump to navigation Jump to search
1,258 bytes added ,  15:02, 12 August 2015
no edit summary
=Value Indexes=
Value indexes can be optionally created and dropped by the user. The By default, the text and attribute index will be created by default, and it comprises all text and attribute nodes of a database.
==Text Index==
Matching text nodes can be directly requested from the index via the XQuery function [[Full-Text Module#ft:search|ft:search]]. The index contents can be accessed with [[Full-Text Module#ft:tokens|ft:tokens]].
 
==Selective Indexing==
 
Since {{Version|8.3}}, value indexing can be restricted to specific elements and attributes. The nodes to be indexed can be restricted via the [[Options#TEXTINCLUDE|TEXTINCLUDE]], [[Options#ATTRINCLUDE|ATTRINCLUDE]] and [[Options#FTINCLUDE|FTINCLUDE]] options. The options take a list of name patterns, which are separated by commas. The following name patterns are supported:
 
* <code>*</code>: accept all names
* <code>name</code>: accept all elements or attributes called <code>name</code> in the empty default namespace
* <code>*:name</code>: accepts all elements or attributes called <code>name</code>; the namespace is ignored
* <code>Q{uri}*</code>: accepts all elements or attributes in the <code>uri</code> namespace
* <code>Q{uri}name</code>: accepts all elements or attributes called <code>name</code> in the <code>uri</code> namespace
 
The options can also be specified via the functions of the Database Module:
 
<pre class="brush:xquery">
(: only index id and name attributes :)
db:create('factbook', 'http://files.basex.org/xml/factbook.xml', '', map { 'attrinclude': 'id,name' })
</pre>
==Index Construction==
=Changelog=
 
;Version 8.3
 
* Added: [[#Selective Indexing|Selective Indexing]]
;Version 8.0
Bureaucrats, editor, reviewer, Administrators
12,258

edits

Navigation menu