1
0
Fork 0

added bitarray documentation, added TOC

This commit is contained in:
Frank Celler 2012-12-03 15:20:49 +01:00
parent 30d46e87ad
commit e5ee30f30b
12 changed files with 225 additions and 63 deletions

View File

@ -0,0 +1,16 @@
BitArray Indexes {#IndexBitArray}
=================================
@EMBEDTOC{IndexBitArrayTOC}
Introduction to Bit-Array Indexes {#IndexBitArrayIntro}
=======================================================
It is possible to define a bit-array index on one or more attributes (or paths)
of a documents.
Accessing BitArray Indexes from the Shell {#IndexBitArrayShell}
---------------------------------------------------------------
@anchor IndexBitArrayShellEnsureBitarray
@copydetails JS_EnsureBitarrayVocbaseCol

View File

@ -0,0 +1,7 @@
TOC {#IndexBitArrayTOC}
=======================
- @ref IndexBitArray
- @ref IndexBitArrayIntro
- @ref IndexBitArrayShell
- @ref IndexBitArrayShellEnsureBitarray "collection.ensureBitarray"

View File

@ -62,6 +62,7 @@ WIKI = \
ImplementorManual \
ImpManual \
ImpManualBasics \
IndexBitArray \
IndexCap \
IndexCapHttp \
IndexGeo \

View File

@ -2,6 +2,10 @@ Upgrading to ArangoDB 1.1 {#Upgrading}
======================================
@NAVIGATE{NewFeatures11,Home,UserManual}
@EMBEDTOC{UpgradingTOC}
Upgrading {#UpgradingIntroduction}
==================================
ArangoDB 1.1 introduces new features but may in some respect have
slightly different behavior than 1.0.
@ -16,15 +20,15 @@ Existing users of ArangoDB 1.0 should read the list carefully and make
sure they have undertaken all necessary steps and precautions before
upgrading from ArangoDB 1.0 to ArangoDB 1.1.
New dependencies
----------------
New Dependencies {#UpgradingNewDependencies}
--------------------------------------------
As ArangoDB 1.1 supports SSL connections, ArangoDB can only be built
on servers with the OpenSSL library installed. The OpenSSL is not
bundled with ArangoDB and must be installed separately.
Database directory version check and upgrade
--------------------------------------------
Database Directory Version Check and Upgrade {#UpgradingVersionCheck}
---------------------------------------------------------------------
Starting with ArangoDB 1.1, _arangod_ will perform a database version
check at startup.
@ -83,8 +87,8 @@ requires the option `--uid username` to upgrade the database:
> bin/arango-upgrade --database.directory /tmp/voctest --uid arangodb
Server startup options changes
------------------------------
Server Startup Options Changes {#UpgradingServerOptions}
--------------------------------------------------------
### Port options and endpoints
@ -111,11 +115,11 @@ _arangod_ will refuse to start.
The server can be bound to one or multiple endpoints at once. The
following endpoint specification sytnax is currently supported:
- `tcp://host:port (HTTP over IPv4)`
- `tcp://[host]:port (HTTP over IPv6)`
- `ssl://host:port (HTTP over SSL-encrypted IPv4)`
- `ssl://[host]:port (HTTP over SSL-encrypted IPv6)`
- `unix://path/to/socket (HTTP over UNIX socket)`
- `tcp://host:port` (HTTP over IPv4)
- `tcp://[host]:port` (HTTP over IPv6)
- `ssl://host:port` (HTTP over SSL-encrypted IPv4)
- `ssl://[host]:port` (HTTP over SSL-encrypted IPv6)
- `unix://path/to/socket` (HTTP over UNIX socket)
An example value for the option is `--server.endpoint
tcp://127.0.0.1:8529`. This will make the server listen to requests
@ -175,17 +179,17 @@ requests from a browser, you should either set
`--server.keep-alive-timeout` to a value of `0`, or make your browser
send `Connection: close` HTTP headers with its requests.
Start / stop scripts
--------------------
Start / Stop Scripts {#UpgradingStartScripts}
---------------------------------------------
The user used in start and stop scripts has changed from _arango_ to
_arangodb_. Furthermore, the start script name itself has changed from
_arangod_ to _arangodb_. Additionally, the default database directory
name changed from _/var/arangodb_ to _/var/lib/arangodb_. This was
done to be more compliant with various Linux policies.
necessary to be more compliant with various Linux policies.
Collection types
----------------
Collection Types {#UpgradingCollectionTypes}
--------------------------------------------
In ArangoDB 1.1, collection types have been introduced:
@ -238,8 +242,8 @@ the server, directly in ArangoDB. The `ArangoEdges` or
`ArangoEdgesCollection` objects were not exposed to _arangosh_ or any
other clients.
arangoimp / arangosh
--------------------
arangoimp / arangosh {#UpgradingShellImport}
--------------------------------------------
The parameters `--connect-timeout` and `--request-timeout` for
_arangosh_ and _arangoimp_ have been renamed to
@ -265,18 +269,35 @@ interactively prompt for a password. If no username is specified on
the command line, the default user _root_ will be used but there will
still be a password prompt.
Change of syslog usage
----------------------
Change of Syslog Usage {#UpgradingSyslog}
-----------------------------------------
In 1.0, arangod always logged its output to the syslog, regardless of
any other logging that was configured. In 1.1, this has changed. Log
messages will be sent to the syslog only if the server is started with
the `--log.syslog` option and a non-empty string (the log facility)
is given to it.
the `--log.syslog` option and a non-empty string (the log facility) is
given to it. This is in accordance with the 1.0 documentation.
Removed functionality
---------------------
Removed Features {#UpgradingRemovedFeatures}
============================================
Removed Dependencies {#UpgradingRemovedDependencies}
----------------------------------------------------
ArangoDB no longer requires BOOST, ZeroMQ, or ProtocolBuffers.
Removed Functionality {#UpgradingRemovedFunctionality}
------------------------------------------------------
### Configuration
In 1.0, there were unfinished REST APIs available at the
`/_admin/config` URL suffix. These APIs were stubs only and have been
removed in ArangoDB 1.1.
### Front-End User and Session Management
In 1.0, there was an API to manage user and session for the GUI
administraion interface. In 1.1 the user management is part of the
database (not just the front-end). There the calls to
`_admin/user-manager` where removed.

View File

@ -0,0 +1,13 @@
TOC {#UpgradingTOC}
===================
- @ref UpgradingIntroduction
- @ref UpgradingNewDependencies
- @ref UpgradingVersionCheck
- @ref UpgradingServerOptions
- @ref UpgradingStartScripts
- @ref UpgradingCollectionTypes
- @ref UpgradingShellImport
- @ref UpgradingSyslog
- @ref UpgradingRemovedFeatures
- @ref UpgradingRemovedDependencies

View File

@ -716,6 +716,7 @@ WARN_LOGFILE =
# with spaces.
INPUT = @srcdir@/Documentation/UserManual \
@srcdir@/Documentation/DBAManual \
@srcdir@/Documentation/Manual \
@srcdir@/Doxygen/js \
@srcdir@/arangod \

View File

@ -1682,6 +1682,7 @@ WIKI = \
ImplementorManual \
ImpManual \
ImpManualBasics \
IndexBitArray \
IndexCap \
IndexCapHttp \
IndexGeo \

54
README
View File

@ -1,46 +1,47 @@
ArangoDB
AArraannggooDDBB
_ _B_u_i_l_d_ _S_t_a_t_u_s_
ArangoDB is a universal open-source database with flexible data model for
documents, graphs, and key-values. Build high performance application using a
convenient sql-like query language or JavaScript/Ruby extensions.
Key features include:
* Schema-free schemata let you combine the space efficiency of MySQL with the
* SScchheemmaa--ffrreeee sscchheemmaattaa let you combine the space efficiency of MySQL with the
performance power of NoSQL
* Use ArangoDB as an application server and fuse your application and database
* Use ArangoDB as an aapppplliiccaattiioonn sseerrvveerr and fuse your application and database
together for maximal throughput
* JavaScript for all: no language zoo, you can use one language from your
* JavaScript for all: nnoo llaanngguuaaggee zzoooo, you can use one language from your
browser to your back-end
* ArangoDB is multi-threaded - exploit the power of all your cores
* Flexible data modeling: model your data as combination of key-value pairs,
* ArangoDB is mmuullttii--tthhrreeaaddeedd - exploit the power of all your cores
* FFlleexxiibbllee ddaattaa mmooddeelliinngg: model your data as combination of key-value pairs,
documents or graphs - perfect for social relations
* Free index choice: use the correct index for your problem, be it a skip list
* Free iinnddeexx cchhooiiccee: use the correct index for your problem, be it a skip list
or a n-gram search
* Configurable durability: let the application decide if it needs more
* Configurable dduurraabbiilliittyy: let the application decide if it needs more
durability or more performance
* No-nonsense storage: ArangoDB uses all of the power of modern storage
hardware, like SSD and large caches
* Powerful query language (AQL) to retrieve data
* It is open source (Apache Licence 2.0)
* No-nonsense storage: ArangoDB uses all of the power of mmooddeerrnn ssttoorraaggee
hhaarrddwwaarree, like SSD and large caches
* PPoowweerrffuull qquueerryy llaanngguuaaggee (AQL) to retrieve data
* It is ooppeenn ssoouurrccee (Apache Licence 2.0)
For more in-depth information
* read more on the design_goals_of_ArangoDB
* watch_the_video - Martin Schoenert, architect of ArangoDB, gives an
* read more on the _d_e_s_i_g_n_ _g_o_a_l_s_ _o_f_ _A_r_a_n_g_o_D_B
* _w_a_t_c_h_ _t_h_e_ _v_i_d_e_o - Martin Schoenert, architect of ArangoDB, gives an
introduction of what the ArangoDB project is about.
* or give it a try.
Compilation
CCoommppiillaattiioonn
Please check the Installation_Manual for installation and compilation
Please check the _I_n_s_t_a_l_l_a_t_i_o_n_ _M_a_n_u_a_l for installation and compilation
instructions.
Mac OS X Hints
MMaacc OOSS XX HHiinnttss
On Mac OS X you can install ArangoDB using the packagemanager Homebrew:
On Mac OS X you can install ArangoDB using the packagemanager _H_o_m_e_b_r_e_w:
* brew install arangodb (use --HEAD in order to build ArangoDB from current
master)
@ -55,18 +56,18 @@ The ArangoDB shell will be install as
/usr/local/bin/arangosh
First Steps
FFiirrsstt SStteeppss
Start the server:
> /usr/sbin/arangod
> /usr/sbin/arangod
2012-03-30T12:54:19Z [11794] INFO ArangoDB (version 1.x.y) is ready for
business
2012-03-30T12:54:19Z [11794] INFO Have Fun!
Start the shell in another windows:
> /usr/bin/arangosh
> /usr/bin/arangosh
_
__ _ _ __ __ _ _ __ __ _ ___ ___| |__
/ _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \
@ -80,18 +81,19 @@ Start the shell in another windows:
Connected to Arango DB 127.0.0.1:8529 Version 1.x.y
arangosh> db._create("examples")
arangosh> db._create("examples")
[ArangoCollection 106097, "examples]
arangosh> db.examples.save({ Hallo: "World" });
arangosh> db.examples.save({ Hallo: "World" });
{"error":false,"_id":"106097/2333739","_rev":2333739}
arangosh> db.examples.all();
arangosh> db.examples.all();
[{ _id : "82883/1524675", _rev : 1524675, Hallo : "World" }]
Caveat
CCaavveeaatt
Please note that this is an early version of ArangoDB. There will be bugs and
we'd really appreciate it if you report them:
we'd really appreciate it if you >report
them:
https://github.com/triAGENS/ArangoDB/issues

View File

@ -46,6 +46,7 @@
/// <li>@ref IndexGeo</li>
/// <li>@ref IndexHash</li>
/// <li>@ref IndexSkiplist</li>
/// <li>@ref IndexBitArray</li>
///
/// @latexonly\appendix@endlatexonly
/// <li>@ref Glossary</li>

View File

@ -32,6 +32,7 @@
/// @copydetails IndexGeoTOC
/// @copydetails IndexHashTOC
/// @copydetails IndexSkiplistTOC
/// @copydetails IndexBitArrayTOC
////////////////////////////////////////////////////////////////////////////////
// Local Variables:

0
arangod/V8Server/v8-query.cpp Executable file → Normal file
View File

122
arangod/V8Server/v8-vocbase.cpp Executable file → Normal file
View File

@ -2969,18 +2969,6 @@ static v8::Handle<v8::Value> JS_EnsureCapConstraintVocbaseCol (v8::Arguments con
////////////////////////////////////////////////////////////////////////////////
/// @brief ensures that a bitarray index exists
///
/// @FUN{@FA{collection}.ensureBitarray(@FA{field1}, @FA{value1}, @FA{field2}, @FA{value2},...,@FA{fieldn}, @FA{valuen})}
///
/// Creates a bitarray index on all documents using attributes as paths to
/// the fields. At least one attribute and one set of possible values must be given.
/// All documents, which do not have the attribute path or
/// with one or more values that are not suitable, are ignored.
///
/// In case that the index was successfully created, the index identifier
/// is returned.
///
/// @verbinclude fluent14
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool supportUndef) {
@ -3204,10 +3192,120 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
return scope.Close(theIndex);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief ensures that a bitarray index exists
///
/// @FUN{@FA{collection}.ensureBitarray(@FA{field1}, @FA{value1}, @FA{field2}, @FA{value2},...,@FA{fieldn}, @FA{valuen})}
///
/// Creates a bitarray index on documents using attributes as paths to the
/// fields (@FA{field1},..., @FA{fieldn}). A value (@FA{value1},...,@FA{valuen})
/// consists of an array of possible values that the field can take. At least
/// one field and one set of possible values must be given.
///
/// All documents, which do not have the attribute path or with one or more
/// values that are not suitable, are ignored (that is, are not part of the
/// bitarray index).
///
/// In case that the index was successfully created, the index identifier is
/// returned.
///
/// In the example below we create a bitarray index with one field and that
/// field can have the values of either `0` or `1`. Any document which has the
/// attribute `x` defined and does not have a value of `0` or `1` will be
/// rejected and therefore not inserted within the collection. Documents without
/// the attribute `x` defined will not take part in the index.
///
/// @code
/// arango> arangod> db.example.ensureBitarray("x", [0,1]);
/// {
/// "id" : "2755894/3607862",
/// "unique" : false,
/// "type" : "bitarray",
/// "fields" : [["x", [0, 1]]],
/// "undefined" : false,
/// "isNewlyCreated" : true
/// }
/// @endcode
///
/// In the example below we create a bitarray index with one field and that
/// field can have the values of either `0`, `1` or *other* (indicated by
/// `[]`). Any document which has the attribute `x` defined will take part in
/// the index. Documents without the attribute `x` defined will not take part in
/// the index.
///
/// @code
/// arangod> db.example.ensureBitarray("x", [0,1,[]]);
/// {
/// "id" : "2755894/4263222",
/// "unique" : false,
/// "type" : "bitarray",
/// "fields" : [["x", [0, 1, [ ]]]],
/// "undefined" : false,
/// "isNewlyCreated" : true
/// }
/// @endcode
///
/// In the example below we create a bitarray index with two fields. Field `x`
/// can have the values of either `0` or `1`; while field `y` can have the values
/// of `2` or `"a"`. A document which does not have *both* attributes `x` and `y`
/// will not take part within the index. A document which does have both attributes
/// `x` and `y` defined must have the values `0` or `1` for attribute `x` and
/// `2` or `a` for attribute `y`, otherwise the document will not be inserted
/// within the collection.
///
/// @code
/// arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a"]);
/// {
/// "id" : "2755894/5246262",
/// "unique" : false,
/// "type" : "bitarray",
/// "fields" : [["x", [0, 1]], ["y", [0, 1]]],
/// "undefined" : false,
/// "isNewlyCreated" : false
/// }
/// @endcode
///
/// In the example below we create a bitarray index with two fields. Field `x`
/// can have the values of either `0` or `1`; while field `y` can have the
/// values of `2`, `"a"` or *other* . A document which does not have *both*
/// attributes `x` and `y` will not take part within the index. A document
/// which does have both attributes `x` and `y` defined must have the values `0`
/// or `1` for attribute `x` and any value for attribute `y` will be acceptable,
/// otherwise the document will not be inserted within the collection.
///
/// @code
/// arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a",[]]);
/// {
/// "id" : "2755894/5770550",
/// "unique" : false,
/// "type" : "bitarray",
/// "fields" : [["x", [0, 1]], ["y", [2, "a", [ ]]]],
/// "undefined" : false,
/// "isNewlyCreated" : true
/// }
/// @endcode
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_EnsureBitarrayVocbaseCol (v8::Arguments const& argv) {
return EnsureBitarray(argv, false);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief ensures that a bitarray index exists
///
/// @FUN{@FA{collection}.ensureUndefBitarray(@FA{field1}, @FA{value1}, @FA{field2}, @FA{value2},...,@FA{fieldn}, @FA{valuen})}
///
/// Creates a bitarray index on all documents using attributes as paths to
/// the fields. At least one attribute and one set of possible values must be given.
/// All documents, which do not have the attribute path or
/// with one or more values that are not suitable, are ignored.
///
/// In case that the index was successfully created, the index identifier
/// is returned.
///
/// @verbinclude fluent14
////////////////////////////////////////////////////////////////////////////////
static v8::Handle<v8::Value> JS_EnsureUndefBitarrayVocbaseCol (v8::Arguments const& argv) {
return EnsureBitarray(argv, true);
}