Changes

Jump to navigation Jump to search
2,327 bytes removed ,  13:28, 17 January 2016
“house” and the text node “house”, and one error between
“house” and “hous”.
 
=Performance=
 
==Index Processing==
 
BaseX offers different evaluation strategies for XQFT queries, the choice of which
depends on the input data and the existence of a full text index. The query compiler tries
to optimize and speed up queries by applying a full text index structure whenever
possible and useful. Three evaluation strategies are available: the standard sequential
database scan, a full-text index based evaluation and a hybrid one, combining both strategies (see [http://www.inf.uni-konstanz.de/gk/pubsys/publishedFiles/GrGaHo09.pdf XQuery Full Text implementation in BaseX]).
Query optimization and selection of the most efficient evaluation strategy is done
in a full-fledged automatic manner. The output of the query optimizer indicates which
evaluation plan is chosen for a specific query. It can be inspected by activating verbose
querying (Command: <code>SET VERBOSE ON</code>) or opening the Query Info in the GUI.
The message
<code>Applying full-text index</code>
suggests that the full-text index is applied to speed up query evaluation.
A second message
<code>Removing path with no index results</code>
indicates that the index does not yield any results for the specified term and
is thus skipped. If index optimizations are missing, it sometimes helps to give
the compiler a second chance and try different rewritings of the same query.
 
By default, the full-text index options will also be applied to optimized full-text queries.
However, the default index options will be overwritten by supplying options in the query.
For example, if words were stemmed in the index, and if the query can be rewritten for index
access, the query terms will be stemmed as well, unless stemming is not explicitly disabled.
This is demonstrated in the following [[Commands#Command_Scripts|Command Script]]:
 
<pre class="brush:xml">
<commands>
<!-- Create database with stemmed full-text index -->
<set option='stemming'>true</set>
<set option='ftindex'>true</set>
<create-db name='test-db'> <text>house</text> </create-db>
<!-- Index access: Query term will be stemmed -->
<xquery> /text[. contains text { 'houses' }] </xquery>
<!-- Disable stemming (query will not be evaluated by the index) -->
<xquery> /text[. contains text { 'houses' } using no stemming] </xquery>
</commands>
</pre>
=Mixed Content=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu