Changes

Jump to navigation Jump to search
1,637 bytes added ,  11:35, 17 June 2022
</syntaxhighlight>
* 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:
<syntaxhighlight lang="perl">
===LOGTRACE===
 
{{Mark|Introduced with Version 9.4:}}
{| width='100%'
|-
| '''Summary'''
|If BaseX is running as [[Web Application]], trace output (generated via {{Code|fn:trace}}, {{Function|Profiling|prof:dump}} and similar functions) if is 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.
|}
===GZIP===
 
{{Mark|Introduced with Version 9.3:}}
{| width='100%'
* 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 In addition to 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 Jetty defaults] of the web server will be applied (support for GET requests, exclusion of binaries, MSIE 6.0, etc.), POST and PUT requests are supported.
|}
|-
| '''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'''
|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]].
|}
|-
| '''Default'''
|{{Code|10050}}
|-
| '''Summary'''
|}
===TAILCALLSUNROLLLIMIT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TAILCALLSUNROLLLIMIT}}
|-
| '''Default'''
|{{Code|2565}}
|-
| '''Summary'''
|Specifies how many stack frames of [httpsThis 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.
|}
===WITHDBENFORCEINDEX=== {{Mark|Introduced with Version 9.3.}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WITHDBENFORCEINDEX [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|By default, resources specified via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] are looked up both in the database and Enforces index rewritings in the file systempath expressions. If you always use {{Function|Database|db:open}} to access databases, it is recommendable to disable this option:* No locks will be created for the two functions (see See [[Transaction ManagementIndexes#LimitationsEnforce Rewritings|limitations of database lockingEnforce Rewritings]] for more details).* Access to local and external resources will be faster, as the database lookup will be skipped.
|}
===DEFAULTDBCOPYNODE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DEFAULTDBCOPYNODE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|If this option is turned on, paths specified When creating new nodes in the [XQuery via [Databases#XML Documents|fnhttps:doc]] and [[Databases//www.w3.org/TR/xquery-31/#XML Documents|fn:collectionid-constructors Node Constructors]] functions , copies of all enclosed nodes will first be resolved against created, and the copied nodes get new node identities. As a database that has been opened in the global context outside result, the following query (e.g. by the yields <code>false</code>:<syntaxhighlight lang="xquery">let $a := <a/>let $b := <b>{{Command|OPEN$a }} command)</b>return $b/a is $a</syntaxhighlight>This step can be very expensive and memory consuming. If the path does not match any existing resourcesoption is disabled, it child nodes will only be linked to the new parent nodes, and the upper query returns <code>true</code>.<br>The option should be resolved used carefully as described it changes the semantics of XQuery. It should preferably be used in the article on [[DatabasesXQuery Extensions#Access ResourcesDatabase Pragmas|accessing database resourcesPragmas]].
|}
===FORCECREATETAILCALLS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FORCECREATE [boolean]TAILCALLS}}
|-
| '''Default'''
|{{Code|false256}}
|-
| '''Summary'''
|By activating Specifies how many stack frames of [https://en.wikipedia.org/wiki/Tail_call tail-calls] are allowed on the stack at any time. When this optionlimit is reached, database instances will tail-call optimization takes place and some call frames are eliminated. The feature can be created with turned off by setting the XQuery functions [[Databases#XML Documentsvalue to {{Code|fn:doc]] and [[Databases#XML Documents|fn:collection]]-1}}.
|}
===CHECKSTRINGSWITHDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHECKSTRINGS [boolean]WITHDB}}
|-
| '''Default'''
|-
| '''Summary'''
|By default, characters from external sources that are invalid in 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> (&#xFFFD;). The option affects [[Java Bindings]] and string conversion and input functions such as resources specified via [[Archive ModuleDatabases#archive:createXML Documents|archivefn:createdoc]], and [[Archive ModuleDatabases#archive:extract-textXML Documents|archivefn:extract-textcollection]], [[Archive Module#archive:updateare looked up both in the database and in the file system. If you always use {{Function|Database|archivedb:update]]open}} to access databases, and it is recommendable to disable this option:* No locks will be created for the two functions (see [[ZIP ModuleTransaction Management#zip:text-entryLimitations|zip:text-entrylimitations of database locking]]for more details).* Access to local and external resources will be faster, as the database lookup will be skipped.
|}
===LSERRORDEFAULTDB===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LSERROR [error]DEFAULTDB}}
|-
| '''Default'''
|{{Code|0false}}
|-
| '''Summary'''
|This If this option specifies is turned on, paths specified in the maximum Levenshtein error for [[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 BaseX-specific fuzzy {{Command|OPEN}} command). If the path does not match option. See any existing resources, it will be resolved as described in the page article on [[Full-TextDatabases#Fuzzy_QueryingAccess Resources|Full-Textsaccessing database resources]] for more information on fuzzy querying.
|}
===RUNQUERYFORCECREATE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNQUERY FORCECREATE [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Specifies if a query By activating this option, database instances will be executed or parsed only. This option can also be changed on created with the XQuery functions [[Databases#XML Documents|fn:doc]] and [[Command-Line OptionsDatabases#BaseX StandaloneXML Documents|command linefn:collection]] via <code>-R</code>.
|}
===RUNSCHECKSTRINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNS CHECKSTRINGS [numboolean]}}
|-
| '''Default'''
|{{Code|1true}}
|-
| '''Summary'''
|Specifies how often a query By default, characters from external sources that are invalid in XML will be evaluatedtrigger an error. The result If the option is serialized only onceset to <code>false</code>, and these characters will be replaced with the measured times are averages of all runsUnicode replacement character <code>FFFD</code> (&#xFFFD;). This The option can also be changed on affects [[Java Bindings]] and string conversion and input functions such as [[Archive Module#archive:create|archive:create]], [[CommandArchive Module#archive:extract-text|archive:extract-Line Optionstext]], [[Archive Module#BaseX Standalonearchive:update|command linearchive:update]] via <code>, and [[ZIP Module#zip:text-entry|zip:text-r</code>entry]].
|}
===ENFORCEINDEXWRAPJAVA===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ENFORCEINDEX WRAPJAVA [booleanmode]}}
|-
| '''Default'''
|{{Code|falsesome}}
|-
| '''Summary'''
|Enforces index rewritings in path expressions (see Defines the way how values that result from Java code invocation will be converted to XQuery items. Allowed values: {{Code|none}}, {{Code|all}}, {{Code|some}}, {{Code|instance}}, and {{Code|void}}. See [[IndexesJava_Bindings#Enforce RewritingsConversion to XQuery|Enforce RewritingsJava Bindings]] for further details).
|}
===COPYNODELSERROR===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COPYNODE LSERROR [booleanerror]}}
|-
| '''Default'''
|{{Code|true0}}
|-
| '''Summary'''
|When creating new nodes in XQuery via [https://www.w3.org/TR/xquery-31/#idThis option specifies the maximum Levenshtein error for fuzzy full-constructors Node Constructors], all enclosed nodes will be copied, and all resulting nodes will get new node identitiestext matching. This step can be very expensiveBy default, and it can be disabled with this option. The option should be used carefullyif {{Code|0}} is assigned, as it changes the standard behavior of XQueryerror value is calculated dynamically. It should preferrably be used in See [[XQuery ExtensionsFull-Text#Database PragmasFuzzy_Querying|PragmasFuzzy Querying]]for more details.
|}
=Serialization Options= ===SERIALIZERUNQUERY===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RUNQUERY [boolean]}}|-| '''Default'''|{{Code|true}}|-| '''Summary'''|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 <code>-R</code>.|} ===RUNS=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|RUNS [num]}}|-| '''Default'''|{{Code|1}}|-| '''Summary'''|Specifies how often a query will be evaluated. The result is serialized only once, and the measured times are averages of all runs. This option can also be changed on [[Command-Line Options#BaseX Standalone|command line]] via <code>-r</code>.|} =Serialization Options= ===SERIALIZE=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|SERIALIZE [boolean]}}
|-
| '''Default'''
|}
===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= ;Version 9.7* Updated: {{Option|GZIP}}: Support for POST and PUT requests.
{| width='100%'|-| width='120' | '''Signature'''|{{Code|MAXSTAT [num]}}|-| '''Default''';Version 9.6|* Added: {{CodeOption|30UNROLLLIMIT}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the , {{CommandOption|INFO INDEXWRAPJAVA}} command.|}
=Changelog=;Version 9.5* Updated: {{Option|INLINELIMIT}}: default reduced to 50.* Updated: {{Option|RESTXQERRORS}}: additionally suppress stack trace in HTTP response
;Version 9.34
* Added: {{Option|LOGTRACE}}
;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