Changes

Jump to navigation Jump to search
1,806 bytes added ,  11:22, 1 March 2017
Various ways exist to access and change options:
* The current value of an option can be requested with the [[Commands#GET{{Command|GET]] }} command. Local options can be changed via [[Commands#SET{{Command|SET]]}}. All values are ''static'': They stay valid until they are changed once again by another operation. 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 e.g. be passed on with the [http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.html#options -D flag] 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 BaseX instance. The specified keys need to be prefixed with {{Code|org.basex.}}. An example:
<pre class="brush:bashxquery">
java -Dorg.basex.CHOP=false -cp basex.jar org.basex.BaseX -c"get chop"
CHOP: false
* 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 class="brush:xml"><key>JVMOptions</key> <array> <string>-Dorg.basex.CHOP=false</string> </array></pre> * In a [[Web Application]], the default can be adjusted in the {{Code|web.xml}} file as follows: <pre class="brush:xml"><context-param> <param-name>org.basex.chop</param-name> <param-value>false</param-value></context-param></pre>
* In XQuery, local options can be set via option declarations and pragmas (see [[XQuery Extensions]]).
If options are implicitly changed by operations in the [[GUI]], the underlying commands will be listed in the [[GUI#Visualizations|Info View]].<br/><br/>
=Global Options=
| '''Summary'''
|Points to the directory in which all databases are located.
|}
 
===LOGPATH===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|LOGPATH [path]}}
|-
| '''Default'''
|<code>.logs</code>
|-
| '''Summary'''
|Points to the directory in which all [[Logging|log files]] are stored. Relative paths will be resolved against the {{Option|DBPATH}} directory.
|}
|}
===GLOBALLOCKFAIRLOCK=== {{Mark|Introduced with Version 8.6:}}
{| 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 (database) or global specified via {{Option|PARALLEL}} has been reached. This prevents update operations from blocking all other requests (processfor example, the DBA can further be used 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, and it should be used for managing read and write if the prompt evaluation of update operationsis critical. The article on |} ===CACHETIMEOUT=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|CACHETIMEOUT [seconds]}}|-| '''Default'''|{{Code|3600}}|-| '''Summary'''|Specifies how many seconds the results of queries, which have been queued by the [[Transaction ManagementJobs Module|asynchronously executed]] provides more details on concurrency control, will be cached in main memory.
|}
|-
| '''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.
|-
| '''Summary'''
|Specifies the HTTP Authenticationdefault authentication method, which will be proposed used by the [[Web Application|HTTP server]] if a client sends an unauthorized requestfor negotiating credentials. Allowed values are {{Code|Basic}} , {{Code|Digest}}, and {{Code|DigestCustom}}:<br/>* If basic access is chosen, the client can still request digest authentication.* This is different for digest access, which cannot be overwritten.* With custom authentication, the server will not do any authentication.
|}
|-
| '''Summary'''
|Specifies the maximum time a read-only transaction triggered by a client may take. If an operation takes longer than the specified timeoutnumber of seconds, it will be aborted. Write Active update operations will not be affected by this timeout, as this would corrupt the integrity of the database. The timeout is deactivated if the timeout is set to {{Code|0}}. It is ignored for {{Codeoperations with [[User Management|ADMIN}} operationsadmin permissions]].
|}
|-
| '''Summary'''
|Denotes the maximum allowed {{Code|number}} of parallel [[Transaction Management|transactions]].<br/>Note that 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.
|}
|-
| '''Summary'''
|Points to the directory which contains the [[RESTXQ]] modules of a web application. Relative paths will be resolved against the [[#WEBPATH{{Option|WEBPATH]] }} directory.
|}
===CACHERESTXQPARSERESTXQ=== {{Mark|Introduced with Version 8.6}}: replacing {{Code|CACHERESTXQ}}.
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CACHERESTXQPARSERESTXQ}}
|-
| '''Default'''
|{{Code|false3}}
|-
| '''Summary'''
|Caches [[Timeout after which the RESTXQ directory will be parsed for changes:* If {{Code|0}} is specified, the directory will be parsed every time a RESTXQ]] modules once when starting function is called.* A positive value defines the web applicationidle time in seconds after which parsing will be enforced.<br/>The option default value is helpful {{Code|3}}: Changes in productive environments with the RESTXQ directory will be detected after 3 seconds without RESTXQ function calls.* Monitoring is completely disabled if a high load, but files should not be replaced while the web server negative value is runningspecified. See [[RESTXQ#Preliminaries|RESTXQ Preliminaries]] for more details.
|}
|-
| '''Summary'''
|Points to the directory which contains XQuery files and command scripts, which can be evaluated via the [[REST#GET Requests|REST run operation]]. Relative paths will be resolved against the [[#WEBPATH{{Option|WEBPATH]] }} directory.
|}
|-
| '''Summary'''
|If this option is activated, and if new resources are added to a database, all files that are not filtered by the [[#CREATEFILTER{{Option|CREATEFILTER]] }} option will be added as ''raw'' files (i.e., in their binary representation).
|}
|-
| '''Summary'''
|Defines a [[Parsers|parser]] for importing new files to the database. Currently, 'XML', 'JSON', 'CSV', 'TEXT', 'HTML' are available as parsers. HTML will be parsed as normal XML files if [http://home.ccil.org/~cowan/XML/tagsoup/ [Parsers#HTML_Parser|Tagsoup]] is not found in the classpath.
|}
|-
| '''Summary'''
|Specifies the way how 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 [[CSV Module#Options|CSV Module]].|-| '''Examples'''|<code>encoding=CP1252,header=true</code> parses the input as CP1252 and the first line as header.
|}
|-
| '''Summary'''
|Specifies the way how JSON 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 [[JSON Module#Options|JSON Module]].|-| '''Examples'''|<code>format=jsonml,lax=yes</code> interprets the input as JSONML and uses lax parsing.
|}
|-
| '''Summary'''
|Specifies the way how HTML data will be parsed. Available Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options are listed described in the [[Parsers]] article.|-| '''Examples'''|<code>encoding=Shift-JIS,nons=true</code> parses the input as Sihft-JIS and suppresses namespaces.
|}
|-
| '''Summary'''
|Specifies the way how TEXT data will be parsed. Available Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options are listed in the [[Parsers]] article.|-| '''Examples'''|<code>lines=true</code> creates a single element for each line of text.
|}
|-
| '''Summary'''
|Many XML documents include whitespaces that have been added to improve readability. The {{Code|CHOP}} This option controls the [http://www.w3.org/TR/REC-xml/#sec-white-space white-space processing mode] of the XML parser:* By With the default, this option is set to value {{Code|true}}. This way, 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>.
|-
| '''Summary'''
|Uses the internal XML parser instead of the standard Java XML parser. The Here are some reasons for using the internal parser is :* Performance: Documents (in particular small ones) will be parsed faster, more fault tolerant and supports common * Fault tolerance: invalid characters will automatically be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;)* Entities: around 250 HTML entities out-of-will be detected and decodedYou will be able to correctly parse most XML documents with the-boxinternal parser. Java’s Xerces parser is still used as default, but however, because it does not support supports all features needed for parsing DTDsof the XML standard and advanced DTD features, such as recursive entity expansion.
|}
|-
| '''Summary'''
|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 databases. The [[#CATFILE{{Option|CATFILE]] }} option can be changed to locally resolve DTDs.
|}
|-
| '''Summary'''
|Resolves XInclude inclusion tags 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 [[#INTPARSE{{Option|INTPARSE]]}}).
|}
===TOKENINDEX===
 
{{Mark|Introduced with Version 8.4:}}
{| width='100%'
===TOKENINCLUDE===
 
{{Mark|Introduced with Version 8.4:}}
{| width='100%'
| '''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 [[Commands#{{Command|OPTIMIZE}} with the {{Code|OPTIMIZE ALL]] }} keyword or [[Database_Module#db:optimize|db:optimize($db, true())]].
* After each update, the value indexes will be refreshed as well. Incremental updates are currently not available for the full-text index and database statistics.
* Find more details in the article on [[Index#Updates|Index Structures]].
* As a result, the 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 can be reassigned by running [[Commands#OPTIMIZE{{Command|OPTIMIZE]] }} or [[Database_Module#db:optimize|db:optimize]].|} ===INDEXSPLITSIZE=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|INDEXSPLITSIZE [num]}}|-| '''Default'''|{{Code|0}}|-| '''Summary'''|This option affects the [[Indexes#Index Construction|construction]] of new text and attribute indexes. It specifies the number of index build operations that are performed before writing partial index data to disk. By default, if the value is set to 0, some dynamic split heuristics are applied. By setting the value to its maximum (2147483647), the index will never be split.
|}
===FTINDEXSPLITSIZESPLITSIZE===
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|FTINDEXSPLITSIZE SPLITSIZE [num]}}
|-
| '''Default'''
|-
| '''Summary'''
|This option affects the [[Indexes#Index ConstructionPerformance|construction]] of new full-text value indexes. It specifies 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 will take place, and the more main memory will be required. * By default, if the value is set to {{Code|0}}, some dynamic split heuristics are applied. By setting the value to its maximum (2147483647), based on the index will never be splitcurrent memory consumption.
|}
==Full-TextIndexing==
===STEMMING===
|-
| '''Summary'''
|If {{Code|true}}, all tokens will be stemmed during full-text indexing, using a language-specific stemmer implementation. By default, tokens will not be stemmed. See [[Full-Text#Indexes#Full-Text Index|Indexes#Full-Text Index]] for more details.
|}
|-
| '''Summary'''
|If {{Code|true}}, the case of tokens will be preserved during full-text indexing. By default, case will be ignored (all tokens will be indexed in lower case). See [[Full-Text#Indexes#Full-Text Index|Indexes#Full-Text Index]] for more details.
|}
|-
| '''Summary'''
|If set to {{Code|true}}, diacritics will be preserved during full-text indexing. By default, diacritics will be removed. See [[Full-Text#Indexes#Full-Text Index|Indexes#Full-Text Index]] for more details.
|}
|-
| '''Summary'''
|The specified language will influence the way how an input text texts will be tokenizedand stemmed. This option is mainly important if tokens are to It can be stemmed, or if the tokenization name of a language differs from Western languagesor a language code. See [[Full-Text#Indexes#Full-Text Index|Indexes#Full-Text Index]] for more details.
|}
|-
| '''Summary'''
|A new full-text index will drop tokens that are listed in the specified stopword list. A stopword list may decrease the size of the full text index. See [[Full-Text#Indexes#Full-Text Index|Indexes#Full-Text Index]] for more details.
|}
XQUERY declare variable $GREETING external; $GREETING
</pre>
|}
 
===QUERYPATH===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|QUERYPATH [path]}}
|-
| '''Default'''
|''empty''
|-
| '''Summary'''
|Contains the path (''base URI'') to the executed query (default: ''empty''). This directory will be used to resolve relative paths to documents, query modules, and other resources addressed in a query.
|}
|-
| '''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#Annotationsbasex:inline|%basex:inline]]</code> annotation(follow the link to get more information on function inlining).
|}
|-
| '''Summary'''
|If this option is turned on, paths specified in the {{Code[[Databases#XML Documents|fn:doc}} ]] and {{Code[[Databases#XML Documents|fn:collections}} collection]] functions will first be resolved against a database that has been opened in the global context outside the query (e.g. by the [[Commands#OPEN{{Command|OPEN]] }} command). If the path does not match any existing resources, it will be resolved as described in the article on [[Databases#Access Resources|accessing database resources]].
|}
|-
| '''Summary'''
|By activating this option, database instances will be created with the XQuery {{Codefunctions [[Databases#XML Documents|fn:doc()}} ]] and {{Code[[Databases#XML Documents|fn:collection()}} functions will create database instances for the addressed input files]].
|}
|-
| '''Summary'''
|If this option is turned offBy default, strings characters from external sources that are invalid in XML will be adopted as trigger an error. If the option isset to <code>false</code>, i. ethese characters will be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;)., without being checked for valid XML characters:* This The option affects [[Java Bindings]] and the string conversion and input functions such as [[Archive Module#archive:create|archive:create]], [[Archive Module#archive:extract-text|archive:extract-text]], [[Archive Module#archive:update|archive:update]], [[Conversion Module#convert:binary-to-string|convert:binary-to-string]], [[Fetch Module#fetch:text|fetch:text]], [[File Module#file:read-text|file:read-text]], and [[ZIP Module#zip:text-entry|zip:text-entry]].* Please be aware that an inconsiderate use of this option may cause unexpected behavior when storing or outputting strings.
|}
|-
| '''Summary'''
|This option specifies the maximum Levenshtein error for the BaseX-specific fuzzy match option. See the page on [[Full-Text#Fuzzy_Querying|Full-Texts]] for more information on fuzzy querying.
|}
|-
| '''Summary'''
|Generates the query plan, which can be activated via [[#XMLPLAN{{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>.
|}
|-
| '''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 [[Commands#FLUSH{{Command|FLUSH]] }} command.
|}
|-
| '''Summary'''
|Propagates updates on main-memory instances of files that have been retrieved via {{Code[[Databases#XML Documents|fn:doc}} or {{Code]] 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 note that, when turning this option on, your original files will not be backed up.
|}
|-
| '''Summary'''
|Specifies the maximum number of index occurrences printed by the <code>[[Commands#INFO{{Command|INFO INDEX]]</code> }} command.
|}
=Changelog=
 
;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>[[#TOKENINDEX|TOKENINDEX]])* Removed: <code>INDEXSPLITSIZE</code>, <code>[[#TOKENINCLUDE|TOKENINCLUDE]]FTINDEXSPLITSIZE</code>
;Version 8.3
* Added: <code>[[#CACHERESTXQ{{Option|CACHERESTXQ]]</code>}}, <code>[[#TEXTINCLUDE{{Option|TEXTINCLUDE]]</code>}}, <code>[[#ATTRINCLUDE{{Option|ATTRINCLUDE]]</code>}}, <code>[[#FTINCLUDE{{Option|FTINCLUDE]]</code>}}, <code>[[#ARCHIVENAME{{Option|ARCHIVENAME]]</code>}}
;Version 8.2
;Version 8.1
* Added: <code>[[#IGNORECERT{{Option|IGNORECERT]]</code>}}, <code>[[#RESTPATH{{Option|RESTPATH]]</code>}}
;Version 8.0
* Added: <code>[[#MIXUPDATES{{Option|MIXUPDATES]]</code>}}, <code>[[#AUTOOPTIMIZE{{Option|AUTOOPTIMIZE]]</code>}}, <code>[[#AUTHMETHOD{{Option|AUTHMETHOD]]</code>}}, <code>[[#XINCLUDE{{Option|XINCLUDE]]</code>}}* Updated: <code>[[#PROXYPORT{{Option|PROXYPORT]]</code>}}: default set to 0; will be ignored. <code>[[#PROXYHOST{{Option|PROXYHOST]]</code>}}, <code>[[#NONPROXYHOSTS{{Option|NONPROXYHOSTS]]</code>}}: empty strings will be ignored.
;Version 7.8.1
* Updated: <code>[[#ADDARCHIVES{{Option|ADDARCHIVES]]</code>}}: parsing of TAR and TGZ files.
;Version 7.8
* Added: <code>[[#CSVPARSER{{Option|CSVPARSER]]</code>}}, <code>[[#JSONPARSER{{Option|JSONPARSER]]</code>}}, <code>[[#TEXTPARSER{{Option|TEXTPARSER]]</code>}}, <code>[[#HTMLPARSER{{Option|HTMLPARSER]]</code>}}, <code>[[#INLINELIMIT{{Option|INLINELIMIT]]</code>}}, <code>[[#TAILCALLS{{Option|TAILCALLS]]</code>}}, <code>[[#DEFAULTDB{{Option|DEFAULTDB]]</code>}}, <code>[[#RUNQUERY{{Option|RUNQUERY]]</code>}}* Updated: <code>[[#WRITEBACK{{Option|WRITEBACK]]</code> }} only applies to main-memory document instances.* Updated: <code>[[#DEBUG{{Option|DEBUG]]</code> }} option can be changed at runtime by users with admin permissions.* Updated: default of <code>[[#INTPARSE{{Option|INTPARSE]]</code> }} is now {{Code|false}}.* Removed: <code>HTMLOPT</code> (replaced with <code>[[#HTMLPARSER{{Option|HTMLPARSER]]</code>}}), <code>PARSEROPT</code> (replaced with parser-specific options), <code>DOTDISPLAY</code>, <code>DOTTY</code>
;Version 7.7
* Added: <code>[[#ADDCACHE{{Option|ADDCACHE]]</code>}}, <code>[[#CHECKSTRINGS{{Option|CHECKSTRINGS]]</code>}}, <code>[[#FTINDEXSPLITSIZE{{Option|FTINDEXSPLITSIZE]]</code>}}, <code>[[#INDEXSPLITSIZE{{Option|INDEXSPLITSIZE]]</code>}}
;Version 7.6
* Added: <code>[[#GLOBALLOCK{{Option|GLOBALLOCK]]</code>}}
* Added: store local options in configuration file after {{Code|# Local Options}} comments.
* Added: options can now be set via system properties
* Added: a pragma expression can be used to locally change database options
* Added: <code>[[#USER{{Option|USER]]</code>}}, <code>[[#PASSWORD{{Option|PASSWORD]]</code>}}, <code>[[#LOG{{Option|LOG]]</code>}}, <code>[[#LOGMSGMAXLEN{{Option|LOGMSGMAXLEN]]</code>}}, <code>[[#WEBPATH{{Option|WEBPATH]]</code>}}, <code>[[#RESTXQPATH{{Option|RESTXQPATH]]</code><code>[[#HTTPLOCAL}}{{Option|HTTPLOCAL]]</code>}}, <code>[[#CREATEONLY{{Option|CREATEONLY]]</code>}}, <code>[[#STRIPNS{{Option|STRIPNS]]</code>}}
* Removed: {{Code|HTTPPATH}}; {{Code|HTTPPORT}}: {{Code|jetty.xml}} configuration file is used instead
* Removed: global options cannot be changed anymore during the lifetime of a BaseX instance
;Version 7.3
* Updated: <code>[[#KEEPALIVE{{Option|KEEPALIVE]]</code>}}, <code>[[#TIMEOUT{{Option|TIMEOUT]]</code>}}: default values changed
* Removed: {{Code|WILDCARDS}}; new index supports both fuzzy and wildcard queries
* Removed: {{Code|SCORING}}; new scoring model will focus on lengths of text nodes and match options
;Version 7.2
* Added: <code>[[#PROXYHOST{{Option|PROXYHOST]]</code>}}, <code>[[#PROXYPORT{{Option|PROXYPORT]]</code>}}, <code>[[#NONPROXYHOSTS{{Option|NONPROXYHOSTS]]</code>}}, <code>[[#HTMLOPT{{Option|HTMLOPT]]</code>}}* Updated: <code>[[#TIMEOUT{{Option|TIMEOUT]]</code>}}: ignore timeout for admin users
;Version 7.1
* Added: <code>[[#ADDRAW{{Option|ADDRAW]]</code>}}, <code>[[#MAXLEN{{Option|MAXLEN]]</code>}}, <code>[[#MAXCATS{{Option|MAXCATS]]</code>}}, <code>[[#UPDINDEX{{Option|UPDINDEX]]</code>}}* Updated: <code>[[#BINDINGS{{Option|BINDINGS]]</code>}}
;Version 7.0
* Added: <code>[[#SERVERHOST{{Option|SERVERHOST]]</code>}}, <code>[[#KEEPALIVE{{Option|KEEPALIVE]]</code>}}, <code>[[#AUTOFLUSH{{Option|AUTOFLUSH]]</code>}}, <code>[[#QUERYPATH{{Option|QUERYPATH]]</code>}}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu