You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
image::n1ql-language-reference/index-vector.png["Syntax diagram: refer to source code listing", align=left]
307
+
308
+
FIXME: Indicates that the index key is a vector field.
309
+
For details, see Vector Indexes and Secondary Indexes with a Vector Field.
310
+
311
+
[[index-include]]
312
+
=== INCLUDE Clause
313
+
314
+
FIXME: Used to include non-key fields in the index.
315
+
This is used for vector indexes and secondary indexes with a vector field.
316
+
For details, see Vector Indexes and Secondary Indexes with a Vector Field.
317
+
268
318
[[index-partition]]
269
319
=== PARTITION BY HASH Clause
270
320
@@ -378,6 +428,9 @@ If the value of this property is not less than the number of index nodes in the
378
428
|Integer
379
429
|===
380
430
431
+
TODO: Vector indexes and secondary indexes with a vector field support further options.
432
+
See Vector Indexes and Secondary Indexes with a Vector Field.
433
+
381
434
== Usage
382
435
383
436
NOTE: It is not recommended to create (or drop) secondary indexes when any node with a secondary index role is down, as this may result in duplicate index names.
* If this clause is present, the statement does nothing and completes without error.
69
+
image::n1ql-language-reference/index-path-and-name.png["Syntax diagram: refer to source code listing", align=left]
70
+
71
+
You can use a dotted notation to specify the index and the keyspace on which the index is built.
72
+
This syntax provides compatibility with legacy versions of Couchbase Server.
73
+
74
+
[horizontal]
75
+
index-name:: (Required) A unique name that identifies the index.
76
+
77
+
index-path:: (Required) Refer to <<index-path>> below.
78
+
79
+
NOTE: If there is a hyphen (-) inside the index name or any part of the index path, you must wrap the index name or that part of the index path in backticks ({backtick}{nbsp}{backtick}).
image::n1ql-language-reference/index-path.png["Syntax diagram: refer to source code listing", align=left]
75
91
76
-
You can use a dotted notation to specify the index and the keyspace on which the index is built.
77
-
This syntax provides compatibility with legacy versions of Couchbase Server.
78
92
The index path may be a <<keyspace-full-index>>, a <<keyspace-prefix-index>>, or a <<keyspace-partial-index>>.
79
93
80
-
NOTE: If there is a hyphen (-) inside the index name or any part of the index path, you must wrap the index name or that part of the index path in backticks ({backtick}{nbsp}{backtick}).
81
-
Refer to the examples below.
82
-
83
94
[[keyspace-full-index,full keyspace path]]
84
-
==== Index Path: Full Keyspace
95
+
===== Index Path: Full Keyspace
85
96
86
97
[source,ebnf]
87
98
----
@@ -112,7 +123,7 @@ For example, `default:{backtick}travel-sample{backtick}.inventory.airline.{backt
112
123
====
113
124
114
125
[[keyspace-prefix-index,keyspace prefix]]
115
-
==== Index Path: Keyspace Prefix
126
+
===== Index Path: Keyspace Prefix
116
127
117
128
[source,ebnf]
118
129
----
@@ -138,7 +149,7 @@ For example, `default:{backtick}travel-sample{backtick}.def_type` indicates the
138
149
====
139
150
140
151
[[keyspace-partial-index,keyspace partial]]
141
-
==== Index Path: Keyspace Partial
152
+
===== Index Path: Keyspace Partial
142
153
143
154
[source,ebnf]
144
155
----
@@ -158,24 +169,40 @@ collection::
158
169
For example, `airline.{backtick}idx-name{backtick}` indicates the `idx-name` index on the `airline` collection, assuming that the query context is set.
image::n1ql-language-reference/keyspace-ref.png["Syntax diagram: refer to source code listing", align=left]
180
+
image::n1ql-language-reference/index-name-on-keyspace.png["Syntax diagram: refer to source code listing", align=left]
170
181
171
-
You can use the index name with the `ON` keyword and a keyspace reference to specify the keyspace on which the index is built.
172
-
The keyspace reference may be a <<keyspace-path>> or a <<keyspace-partial>>.
182
+
You can use the index name with the `ON` keyword and a keyspace reference to specify the index and the keyspace on which the index is built.
183
+
184
+
[horizontal]
185
+
index-name:: (Required) A unique name that identifies the index.
186
+
187
+
keyspace-ref:: (Required) Refer to <<keyspace-ref>> below.
173
188
174
189
NOTE: If there is a hyphen (-) inside the index name or any part of the keyspace reference, you must wrap the index name or that part of the keyspace reference in backticks ({backtick}{nbsp}{backtick}).
0 commit comments