Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60788

Global index endpoint is returning scoped indexes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • 7.6.0
    • 7.6.0
    • fts
    • None
    • Untriaged
    • 0
    • Unknown

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sarthak.dua Sarthak Dua
            graham.pople Graham Pople
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty