You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by na...@apache.org on 2007/11/09 03:14:41 UTC
svn commit: r593393 -
/xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml
Author: natalia
Date: Thu Nov 8 18:14:41 2007
New Revision: 593393
URL: http://svn.apache.org/viewvc?rev=593393&view=rev
Log:
Updated documentation for commandline tool
Modified:
xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml
Modified: xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml?rev=593393&r1=593392&r2=593393&view=diff
==============================================================================
--- xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml (original)
+++ xml/xindice/trunk/src/documentation/content/xdocs/guide-tools.xml Thu Nov 8 18:14:41 2007
@@ -28,7 +28,7 @@
<document>
<header>
- <title>Xindice 1.1 Commandline Tool Guide</title>
+ <title>Xindice 1.2 Commandline Tool Guide</title>
<version>$Revision$</version>
<authors>
<person id="jk" name="Jay Kalafus" email=""/>
@@ -42,10 +42,113 @@
<note>
If you notice incorrectness in this documentation, please
<link href="mail.html">notify</link> Xindice community. Your feedback
- will help create better documentation.
+ will help to create better documentation.
</note>
<section>
+ <title>General Information</title>
+ <section>
+ <title>Collection context</title>
+ <p>
+ Collection context refers to a collection location. It can be either
+ collection canonical name or complete XML:DB URL. The collection
+ context points to must already exist.
+ </p>
+ <p>
+ Collection canonical name starts with '/', then has a database name
+ and the collection path. So, a collection 'foo' under a collection
+ 'bar' in database 'db' will have canonical name /db/bar/foo.
+ Canonical names are used for convenience and are converted to complete
+ URLs by the command tool.
+ </p>
+ <p>
+ Complete URL has the following format:
+ <code>xmldb:<driver_protocol>://<host>:<port><path></code>,
+ where
+ <dl>
+ <dt><code>driver_protocol</code></dt>
+ <dd>
+ Either <code>xindice</code> (XML-RPC driver) or <code>xindice-embed</code>
+ (embedded driver). Driver choice depends on whether or not -l switch was
+ specified.
+ </dd>
+ <dt><code>host</code> and <code>port</code></dt>
+ <dd>
+ Host name or IP address and port number where Xindice server is running.
+ This information only is used for XML-RPC driver, it can be present in
+ URL when embedded driver is used, but will be ignored, so usually it is
+ omitted. For XML-RPC, host name and port number can be omitted, too, then
+ default address 127.0.0.1:8888 is used.
+ </dd>
+ <dt><code>path</code></dt>
+ <dd>
+ Collection canonical name
+ </dd>
+ </dl>
+ </p>
+ <p><b>Examples</b></p>
+ <source><![CDATA[
+ xmldb:xindice://10.1.1.1:8889/db1/col1/col2]]></source>
+ <p>
+ Context points to a collection col2, which is a child of the collection col1,
+ located in database db1 that is available on Xindice server running on host
+ 10.1.1.1 with port number 8889. To communicate with the server, XML-RPC
+ protocol will be used.
+ </p>
+ <source><![CDATA[
+ xmldb:xindice-embed:///db1/col1/col2]]></source>
+ <p>
+ Context points to a collection col2, which is a child of the collection col1,
+ located in database db1 that is available on embedded Xindice instance.
+ Command tool will use embedded driver.
+ </p>
+ <source><![CDATA[
+ /db1/col1/col2]]></source>
+ <p>
+ If -l switch was specified, this canonical name will be converted to
+ <code>xmldb:xindice-embed:///db1/col1/col2</code>. Otherwise, the result
+ will be <code>xmldb:xindice:///db1/col1/col2</code> (please note, that
+ the default target address 127.0.0.1:8888 will be used).
+ </p>
+ </section>
+ <section>
+ <title>Common parameters</title>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context that points to Xindice collection under
+ which the action will be executed. The context can be either
+ canonical name of the collection or complete XML:DB URL. The
+ collection context points to must already exist.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network. This is done
+ by using different driver to access database, embedded driver will
+ be used instead of XML-RPC. This parameter should be combined with
+ -d to specify system configuration to use.
+ </dd>
+ <dt><code>-d <file path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified. If this parameter is
+ omitted, Xindice will look for system property "xindice.configuration",
+ which can be set by setting environment variable XINDICE_CONFIG or
+ by specifying it as the -D parameter for java command, which is
+ what usually xindice command does itself.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ <dt><code>-h</code></dt>
+ <dd>
+ Print help screen for an action.
+ </dd>
+ </dl>
+ </section>
+ </section>
+ <section>
<title>Collection Management Commands</title>
<section>
@@ -55,184 +158,203 @@
under an existing collection hierarchy all parent collections must
already exist in the database.
</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice add_collection -c (or context)
- -n (or name) [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>add_collection</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>ac</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to create the new
- collection.
- </li>
- <li>
- <code>-n</code> The name of the collection to create
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Creating a Top Level Collection</title>
- <source><![CDATA[
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice add_collection -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>ac</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ Name for the collection to be created, must be present unless
+ collection configuration is specified. It can also be a collection
+ path rather than a name, in that case all parent collections must
+ already exist.
+ </dd>
+ <dt><code>-f <file></code></dt>
+ <dd>
+ Name of the file that holds collection configuration. If specified,
+ the rest of command-specific parameters (like collection name) are
+ ignored. A configuration may include child collections or indexers,
+ all of them will be created at the same time as well.
+ </dd>
+ <dt><code>--filer <name></code></dt>
+ <dd>
+ Collection filer, can be HashFiler or BTreeFiler (default:
+ BTreeFiler). A filer defines which data structure is going to be used
+ for storing information. HashFiler generally is more suitable for
+ collections that are not expected to grow significantly.
+ </dd>
+ <dt><code>--pagesize <number></code></dt>
+ <dd>
+ Page size for file pages (default: 4096 bytes).
+ </dd>
+ <dt><code>--pagecount <number></code></dt>
+ <dd>
+ Initial number of pages in the primary storage (default: 1024).
+ <ul>
+ <li>
+ BTreeFiler: number of pages filer will be created with. This
+ number can grow as more and more documents are added to the collection
+ </li>
+ <li>
+ HashFiler: the size of the hash table main storage. Main storage
+ size is constant. If main storage is at its capacity, documents
+ are stored in overflow storage, affecting efficiency of the hash
+ table
+ </li>
+ </ul>
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Create a top level collection pebbles in database db. Collection will use
+ BTreeFiler with default values for page count and page size.</p>
+ <source><![CDATA[
xindice add_collection -c /db -n pebbles
]]></source>
- </section>
- <section>
- <title>Creating a Sub Collection Under an Existing Collection</title>
- <source><![CDATA[
+ <p>Create a child collection boulder in collection pebbles.</p>
+ <source><![CDATA[
xindice add_collection -c /db/pebbles -n boulder
]]></source>
- </section>
+ <p>Create a child collection stone in collection boulder.</p>
+ <source><![CDATA[
+ xindice add_collection -c /db/pebbles -n boulder/stone
+ ]]></source>
+ <p>Create a child collection sand in collection pebbles that uses
+ HashFiler with page size equal to 1024 bytes and the size of the hash table main
+ storage equals to 2048.</p>
+ <source><![CDATA[
+ xindice add_collection -c /db/pebbles -n sand --filer HashFiler --pagesize 1024 --pagecount 2048
+ ]]></source>
+ <p>Create a child collection in collection pebbles with the configuration specified
+ in the file /tmp/collections/config.xml. If collection configuration contains
+ any child collections or indexers, they will be created as well.</p>
+ <source><![CDATA[
+ xindice add_collection -c /db/pebbles -f /tmp/collections/config.xml
+ ]]></source>
</section>
<section>
<title>Deleting a Collection</title>
<p>
Deletes a collection or subcollection from the database. If deleting
- a collection that has subcollections and documents they will also be
- deleted.
+ a collection that has subcollections, indexers and/or documents
+ they will also be deleted.
</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice delete_collection -c (or context)
- -n (or name)
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>delete_collection</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>dc</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to delete the collection.
- </li>
- <li>
- <code>-n</code> The name of the collection to delete.
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Deleting a Top Level Collection</title>
- <source><![CDATA[
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice delete_collection -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>dc</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ Name of the collection to delete. Required. It can also be a collection
+ path rather than a name.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Delete a top level collection pebbles and all its subcollections,
+ indexers and documents.</p>
+ <source><![CDATA[
xindice delete_collection -c /db -n pebbles
]]></source>
- </section>
- <section>
- <title>Deleting a Sub Collection</title>
- <source><![CDATA[
+ <p>Delete a child collection boulder from collection pebbles and
+ all its subcollections, indexers and documents.</p>
+ <source><![CDATA[
xindice delete_collection -c /db/pebbles -n boulder
]]></source>
- </section>
+ <p>Delete a child collection stone from collection boulder. Collection
+ boulder is not affected.</p>
+ <source><![CDATA[
+ xindice delete_collection -c /db/pebbles -n boulder/stone
+ ]]></source>
</section>
<section>
<title>List Collections</title>
<p>
- List all collections under the collection context given.
+ List all child collections under the given collection context.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice list_collections -c <context> [-l [-d <path>]] [-v]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>lc</code>
</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice list_collections -c (or context) [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>list_collections</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>lc</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which all sub collections are listed
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Listing the Top Level Collections</title>
- <source><![CDATA[
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>List the top level collections in database db.</p>
+ <source><![CDATA[
xindice list_collections -c /db
]]></source>
- </section>
- <section>
- <title>Listing a Sub Collection</title>
- <source><![CDATA[
+ <p>List child collections of collection pebbles.</p>
+ <source><![CDATA[
xindice list_collections -c /db/pebbles
]]></source>
- </section>
</section>
</section>
@@ -242,405 +364,423 @@
<section>
<title>Adding a Document</title>
<p>
- Adds a document to a collection or nested collection. Adding a
- document requires two parameters - the collection it will be stored
- under, and the file path to the document. If a document key is not
- provided an auto-generated system key will be used for the document.
- Documents cannot be added to collections that do not already exist.
+ Adds a document to a collection. Adding a document requires the file
+ path to the document. If a document key is not provided an auto-generated
+ system key will be used for the document. When entering the file path be
+ sure to include the path and file extension.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice add_document -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>ad</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <file></code></dt>
+ <dd>
+ File path for the file with the document being added to the
+ collection. Required. File content must be a well-formed XML
+ document.
+ </dd>
+ <dt><code>-n <key></code></dt>
+ <dd>
+ Key assigned to the document key. If this parameter is omitted,
+ database will generate an unique key and assign it to the document.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Add a document to the collection pebbles with a key "stones".</p>
+ <source><![CDATA[
+ xindice add_document -c /db/pebbles -f /tmp/stones.xml -n stones
+ ]]></source>
+ <p>Add a document to the collection boulder with an automatically generated key.</p>
+ <source><![CDATA[
+ xindice add_document -c /db/pebbles/boulder -f /tmp/bookmarks.xml
+ ]]></source>
+ </section>
+
+ <section>
+ <title>Adding a Binary Resource</title>
+ <p>
+ Adds a binary resource a collection, if support of binary resources
+ has been turned on for the collection. If a resource key is not
+ provided an auto-generated system key will be used for the resource.
When entering the file path be sure to include the path and file
extension.
</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice add_document -c (or context)
- -f (or file path)
- [-n (or key to assign to document)]
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>add_document</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>ad</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to add the document
- </li>
- <li>
- <code>-f</code> The complete file path to the document being added
- </li>
- <li>
- <code>-n</code> The key to assign to the document
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Adding a document to a collection with a key of "stones"</title>
- <source><![CDATA[
- xindice add_document -c /db/pebbles -f /tmp/stones.xml -n stones
- ]]></source>
- </section>
- <section>
- <title>Adding a document to the root collection with an automatically generated key</title>
- <source><![CDATA[
- xindice add_document -c /db -f /tmp/bookmarks.xml
+ <p>
+ The resource may or may not be XML document. Even if resouce
+ is XML document, it cannot be indexed, cannot be quieried with XPath
+ or modified with XUpdate.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice add_resource -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>ar</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <file path></code></dt>
+ <dd>
+ File path for the resource being added to the collection. Required.
+ </dd>
+ <dt><code>-n <key></code></dt>
+ <dd>
+ Key assigned to the resource. If this parameter is omitted,
+ database will generate an unique key and assign it to the resource.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Add a resource to a collection pebbles with a key "stones".</p>
+ <source><![CDATA[
+ xindice add_document -c /db/pebbles -f /tmp/stones.jpg -n stones
+ ]]></source>
+ <p>Add a resource to the collection boulder with an automatically generated key.</p>
+ <source><![CDATA[
+ xindice add_resource -c /db/pebbles/boulder -f /tmp/bookmarks.html
]]></source>
- </section>
</section>
<section>
<title>Adding Multiple Documents</title>
<p>
- Adds multiple documents to a collection or a nested collection. This
- command requires two arguments: the collection to store the documents
- under and the directory path containing the documents. Documents can
- be added to collections as well as subcollections as long as they
- exist. Documents added will be assigned their file name as the
- document key. The optional "extension" parameter can be used to
- import documents with a certain file extension. Document keys are
- shown as they are created.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice add_multiple_documents -c (or context)
- -f (or Directory to use )
- [-e (or file extenstion )]
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>add_multiple_documents</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>addmultiple</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to add the documents
- </li>
- <li>
- <code>-f</code> The path to the directory to import documents from
- </li>
- <li>
- <code>-e</code> The file extension to use when importing documents
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Adding all files from a directory to a collection</title>
- <source><![CDATA[
+ Adds multiple documents to a collection. This command requires
+ the argument pointing to the directory path that contains documents,
+ which are going to be stored in the collection specified by
+ collection context. The collection must already exist. Documents
+ added will be assigned their file name as the document key. The
+ optional "extension" parameter can be used to only import documents
+ with a certain file extension.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice add_multiple_documents -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>addmultiple</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <path></code></dt>
+ <dd>
+ Directory name to import documents from. Required.
+ </dd>
+ <dt><code>-e <extention></code></dt>
+ <dd>
+ The file extention that files must have in order to be added to the
+ collection.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Add all files from directory /tmp/mydocs to the collection pebbles.</p>
+ <source><![CDATA[
xindice add_multiple_documents -c /db/pebbles -f /tmp/mydocs
]]></source>
- </section>
- <section>
- <title>Adding all files from a directory with an extension of ".xml" </title>
- <source><![CDATA[
+ <p>Add all files from directory /tmp/mydocs that have an extension ".xml" to
+ the collection pebbles.</p>
+ <source><![CDATA[
xindice add_multiple_documents -c /db/pebbles -f /tmp/mydocs -e xml
]]></source>
- </section>
</section>
<section>
<title>Deleting a Document</title>
<p>
- Deletes an existing document from a collection or nested collection
- within the database.
+ Deletes an existing document from a collection.
</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice delete_document -c (or context)
- -n (or document key)
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>delete_document</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>dd</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to delete the document
- </li>
- <li>
- <code>-n</code> The key of the document to be deleted
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Deleting a Document from a collection</title>
- <source><![CDATA[
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice delete_document -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>dd</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ The key of the document to be deleted. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Delete a document with the key "stones" from the collection pebbles.</p>
+ <source><![CDATA[
xindice delete_document -c /db/pebbles -n stones
]]></source>
- </section>
</section>
<section>
<title>Retrieving a Document</title>
<p>
- Retrieves an existing document from a collection or nested collection within the database. The complete path where
- the document will be stored is required. If the file path passed in does not exist, it will be created .
- If the file argument given already exists, it will be overwritten automatically.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice retrieve_document -c (or context)
- -n (or document key)
- -f (or file path and name )
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>retrieve_document</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>rd</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to retrieve the document
- </li>
- <li>
- <code>-n</code> The key of the document to be retrieved
- </li>
- <li>
- <code>-f</code> The file path to store the document under
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Retrieving a document from a collection</title>
- <source><![CDATA[
+ Retrieves an existing document from a collection and stores it in
+ the file. If the path passed in does not exist, it will be created.
+ If the file specified by path argument already exists, it will be
+ overwritten.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice retrieve_document -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>rd</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ The key of the document to be retrieved. Required.
+ </dd>
+ <dt><code>-f <file></code></dt>
+ <dd>
+ The file path to store the document under. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Retrieve a document with the key "stones" from the collection pebbles
+ and save it in the file /tmp/stones.xml.</p>
+ <source><![CDATA[
xindice retrieve_document -c /db/pebbles -n stones -f /tmp/stones.xml
]]></source>
- </section>
+ </section>
+
+ <section>
+ <title>List Resources</title>
+ <p>
+ List all resource keys under the given collection context.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice list_documents -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>ld</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>List all documents in the collection pebbles.</p>
+ <source><![CDATA[
+ xindice list_documents -c /db/pebbles
+ ]]></source>
</section>
<section>
<title>Importing a Directory Tree</title>
<p>
- Adds multiple documents into a collection or a nested collection
- within the database, copying the directory structure into the
- database as collections. This command is designed to take a
- directory and create a collection from it's name. Directories
- under the directory will also be created as collections,
- duplicating the directory tree. The files within the specified
- directory are converted into Documents and then stored into the
+ Adds multiple documents into a collection, copying the directory
+ structure into the database as collections. This command takes a
+ directory and creates a collection with the same name. Directories
+ under the directory will also be created as child collections,
+ duplicating the directory tree. The files within the specified
+ directory are converted into documents and then stored into the
newly created collection with their filenames as the document keys.
The optional "extension" parameter can be used to only import
- documents with a certain file extension. If the collection name
- used already exists it will be overwritten. Collection and document
- keys will are shown as they are created.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice import -c (or context)
- -f (or file path and name )
- [-e (or file extenstion )]
- [-v (or ) ]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>import</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>import</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to import the documents
- </li>
- <li>
- <code>-f</code> The path to the documents being added
- </li>
- <li>
- <code>-e</code> The file extension to use when importing documents
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Importing all directories and documents</title>
- <source><![CDATA[
+ documents with a certain file extension.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice import -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <path></code></dt>
+ <dd>
+ The path to a directory to be imported as a collection. Required.
+ </dd>
+ <dt><code>-e <extention></code></dt>
+ <dd>
+ The file extention that files must have in order to be added to the
+ collection.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Import all directories and documents to the collection pebbles, starting
+ with directory /tmp/flintstones.</p>
+ <source><![CDATA[
xindice import -c /db/pebbles -f /tmp/flintstones
]]></source>
- </section>
- <section>
- <title>Importing all directories and documents with an extension of ".xml" </title>
- <source><![CDATA[
+ <p>Import all directories and documents with an extension of ".xml" to the
+ collection pebbles, starting with directory /tmp/flintstones.</p>
+ <source><![CDATA[
xindice import -c /db/pebbles -f /tmp/flintstones -e xml
]]></source>
- </section>
</section>
<section>
<title>Exporting a Directory Tree</title>
<p>
- Creates an identical directory tree from a collection including any
- subcollections. The directory tree will be created starting at the
- directory passed in as an argument. This command requires the
- collection which you are eporting and the directory to export to as
- arguments.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice export -c (or context) -f (or directory path) [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>export</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>export</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to export the document tree
- </li>
- <li>
- <code>-f</code> The directory to create the collection structure under
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Creating a directory tree indentical to a collection</title>
- <source><![CDATA[
- xindice export -c /db/pebbles -f /tmp/pebbles
+ Creates an directory tree from a collection and its subcollections.
+ The directory tree will be created starting at the directory passed
+ in as an argument. That directory must exist already. The collection
+ documents will be converted to files with the keys used as file names.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice export -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <path></code></dt>
+ <dd>
+ The path to a directory where collection structure will be created.
+ The directory must already exist. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Creating a directory tree indentical to a collection pebbles tree in
+ directory /tmp/export</p>
+ <source><![CDATA[
+ xindice export -c /db/pebbles -f /tmp/export
]]></source>
- </section>
</section>
</section>
@@ -649,383 +789,463 @@
<section>
<title>Adding a Collection Indexer</title>
<p>
- Adds a new collection index or nested collection index to the
- database. In order to add the collection index, the collection it is
- being added to must already exist. This command allows you to supply
- optional parameters for setting the index page size, setting the
- maximum key size for the index, and the index data type.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice add_indexer
- -c (or context)
- -n (or index name )
- -p (or index pattern)
- [--pagesize (or pagesize)]
- [--maxkeysize (or max key size)]
- [-t (or index type)]
- [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>add_indexer</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>ai</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to add the indexer
- </li>
- <li>
- <code>-n</code> The name of the index being added
- </li>
- <li>
- <code>-p</code> The pattern used to create the index
- </li>
- <li>
- <code>--maxkeysize</code> The MaxKeySize for the index ( default: 0 = none )
- </li>
- <li>
- <code>--pagesize</code> The PageSize for the index ( default: 4096)
- </li>
- <li>
- <code>-t</code>
- The data type for the index to create. Possible values are:
- <code><![CDATA[ string Non-normalized string value
- trimmed Normalized (whitespace stripped) string value
- short 16-bit signed short integer
- int 32-bit signed integer
- long 64-bit signed integer
- float 32-bit floating point value
- double 64-bit floating point value (XPath number)
- byte 8-bit signed byte
- char 16-bit signed character
- boolean 8-bit boolean value
- name Store document keys that contain the pattern]]></code>
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>
- To create a collection index in the pebbles collection for
- documents with a "rock" element
- </title>
- <source><![CDATA[
+ Adds a new collection index. In order to add the collection index,
+ the collection it is being added to must already exist. This command
+ has optional parameters for setting the index page size, index page
+ count, and the index data type.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice add_indexer -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>ai</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ The name of the indexer. Required.
+ </dd>
+ <dt><code>-p <pattern></code></dt>
+ <dd>
+ The pattern used to create the index. Required, unless indexer configuration
+ is specified. Name and Value indexers can only have one pattern,
+ which is going to follow the -p switch. Full text indexer can have multiple
+ patterns and its syntax is different, -p switch is followed by semicolon
+ delimited list of patterns for indexer in the form pattern=alias.
+ </dd>
+ <dt><code>-t <type></code></dt>
+ <dd>
+ The data type/index type.
+ </dd>
+ <dt><code>-f <file></code></dt>
+ <dd>
+ Name of the file that holds indexer configuration. If specified,
+ the rest of command-specific parameters (like indexer name) are
+ ignored.
+ </dd>
+ <dt><code>--pagesize <pagesize></code></dt>
+ <dd>
+ Page size for file pages (default: 4096). Does not apply to
+ LuceneIndexer.
+ </dd>
+ <dt><code>--pagecount <pagecount></code></dt>
+ <dd>
+ Number of pages in the primary storage (default: 1024). Does
+ not apply to LuceneIndexer.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+
+ <p>Possible values of index type are:
+ <table>
+ <tr>
+ <th>Type</th><th>What is indexed</th><th>Indexer type</th>
+ </tr>
+ <tr>
+ <td>string</td><td>Non-normalized string value</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>trimmed</td><td>Normalized (whitespace stripped) string value</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>short</td><td>16-bit signed short integer</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>int</td><td>32-bit signed integer</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>long</td><td>64-bit signed integer</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>float</td><td>32-bit floating point value</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>double</td><td>64-bit floating point value (XPath number)</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>byte</td><td>8-bit signed byte</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>char</td><td>16-bit signed character</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>boolean</td><td>8-bit boolean value</td><td>ValueIndexer</td>
+ </tr>
+ <tr>
+ <td>name</td><td>Presence of the pattern in a document</td><td>NameIndexer</td>
+ </tr>
+ <tr>
+ <td>text</td><td>Pattern text content</td><td>LuceneIndexer</td>
+ </tr>
+ </table>
+
+ By default type will be "string" for element pattern or "trimmed"
+ for attribute pattern.
+ </p>
+ <p><b>Examples</b></p>
+ <p>
+ Create a Value indexer named "rockindex" in the pebbles collection and
+ index value of a "rock" element as a string.
+ </p>
+ <source><![CDATA[
xindice add_indexer -c /db/pebbles -n rockindex -p rock
]]></source>
- </section>
- <section>
- <title>
- To create a collection index in the boulder sub collection
- for documents containing a rock elements with an attribute of "hard"
- </title>
- <source><![CDATA[
+ <p>
+ Create a Value indexer with name "hardindex" in the boulder collection
+ for documents containing a rock elements with an attribute of "hard" and
+ index value of an attribute "hard" of the "rock" element as normalized
+ string.
+ </p>
+ <source><![CDATA[
xindice add_indexer -c /db/pebbles/boulder -n hardindex -p rock@hard
]]></source>
- </section>
+ <p>
+ Create a Value indexer named "weight" in the pebbles collection and index
+ value of an attribute "weight" of the "rock" element as a floating point
+ value.
+ </p>
+ <source><![CDATA[
+ xindice add_indexer -c /db/pebbles -n weight -p rock@weight -t float
+ ]]></source>
+ <p>
+ Create a Name indexer named "type" in the pebbles collection and index
+ document keys of the documents that contain "rock" elements with an
+ attribute of "type".
+ </p>
+ <source><![CDATA[
+ xindice add_indexer -c /db/pebbles -n type -p rock@type -t name
+ ]]></source>
+ <p>
+ Create a Lucene indexer named "text" in the pebbles collection and index
+ text content of element "origin" (with alias "origin") and text of attribute
+ "donatedby" of the element "location" (with alias "donated").
+ </p>
+ <source><![CDATA[
+ xindice add_indexer -c /db/pebbles -n text -p origin=origin;location@donatedby=donated -t text
+ ]]></source>
</section>
<section>
<title>Deleting a Collection Indexer</title>
<p>
- Deletes a collection index or a nested collection index from the
- database. Deleting an index requires the collection and index name.
- If a collection index is deleted, the collection will still remain.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice delete_indexer -c (or context) -n (or index name) [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>delete_indexer </code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>di </code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin </td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to delete the index
- </li>
- <li>
- <code>-n</code> The name of the indexer being deleted
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Delete a collecion index in the pebbles collection</title>
- <source><![CDATA[
+ Deletes a collection index referred by the name. Deleting an index
+ does not affect collection and its documents.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice delete_indexer -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>di</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ The name of the indexer being deleted. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Delete index with name "hardindex" in the pebbles collection.</p>
+ <source><![CDATA[
xindice delete_indexer -c /db/pebbles -n hardindex
]]></source>
- </section>
</section>
<section>
<title>Listing Collection Indexers</title>
<p>
- Lists all collection indexers or nested collection indexes in the
- database. The listing of indexes works in a similar fashion to
- listing collections
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice list_indexers -c (or context) [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>list_indexers</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>li</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to list the indexers
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>To list all collection indexes from the pebbles collection </title>
- <source><![CDATA[
+ Lists all indexers of a collection.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice list_indexers -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p>
+ Command name abbreviation: <code>li</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>To list all collection indexes in the pebbles collection </p>
+ <source><![CDATA[
xindice list_indexers -c /db/pebbles
]]></source>
- </section>
</section>
</section>
<section>
- <title>Xpath Query Actions</title>
+ <title>Quering a Collection</title>
<section>
- <title>Executing an Xpath Query against a Collection</title>
+ <title>Xpath Query</title>
<p>
- Execute an Xpath query against a collection or nested collection. The
- command requires two arguments: the collection to query against and
- the query string to use.
- </p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice xpath -c (or context) -q (or query) -s (or prefix=namespace) [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>xpath</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>xpath</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-c</code> The collection context under which to execute the query
- </li>
- <li>
- <code>-q</code> The query to execute against the collection
- </li>
- <li>
- <code>-s</code> Semi-colon delimited list of namespaces for query
- in the form prefix=namespace-uri
- </li>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>
- Run an Xpath query against all documents in the pebbles collection
- with "rock" node that has the type attribute = "hard"
- </title>
- <source><![CDATA[
+ Execute XPath query against a collection. The query is executed for all
+ documents in the collection.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice xpath -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-q <query></code></dt>
+ <dd>
+ XPath query to execute. Required.
+ </dd>
+ <dt><code>-s <namespaces></code></dt>
+ <dd>
+ Semicolon delimited list of namespaces for query in the form
+ prefix=namespace-uri.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>
+ Run XPath query against all documents in the pebbles collection
+ and find all "rock" elements that have the "type" attribute
+ equals to "hard".
+ </p>
+ <source><![CDATA[
xindice xpath -c /db/pebbles -q "/rock[@type='hard']"
]]></source>
- </section>
- <section>
- <title>
- Run an Xpath query against all documents in the pebbles collection
- with "rock" node that has the type attribute = "hard" when the rock
- element is in the namespace http://www.bedrock.com
- </title>
- <source><![CDATA[
+ <p>
+ Run Xpath query against all documents in the pebbles collection
+ and find all "rock" elements that have the "type" attribute equals
+ to "hard" when the rock element is in the namespace
+ http://www.bedrock.com.
+ </p>
+ <source><![CDATA[
xindice xpath -c /db/pebbles -s "br=http://www.bedrock.com" -q "/br:rock[@type='hard']"
]]></source>
- </section>
+ </section>
+
+ <section>
+ <title>XUpdate Query</title>
+ <p>
+ Execute XUpdate query against a document or a collection.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice xupdate -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-f <file path></code></dt>
+ <dd>
+ Name of the file which holds XUpdate query. Required.
+ </dd>
+ <dt><code>-n <name></code></dt>
+ <dd>
+ Document key, if query to be run against single document.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>
+ Run XUpdate query from file /path/to/xupdate.xml against all
+ documents in the test collection.
+ </p>
+ <source><![CDATA[
+ xindice xupdate -c /db/test -f /path/to/xupdate.xml
+ ]]></source>
+ <p>
+ Run XUpdate query from file /path/to/xupdate.xml against the document
+ with the key "document-to-update.xml" in the test collection.
+ </p>
+ <source><![CDATA[
+ xindice xupdate -c /db/test -n document-to-update.xml -f /path/to/xupdate.xml
+ ]]></source>
+ </section>
+
+ <section>
+ <title>Full Text Query</title>
+ <p>
+ Execute Lucene query against a collection. This type of query
+ requires existing LuceneIndexer for the collection.
+ </p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice xpath -c <context> [-l [-d <path>]] [-v] [parameters...]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-q <query></code></dt>
+ <dd>
+ Lucene query to execute. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>
+ Find documents that have word 'Xindice' and do not have word 'XPath'
+ in the text content of "title" element in the book collection,
+ assuming that element "title" is included in LuceneIndexer with alias
+ "chaptertitle".
+ </p>
+ <source><![CDATA[
+ xindice xpath -c /db/pebbles -q "+chaptertitle:Xindice -chaptertitle:XPath"
+ ]]></source>
</section>
</section>
<section>
<title>Miscellaneous Actions</title>
<section>
- <title>Shutting down the server</title>
- <p>Shutdown the Xindice server</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice shutdown [-v (or )]
- </code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>shutdown</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>shutdown</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>Admin</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Shutdown the server</title>
- <source><![CDATA[
- xindice shutdown
- ]]></source>
- </section>
- </section>
- <section>
- <title>Accessing online Help</title>
- <p>Show the online help</p>
- <section>
- <title>Summary:</title>
- </section>
- <p>
- <code>xindice help [-v (or )]</code>
- </p>
- <table>
- <tr>
- <td>Action:</td>
- <td>
- <code>help</code>
- </td>
- </tr>
- <tr>
- <td>Abberviated-Action:</td>
- <td>
- <code>help</code>
- </td>
- </tr>
- <tr>
- <td>Access Level:</td>
- <td>User</td>
- </tr>
- </table>
- <section>
- <title>Parameters:</title>
- </section>
- <ul>
- <li>
- <code>-v</code> Show verbose output
- </li>
- </ul>
- <section>
- <title>Examples:</title>
- </section>
- <section>
- <title>Show online Help</title>
- <source><![CDATA[
- xindice help
+ <title>Shutting down the Server</title>
+ <p>Shuts down the Xindice server. Shutdown command only works with embedded driver.
+ Usually, this command is unnecessary, because all other commands will execute
+ shutdown command after their main work has been done, if embedded drived is used.
+ For XML-RPC driver, command can be executed, but it does not do anything, as the
+ lifecycle is managed by application container (such as Tomcat).</p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice shutdown -c <context> [-l [-d <path>]] [-v]</code>
+ </p>
+ <p><b>Parameters</b></p>
+ <dl>
+ <dt><code>-c <context></code></dt>
+ <dd>
+ The collection context. Required.
+ </dd>
+ <dt><code>-l</code></dt>
+ <dd>
+ Use a local database rather then going over the network.
+ Should be combined with -d to specify the configuration to use.
+ </dd>
+ <dt><code>-d <path></code></dt>
+ <dd>
+ Path to the database configuration to use for the local
+ database. Only applies if -l is specified.
+ </dd>
+ <dt><code>-v</code></dt>
+ <dd>
+ Show verbose output, additional information and exceptions.
+ </dd>
+ </dl>
+ <p><b>Examples</b></p>
+ <p>Shutdown the server</p>
+ <source><![CDATA[
+ xindice shutdown -c /db
]]></source>
- </section>
+ </section>
+
+ <section>
+ <title>Accessing Help</title>
+ <p>Show available commands</p>
+ <p><b>Summary</b></p>
+ <p>
+ <code>xindice --help</code>
+ </p>
+ <p>
+ Command name abbreviations: <code>-h, help</code>
+ </p>
</section>
</section>
</body>