Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.2.7
-
None
-
None
-
1
Description
The query statement used at QueryGenerator to get all the indexes does not find any indexes on the server when I test it against 7.1.0.
No indexes are found whether the index is bucket based, or scope/collection based.
I've found that this query statement works for getting bucket-level indexes:
return "SELECT i.* FROM system:indexes AS i" + |
$" WHERE ((bucket_id IS MISSING AND keyspace_id = \"{bucketName}\") OR bucket_id = \"{bucketName}\")" + |
" AND `using` = \"gsi\"" + |
" ORDER BY is_primary DESC, name ASC"; |
And the Java and Gocb SDKs are using the following query statments to get the indexes whether looking for indexes at a bucket-level, scope-level, or collection-level: Java example. So I think the .NET should use these statements.
I've added some QueryIndexManager tests that currently fail due to this bug https://review.couchbase.org/c/couchbase-net-client/+/170670