Difference between revisions of "Options"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | The | + | The options listed on this page can be requested with the [[Commands#GET|GET]] command and changed with the [[Commands#SET|SET]] command. Three data types exist: strings, numbers, and booleans, which can be turned ON and OFF. If options are internally changed by the [[GUI_Tutorial|GUI]] of BaseX, they will be listed in the [[GUI_Views|Info View]]. |
− | |||
A [[Options_(Snapshot)|preview page]] contains all options offered by the [http://files.basex.org/releases/latest/ latest stable snapshot]. | A [[Options_(Snapshot)|preview page]] contains all options offered by the [http://files.basex.org/releases/latest/ latest stable snapshot]. | ||
− | == | + | ==Main Options== |
+ | |||
+ | The main options are only available in the [[Standalone Tutorial|standalone]] and [[Server Tutorial|server]] instance of BaseX; they cannot be changed by database clients: | ||
− | + | * <code>LANG [language]</code> | |
− | + | : Set the interface language. Currently, seven languages are available 'English', 'German', 'French', 'Dutch', 'Italian', 'Japanese', and 'Vietnamese' (default: <code>English</code>). BaseX needs to be restarted in order to activate the new language. | |
− | |||
− | *<code>LANG [language]</code> | ||
− | : Set the interface language. Currently, seven languages are available 'English', 'German', 'French', 'Dutch', 'Italian', 'Japanese', and 'Vietnamese' (default: <code>English</code>). BaseX needs to be restarted to activate | ||
− | *<code>LANGKEY</code> | + | * <code>LANGKEY</code> |
− | : Prefix all texts with the internal language keys. This option is helpful for creating new translations. BaseX needs to be restarted to activate this option. | + | : Prefix all texts with the internal language keys. This option is helpful for creating new translations. BaseX needs to be restarted in order to activate this option. |
− | * <code> | + | * <code>DBPATH [path]</code> |
− | : | + | : Set a new database path (default: <code>[[Configuration#Database Directory|{home}/BaseXData]]</code>). Note: if the database path is changed, existing databases have to be manually moved to the new location. |
− | + | * <code>REPOPATH [path]</code> | |
− | + | : this <code>path</code> points to the XQuery package repository (default: <code>[[Configuration#Database Directory|{home}/BaseXRepo]]</code>). | |
− | * <code> | ||
− | : | ||
* <code>PARALLEL [number]</code> | * <code>PARALLEL [number]</code> | ||
: Set the maximum <code>number</code> of parallel readers (default: <code>8</code>). | : Set the maximum <code>number</code> of parallel readers (default: <code>8</code>). | ||
+ | |||
+ | * <code>DEBUG</code> | ||
+ | : Show internal debug info, usually used for development of new features (default: <code>false</code>). | ||
+ | |||
+ | ===Client/Server Architecture=== | ||
+ | |||
+ | * <code>HOST [host]</code> | ||
+ | : Used by the client to connect the server (default: <code>localhost</code>). | ||
+ | |||
+ | * <code>PORT [port]</code> | ||
+ | : Used by the client to connect the server (default: <code>1984</code>). | ||
* <code>SERVERPORT [port]</code> | * <code>SERVERPORT [port]</code> | ||
− | : | + | : Port of the database server (default: <code>1984</code>). |
− | |||
− | |||
− | |||
− | *<code> | + | * <code>EVENTPORT [port]</code> |
− | : | + | : Port of the client, listening for server events. This port is only used if a client attaches itself to a database event (default: <code>1985</code>). |
* <code>JAXRXPORT [port]</code> | * <code>JAXRXPORT [port]</code> | ||
− | : | + | : Port of the JAX-RX web server, usually Jetty (default: <code>8984</code>). |
− | *<code>JAXRXPATH [path]</code> | + | * <code>JAXRXPATH [path]</code> |
− | : | + | : This local <code>path</code> points to the JAX-RX web directory (default: <code>[[Configuration#Database Directory|{home}/BaseXWeb]]</code>). |
+ | |||
+ | * <code>TIMEOUT [time]</code> | ||
+ | : Server timeout in seconds. The timeout describes the maximum execution time of a client query. The timeout is deactivated if <code>time</code> is set to <code>0</code> (default: no timeout (<code>0</code>)). | ||
==Database Options== | ==Database Options== | ||
− | *<code> | + | * <code>CHOP</code> |
− | : | + | : Chop all leading and trailing whitespaces from text nodes while building a database, and discard empty text nodes. This option often reduces the database size by up to 50% (default: <code>true</code>). |
− | *<code> | + | * <code>INTPARSE</code> |
− | : | + | : Use internal XML parser instead of the standard Java XML parser. The internal parser is faster, more fault tolerant and supports common HTML entities out-of-the-box, but it does not support all features needed for parsing DTDs. (default: <code>false</code>). |
+ | |||
+ | * <code>DTD</code> | ||
+ | : Parse referenced DTDs and resolve XML entities (default: <code>false</code>). | ||
− | *<code> | + | * <code>CATFILE [path]</code> |
− | : | + | : Specify a catalog file to locally resolve DTDs; see the Wikipedia entry on [http://en.wikipedia.org/wiki/XML_Catalog XML Catalogs] for more details (default: ''empty''). |
− | *<code> | + | * <code>CREATEFILTER [filter]</code> |
− | : | + | : Globbing syntax for filtering input documents (default: <code>*.xml</code>). |
+ | |||
+ | * <code>ADDARCHIVES</code> | ||
+ | : Parse files within archives (ZIP, DOCX, GZIP, etc.) while creating a database or adding new documents (default: <code>true</code>). | ||
− | *<code> | + | * <code>SKIPCORRUPT</code> |
− | : | + | : Skip corrupt (i.e., non-well-formed) files while creating a database or adding new documents. If this option is used, database creation is slowed down, as all files will be parsed twice. Next, main memory consumption will be higher as parsed files will be cached in main memory (default: <code>false</code>). |
+ | |||
+ | * <code>PARSER [type]</code> | ||
+ | : Define import [[Parsers|parser]]. As <code>TYPE</code> are available 'XML', 'CSV' or 'TEXT'. If [http://home.ccil.org/~cowan/XML/tagsoup/ Tagsoup] is found in the classpath, 'HTML' is also available (default: <code>XML</code>). | ||
+ | |||
+ | * <code>PARSEROPT [options]</code> | ||
+ | : Define parser-specific options (default: ''empty''). See [[Parsers|parsers]] page for more information. | ||
− | + | * <code>PATHINDEX</code> | |
− | |||
− | |||
− | *<code>PATHINDEX</code> | ||
: Create index for paths and speedup path based queries (default: <code>true</code>). | : Create index for paths and speedup path based queries (default: <code>true</code>). | ||
− | *<code>TEXTINDEX</code> | + | * <code>TEXTINDEX</code> |
: Create index for text nodes and speedup queries querying the entire text of a node (default: <code>true</code>). | : Create index for text nodes and speedup queries querying the entire text of a node (default: <code>true</code>). | ||
− | *<code>ATTRINDEX</code> | + | * <code>ATTRINDEX</code> |
: Create index for attribute values and speedup queries querying attribute values (default: <code>true</code>). | : Create index for attribute values and speedup queries querying attribute values (default: <code>true</code>). | ||
− | *<code>FTINDEX</code> | + | * <code>FTINDEX</code> |
: Create index for fulltext and speedup queries querying full text (default: <code>false</code>). | : Create index for fulltext and speedup queries querying full text (default: <code>false</code>). | ||
− | *<code> | + | * <code>WRITEBACK</code> |
− | : | + | : Write original files back after updates. As this will alter your input file make sure you have a backup before you use this option (default: <code>false</code>). |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | *<code> | + | * <code>MAINMEM</code> |
− | : | + | : Use main-memory mode. Now all data is exclusively stored in main memory. Some queries will be evaluated even faster, but the data is lost if BaseX is shut down (default: <code>false</code>). |
− | *<code> | + | * <code>FORCECREATE</code> |
− | : | + | : Force database creation for unknown documents specified in XQuery expressions (default: <code>false</code>). |
− | |||
− | |||
− | |||
==Full-Text Options== | ==Full-Text Options== | ||
− | *<code>WILDCARDS</code> | + | * <code>WILDCARDS</code> |
: Create wildcard optimized full text index that is especially tuned for querying full text using wildcards expressions (default: <code>false</code>). | : Create wildcard optimized full text index that is especially tuned for querying full text using wildcards expressions (default: <code>false</code>). | ||
− | *<code>STEMMING</code> | + | * <code>STEMMING</code> |
: Stemm full text tokens before indexing and decrease index size. Should only be assigned for full text queries using stemming, otherwise the full text index could not be assigned for query speedups (default: <code>false</code>). | : Stemm full text tokens before indexing and decrease index size. Should only be assigned for full text queries using stemming, otherwise the full text index could not be assigned for query speedups (default: <code>false</code>). | ||
− | *<code>CASESENS</code> | + | * <code>CASESENS</code> |
: Case sensitive full text indexing, i.e. full text tokens are stored case sensitive and enables the assignment of the full text index for case sensitive queries (default: <code>false</code>). | : Case sensitive full text indexing, i.e. full text tokens are stored case sensitive and enables the assignment of the full text index for case sensitive queries (default: <code>false</code>). | ||
− | *<code>DIACRITICS</code> | + | * <code>DIACRITICS</code> |
: Diacritic sensitive full text indexing, i.e. full text tokens are stored with diacritics and enables the assignment of the full text index for diacritic queries (default: <code>false</code>). | : Diacritic sensitive full text indexing, i.e. full text tokens are stored with diacritics and enables the assignment of the full text index for diacritic queries (default: <code>false</code>). | ||
− | *<code>LANGUAGE [lang]</code> | + | * <code>LANGUAGE [lang]</code> |
− | : Language for full-text search index, e.g. <code>LANG</code> can be set to <code>English</code> or <code>German</code> (default: empty). | + | : Language for full-text search index, e.g. <code>LANG</code> can be set to <code>English</code> or <code>German</code> (default: ''empty''). |
− | *<code>SCORING [mode]</code> | + | * <code>SCORING [mode]</code> |
: Precalculation of full text scores and storage within the full text index structure. Enables TF/IDF based scores in full text queries and increases memory consumption while indexing. <code>MODE</code> can be set to <code>1</code> for document based scoring, <code>2</code> for text node based scoring and <code>0</code> for non scoring (default: <code>0</code>). | : Precalculation of full text scores and storage within the full text index structure. Enables TF/IDF based scores in full text queries and increases memory consumption while indexing. <code>MODE</code> can be set to <code>1</code> for document based scoring, <code>2</code> for text node based scoring and <code>0</code> for non scoring (default: <code>0</code>). | ||
− | *<code>STOPWORDS [path]</code> | + | * <code>STOPWORDS [path]</code> |
− | : Specify stop word list at <code>PATH</code>, that could be used e.g. to decrease the full text index size. The standard stopword list (english) is provided at <code>'etc/xml/stopWords'</code> (default: empty). | + | : Specify stop word list at <code>PATH</code>, that could be used e.g. to decrease the full text index size. The standard stopword list (english) is provided at <code>'etc/xml/stopWords'</code> (default: ''empty''). |
− | *<code>LSERROR [error]</code> | + | * <code>LSERROR [error]</code> |
: Levenshtein default error used for fuzzy search with BaseX specialized own FTMatchOption, e.g. error could be <code>2</code> (default: <code>0</code>). | : Levenshtein default error used for fuzzy search with BaseX specialized own FTMatchOption, e.g. error could be <code>2</code> (default: <code>0</code>). | ||
==Query Options== | ==Query Options== | ||
− | *<code>QUERYINFO</code> | + | * <code>QUERYINFO</code> |
: Show (all) process info (default: <code>false</code>). | : Show (all) process info (default: <code>false</code>). | ||
− | *<code>QUERY3</code> | + | * <code>QUERY3</code> |
: Enable/disable [http://www.w3.org/TR/xquery-30/ XQuery 3.0] functions (default: <code>true</code>). | : Enable/disable [http://www.w3.org/TR/xquery-30/ XQuery 3.0] functions (default: <code>true</code>). | ||
− | *<code>SERIALIZE</code> | + | * <code>SERIALIZE</code> |
: Flag for serialization of query results. I.e. there are any results printed if serialization is turned off (default: <code>true</code>). | : Flag for serialization of query results. I.e. there are any results printed if serialization is turned off (default: <code>true</code>). | ||
− | *<code>BINDINGS [vars]</code> | + | * <code>BINDINGS [vars]</code> |
− | : Contains external variables to be bound to the query. Keys and values are separated by equality signs, multiple variables are separated by commas (default: empty). Example: <code>var1=Hello,var2=World</code> | + | : Contains external variables to be bound to the query. Keys and values are separated by equality signs, multiple variables are separated by commas (default: ''empty''). |
+ | : Example: <code>var1=Hello,var2=World</code> | ||
− | *<code>SERIALIZER [params]</code> | + | * <code>SERIALIZER [params]</code> |
− | : Parameters for serializing queries; see [[Serialization]] for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: empty). Example: <code>method=xml,encoding=CP1252</code> | + | : Parameters for serializing queries; see [[Serialization]] for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: ''empty''). |
+ | : Example: <code>method=xml,encoding=CP1252</code> | ||
− | *<code>EXPORTER [params]</code> | + | * <code>EXPORTER [params]</code> |
− | : Parameters for exporting the documents; see [[Serialization]] for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: empty). | + | : Parameters for exporting the documents; see [[Serialization]] for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: ''empty''). |
− | *<code>RUNS [num]</code> | + | * <code>RUNS [num]</code> |
: Specify number of runs a query is executed. Results are printed a single time and evaluation times are averages of all runs (default: <code>1</code>). | : Specify number of runs a query is executed. Results are printed a single time and evaluation times are averages of all runs (default: <code>1</code>). | ||
==Serialization Options== | ==Serialization Options== | ||
− | *<code>DOTPLAN</code> | + | * <code>DOTPLAN</code> |
: Create query plans visualized with [http://www.graphviz.org dotty], see <code>'plan.dot'</code> file in your project folder (default: <code>false</code>). | : Create query plans visualized with [http://www.graphviz.org dotty], see <code>'plan.dot'</code> file in your project folder (default: <code>false</code>). | ||
− | *<code>DOTCOMPACT</code> | + | * <code>DOTCOMPACT</code> |
: Compact dot representation (default: <code>false</code>). | : Compact dot representation (default: <code>false</code>). | ||
− | *<code>DOTDISPLAY</code> | + | * <code>DOTDISPLAY</code> |
: Display dot representation after query execution (default: <code>true</code>). | : Display dot representation after query execution (default: <code>true</code>). | ||
− | *<code>DOTTY [path]</code> | + | * <code>DOTTY [path]</code> |
: Program <code>PATH</code> of dotty executable (default: <code>dotty</code>). | : Program <code>PATH</code> of dotty executable (default: <code>dotty</code>). | ||
− | *<code>XMLPLAN</code> | + | * <code>XMLPLAN</code> |
: Print query plan as xml document (default: <code>false</code>). | : Print query plan as xml document (default: <code>false</code>). | ||
− | *<code>COMPPLAN</code> | + | * <code>COMPPLAN</code> |
: Create query plan before or after compilation - query plan might change due to optimizations (default: <code>true</code>). | : Create query plan before or after compilation - query plan might change due to optimizations (default: <code>true</code>). | ||
− | *<code>CACHEQUERY</code> | + | * <code>CACHEQUERY</code> |
: Cache the query results (default: <code>false</code>). | : Cache the query results (default: <code>false</code>). | ||
− | *<code>MAXSTAT [num]</code> | + | * <code>MAXSTAT [num]</code> |
: Set maximum number of index occurrences to print through the command <code>info index</code> (default: <code>15</code>). | : Set maximum number of index occurrences to print through the command <code>info index</code> (default: <code>15</code>). |
Revision as of 21:19, 28 July 2011
The options listed on this page can be requested with the GET command and changed with the SET command. Three data types exist: strings, numbers, and booleans, which can be turned ON and OFF. If options are internally changed by the GUI of BaseX, they will be listed in the Info View.
A preview page contains all options offered by the latest stable snapshot.
Contents
Main Options
The main options are only available in the standalone and server instance of BaseX; they cannot be changed by database clients:
LANG [language]
- Set the interface language. Currently, seven languages are available 'English', 'German', 'French', 'Dutch', 'Italian', 'Japanese', and 'Vietnamese' (default:
English
). BaseX needs to be restarted in order to activate the new language.
LANGKEY
- Prefix all texts with the internal language keys. This option is helpful for creating new translations. BaseX needs to be restarted in order to activate this option.
DBPATH [path]
- Set a new database path (default:
{home}/BaseXData
). Note: if the database path is changed, existing databases have to be manually moved to the new location.
REPOPATH [path]
- this
path
points to the XQuery package repository (default:{home}/BaseXRepo
).
PARALLEL [number]
- Set the maximum
number
of parallel readers (default:8
).
DEBUG
- Show internal debug info, usually used for development of new features (default:
false
).
Client/Server Architecture
HOST [host]
- Used by the client to connect the server (default:
localhost
).
PORT [port]
- Used by the client to connect the server (default:
1984
).
SERVERPORT [port]
- Port of the database server (default:
1984
).
EVENTPORT [port]
- Port of the client, listening for server events. This port is only used if a client attaches itself to a database event (default:
1985
).
JAXRXPORT [port]
- Port of the JAX-RX web server, usually Jetty (default:
8984
).
JAXRXPATH [path]
- This local
path
points to the JAX-RX web directory (default:{home}/BaseXWeb
).
TIMEOUT [time]
- Server timeout in seconds. The timeout describes the maximum execution time of a client query. The timeout is deactivated if
time
is set to0
(default: no timeout (0
)).
Database Options
CHOP
- Chop all leading and trailing whitespaces from text nodes while building a database, and discard empty text nodes. This option often reduces the database size by up to 50% (default:
true
).
INTPARSE
- Use internal XML parser instead of the standard Java XML parser. The internal parser is faster, more fault tolerant and supports common HTML entities out-of-the-box, but it does not support all features needed for parsing DTDs. (default:
false
).
DTD
- Parse referenced DTDs and resolve XML entities (default:
false
).
CATFILE [path]
- Specify a catalog file to locally resolve DTDs; see the Wikipedia entry on XML Catalogs for more details (default: empty).
CREATEFILTER [filter]
- Globbing syntax for filtering input documents (default:
*.xml
).
ADDARCHIVES
- Parse files within archives (ZIP, DOCX, GZIP, etc.) while creating a database or adding new documents (default:
true
).
SKIPCORRUPT
- Skip corrupt (i.e., non-well-formed) files while creating a database or adding new documents. If this option is used, database creation is slowed down, as all files will be parsed twice. Next, main memory consumption will be higher as parsed files will be cached in main memory (default:
false
).
PARSER [type]
- Define import parser. As
TYPE
are available 'XML', 'CSV' or 'TEXT'. If Tagsoup is found in the classpath, 'HTML' is also available (default:XML
).
PARSEROPT [options]
- Define parser-specific options (default: empty). See parsers page for more information.
PATHINDEX
- Create index for paths and speedup path based queries (default:
true
).
TEXTINDEX
- Create index for text nodes and speedup queries querying the entire text of a node (default:
true
).
ATTRINDEX
- Create index for attribute values and speedup queries querying attribute values (default:
true
).
FTINDEX
- Create index for fulltext and speedup queries querying full text (default:
false
).
WRITEBACK
- Write original files back after updates. As this will alter your input file make sure you have a backup before you use this option (default:
false
).
MAINMEM
- Use main-memory mode. Now all data is exclusively stored in main memory. Some queries will be evaluated even faster, but the data is lost if BaseX is shut down (default:
false
).
FORCECREATE
- Force database creation for unknown documents specified in XQuery expressions (default:
false
).
Full-Text Options
WILDCARDS
- Create wildcard optimized full text index that is especially tuned for querying full text using wildcards expressions (default:
false
).
STEMMING
- Stemm full text tokens before indexing and decrease index size. Should only be assigned for full text queries using stemming, otherwise the full text index could not be assigned for query speedups (default:
false
).
CASESENS
- Case sensitive full text indexing, i.e. full text tokens are stored case sensitive and enables the assignment of the full text index for case sensitive queries (default:
false
).
DIACRITICS
- Diacritic sensitive full text indexing, i.e. full text tokens are stored with diacritics and enables the assignment of the full text index for diacritic queries (default:
false
).
LANGUAGE [lang]
- Language for full-text search index, e.g.
LANG
can be set toEnglish
orGerman
(default: empty).
SCORING [mode]
- Precalculation of full text scores and storage within the full text index structure. Enables TF/IDF based scores in full text queries and increases memory consumption while indexing.
MODE
can be set to1
for document based scoring,2
for text node based scoring and0
for non scoring (default:0
).
STOPWORDS [path]
- Specify stop word list at
PATH
, that could be used e.g. to decrease the full text index size. The standard stopword list (english) is provided at'etc/xml/stopWords'
(default: empty).
LSERROR [error]
- Levenshtein default error used for fuzzy search with BaseX specialized own FTMatchOption, e.g. error could be
2
(default:0
).
Query Options
QUERYINFO
- Show (all) process info (default:
false
).
QUERY3
- Enable/disable XQuery 3.0 functions (default:
true
).
SERIALIZE
- Flag for serialization of query results. I.e. there are any results printed if serialization is turned off (default:
true
).
BINDINGS [vars]
- Contains external variables to be bound to the query. Keys and values are separated by equality signs, multiple variables are separated by commas (default: empty).
- Example:
var1=Hello,var2=World
SERIALIZER [params]
- Parameters for serializing queries; see Serialization for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: empty).
- Example:
method=xml,encoding=CP1252
EXPORTER [params]
- Parameters for exporting the documents; see Serialization for more details. Keys and values are separated by equality signs, multiple parameters are separated by commas (default: empty).
RUNS [num]
- Specify number of runs a query is executed. Results are printed a single time and evaluation times are averages of all runs (default:
1
).
Serialization Options
DOTPLAN
- Create query plans visualized with dotty, see
'plan.dot'
file in your project folder (default:false
).
DOTCOMPACT
- Compact dot representation (default:
false
).
DOTDISPLAY
- Display dot representation after query execution (default:
true
).
DOTTY [path]
- Program
PATH
of dotty executable (default:dotty
).
XMLPLAN
- Print query plan as xml document (default:
false
).
COMPPLAN
- Create query plan before or after compilation - query plan might change due to optimizations (default:
true
).
CACHEQUERY
- Cache the query results (default:
false
).
MAXSTAT [num]
- Set maximum number of index occurrences to print through the command
info index
(default:15
).