Changes

Jump to navigation Jump to search
2,618 bytes added ,  08:21, 8 April 2021
* The {{Code|.basex}} [[Configuration#Configuration Files|configuration file]] is parsed by every new local BaseX instance. It contains all global options. Local options can be specified at the end of the file after the {{Code|Local Options}} comment:
<pre classsyntaxhighlight lang="brush:perl">
# General Options
DEBUG = false
# Local Options
CHOP = false
</presyntaxhighlight>
* Initial values for global options can also be specified via system properties, which can e.g. be passed on with the [httphttps://docs.oracle.com/javaseen/1.4.2java/docsjavase/tooldocs11/windowstools/java.html#options -D flag] on command line, or using [httphttps://docs.oracle.com/en/java/javase/611/docs/api/java.base/java/lang/System.html#setProperty(java.lang.String,%20javajava.lang.String) System.setProperty()] before creating a BaseX instance. The specified keys need to be prefixed with {{Code|org.basex.}}. An example:
<pre classsyntaxhighlight lang="brush:xqueryperl">
java -Dorg.basex.CHOP=false -cp basex.jar org.basex.BaseX -c"get chop"
CHOP: false
</presyntaxhighlight>
* If using the Mac OS X packaged application then global options can be set within the Info.plist file within the Contents folder of the application package. For example:
<pre classsyntaxhighlight lang="brush:xml">
<key>JVMOptions</key>
<array>
<string>-Dorg.basex.CHOP=false</string>
</array>
</presyntaxhighlight>
* In a [[Web Application]], the default can be adjusted in the {{Code|web.xml}} file as follows:
<pre classsyntaxhighlight lang="brush:xml">
<context-param>
<param-name>org.basex.chop</param-name>
<param-value>false</param-value>
</context-param>
</presyntaxhighlight>
* In XQuery, local options can be set via option declarations and [[XQuery Extensions#Pragmas|pragmas]].
| '''Summary'''
|Specifies how many seconds the results of queries, which have been queued by the [[Jobs Module|asynchronously executed]], will be cached in main memory.
|}
 
===WITHDB===
 
{{Mark|Introduced with Version 9.3.}}
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WITHDB}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|By default, URIs specified in the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] functions will also be resolved against existing databases. If {{Function|Database|db:open}} is consistently used to access database documents, it is recommendable to disable this option:
* Access to local and external resources will be faster, as the database lookup will be skipped.
* No locks will be created by the two functions (see [[Transaction Management#Limitations|limitations of database locking]] for more details).
|}
| '''Summary'''
|Specifies the maximum length of a single [[Logging|log message]].
|}
 
===LOGTRACE===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LOGTRACE [boolean]}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|If BaseX is running as [[Web Application]], trace output (generated via {{Code|fn:trace}}, {{Function|Profiling|prof:dump}} and similar functions) if written to the [[Logging|database logs]]. If this option is disabled, trace output will be redirected to standard error, as it is known from the standalone version of BaseX.
|}
|-
| '''Summary'''
|Points to the directory in which all the [[Web Application]] contents are stored, including XQuery, Script, [[RESTXQ]] and configuration files. This :* The option is ignored if BaseX is deployed as [[Web Application#Servlet_Container|web servlet]].* It cannot be assigned via the {{Code|web.xml}} file, as it will be evaluated before the configuration files are parsed.
|}
===GZIP=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|GZIP [boolean]}}|-| '''Default'''|<code>false</code>|-| '''Summary'''|Jetty provides a [https://www.eclipse.org/jetty/documentation/current/gzip-filter.html Gzip handler] for dynamically uncompressing requests and compressing responses. This feature can be enabled if Jetty is started via the [[Web Application|BaseX HTTP Server]]:* The option can also be enabled on [[Command-Line Options#HTTP Server|command line]] via <code>-g</code>.* It cannot be assigned via the {{Code|web.xml}} file, as it will be evaluated before the configuration files are parsed.* The [https://github.com/eclipse/jetty.project/blob/7cc552013eb4d05cb603ba0bc85d176c97957cd4/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java#L187-L211 same defaults] of the web server will be applied (support for GET requests, exclusion of binaries, MSIE 6.0, etc.).|} ===RESTXQPATH===
{| width='100%'
===RESTXQERRORS===
{{Mark|Introduced Updated with Version BaseX 9.2.5:}}Additionally suppress stack trace in HTTP response.
{| width='100%'
|-
| '''Summary'''
|Reports parsing errors in XQuery modules in the RESTXQ directory back and returns the full error message and stack trace to the client. By default, this option is enabled. On productive systemsIn a production environment, it can be disabled in order to suppress errors that should not be seen by the clientuser of an API (the full error information can still be looked up in the database logs). See [[RESTXQ#Error Handling|RESTXQ Error Handling]] for more details.
|}
|-
| '''Summary'''
|By default, if BaseX is run as [[Web Application]], a the database server instance will be started as well. The server in addition, which can then be addressed by other BaseX clients in parallel to [[Clients]] via the HTTP servicesdatabase port (see {{Option|PORT}}).<br/>If the option is set to {{Code|true}}, the no database server will be disabledlaunched.
|}
|-
| '''Summary'''
|Defines a [[Parsers|parser]] for importing new files to the database. Available parsers are {{Code|XML}}, {{Code|JSON}}, {{Code|CSV}}, {{Code|TEXT}}, {{Code|HTML}}, and {{Code|HTMLRAW}}. HTML input will be parsed as normal XML files documents if [[Parsers#HTML_Parser|Tagsoup]] is not found in the classpath.
|}
|-
| '''Summary'''
|Many XML documents include whitespaces that have been added to improve readability. This option controls the [httphttps://www.w3.org/TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:
* With the default value {{Code|true}}, leading and trailing whitespaces from text nodes will be chopped and all empty text nodes will be discarded.
* The flag should be turned off if a document contains [[Full-Text#Mixed Content|mixed content]].
In the following example document, the whitespaces in the text nodes of the {{Code|text}} element will not be chopped:
<pre classsyntaxhighlight lang="brush:xml">
<xml>
<title>
<text xml:space="preserve">To <b>be</b>, or not to <b>be</b>, that is the question.</text>
</xml>
</presyntaxhighlight>
It is recommendable to additionally assign <code>indent=no</code> to the {{Option|SERIALIZER}} option; otherwise the serialized documents will automatically be indented.
|}
|-
| '''Summary'''
|Specifies the maximum length of for strings that are to be indexed by the name, path, value, and full-text stored in [[Indexes|index structures]]. The value of this option will be assigned once to a new database, and cannot can only be changed after thatby creating a new database or doing a [[Commands#OPTIMIZE|full optimization]].
|}
| '''Summary'''
|This option affects the [[Indexes#Performance|construction]] of new value indexes. It controls the number of index build operations that are performed before writing partial index data to disk:
* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumption. Usually, this works fine.
* If explicit garbage collection is disabled when running Java (e.g. via the JVM option {{Code|-XX:+DisableExplicitGC}}), you may need to choose a custom split size.
* You can e. g. start with {{Code|1000000}} (one million) index operations and adjust this value in the next steps.
* The larger the assigned value is, the less splits will take place, and the more main memory will be required.
* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumption. Usually, this works fine. If explicit garbage collection is disabled when running Java (e.g. via the JVM option {{Code|-XX:+DisableExplicitGC}}), you may need to choose a custom split size.
|}
|-
| '''Summary'''
|A new If a text file with stop words is specified, frequently used terms contained in that file will be ignored when a full-text index will drop tokens that are listed in the specified stopword listis created. A stopword list may decrease the size of the full text indexand speed up your queries. See [[Indexes#Full-Text Index|Full-Text Index]] for more details.
|}
| '''Summary'''
|Prints more information on internal query rewritings, optimizations, and performance. By default, this info is shown in the [[GUI#Visualizations|Info View]] in the GUI. It can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-V</code>.
|}
 
===XQUERY3===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XQUERY3}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|Enables all [[XQuery 3.0]] features supported by BaseX. If this option is set to {{Code|false}}, the XQuery parser will only accept expressions of the XQuery 1.0 specification.
|}
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned off, and nodes to be returned will be copied before they are modified by an updating expression. By default, in compliance with the XQuery Update Facility, this option is set to {{Code|false}}, because the XQuery Update Facility does not allow an updating query to . See [[XQuery Update#Returning Results|return resultsReturning Results]]for more details.
|}
* Commas in values must be duplicated.
* Variables may optionally be introduced with a leading dollar sign.
* If a variable uses a namespace different to the default namespace, it can be specified with the [http://www.jclark.com/xml/xmlns.htm Clark Notation] or [httphttps://www.w3.org/TR/xquery-30/#id-basics Expanded QName Notation].
This option can also be used on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-b</code>.
|-
* <code>a=1,,2</code> &nbsp; binds the value {{Code|1,2}} to the variable $a
* <code>{URI}a=x</code> &nbsp; binds the value {{Code|x}} to the variable $a with the namespace {{Code|URI}}.
* In the following [[Commands#Command_Scripts| Command Script]], the value {{Code|hello world!}} is bound to the variable {{Code|$GREETING}}:<pre classsyntaxhighlight lang="brush:xmlxquery">
SET BINDINGS GREETING="hello world!"
XQUERY declare variable $GREETING external; $GREETING
</presyntaxhighlight>
|}
===INLINELIMIT===
 
{{Mark|Updated with Version 9.5:}} default reduced to 50.
{| width='100%'
|-
| '''Default'''
|{{Code|10050}}
|-
| '''Summary'''
|}
===TAILCALLSUNROLLLIMIT=== {{Mark|Introduced with Version 9.6:}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TAILCALLSUNROLLLIMIT}}
|-
| '''Default'''
|{{Code|2565}}
|-
| '''Summary'''
|Specifies how many stack frames of [httpThis option controls the unroll limit://en.wikipedia.org/wiki/Tail_call tail-calls] * Loops with few iterations are allowed on ''unrolled'' by the stack at any timeXQuery compiler to enable further optimizations. When this * If the limit is reachedincreased, tail-call optimization takes more optimizations will take place , but the memory consumption and some call frames are eliminatedcompile time will increase. The feature can be turned off by setting the value to {{Code* See [[XQuery Optimizations#Loop Unrolling|-1}}Loop Unrolling]] for more details.
|}
===DEFAULTDBENFORCEINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DEFAULTDBENFORCEINDEX [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If this option is turned on, paths specified Enforces index rewritings in the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] functions will first be resolved against a database that has been opened in the global context outside the query (epath expressions.g. by the {{Command|OPEN}} command). If the path does not match any existing resources, it will be resolved as described in the article on See [[DatabasesIndexes#Access ResourcesEnforce Rewritings|accessing database resourcesEnforce Rewritings]]for details.
|}
===FORCECREATECOPYNODE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FORCECREATE COPYNODE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|By activating this optionWhen creating new nodes in XQuery via [https://www.w3.org/TR/xquery-31/#id-constructors Node Constructors], all enclosed nodes will be copied, database instances and all resulting nodes will get new node identities. This step can be created very expensive, and it can be disabled with this option. The option should be used carefully, as it changes the standard behavior of XQuery functions . It should preferrably be used in [[DatabasesXQuery Extensions#XML DocumentsDatabase Pragmas|fn:doc]] and [[Databases#XML Documents|fn:collectionPragmas]].
|}
===CHECKSTRINGSTAILCALLS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHECKSTRINGS [boolean]TAILCALLS}}
|-
| '''Default'''
|{{Code|true256}}
|-
| '''Summary'''
|By default, characters from external sources that are invalid in XML will trigger an errorSpecifies how many stack frames of [https://en.wikipedia. If the option is set to <code>false<org/wiki/code>, these characters will be replaced with Tail_call tail-calls] are allowed on the Unicode replacement character <code>FFFD</code> (&#xFFFD;)stack at any time. The option affects [[Java Bindings]] and string conversion and input functions such as [[Archive Module#archive:create|archive:create]]When this limit is reached, [[Archive Module#archive:extract-text|archive:extracttail-text]], [[Archive Module#archive:update|archive:update]], call optimization takes place and [[ZIP Module#zip:text-entrysome call frames are eliminated. The feature can be turned off by setting the value to {{Code|zip:text-entry]]1}}.
|}
===LSERRORWITHDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LSERROR [error]WITHDB}}
|-
| '''Default'''
|{{Code|0true}}
|-
| '''Summary'''
|This option specifies By default, resources specified via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] are looked up both in the maximum Levenshtein error for database and in the BaseX-specific fuzzy match file system. If you always use {{Function|Database|db:open}} to access databases, it is recommendable to disable this option. See :* No locks will be created for the page on two functions (see [[Full-TextTransaction Management#Fuzzy_QueryingLimitations|Full-Textslimitations of database locking]] for more information on fuzzy queryingdetails).* Access to local and external resources will be faster, as the database lookup will be skipped.
|}
===RUNQUERYDEFAULTDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNQUERY [boolean]DEFAULTDB}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Specifies if If this option is turned on, paths specified in the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] functions will first be resolved against a database that has been opened in the global context outside the query (e.g. by the {{Command|OPEN}} command). If the path does not match any existing resources, it will be executed or parsed only. This option can also be changed resolved as described in the article on [[Command-Line OptionsDatabases#BaseX StandaloneAccess Resources|command lineaccessing database resources]] via <code>-R</code>.
|}
===RUNSFORCECREATE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNS FORCECREATE [numboolean]}}
|-
| '''Default'''
|{{Code|1false}}
|-
| '''Summary'''
|Specifies how often a query By activating this option, database instances will be evaluated. The result is serialized only once, created with the XQuery functions [[Databases#XML Documents|fn:doc]] and the measured times are averages of all runs. This option can also be changed on [[Command-Line OptionsDatabases#BaseX StandaloneXML Documents|command linefn:collection]] via <code>-r</code>.
|}
===ENFORCEINDEXCHECKSTRINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ENFORCEINDEX CHECKSTRINGS [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Enforces index rewritings By default, characters from external sources that are invalid in path expressions XML will trigger an error. If the option is set to <code>false</code>, these characters will be replaced with the Unicode replacement character <code>FFFD</code> (see &#xFFFD;). The option affects [[IndexesJava Bindings]] and string conversion and input functions such as [[Archive Module#Enforce Rewritingsarchive:create|Enforce Rewritingsarchive:create]], [[Archive Module#archive:extract-text|archive:extract-text]], [[Archive Module#archive:update|archive:update]], and [[ZIP Module#zip:text-entry|zip:text-entry]] for details).
|}
===COPYNODELSERROR===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COPYNODE LSERROR [error]}}|-| '''Default'''|{{Code|0}}|-| '''Summary'''|This option specifies the maximum Levenshtein error for fuzzy full-text matching. By default, if {{Code|0}} is assigned, the error value is calculated dynamically. See [[Full-Text#Fuzzy_Querying|Fuzzy Querying]] for more details.|} ===RUNQUERY=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|RUNQUERY [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|When creating new nodes in XQuery Specifies if a query will be executed or parsed only. This option can also be changed on [[Command-Line Options#BaseX Standalone|command line]] via [https:<code>-R<//wwwcode>.w3.org/TR/xquery|} ===RUNS=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|RUNS [num]}}|-31/#id| '''Default'''|{{Code|1}}|-constructors Node Constructors], all enclosed nodes | '''Summary'''|Specifies how often a query will be copiedevaluated. The result is serialized only once, and the measured times are averages of all resulting nodes will get new node identitiesruns. This step option can also be very expensive, and it can be disabled with this option. The option should be used carefully, as it changes the standard behavior of XQuery. It should preferrably be used in changed on [[XQuery ExtensionsCommand-Line Options#Database PragmasBaseX Standalone|Pragmascommand line]]via <code>-r</code>.
|}
===FULLPLAN===
 
{{Mark|Introduced with Version 9.2:}}
{| width='100%'
* Please take in mind that no backup will be created from your original files.
* The serialization options can be controlled via the {{Option|EXPORTER}} option.
|} ===MAXSTAT=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|MAXSTAT [num]}}|-| '''Default'''|{{Code|30}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the {{Command|INFO INDEX}} command.|} =Changelog=
===MAXSTAT===;Version 9.6* Added: {{Option|UNROLLLIMIT}}
{| width='100%'|-| width='120' | '''Signature''';Version 9.5|* Updated: {{CodeOption|MAXSTAT [num]INLINELIMIT}}: default reduced to 50.|-| '''Default'''|{{Code|30}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the * Updated: {{CommandOption|INFO INDEXRESTXQERRORS}} command.|}: additionally suppress stack trace in HTTP response
=Changelog=;Version 9.4* Added: {{Option|LOGTRACE}}
;Version 9.3
* Added: {{Option|WITHDB}}, {{Option|GZIP}}
;Version 9.2
;Version 8.5
 
* Added: {{Option|CACHETIMEOUT}}, {{Option|LOGPATH}}
* Updated: {{Option|AUTHMETHOD}}: {{Code|custom}} value added.
;Version 8.4
 
* Added: {{Option|TOKENINDEX}}, {{Option|TOKENINCLUDE}}
* Added: {{Option|SPLITSIZE}} (replacing <code>INDEXSPLITSIZE</code> and <code>FTINDEXSPLITSIZE</code>)
;Version 8.3
 
* Added: {{Option|CACHERESTXQ}}, {{Option|TEXTINCLUDE}}, {{Option|ATTRINCLUDE}}, {{Option|FTINCLUDE}}, {{Option|ARCHIVENAME}}
;Version 8.2
 
* Removed: <code>EVENTPORT</code>, <code>CACHEQUERY</code>
;Version 8.1
 
* Added: {{Option|IGNORECERT}}, {{Option|RESTPATH}}
;Version 8.0
 
* Added: {{Option|MIXUPDATES}}, {{Option|AUTOOPTIMIZE}}, {{Option|AUTHMETHOD}}, {{Option|XINCLUDE}}
* Updated: {{Option|PROXYPORT}}: default set to 0; will be ignored. {{Option|PROXYHOST}}, {{Option|NONPROXYHOSTS}}: empty strings will be ignored.
;Version 7.7
 
* Added: {{Option|ADDCACHE}}, {{Option|CHECKSTRINGS}}, {{Option|FTINDEXSPLITSIZE}}, {{Option|INDEXSPLITSIZE}}
;Version 7.6
 
* Added: {{Option|GLOBALLOCK}}
* Added: store local options in configuration file after {{Code|# Local Options}} comments.
;Version 7.5
 
* Added: options can now be set via system properties
* Added: a pragma expression can be used to locally change database options
;Version 7.3
 
* Updated: {{Option|KEEPALIVE}}, {{Option|TIMEOUT}}: default values changed
* Removed: {{Code|WILDCARDS}}; new index supports both fuzzy and wildcard queries
;Version 7.2
 
* Added: {{Option|PROXYHOST}}, {{Option|PROXYPORT}}, {{Option|NONPROXYHOSTS}}, {{Option|HTMLOPT}}
* Updated: {{Option|TIMEOUT}}: ignore timeout for admin users
;Version 7.1
 
* Added: {{Option|ADDRAW}}, {{Option|MAXLEN}}, {{Option|MAXCATS}}, {{Option|UPDINDEX}}
* Updated: {{Option|BINDINGS}}
;Version 7.0
 
* Added: {{Option|SERVERHOST}}, {{Option|KEEPALIVE}}, {{Option|AUTOFLUSH}}, {{Option|QUERYPATH}}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu