Description
I have two indexes, one global and one scoped, in my 7.6.0-2010 cluster:
My understanding is that the new scoped FTS endpoints will only return scoped indexes, which it does:
curl -X GET -u Administrator:password http://192.168.0.99:8094/api/bucket/default/scope/scope_d05a13/index | jq '.indexDefs.indexDefs | length' |
1 |
And also that the original global FTS endpoints will only return global indexes. However, they are returning the scoped indexes too:
curl -X GET -u Administrator:password http://192.168.0.99:8094/api/index | jq '.indexDefs.indexDefs | length' |
2 |
This isn't compatible with how we've positioned global and scoped indexes in the SDK, as our intent is that the user exclusively uses Cluster-level APIs to work with global indexes, and exclusively Scope-level APIs to work with scoped indexes. E.g. `cluster.searchIndexes().getAllIndexes()` should only return global indexes.
In addition I thought that we had previously agreed that the "bucket.scope.index" full internal naming of a scoped index would remain purely an internal implementation detail that wouldn't be exposed to users? However, when a scoped index is returned from the global index endpoint, it contains that full internal name:
curl -X GET -u Administrator:password http://192.168.0.99:8094/api/index | jq |
"status": "ok", |
"indexDefs": { |
"uuid": "400f22bca457162d", |
"indexDefs": { |
"default.scope_21497f.scoped_index_21497f": { |
"type": "fulltext-index", |
"name": "default.scope_21497f.scoped_index_21497f", |
When the same scoped index is fetched from the scoped endpoint, it just contains "scoped_index_21497f" as the index name, as expected.