Skip to content

Commit 700c688

Browse files
author
Thomas Lund Sigdestad
committed
moved valuetypes from index to properties
1 parent 59598f5 commit 700c688

File tree

3 files changed

+84
-89
lines changed

3 files changed

+84
-89
lines changed

docs/storage/indexing.adoc

Lines changed: 3 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
:toc: right
33
:imagesdir: images
44

5-
Properties in a node can be indexed.
6-
Indexing is the process of extracting, processing and storing a search-optimized version of the property value.
5+
Indexing is the process of extracting, processing and storing a search-optimized version the property value.
76

8-
Properties are mapped to specific indexes based on its <<ValueTypes,valueType>>, and the node's <<Index config>> - as illustrated below:
7+
Properties are mapped to specific indexes based on its <<Value Types,properties#valueType>>, and the node's <<Index config>> - as illustrated below:
98

109
image::indexmapping.svg[]
1110

@@ -76,85 +75,8 @@ The path-elements (separated by default path-separator '/') are indexed as token
7675
=== orderby
7776

7877
Any indexed property automatically gets indexed with the orderby mapping as well.
79-
The "orderby" index mapping lets us sort text and numbers in a natural way across properties with different <<ValueTypes>>
78+
The "orderby" index mapping lets us sort text and numbers in a natural way across properties with different <<>>
8079

81-
[#value_types]
82-
== ValueTypes
83-
84-
Every property in a node has a specific value type.
85-
The value type enables the data storage to interpret and handle each value specially - applying to both validation and indexing.
86-
87-
Below is the complete list of all supported value-types.
88-
89-
[cols="1,1,1,2"]
90-
|===
91-
|Value Type |Example |Default indexing |Comment
92-
93-
|String
94-
|My String
95-
|text
96-
|String of characters within UTF charset
97-
98-
|BinaryReference
99-
|a-binary-reference
100-
|text
101-
|Handle for accessing a binary
102-
103-
|Boolean
104-
|true
105-
|text
106-
|A value representing ``true`` or ``false``
107-
108-
|Double
109-
|11.5
110-
|number, text
111-
|Double-precision 64-bit IEEE 754 floating point.
112-
113-
|GeoPoint
114-
|59.9090442,10.7423389
115-
|geoPoint, text
116-
|Represents a geographical point on earth, given in latitude and longitude.
117-
118-
|Instant
119-
|2015-03-16T10:00:02Z
120-
|datetime, text
121-
|A single point on the time-line (may include subsecond up to 9 digits).
122-
123-
|LocalTime
124-
|10:00:03
125-
|text
126-
|A time representation without date or timezone(nor subsecond).
127-
128-
|LocalDate
129-
|2015-03-16
130-
|datetime, text
131-
|A date representation. Will be indexed with UTC timezone offset.
132-
133-
|LocalDateTime
134-
|2015-03-16T10:00:02
135-
|datetime, text
136-
|A date-time representation without timezone. Will be indexed with UTC timezone offset.
137-
138-
|Long
139-
|1234
140-
|number, text
141-
|64-bit two's complement integer.
142-
143-
|Reference
144-
|0b7f7720-6ab1-4a37-8edc-731b7e4f439e
145-
|text
146-
|Holds a reference to other nodes in the same repository.
147-
148-
|Set
149-
|
150-
|Not indexed
151-
|Holds sub properties as it's value
152-
153-
|XML
154-
|<some>xml</some>
155-
|text
156-
|Any valid XML
157-
|===
15880

15981
[#_allText]
16082
== _allText

docs/storage/nodes.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
:toc: right
33
:imagesdir: images
44

5-
65
== Introduction
76

87
Repositories and nodes are the fundamental concepts that enable you to create and store data in XP. Nodes are the smallest possible data object that can be created, and they are always stored in a repository. A simple comparison might be: If a repository is a drive, nodes are the files (and folders).

docs/storage/properties.adoc

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
== Introduction
66

77
Properties contain the actual data inside a <<nodes#, node>>.
8-
Properties use a key-value format.
9-
10-
The key must be unique within the node, and the value must have a specific <<indexing#value_types, valueType>>, such as ``String``, or ``GeoPoint``.
11-
The valueType is used to index the property correctly, and does the basic validation.
8+
Properties use a key-value format
129

10+
The key must be unique within the node, and the value must have a specific <<#value_types, valueType>>, such as ``String``, or ``GeoPoint``.
1311

1412
== Property anatomy
1513
Examples of what a property might look like:
@@ -40,11 +38,87 @@ person.age = 39
4038
person.birth-date = localDate("1975-17-10")
4139
----
4240

43-
In the example above, the property `person` is of the ValueType `Set`.
41+
In the example above, the property `person` is of the <<#value_type, Value type >> `Set`.
4442
Sets are special in the way that they don't hold actual values, but rather act as containers for other properties.
4543

46-
Properties are of a specific <<indexing#value_types, ValueType>>.
47-
ValueTypes are used for validation and securing correct <<indexing#, indexing>>.
44+
[#value_types]
45+
== Value types
46+
47+
Each property has a specific value type. These are the primitive data types in the XP storage
48+
The value type enables the data storage to handle both validation and <<indexing#,indexing>> of the property.
49+
50+
Below is the complete list of all supported value-types.
51+
52+
[cols="1,1,1,2"]
53+
|===
54+
|Value Type |Example |Default indexing |Comment
55+
56+
|String
57+
|My String
58+
|text
59+
|String of characters within UTF charset
60+
61+
|BinaryReference
62+
|a-binary-reference
63+
|text
64+
|Handle for accessing a binary
65+
66+
|Boolean
67+
|true
68+
|text
69+
|A value representing ``true`` or ``false``
70+
71+
|Double
72+
|11.5
73+
|number, text
74+
|Double-precision 64-bit IEEE 754 floating point.
75+
76+
|GeoPoint
77+
|59.9090442,10.7423389
78+
|geoPoint, text
79+
|Represents a geographical point on earth, given in latitude and longitude.
80+
81+
|Instant
82+
|2015-03-16T10:00:02Z
83+
|datetime, text
84+
|A single point on the time-line (may include subsecond up to 9 digits).
85+
86+
|LocalTime
87+
|10:00:03
88+
|text
89+
|A time representation without date or timezone(nor subsecond).
90+
91+
|LocalDate
92+
|2015-03-16
93+
|datetime, text
94+
|A date representation. Will be indexed with UTC timezone offset.
95+
96+
|LocalDateTime
97+
|2015-03-16T10:00:02
98+
|datetime, text
99+
|A date-time representation without timezone. Will be indexed with UTC timezone offset.
100+
101+
|Long
102+
|1234
103+
|number, text
104+
|64-bit two's complement integer.
105+
106+
|Reference
107+
|0b7f7720-6ab1-4a37-8edc-731b7e4f439e
108+
|text
109+
|Holds a reference to other nodes in the same repository.
110+
111+
|Set
112+
|
113+
|Not indexed
114+
|Holds sub properties as it's value
115+
116+
|XML
117+
|<some>xml</some>
118+
|text
119+
|Any valid XML
120+
|===
121+
48122

49123
[#sysprops]
50124
== System Properties

0 commit comments

Comments
 (0)