Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/guides/pages/create-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ For further details and examples, refer to xref:n1ql:n1ql-language-reference/cov

Reference and explanation:

* xref:server:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:cloud:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]

Administrator guides:

Expand Down
2 changes: 1 addition & 1 deletion modules/guides/pages/drop-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ For further details, refer to https://docs.couchbase.com/sdk-api/couchbase-pytho

Reference and explanation:

* xref:server:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:cloud:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]

Administrator guides:

Expand Down
2 changes: 1 addition & 1 deletion modules/guides/pages/index-advisor.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ For more details, refer to xref:n1ql:n1ql-language-reference/advisor.adoc#adviso

Reference and explanation:

* xref:server:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:cloud:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]

Administrator guides:

Expand Down
6 changes: 3 additions & 3 deletions modules/guides/pages/place-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ include::partial$query-context.adoc[tag=step]
.Query
[source,sqlpp]
----
include::server:learn:example$services-and-indexes/indexes/replication-nodes.n1ql[]
include::learn:example$services-and-indexes/indexes/replication-nodes.n1ql[]
----
====

NOTE: If you specify both `num_replica` _and_ `nodes`, the number of nodes must be _one greater_ than the number of replicas.

For further details and examples, refer to xref:server:learn:services-and-indexes/indexes/index-replication.adoc#index-replication[Index Replication].
For further details and examples, refer to xref:learn:services-and-indexes/indexes/index-replication.adoc#index-replication[Index Replication].

== Altering Index Placement

Expand Down Expand Up @@ -162,7 +162,7 @@ For further details and examples, refer to xref:n1ql:n1ql-language-reference/alt

Reference and explanation:

* xref:server:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]

Administrator guides:

Expand Down
4 changes: 1 addition & 3 deletions modules/guides/pages/prep-statements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ To supply values for placeholder parameters using the cbq shell:
* Use the `-args` parameter to specify positional parameters.
* Use `-$` or `-@` followed by a parameter name to specify named parameters.
ifdef::flag-devex-rest-api[]
To supply values for placeholder parameters using the {sqlpp} REST API:
To supply values for placeholder parameters using the Data API:
* Specify the parameters in the request body or the query URI, alongside the statement.
* Use the `args` parameter to specify positional parameters.
* Use `$` or `@` followed by a parameter name to specify named parameters.
endif::flag-devex-rest-api[]
To supply values for placeholder parameters using the Query tab:
Expand Down
2 changes: 1 addition & 1 deletion modules/guides/pages/select-index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ For further details and examples, refer to xref:n1ql:n1ql-language-reference/key

Reference and explanation:

* xref:server:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:learn:services-and-indexes/indexes/global-secondary-indexes.adoc[Using Indexes]
* xref:n1ql:n1ql-language-reference/selectintro.adoc[SELECT]
* xref:n1ql:n1ql-language-reference/optimizer-hints.adoc[Hints]

Expand Down
4 changes: 2 additions & 2 deletions modules/guides/partials/clients.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ The most common type of client is a Couchbase SDK, which is a full programmatic
This developer guide focuses on the most commonly-used SDKs, but full explanations and reference documentation for all SDKs is available.

The Couchbase Shell (cbsh) also provides a quick and streamlined interface for simple access, and is suitable if you just want to access an item without writing any code.
Note that the Couchbase Shell is currently in developer preview, and is not covered by support.
Note that the Couchbase Shell is maintained by Couchbase, but it is not covered by support.

// tag::refs[]
Read the following for further information about the clients available:

* https://couchbase.sh/docs/[Couchbase Shell (cbsh)] -- developer preview
* https://couchbase.sh/docs/[Couchbase Shell (cbsh)]
* xref:home::sdk.adoc[SDK Clients]
// end::refs[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:install-sample-buckets: xref:clusters:data-service/import-data-documents.adoc#import-sample-data
:query: xref:n1ql:query.adoc
:query-preferences: xref:clusters:query-service/query-workbench.adoc#query-settings
:scan_consistency: xref:server:n1ql:n1ql-manage/query-settings.adoc#scan_consistency
:scan_consistency: xref:n1ql:n1ql-manage/query-settings.adoc#scan_consistency

[abstract]
The _Index Service_ ensures availability and performance through _replication_ and _partitioning_.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:page-topic-type: concept
:description: Sequential scans enable you to query a keyspace, even if the keyspace has no indexes.

:authorization-overview: xref:server:learn:security/authorization-overview.adoc
:authorization-overview: xref:clusters:manage-database-users.adoc
:install-sample-buckets: xref:clusters:data-service/import-data-documents.adoc#import-sample-data

[abstract]
Expand Down
104 changes: 52 additions & 52 deletions modules/n1ql/examples/transactions/multiple.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example file was updated but does not appear in the published docs

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/bin/sh

# tag::index[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "CREATE PRIMARY INDEX ON bookings;",
"query_context": "`travel-sample`.tenant_agent_00",
}'
# end::index[]

# tag::transaction[]
# tag::begin[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "BEGIN WORK",
"query_context": "`travel-sample`.tenant_agent_00",
"txtimeout": "2m",
Expand All @@ -25,21 +25,21 @@ curl http://localhost:8093/query/service \
# end::begin[]

# tag::set[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SET TRANSACTION ISOLATION LEVEL READ COMMITTED;",
"query_context": "`travel-sample`.tenant_agent_00",
"txid": "d81d9b4a-b758-4f98-b007-87ba262d3a51"
}' # <1>
# end::set[]

# tag::upsert[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "UPSERT INTO bookings VALUES(\"bf7ad6fa-bdb9-4099-a840-196e47179f03\", {
\"date\": \"07/24/2021\",
\"flight\": \"WN533\",
Expand All @@ -53,21 +53,21 @@ curl http://localhost:8093/query/service \
# end::upsert[]

# tag::savepoint-1[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SAVEPOINT s1;",
"query_context": "`travel-sample`.tenant_agent_00",
"txid": "d81d9b4a-b758-4f98-b007-87ba262d3a51"
}' # <1>
# end::savepoint-1[]

# tag::update-1[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "UPDATE bookings AS b
SET b.`user` = \"0\"
WHERE META(b).id = \"bf7ad6fa-bdb9-4099-a840-196e47179f03\";",
Expand All @@ -77,10 +77,10 @@ curl http://localhost:8093/query/service \
# end::update-1[]

# tag::check-1[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SELECT b.*, u.name
FROM bookings b JOIN users u ON b.`user` = META(u).id
WHERE META(b).id = \"bf7ad6fa-bdb9-4099-a840-196e47179f03\";",
Expand All @@ -90,21 +90,21 @@ curl http://localhost:8093/query/service \
# end::check-1[]

# tag::savepoint-2[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SAVEPOINT s2;",
"query_context": "`travel-sample`.tenant_agent_00",
"txid": "d81d9b4a-b758-4f98-b007-87ba262d3a51"
}' # <1>
# end::savepoint-2[]

# tag::update-2[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "UPDATE bookings AS b
SET b.`user` = \"1\"
WHERE META(b).id = \"bf7ad6fa-bdb9-4099-a840-196e47179f03\";",
Expand All @@ -114,10 +114,10 @@ curl http://localhost:8093/query/service \
# end::update-2[]

# tag::check-2[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SELECT b.*, u.name
FROM bookings b JOIN users u ON b.`user` = META(u).id
WHERE META(b).id = \"bf7ad6fa-bdb9-4099-a840-196e47179f03\";",
Expand All @@ -127,21 +127,21 @@ curl http://localhost:8093/query/service \
# end::check-2[]

# tag::rollback[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "ROLLBACK TRAN TO SAVEPOINT s2;",
"query_context": "`travel-sample`.tenant_agent_00",
"txid": "d81d9b4a-b758-4f98-b007-87ba262d3a51"
}' # <1>
# end::rollback[]

# tag::check-3[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "SELECT b.*, u.name
FROM bookings b JOIN users u ON b.`user` = META(u).id
WHERE META(b).id = \"bf7ad6fa-bdb9-4099-a840-196e47179f03\";",
Expand All @@ -151,10 +151,10 @@ curl http://localhost:8093/query/service \
# end::check-3[]

# tag::commit[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "COMMIT TRANSACTION",
"query_context": "`travel-sample`.tenant_agent_00",
"txid": "d81d9b4a-b758-4f98-b007-87ba262d3a51"
Expand Down
8 changes: 4 additions & 4 deletions modules/n1ql/examples/transactions/single.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example file was updated but does not appear in the published docs

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

# tag::query[]
curl http://localhost:8093/query/service \
-u Administrator:password \
-H 'Content-Type: application/json' \
-d '{
curl -X POST "$BASEURL/_p/query/query/service" \
-u $USER:$PASSWORD \
-H 'Content-Type: application/json' \
-d '{
"statement": "UPDATE `travel-sample`.inventory.hotel
SET price = \"from £89\"
WHERE name = \"Glasgow Grand Central\";",
Expand Down
12 changes: 2 additions & 10 deletions modules/n1ql/pages/n1ql-intro/queriesandresults.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ When the query context is not set, it defaults to the `default` namespace, with

* To set the query context in the Query tab, use the xref:clusters:query-service/query-workbench.adoc#specify-bucket-and-scope-context[Query Context] drop-down menus in the Query Editor.

* To set the query context from
ifdef::flag-devex-rest-api[]
the REST API or
endif::flag-devex-rest-api[]
the cbq shell, use the xref:n1ql:n1ql-manage/query-settings.adoc#query_context[query_context] request-level parameter.
* To set the query context from the Data API or the cbq shell, use the xref:n1ql:n1ql-manage/query-settings.adoc#query_context[query_context] request-level parameter.

.Tenant separation
[IMPORTANT]
Expand Down Expand Up @@ -194,11 +190,7 @@ The first occurrence of `?` refers to the first argument, the second occurrence
* Named placeholders take the form of `$name` or `@name`.
This is particularly useful when there are many query parameters, and ensuring that they are all in the correct order may be cumbersome.

To set query parameter values when you run the query, use
ifdef::flag-devex-rest-api[]
the {sqlpp} REST API,
endif::flag-devex-rest-api[]
the cbq query shell, or the Query tab.
To set query parameter values when you run the query, use the Data API, the cbq query shell, or the Query tab.

For more information and examples, refer to xref:n1ql:n1ql-manage/query-settings.adoc#section_srh_tlm_n1b[Named Parameters and Positional Parameters].

Expand Down
2 changes: 1 addition & 1 deletion modules/n1ql/pages/n1ql-language-reference/advise.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Similarly, if the query is already using the optimal covering index, the index a
== Prerequisites

To execute the ADVISE statement, you must have the privileges required for the {sqlpp} statement for which you want advice.
For more details about user roles, see xref:server:learn:security/authorization-overview.adoc[Authorization].
For more details about user roles, see xref:clusters:manage-database-users.adoc[].

== Syntax

Expand Down
8 changes: 6 additions & 2 deletions modules/n1ql/pages/n1ql-language-reference/alterindex.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:imagesdir: ../../assets/images

:rebalancing-the-index-service: xref:server:learn:clusters-and-availability/rebalance.adoc#rebalancing-the-index-service
:console-indexes: xref:server:manage:manage-ui/manage-ui.adoc#console-indexes
:console-indexes: xref:clusters:index-service/manage-indexes.adoc
:query-context: xref:n1ql:n1ql-intro/queriesandresults.adoc#query-context
:identifiers: xref:n1ql-language-reference/identifiers.adoc
:logical-hierarchy: xref:n1ql:n1ql-intro/queriesandresults.adoc#logical-hierarchy
Expand Down Expand Up @@ -359,7 +359,11 @@ When dropping a replica, the index topology does not change.
The indexing service remembers the number of partitions and replicas specified for this index.
Given sufficient capacity, the dropped replica is rebuilt after the next rebalance -- although it may be placed on a different index node, depending on the resource usage statistics of the available nodes.

To find the ID of an index replica and see which node it is placed on, you can use the {console-indexes}[Indexes screen in the Couchbase Web Console] or query the {querying-indexes}[system:indexes] catalog.
To find the ID of an index replica and see which node it is placed on, you can
////
use the {console-indexes}[Indexes page in the Capella UI] or
////
Comment on lines +363 to +365
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
////
use the {console-indexes}[Indexes page in the Capella UI] or
////
// use the {console-indexes}[Indexes page in the Capella UI] or

The block comment (//// .. ////) seems to be adding extra space in the rendered output.
Can we change it to a line comment (//) instead so the formatting stays intact?

query the {querying-indexes}[system:indexes] catalog.

When dropping a replica, it is possible to leave a server group with no replica.
For a partitioned index, run a rebalance to move a replica into the vacant server group.
Expand Down
4 changes: 2 additions & 2 deletions modules/n1ql/pages/n1ql-language-reference/altersequence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:description: The ALTER SEQUENCE statement enables you to alter an existing sequence in a given scope.

// Cross-references
:authorization-overview: xref:server:learn:security/authorization-overview.adoc
:authorization-overview: xref:clusters:manage-database-users.adoc
:query-context: xref:n1ql:n1ql-intro/queriesandresults.adoc#query-context
:identifiers: xref:n1ql-language-reference/identifiers.adoc
:logical-hierarchy: xref:n1ql-intro/queriesandresults.adoc#logical-hierarchy
Expand Down Expand Up @@ -40,7 +40,7 @@ Similarly, when you restore a bucket, sequences are restored in accordance with

.RBAC Privileges
To execute the ALTER SEQUENCE statement, you must have the _Query Manage Sequences_ privilege granted on the scope.
For more details about user roles, see {authorization-overview}[Authorization].
For more details about user roles, see {authorization-overview}[].

== Syntax

Expand Down
Loading