Changes

Jump to navigation Jump to search
8,009 bytes added ,  19 August
no edit summary
This page is linked from the [[Getting Started]] Section.
The options listed on this page influence the way how database [[Commands|commands]] are executed and XQuery expressions are evaluated. Options are divided into [[#Global Options|'''global options''']], which are valid for all BaseX instances, and '''local options''', which are specific to a client or session. Values Two kinds of options are either ''strings'', ''numbers'' or ''booleans''.exist:
The {{Code|.basex}} * '''[[Configuration#Configuration FilesGlobal Options|configuration fileGlobal Options]] ''' are valid for all BaseX instances in the same JVM. This is parsed by every new local BaseX instanceparticularly relevant if you are working with the client/server architecture. It contains * '''Local options''' (all global options and, optionally, local options at the end of the fileremaining ones) are specific to a client or session.
Values of options are either ''strings'', ''numbers'' or ''booleans''. Options are ''static'' and not bound to a single operation (for example, the next command). Various ways exist to access and change options:
* The current value of an option can be requested with the {{Command|GET}} command. Local options can be changed via {{Command|SET}}. All values are ''static'': They stay valid until they are (all global options, except for {{Option|DEBUG}}, can only be changed once again by another operationat startup time). If an option is of type ''boolean'', and if no value is specified, its current value will be inverted.
* Initial values for global options can also be specified via system properties, which can eThe {{Code|.g. be passed on with the basex}} [[http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.htmlConfiguration#options -D flagConfiguration Files|configuration file] on command line, or using [http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String,%20java.lang.String) System.setProperty()] before creating a is parsed by every new local BaseX instance. The It contains all global options. Local options can be specified keys need to be prefixed with at the end of the file after the {{Code|org.basex.Local Options}}. An examplecomment:
<pre classsyntaxhighlight lang="brushperl"># General OptionsDEBUG = false... # Local OptionsCHOP = false</syntaxhighlight> * Initial values for global options can also be specified via system properties, which can e.g. be passed on with the [https:xquery//docs.oracle.com/en/java/javase/11/tools/java.html -D flag] on command line, or using [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#setProperty(java.lang.String,java.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">
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 pragmas (see [[XQuery Extensions#Pragmas|pragmas]]).
If options are changed by operations in the [[GUI]], the underlying commands will be listed in the [[GUI#Visualizations|Info View]].<br/><br/>
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXData]]</code> or <code>[[Configuration#Database Directory|{home}/data]]</code>
|-
| '''Summary'''
===LOGPATH===
 
{{Mark|Updated with Version 8.5}}:
{| width='100%'
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXReporepo]]</code>
|-
| '''Summary'''
|}
===GLOBALLOCKFAIRLOCK===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|GLOBALLOCK FAIRLOCK [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Controls Defines the locking strategy:* By default, non-fair is used. Read transactions will be favored, and transactions that access no databases can be evaluated even if local the limit of parallel transactions (databasespecified via {{Option|PARALLEL}}) or global (process) locking will has been reached. This prevents update operations from blocking all other requests. For example, the DBA can further be used for managing to see which jobs are running, even if the queue is full.* If fair locking is enabled, read and write transactions will be treated equally (first in, first out). This avoids starvation of update operations. The article on [[Transaction Management]] provides more details on concurrency control, and it should be used if the prompt evaluation of update operations is critical.
|}
===CACHETIMEOUT===
 
{{Mark|Introduced with Version 8.5:}}
{| width='100%'
|-
| '''Summary'''
|Represents a password, which is used for accessing the server or an HTTP service:
* The default value will be overwritten if a client specifies its own credentials.
* If the default value is empty, login will only be possible if the client specifies credentials.
===AUTHMETHOD===
 
{{Mark|Updated with Version 8.5}}: {{Code|custom}} value added.
{| width='100%'
| '''Summary'''
|This is a list of hosts that should be directly accessed. If the value is an empty string, it will be ignored.
|}
 
===IGNOREHOSTNAME===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|IGNOREHOSTNAME [boolean]}}
|-
| '''Default'''
|{{Code|false}}
|-
| '''Summary'''
|If this option is enabled, hostnames of certificates will not be verified. Use {{Option|IGNORECERT}} to completely disable certificate verification.
|}
|-
| '''Summary'''
|This option can be turned on to ignore untrusted certificates when connecting to servers. Please use this option carefullyUse {{Option|IGNOREHOSTNAME}} to suppress only the hostname verification.
|}
|-
| '''Summary'''
|Denotes the maximum allowed number of parallel [[Transaction Management|transactions]]:* If {{Option|FAIRLOCK}} is enabled, the number of parallel transactions will never exceed the specified value.<br/>Note * If the option is disabled (which is the default), the limit only applies to transactions that a access databases.* The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations. A higher number of parallel operations may increase disk activity and thus slow down queries. In some cases, a single transaction may even give you better results than any parallel activity. The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations.
|}
|}
==HTTP Services== If BaseX is run as web servlet, the HTTP options must be specified in the <code>[https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/WEB-INF webapp/WEB-INF]</code> directory and the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files. ===WEBPATHLOGTRACE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WEBPATH LOGTRACE [pathboolean]}}
|-
| '''Default'''
|<code>[[Configuration#Database Directory{{Code|{hometrue}/BaseXWeb]]</code> or <code>[[Configuration#Database Directory|{home}/webapp]]</code>
|-
| '''Summary'''
|Points to the directory in which all the If BaseX is running as [[Web Application]] contents are stored, including XQuery, Scripttrace output (generated via {{Code|fn:trace}}, {{Function|Profiling|prof:dump}} and similar functions) is written to the [[RESTXQLogging|database logs]] and configuration files. This If this option is ignored if disabled, trace output will be redirected to standard error, as it is known from the standalone version of BaseX is deployed as [[Web Application#Servlet_Container|web servlet]].
|}
==HTTP Services=RESTXQPATH= Most HTTP options are defined in the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files in the <code>[https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/WEB-INF webapp/WEB-INF]</code> directory. Some additional BaseX-specific options exist that will be set before the web server is started: ===WEBPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RESTXQPATH WEBPATH [path]}}
|-
| '''Default'''
|''empty''<code>[[Configuration#Database Directory|{home}/webapp]]</code>
|-
| '''Summary'''
|Points to the directory in which contains all the [[Web Application]] contents are stored, including XQuery, Script, [[RESTXQ]] modules of a and configuration files:* The option is ignored if BaseX is deployed as [[Web Application#Servlet_Container|web applicationservlet]]. Relative paths will * It cannot be resolved against assigned via the {{OptionCode|WEBPATHweb.xml}} directoryfile, as it will be evaluated before the configuration files are parsed.
|}
===CACHERESTXQGZIP===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CACHERESTXQGZIP [boolean]}}
|-
| '''Default'''
|{{Code|<code>false}}</code>
|-
| '''Summary'''
|Disables 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 timestamp check when parsing RESTXQ files. See [[RESTXQWeb Application|BaseX HTTP Server]]:* The option can also be enabled on [[Command-Line Options#PreliminariesHTTP Server|RESTXQ Preliminariescommand 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 more detailsGET requests, exclusion of binaries, MSIE 6.0, etc.).
|}
===RESTPATHRESTXQPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RESTPATH RESTXQPATH [path]}}
|-
| '''Default'''
|-
| '''Summary'''
|Points to the directory which contains XQuery files and command scripts, which can be evaluated via the [[REST#GET Requests|REST run operationRESTXQ]]modules of a web application. Relative paths will be resolved against the {{Option|WEBPATH}} directory.
|}
===HTTPLOCALPARSERESTXQ===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|HTTPLOCAL [boolean]PARSERESTXQ}}
|-
| '''Default'''
|{{Code|false3}}
|-
| '''Summary'''
|By default, if BaseX Timeout after which the RESTXQ directory will be parsed for changes:* If {{Code|0}} is run as [[Web Application]]specified, a database server instance the directory will be started as soon as the first HTTP service parsed every time a RESTXQ function is called. The server can then * A positive value defines the idle time in seconds after which parsing will be addressed by other BaseX clients in parallel to the HTTP servicesenforced.<br/>If the option The default value is set to {{Code|false3}}, : Changes in the database server RESTXQ directory will be detected after 3 seconds without RESTXQ function calls.* Monitoring is completely disabledif a negative value is specified. See [[RESTXQ#Preliminaries|RESTXQ Preliminaries]] for more details.
|}
===STOPPORTRESTXQERRORS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STOPPORT [port]RESTXQERRORS}}
|-
| '''Default'''
|{{Code|8985true}}
|-
| '''Summary'''
|This is Reports parsing errors in XQuery modules in the port on which the [[Startup#BaseX HTTP Server|HTTP Server]] can be locally closed:* The listener for stopping RESTXQ directory and returns the web server will only be started if full error message and stack trace to the specified value is greater than {{Code|0}}client.* The By default, this option is ignored if BaseX is used as enabled. In a [[Web Application]] or started via [[Web Application#Maven|Maven]].* This option production environment, it can be disabled to suppress errors that should not be seen by the user of an API (the full error information can also still be changed when running looked up in the HTTP server on database logs). See [[Command-Line OptionsRESTXQ#BaseX ServerError Handling|command lineRESTXQ Error Handling]] via <code>-s</code>for more details.
|}
=Create Options= ==General== ===MAINMEMRESTPATH===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAINMEM RESTPATH [booleanpath]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|If this option is turned onPoints to the directory which contains XQuery files and command scripts, new databases will be exclusively created in main memory. Most queries will which can be evaluated faster in main memory mode, but all data is lost if BaseX is shut downvia the [[REST#GET Requests|REST run operation]]. The value of this option Relative paths will be assigned once to a new database, and cannot be changed after thatresolved against the {{Option|WEBPATH}} directory.
|}
===ADDCACHEHTTPLOCAL===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDCACHE HTTPLOCAL [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If this option By default, if BaseX is activatedrun as [[Web Application]], data structures of documents the database server instance will first be cached to disk before being added to started in addition, which can then be addressed by [[Clients]] via the final databaseport (see {{Option|PORT}}). This <br/>If the option is helpful when larger documents need set to {{Code|true}}, no database server will be added, and if the existing heuristics cannot estimate the input size (e.g. when adding directories or sending input streams)launched.
|}
==Parsing== ===CREATEFILTERSTOPPORT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CREATEFILTER STOPPORT [filterport]}}
|-
| '''Default'''
|{{Code|*.xml8985}}
|-
| '''Summary'''
|File filter in This is the port on which the [[CommandsStartup#Glob SyntaxBaseX HTTP Server|Glob SyntaxHTTP Server]], which can be locally closed:* The listener for stopping the web server will only be started if the specified value is greater than {{Code|0}}.* The option is ignored if BaseX is applied whenever new databases are created, used as a [[Web Application]] or resources are added to a databasestarted via [[Web Application#Maven|Maven]].* This option can also be changed when running the HTTP server on [[Command-Line Options#BaseX Server|command line]] via <code>-s</code>.
|}
=Create Options= =ADDARCHIVES=General== ===MAINMEM===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDARCHIVES MAINMEM [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|If this option is set turned on, new databases will be created in main memory:* Most queries will be evaluated faster in main-memory mode, but all data is lost if the BaseX instance in which the database was created is shut down.* It is not possible to store binary resources in a main-memory database.* A main-memory database will have no disk representation. However, it is possible to export the database via the {{CodeCommand|trueEXPORT}}command, files within archives (ZIPand create a new database from the exported file in a second step.* This option will not be available for [[Database Module#db:create|db:create]], GZIPbecause the database would not be accessible anymore after database creation, TAR, TGZ, DOCXi. e., etc.) are parsed whenever new databases are created or resources are added to a databaseoutside the query scope.
|}
===ARCHIVENAMEADDCACHE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ARCHIVENAME ADDCACHE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If this option is set to {{Code|true}}activated, the file name data structures of parsed archives documents will first be included in cached to disk before being added to the final database. This option is helpful when larger documents need to be added, and if the existing heuristics cannot estimate the document pathsinput size (e.g. when adding directories or sending input streams).
|}
==Parsing=SKIPCORRUPT= ===CREATEFILTER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SKIPCORRUPT CREATEFILTER [booleanfilter]}}
|-
| '''Default'''
|{{Code|false*.xml}}
|-
| '''Summary'''
|Skips corrupt (i.e.File filter in the [[Commands#Glob Syntax|Glob Syntax]], not well-formed) files while creating a database or adding which is applied whenever new documents. If this option is activateddatabases are created, document updates or resources are slowed down, as all files will be parsed twice. Next, main memory consumption will be higher as parsed files will be cached in main memoryadded to a database.
|}
===ADDRAWADDARCHIVES===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ADDRAW ADDARCHIVES [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|If this option is activated, and if new resources are added set to a database, all files that are not filtered by the {{OptionCode|CREATEFILTERtrue}} option will be added as ''raw'' , files within archives (iZIP, GZIP, TAR, TGZ, DOCX, etc.e., in their binary representation)are parsed whenever new databases are created or resources are added to a database.
|}
===PARSERARCHIVENAME===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|PARSER ARCHIVENAME [typeboolean]}}
|-
| '''Default'''
|{{Code|XMLfalse}}
|-
| '''Summary'''
|Defines a [[ParsersIf this option is set to {{Code|parser]] for importing new files to true}}, the database. Currently, 'XML', 'JSON', 'CSV', 'TEXT', 'HTML' are available as parsers. HTML file name of parsed archives will be parsed as normal XML files if [http://home.ccil.org/~cowan/XML/tagsoup/ Tagsoup] is not found included in the classpathdocument paths.
|}
===CSVPARSERSKIPCORRUPT===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CSVPARSER SKIPCORRUPT [optionsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies the way how CSV data will be parsedSkips corrupt (i.e. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>not well-formed) files while creating a database or adding new documents. The available options (except for the additional <code>encoding</code> If this option) is activated, document updates are described in the [[CSV Module#Options|CSV Module]]slowed down, as all files will be parsed twice.|-| '''Examples'''|<code>encoding=CP1252Next,header=true</code> parses the input main memory consumption will be higher as CP1252 and the first line as headerparsed files will be cached in main memory.|}
===JSONPARSERADDRAW===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|JSONPARSER ADDRAW [optionsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies the way how JSON data will be parsed. Keys and values are delimited with <code>=</code>If this option is enabled, and multiple options all resources that are delimited with <code>,</code>. The available options (except for filtered out by the additional <code>encoding</code> {{Option|CREATEFILTER}} option) are described in the while being added to a database will be stored as [[JSON Module#OptionsBinary Data|JSON Moduleraw files]]instead (i.e.|-| '''Examples'''|<code>format=jsonml,lax=yes</code> interprets the input as JSONML and uses lax parsingin their binary representation).
|}
===HTMLPARSERPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|HTMLPARSER PARSER [optionstype]}}
|-
| '''Default'''
|''empty''{{Code|XML}}
|-
| '''Summary'''
|Specifies Defines a [[Parsers|parser]] for importing new files to the way how HTML data will be parseddatabase. Keys and values Available parsers are delimited with <code>=</code>{{Code|XML}}, {{Code|JSON}}, {{Code|CSV}}, {{Code|TEXT}}, {{Code|HTML}}, and multiple options are delimited with <code>,</code>{{Code|RAW}}. The available options are described in the HTML input will be parsed as XML documents if [[Parsers#HTML_Parser|Tagsoup]] article.|-| '''Examples'''|<code>encoding=Shift-JIS,nons=true</code> parses is not found in the input as Sihft-JIS and suppresses namespacesclasspath.
|}
===TEXTPARSERCSVPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTPARSER CSVPARSER [options]}}
|-
| '''Default'''
|-
| '''Summary'''
|Specifies the way how TEXT CSV data will be parsed. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options (except for the additional <code>encoding</code> option) are listed described in the [[ParsersCSV Module#Options|CSV Module]] article.
|-
| '''Examples'''
|<code>linesencoding=CP1252,header=true</code> creates a single element for each parses the input as CP1252 and the first line of textas header.
|}
==XML Parsing== ===CHOPJSONPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CHOP JSONPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Many XML documents include whitespaces that have been added to improve readability. This option controls Specifies the [http://wwwway how JSON data will be parsed.w3.orgKeys and values are delimited with <code>=</TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:* With the default value {{Code|true}}code>, 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]].* The flag can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via multiple options are delimited with <code>-w,</code>.* If The available options (except for the additional <code>xml:space="preserve"encoding</code> attribute is attached to an element, chopping will be turned off for all descendant text nodes. In the following example document, the whitespaces option) are described in the text nodes of the {{Code[[JSON Module#Options|text}} element will not be chopped:JSON Module]].<pre class="brush:xml">|-<xml>| '''Examples''' |<title> Demonstrating the CHOP flag </titlecode> <text xml:spaceformat="preserve">To <b>be</b>jsonml, or not to <b>belax=yes</bcode>, that is interprets the questioninput as JSONML and uses lax parsing.</text></xml></pre>
|}
===STRIPNSHTMLPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STRIPNS HTMLPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Strips all Specifies the way how HTML data will be parsed. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options are described in the [[Parsers#Options|Parsers]] article.|-| '''Examples'''|* <code>encoding=Shift-JIS,nons=true</code> parses the input as Sihft-JIS and suppresses namespaces from an XML document and all elements while parsing.* <code>lexical=true</code> preserves comments.
|}
===INTPARSETEXTPARSER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|INTPARSE TEXTPARSER [booleanoptions]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Uses Specifies the internal XML parser instead of the standard Java XML parser. Here are some reasons for using the internal parser:* Performance: Documents (in particular small ones) way how TEXT data will be parsed faster* Fault tolerance: invalid characters will automatically be replaced . Keys and values are delimited with the Unicode replacement character <code>FFFD=</code> (&#xFFFD;)* Entities: around 250 HTML entities will be detected , and decodedYou will be able to correctly parse most XML documents multiple options are delimited with <code>,</code>. The available options are listed in the internal parser[[Parsers]] article. Java’s Xerces parser is still used as default, however, because it supports all features |-| '''Examples'''|<code>lines=true</code> creates a single element for each line of the XML standard and advanced DTD features, such as recursive entity expansiontext.
|}
==XML Parsing=DTD= ===CHOP===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DTD CHOP [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Parses referenced DTDs and resolves Many XML entitiesdocuments include whitespaces that have been added to improve readability. By This option controls the [https://www.w3.org/TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:* With the defaultvalue {{Code|true}}, this option 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]].* The flag can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via <code>-w</code>.* If the <code>xml:space="preserve"</code> attribute is switched attached to an element, chopping will be turned off for all descendant text nodes.  In the following example document, the whitespaces in the text nodes of the {{Code|falsetext}}element will not be chopped:<syntaxhighlight lang="xml"><xml> <title> Demonstrating the CHOP flag </title> <text xml:space="preserve">To <b>be</b>, as many DTDs are located externallyor not to <b>be</b>, which may completely block that is the process of creating new databasesquestion. The </text></xml></syntaxhighlight>It is recommendable to additionally assign <code>indent=no</code> to the {{Option|CATFILESERIALIZER}} option can ; otherwise the serialized documents will automatically be changed to locally resolve DTDsindented.
|}
===XINCLUDESTRIPNS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XINCLUDE STRIPNS [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Resolves XInclude inclusion tags Strips all namespaces from an XML document and merges referenced XML documents. By default, this option is switched to {{Code|true}}. This option is only available if the standard Java XML Parser is used (see {{Option|INTPARSE}})all elements while parsing.
|}
===CATFILEINTPARSE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CATFILE INTPARSE [pathboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Specifies a catalog file Uses the internal XML parser instead of the standard Java XML parser. Here are some reasons for using the internal parser:* Performance: Documents (in particular small ones) will be parsed faster* Fault tolerance: invalid characters will automatically be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;)* Entities: around 250 HTML entities will be detected and decodedYou will be able to locally resolve DTDscorrectly parse most XML documents with the internal parser. See Java’s Xerces parser is still used as default, however, because it supports all features of the entry on [[Catalog Resolver]]s for more detailsXML standard and advanced DTD features, such as recursive entity expansion.
|}
==Indexing== The following options control the creation of index structures. The current values will be considered if a new database is created. See [[Indexes]] for more details. ===TEXTINDEXDTD===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTINDEX DTD [boolean]}}
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Creates a text index whenever a Parses referenced DTDs and resolves XML entities. By default, this option is switched to {{Code|false}}, as many DTDs are located externally, which may completely block the process of creating new database is created. A text index speeds up queries with equality comparisons on text nodesdatabases. See [[Index#Text IndexThe {{Option|Text Index]] for more detailsCATFILE}} option can be changed to locally resolve DTDs.
|}
===ATTRINDEXXINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ATTRINDEX XINCLUDE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Creates an attribute index whenever a new database Resolves XInclude inclusion tags and merges referenced XML documents. By default, this option is createdswitched to {{Code|true}}. An attribute index speeds up queries with equality comparisons on attribute values. See [[Index#Attribute IndexThis option is only available if the standard Java XML Parser is used (see {{Option|Attribute Index]] for more detailsINTPARSE}}).
|}
===TOKENINDEXCATFILE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TOKENINDEX CATFILE [booleanpath]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Creates a token index whenever a new database is created. A token index speeds up searches for single tokens in attribute valuesSemicolon-separated list of XML catalog files to resolve URIs. See [[Index#Token Index|Token IndexCatalog Resolver]] s for more details.
|}
==Indexing=FTINDEX= The following options control the creation of index structures. The current values will be considered if a new database is created. See [[Indexes]] for more details. ===TEXTINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FTINDEX TEXTINDEX [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Creates a full-text index whenever a new database is created. A full-text index speeds up queries with full-equality comparisons on text expressionsnodes. See [[Index#Full-Text Index|Full-Text Index]] for more details.
|}
===TEXTINCLUDEATTRINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TEXTINCLUDE ATTRINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Defines name patterns for the parent elements of texts that are indexedCreates an attribute index whenever a new database is created. By default, all text nodes will be indexed.<br/>Name patterns are separated by commasAn attribute index speeds up queries with equality comparisons on attribute values. See [[IndexesIndex#Selective IndexingAttribute Index|Selective IndexingAttribute Index]] for more details.
|}
===ATTRINCLUDETOKENINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ATTRINCLUDE TOKENINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|true}}
|-
| '''Summary'''
|Defines name patterns Creates a token index whenever a new database is created. A token index speeds up searches for the attributes to be indexed. By default, all single tokens in attribute nodes will be indexed.<br/>Name patterns are separated by commasvalues. See [[IndexesIndex#Selective IndexingToken Index|Selective IndexingToken Index]] for more details.
|}
===TOKENINCLUDEFTINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|TOKENINCLUDE FTINDEX [namesboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|Defines name patterns for the attributes to be indexedCreates a full-text index whenever a new database is created. By default, tokens in all attribute nodes will be indexed.<br/>Name patterns are separated by commasA full-text index speeds up queries with full-text expressions. See [[IndexesIndex#Selective IndexingFull-Text Index|Selective IndexingFull-Text Index]] for more details.
|}
===FTINCLUDETEXTINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FTINCLUDE TEXTINCLUDE [names]}}
|-
| '''Default'''
|}
===MAXLENATTRINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAXLEN ATTRINCLUDE [intnames]}}
|-
| '''Default'''
|{{Code|96}}''empty''
|-
| '''Summary'''
|Specifies Defines name patterns for the maximum length of strings that are attributes to be indexed by the name, path, value. By default, and full-text index structures. The value of this option all attribute nodes will be assigned once to a new database, and cannot be changed after thatindexed.<br/>Name patterns are separated by commas. See [[Indexes#Selective Indexing|Selective Indexing]] for more details.
|}
===MAXCATSTOKENINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MAXCATS TOKENINCLUDE [intnames]}}
|-
| '''Default'''
|{{Code|100}}''empty''
|-
| '''Summary'''
|Specifies Defines name patterns for the maximum number of distinct values (categories) that attributes to be indexed. By default, tokens in all attribute nodes will be stored together with the elementindexed.<br/attribute names or unique paths in the [[Index#>Name Index|Name Index]] or patterns are separated by commas. See [[IndexIndexes#Path IndexSelective Indexing|Path IndexSelective Indexing]]. The value of this option will be assigned once to a new database, and cannot be changed after thatfor more details.
|}
===UPDINDEXFTINCLUDE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|UPDINDEX FTINCLUDE [booleannames]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|If turned on, incremental indexing will be enabled:* The current value of this option will be assigned to new databases. It can be changed Defines name patterns for existing databases by running {{Command|OPTIMIZE}} with the {{Code|ALL}} keyword or [[Database_Module#db:optimize|db:optimize($db, true())]]parent elements of texts that are indexed.* After each updateBy default, the value indexes all text nodes will be refreshed as wellindexed. Incremental updates <br/>Name patterns are currently not available for the full-text index and database statisticsseparated by commas.* Find more details in the article on See [[IndexIndexes#UpdatesSelective Indexing|Index StructuresSelective Indexing]]for more details.
|}
===AUTOOPTIMIZEMAXLEN===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|AUTOOPTIMIZE MAXLEN [booleanint]}}
|-
| '''Default'''
|{{Code|false96}}
|-
| '''Summary'''
|If turned on, auto optimization will be applied Specifies the maximum length for strings to new databases:* With each update, outdated indexes and database statistics will be recreated.* As a result, the stored in [[Indexes|index structures will always be up-to-date]].* However, updates can take much longer, so this option should only be activated for medium-sized databases.* The value of this option will be assigned once to a new database. It , and can only be reassigned changed by running {{Command|OPTIMIZE}} creating a new database or doing a [[Database_ModuleCommands#db:optimizeOPTIMIZE|db:optimizefull optimization]].
|}
===SPLITSIZEMAXCATS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SPLITSIZE MAXCATS [numint]}}
|-
| '''Default'''
|{{Code|0100}}
|-
| '''Summary'''
|This option affects Specifies the maximum number of distinct values (categories) that will be stored together with the element/attribute names or unique paths in the [[IndexesIndex#Name Index|Name Index]] or [[Index#PerformancePath Index|constructionPath Index]] of new value indexes. It controls the number of index build operations that are performed before writing partial index data to disk:* The larger the assigned value is, the less splits of this option will take placebe assigned once to a new database, and the more main memory will cannot be required.* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumptionchanged after that.
|}
==Full-Text Indexing== ===STEMMINGUPDINDEX===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STEMMING UPDINDEX [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If turned on, incremental indexing will be enabled:* The current value of this option will be assigned to new databases. It can be changed for existing databases by running {{Command|OPTIMIZE}} with the {{Code|trueALL}}keyword or [[Database_Module#db:optimize|db:optimize($db, true())]].* After each update, all tokens the value indexes will be stemmed during refreshed as well. Incremental updates are currently not available for the full-text indexing, using a language-specific stemmer implementationindex and database statistics. By default, tokens will not be stemmed. See * Find more details in the article on [[IndexesIndex#Full-Text IndexUpdates|Full-Text IndexStructures]] for more details.
|}
===CASESENSAUTOOPTIMIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CASESENS AUTOOPTIMIZE [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|If {{Code|true}}turned on, auto optimization will be applied to new databases:* With each update, outdated indexes and database statistics will be recreated.* As a result, the case of tokens index structures will always be preserved during fullup-text indexingto-date. By default* However, case will updates can take much longer, so this option should only be ignored (all tokens activated for medium-sized databases.* The value of this option will be indexed in lower case)assigned once to a new database. See It can be reassigned by running {{Command|OPTIMIZE}} or [[IndexesDatabase_Module#Full-Text Indexdb:optimize|Full-Text Indexdb:optimize]] for more details.
|}
===DIACRITICSSPLITSIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DIACRITICS SPLITSIZE [booleannum]}}
|-
| '''Default'''
|{{Code|false0}}
|-
| '''Summary'''
|If 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|true0}}, diacritics will be preserved during full-text indexingsome heuristics are applied, based on the current memory consumption. By defaultUsually, diacritics will be removedthis works fine.* If explicit garbage collection is disabled when running Java (e.g. See [[Indexes#Fullvia the JVM option {{Code|-Text IndexXX:+DisableExplicitGC}}), you may need to choose a custom split size.* You can e. g. start with {{Code|Full-Text Index]] for 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 detailsmain memory will be required.
|}
==Full-Text Indexing=LANGUAGE= ===STEMMING===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LANGUAGE STEMMING [langboolean]}}
|-
| '''Default'''
|{{Code|enfalse}}
|-
| '''Summary'''
|The specified language will influence the way how texts If {{Code|true}}, all tokens will be tokenized and stemmedduring full-text indexing, using a language-specific stemmer implementation. It can By default, tokens will not be the name of a language or a language codestemmed. See [[Indexes#Full-Text Index|Full-Text Index]] for more details.
|}
===STOPWORDSCASESENS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|STOPWORDS CASESENS [pathboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''Summary'''
|A new If {{Code|true}}, the case of tokens will be preserved during full-text index indexing. By default, case will drop be ignored (all tokens that are listed will be indexed in the specified stopword list. A stopword list may decrease the size of the full text indexlower case). See [[Indexes#Full-Text Index|Full-Text Index]] for more details.
|}
=Query Options= ===QUERYINFODIACRITICS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|QUERYINFO DIACRITICS [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Prints more information on internal query rewritingsIf set to {{Code|true}}, optimizations, and performancediacritics will be preserved during full-text indexing. By default, this info is shown in the diacritics will be removed. See [[GUIIndexes#VisualizationsFull-Text Index|Info View]] in the GUI. It can also be activated on [[CommandFull-Line Options#BaseX Standalone|command lineText Index]] via <code>-V</code>for more details.
|}
===XQUERY3LANGUAGE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XQUERY3LANGUAGE [lang]}}
|-
| '''Default'''
|{{Code|trueen}}
|-
| '''Summary'''
|Enables all The specified language will influence the way how texts will be tokenized and stemmed. It can be the name of a language or a language code. See [[XQuery 3.0Indexes#Full-Text Index|Full-Text Index]] features supported by BaseX. If this option is set to {{Code|false}}, the XQuery parser will only accept expressions of the XQuery 1.0 specificationfor more details.
|}
===MIXUPDATESSTOPWORDS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|MIXUPDATESSTOPWORDS [path]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned offIf a text file with stop words is specified, and nodes to be returned frequently used terms contained in that file will be copied before they are modified by an updating expressionignored when a full-text index is created. – By default, this option is set to {{Code|false}}, because A stopword list may decrease the size of the XQuery Update Facility does not allow an updating query to full text index and speed up your queries. See [[XQuery UpdateIndexes#Returning ResultsFull-Text Index|return resultsFull-Text Index]]for more details.
|}
=Query Options= =BINDINGS==QUERYINFO===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|BINDINGS QUERYINFO [varsboolean]}}
|-
| '''Default'''
|''empty''{{Code|false}}
|-
| '''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>. |} ===MIXUPDATES=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|MIXUPDATES}}|-| '''Default'''|{{Code|false}}|-| '''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}}. See [[XQuery Update#Returning Results|Returning Results]] for more details.|} ===BINDINGS=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|BINDINGS [vars]}}|-| '''Default'''|''empty''|-| '''Summary'''|Contains external variables to be bound to a query. The string must comply with the following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* 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>
|}
|-
| '''Default'''
|{{Code|10050}}
|-
| '''Summary'''
|This option controls inlining of XQuery functions:* The XQuery compiler inlines functions to speed up query evaluation. * Inlining will only take place if a function body is not too large (i.e., if it does not contain too many expressions). * With this option, this maximum number of expressions can be specified.<br/>* Function inlining can be turned off by setting the value to {{Code|0}}. * The limit can be locally overridden overwritten via the <code>[[XQuery_3.0XQuery Extensions#AnnotationsFunction Inlining|%basex:inline]]</code> annotation(follow the link to get more information on function inlining).
|}
===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>.
|}
=Serialization Options= ===SERIALIZECHECKSTRINGS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZE CHECKSTRINGS [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Results of XQuery expressions By default, characters from external sources that are invalid in XML will be serialized if this trigger an error. If the option is turned on. For debugging purposes and performance measurements, this option can be set to {{Code|<code>false}}</code>, these characters will be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;). It can also be turned off on The option 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-z</code>entry]].
|}
===SERIALIZERWRAPJAVA===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|SERIALIZER WRAPJAVA [paramsmode]}}
|-
| '''Default'''
|''empty''{{Code|some}}
|-
| '''Summary'''
|Parameters for [[Serialization|serializing]] query results. The string must comply with Defines the following rules:* Variable names and way how values must that result from Java code invocation will be separated by equality signsconverted to XQuery items.* Multiple variables must be delimited by commas.* Commas in Allowed values must be duplicated.The option can also be used on [[Command-Line Options#BaseX Standalone: {{Code|command line]] with the flag <code>-s</code>.none}}, {{Code|-all}}, {{Code| '''Examples'''some}}, {{Code|* <code>encoding=US-ASCIIinstance}},omit-xml-declaration=no</code> : sets the encoding to and {{Code|US-ASCIIvoid}} and prints the XML declaration.* <code>item-separator=,,</code> : separates serialized items by a single commaSee [[Java_Bindings#Conversion to XQuery|Java Bindings]] for further details.|}
===EXPORTERLSERROR===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|EXPORTER LSERROR [paramserror]}}
|-
| '''Default'''
|''empty''{{Code|0}}
|-
| '''Summary'''
|Contains parameters This option specifies the maximum Levenshtein error for exporting all resources of a databasefuzzy full-text matching. Keys and values are separated by equality signsBy default, multiple parameters are delimited by commasif {{Code|0}} is assigned, the error value is calculated dynamically. See [[SerializationFull-Text#Fuzzy_Querying|Fuzzy Querying]] for more details.
|}
===XMLPLANRUNQUERY===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XMLPLAN RUNQUERY [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Prints the execution plan of an XQuery expression in its XML representationSpecifies if a query will be executed or parsed only. This option can also be activated changed on [[Command-Line Options#BaseX Standalone|command line]] via <code>-xR</code>.
|}
===COMPPLANRUNS===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COMPPLAN RUNS [booleannum]}}
|-
| '''Default'''
|{{Code|true1}}
|-
| '''Summary'''
|Generates the Specifies how often a query plan, which can will be activated via {{Option|XMLPLAN}}evaluated. The result is serialized only once, before or after query compilationand the measured times are averages of all runs. This option can also be activated changed on [[Command-Line Options#BaseX Standalone|command line]] via <code>-Xr</code>.
|}
=Serialization Options= =DOTPLAN==SERIALIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTPLAN SERIALIZE [boolean]}}
|-
| '''Default'''
|{{Code|falsetrue}}
|-
| '''Summary'''
|Saves the query plan Results of an XQuery expression as expressions will be serialized if this option is turned on. For debugging purposes and performance measurements, this option can be set to {{Code|.dotfalse}} file in the current working directory, using the [https://en.wikipedia.org/wiki/DOT_(graph_description_language) graph description language]. The output file It can e.g. also be visualized with turned off on [http:/[Command-Line Options#BaseX Standalone|command line]] via <code>-z</www.graphviz.org Graphviz]code>.
|}
===DOTCOMPACTSERIALIZER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTCOMPACT SERIALIZER [booleanparams]}}
|-
| '''Default'''
|{{Code|false}}''empty''
|-
| '''Summary'''
|Chooses Parameters for [[Serialization|serializing]] query results. The string must comply with the following rules:* Variable names and values must be separated by equality signs.* Multiple variables must be delimited by commas.* Commas in values must be duplicated.The option can also be used on [[Command-Line Options#BaseX Standalone|command line]] with the flag <code>-s</code>.|-| '''Examples'''|* <code>indent=no</code> : disables automatic indentation of XML nodes. This is usually a compact dot representationgood choice when working with [[Full-Text#Mixed Content|Mixed-Content Data]].* <code>encoding=US-ASCII,omit-xml-declaration=no</code> : sets the encoding to {{Code|US-ASCII}}and prints the XML declaration.* <code>item-separator=,,</code> : separates serialized items by a single comma.=Other Options=|} ===AUTOFLUSHEXPORTER===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|AUTOFLUSH EXPORTER [booleanparams]}}
|-
| '''Default'''
|{{Code|true}}''empty''
|-
| '''Summary'''
|Flushes Contains parameters for exporting resources of a database buffers to disk and writing files after each update. If this option is set to updates via the {{CodeOption|falseWRITEBACK}}option. Keys and values are separated by equality signs, bulk operations (multiple single updates) will be evaluated fasterparameters are delimited by commas. See [[Serialization]] for more details. As a drawback|-| '''Examples'''|* <code>indent=no, the chance omit-xml-declaration=no</code> : disables automatic indentation of data loss increases if the database is not explicitly flushed via XML nodes, outputs the {{Command|FLUSH}} commandXML declaration.
|}
===WRITEBACKXMLPLAN===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WRITEBACK XMLPLAN [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Propagates updates on main-memory instances Prints the execution plan of files that have been retrieved via [[Databases#XML Documents|fn:doc]] and [[Databases#an XQuery expression in its XML Documents|fn:collection]] back to diskrepresentation. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-ux</code>. Please note that, when turning this option on, your original files will not be backed up.
|}
===COMPPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|COMPPLAN [boolean]}}|-| '''Default'''|{{Code|true}}|-| '''Summary'''|Generates the query plan, which can be activated via {{Option|XMLPLAN}}, before or after query compilation. This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-X</code>. |} ===FULLPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|FULLPLAN [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Attaches the file path, line and column of the expressions in the original query string to the query plan. Values (items and sequences) have no input information attached.|} =Other Options= ===AUTOFLUSH=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|AUTOFLUSH [boolean]}}|-| '''Default'''|{{Code|true}}|-| '''Summary'''|Flushes database buffers to disk after each update. If this option is set to {{Code|false}}, bulk operations (multiple single updates) will be evaluated faster. As a drawback, the chance of data loss increases if the database is not explicitly flushed via the {{Command|FLUSH}} command.|} ===WRITEBACK=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|WRITEBACK [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Propagates updates on main-memory instances of files that have been retrieved via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] back to disk:* This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-u</code>.* 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= ;Version 9.6* Added: {{Option|UNROLLLIMIT}}, {{Option|WRAPJAVA}} ;Version 9.5* Updated: {{Option|INLINELIMIT}}: default reduced to 50.* Updated: {{Option|RESTXQERRORS}}: additionally suppress stack trace in HTTP response ;Version 9.4* Added: {{Option|LOGTRACE}} ;Version 9.3* Added: {{Option|WITHDB}}, {{Option|GZIP}}
{| width='100%'|-| width='120' | '''Signature''';Version 9.2|* Added: {{CodeOption|MAXSTAT [num]RESTXQERRORS}}|-| '''Default'''|, {{CodeOption|30FULLPLAN}}|-| '''Summary'''|Specifies the maximum number of index occurrences printed by the {{Command|INFO INDEX}} command.|}* Removed: <code>DOTPLAN</code>, <code>DOTCOMPACT</code>
=Changelog=;Version 9.0* Added: {{Option|ENFORCEINDEX}}, {{Option|COPYNODE}}, {{Option|IGNOREHOSTNAME}}
;Version 8.6
* Added: {{Option|FAIRLOCK}}, {{Option|PARSERESTXQ}}
* Removed: {{Code|GLOBALLOCK}} (exclusive use of database lock)
* Removed: {{Code|QUERYPATH}} (will now be internally assigned)
* Removed: {{Code|CACHERESTXQ}} (replaced with PARSERESTXQ)
;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
12,250

edits

Navigation menu