Skip to content

Commit c95c305

Browse files
artembolenkis
authored andcommitted
New TOC structure (#1552)
(cherry picked from commit 5dea181)
1 parent 8046b6e commit c95c305

22 files changed

+492
-366
lines changed

doc/book/admin/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _admin:
22

33
********************************************************************************
4-
Server administration
4+
Administration
55
********************************************************************************
66

77
Tarantool is designed to have multiple running instances on the same host.
@@ -36,3 +36,4 @@ This chapter includes the following sections:
3636
os_notes
3737
bug_reports
3838
troubleshoot
39+
../monitoring/index

doc/book/app_server/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Application server
55
********************************************************************************
66

7-
In this chapter, we introduce the basics of working with Tarantool as a Lua
7+
Here we introduce the basics of working with Tarantool as a Lua
88
application server.
99

1010
This chapter contains the following sections:

doc/book/box/atomic_index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _atomic-atomic_execution:
2+
3+
================================================================================
4+
Transaction control
5+
================================================================================
6+
7+
.. include:: atomic.rst

doc/book/box/authentication_index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _authentication:
2+
3+
================================================================================
4+
Access control
5+
================================================================================
6+
7+
.. include:: authentication.rst

doc/book/box/data_model.rst

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -67,70 +67,7 @@ for example: ``[3, 'Ace of Base', 1993]``.
6767
Index
6868
--------------------------------------------------------------------------------
6969

70-
An **index** is a group of key values and pointers.
71-
72-
As with spaces, you should specify the index **name**, and let Tarantool
73-
come up with a unique **numeric identifier** ("index id").
74-
75-
An index always has a **type**. The default index type is 'TREE'.
76-
TREE indexes are provided by all Tarantool engines, can index unique and
77-
non-unique values, support partial key searches, comparisons and ordered results.
78-
Additionally, memtx engine supports HASH, RTREE and BITSET indexes.
79-
80-
An index may be **multi-part**, that is, you can declare that an index key value
81-
is composed of two or more fields in the tuple, in any order.
82-
For example, for an ordinary TREE index, the maximum number of parts is 255.
83-
84-
An index may be **unique**, that is, you can declare that it would be illegal
85-
to have the same key value twice.
86-
87-
The first index defined on a space is called the **primary key index**,
88-
and it must be unique. All other indexes are called **secondary indexes**,
89-
and they may be non-unique.
90-
91-
An index definition may include identifiers of tuple fields and their expected
92-
**types** (see allowed :ref:`indexed field types <index-box_indexed-field-types>`
93-
below).
94-
95-
.. NOTE::
96-
97-
A recommended design pattern for a data model is to base primary keys on the
98-
first fields of a tuple, because this speeds up tuple comparison.
99-
100-
In our example, we first defined the primary index (named 'primary') based on
101-
field #1 of each tuple:
102-
103-
.. code-block:: tarantoolsession
104-
105-
tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}
106-
107-
The effect is that, for all tuples in space 'tester', field #1 must exist and
108-
must contain an unsigned integer.
109-
The index type is 'hash', so values in field #1 must be unique, because keys
110-
in HASH indexes are unique.
111-
112-
After that, we defined a secondary index (named 'secondary') based on field #2
113-
of each tuple:
114-
115-
.. code-block:: tarantoolsession
116-
117-
tarantool> i = s:create_index('secondary', {type = 'tree', parts = {field = 2, type = 'string'}})
118-
119-
The effect is that, for all tuples in space 'tester', field #2 must exist and
120-
must contain a string.
121-
The index type is 'tree', so values in field #2 must not be unique, because keys
122-
in TREE indexes may be non-unique.
123-
124-
.. NOTE::
125-
126-
Space definitions and index definitions are stored permanently in Tarantool's
127-
system spaces :ref:`_space <box_space-space>` and :ref:`_index <box_space-index>`
128-
(for details, see reference on :ref:`box.space <box_space>` submodule).
129-
130-
You can add, drop, or alter the definitions at runtime, with some restrictions.
131-
See syntax details in reference on :ref:`box <box-module>` module.
132-
133-
Read more about index operations :ref:`below <index-box_index-operations>`.
70+
.. include:: indexes.rst
13471

13572
.. _index-box_data-types:
13673

doc/book/box/indexes.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
********************************************************************************
2+
Indexes
3+
********************************************************************************
4+
5+
An **index** is a group of key values and pointers.
6+
7+
As with spaces, you should specify the index **name**, and let Tarantool
8+
come up with a unique **numeric identifier** ("index id").
9+
10+
An index always has a **type**. The default index type is 'TREE'.
11+
TREE indexes are provided by all Tarantool engines, can index unique and
12+
non-unique values, support partial key searches, comparisons and ordered results.
13+
Additionally, memtx engine supports HASH, RTREE and BITSET indexes.
14+
15+
An index may be **multi-part**, that is, you can declare that an index key value
16+
is composed of two or more fields in the tuple, in any order.
17+
For example, for an ordinary TREE index, the maximum number of parts is 255.
18+
19+
An index may be **unique**, that is, you can declare that it would be illegal
20+
to have the same key value twice.
21+
22+
The first index defined on a space is called the **primary key index**,
23+
and it must be unique. All other indexes are called **secondary indexes**,
24+
and they may be non-unique.
25+
26+
An index definition may include identifiers of tuple fields and their expected
27+
**types** (see allowed :ref:`indexed field types <index-box_indexed-field-types>`
28+
below).
29+
30+
.. NOTE::
31+
32+
A recommended design pattern for a data model is to base primary keys on the
33+
first fields of a tuple, because this speeds up tuple comparison.
34+
35+
In our example, we first defined the primary index (named 'primary') based on
36+
field #1 of each tuple:
37+
38+
.. code-block:: tarantoolsession
39+
40+
tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}
41+
42+
The effect is that, for all tuples in space 'tester', field #1 must exist and
43+
must contain an unsigned integer.
44+
The index type is 'hash', so values in field #1 must be unique, because keys
45+
in HASH indexes are unique.
46+
47+
After that, we defined a secondary index (named 'secondary') based on field #2
48+
of each tuple:
49+
50+
.. code-block:: tarantoolsession
51+
52+
tarantool> i = s:create_index('secondary', {type = 'tree', parts = {field = 2, type = 'string'}})
53+
54+
The effect is that, for all tuples in space 'tester', field #2 must exist and
55+
must contain a string.
56+
The index type is 'tree', so values in field #2 must not be unique, because keys
57+
in TREE indexes may be non-unique.
58+
59+
.. NOTE::
60+
61+
Space definitions and index definitions are stored permanently in Tarantool's
62+
system spaces :ref:`_space <box_space-space>` and :ref:`_index <box_space-index>`
63+
(for details, see reference on :ref:`box.space <box_space>` submodule).
64+
65+
You can add, drop, or alter the definitions at runtime, with some restrictions.
66+
See syntax details in reference on :ref:`box <box-module>` module.
67+
68+
Read more about index operations :ref:`below <index-box_index-operations>`.

0 commit comments

Comments
 (0)