Changes

Jump to navigation Jump to search
408 bytes added ,  14:10, 17 January 2016
no edit summary
=Value Indexes=
Value indexes can be created and dropped by the user. Four types of values indexes are available: a text and attribute index, and an optional token and full-text index. By default, the text and attribute index will automatically be created, and all text and attribute nodes will be indexed.
In the GUI, index structures can be managed in the dialog windows for creating new databases or displaying the database properties. On command-line, the commands <code>[[Commands#CREATE INDEX|CREATE INDEX]]</code> and <code>[[Commands#DROP INDEX|DROP INDEX]]</code> are used to create and drop index structures. With <code>[[Commands#INFO INDEX|INFO INDEX]]</code>, you get some insight into the contents of an index structure, and <code>[[Commands#SET|SET]]</code> allows you to change the index defaults for new databases:
* <code>SET ATTRINDEX true; SET ATTRINCLUDE id name; CREATE DB factbook.xml</code>: Enable attribute index; only index 'id' and 'name' attributes; create database
* <code>OPEN factbook; INFO INDEX TOKEN</code>: Open database; show info on token index
* <code>OPEN factbook; SET FTINDEX true; OPTIMIZE</code>: Open database; enable full-text indexing; optimize database
Four types of values indexes are availableWith XQuery, index structures can be created and dropped via [[Database Module#db:optimize|db:optimize]]: <pre class="brush:xquery"> (: a text and attribute indexOptimize specified database, and an optional token and create full-text indexfor texts of the specified elements :)db:optimize( 'factbook', false(), map { 'ftindex': true(), 'ftinclude':'p div' })</pre>
==Text Index==
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu