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

FTS: backup-restore API. Exclude filter works incorrectly.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • Cheshire-Cat
    • fts
    • Untriaged
    • Centos 64-bit
    • 1
    • Unknown

    Description

      Build: 7.0.0-3960

      The following request does not return expected fts index json:

      http://<your_fts_ip>:<your_port>/api/v1/bucket/<your_bucket>/backup?exclude=<your_scope>.<your_collection>

      Steps to reproduce:

      • create the following buckets, scopes, and collections:
        Bucket: b1, scope: s1, collections: c1 and c2.

      b1.s1.c1
      b1.s1.c2

      • Create 2 fts indexes:
        idx1:

      {
       "name": "idx1",
       "type": "fulltext-index",
       "params": {
        "doc_config": {
         "docid_prefix_delim": "",
         "docid_regexp": "",
         "mode": "scope.collection.type_field",
         "type_field": "type"
        },
        "mapping": {
         "default_analyzer": "standard",
         "default_datetime_parser": "dateTimeOptional",
         "default_field": "_all",
         "default_mapping": {
          "dynamic": false,
          "enabled": false
         },
         "default_type": "_default",
         "docvalues_dynamic": true,
         "index_dynamic": true,
         "store_dynamic": false,
         "type_field": "_type",
         "types": {
          "s1.c1": {
           "default_analyzer": "standard",
           "dynamic": true,
           "enabled": true
          }
         }
        },
        "store": {
         "indexType": "scorch",
         "mossStoreOptions": {},
         "segmentVersion": 15
        }
       },
       "sourceType": "gocbcore",
       "sourceName": "b1",
       "sourceUUID": "dbb2752c0ed7eae4379da1dfb8f810f1",
       "sourceParams": {},
       "planParams": {
        "maxPartitionsPerPIndex": 171,
        "numReplicas": 0,
        "indexPartitions": 6
       },
       "uuid": "1b0e49e740e8facd"
      }

      idx2:

      {
       "name": "idx2",
       "type": "fulltext-index",
       "params": {
        "doc_config": {
         "docid_prefix_delim": "",
         "docid_regexp": "",
         "mode": "scope.collection.type_field",
         "type_field": "type"
        },
        "mapping": {
         "default_analyzer": "standard",
         "default_datetime_parser": "dateTimeOptional",
         "default_field": "_all",
         "default_mapping": {
          "dynamic": false,
          "enabled": false
         },
         "default_type": "_default",
         "docvalues_dynamic": true,
         "index_dynamic": true,
         "store_dynamic": false,
         "type_field": "_type",
         "types": {
          "s1.c2": {
           "default_analyzer": "standard",
           "dynamic": true,
           "enabled": true
          }
         }
        },
        "store": {
         "indexType": "scorch",
         "mossStoreOptions": {},
         "segmentVersion": 15
        }
       },
       "sourceType": "gocbcore",
       "sourceName": "b1",
       "sourceUUID": "dbb2752c0ed7eae4379da1dfb8f810f1",
       "sourceParams": {},
       "planParams": {
        "maxPartitionsPerPIndex": 171,
        "numReplicas": 0,
        "indexPartitions": 6
       },
       "uuid": "498aa66def3cc4d9"
      }

      • Run the following request:

      curl -GET -H "Content-Type: application/json" -u <username>:<password> http://<your_ip>:<your_port>/api/v1/bucket/b1/backup?exclude=s1.c2

      • response is:

      {
        "status": "ok",
        "indexDefs": {
          "uuid": "498aa66def3cc4d9",
          "indexDefs": {},
          "implVersion": "5.5.0"
        }
      }

      Expected behavior: idx1 should be returned in response, since it is built for collection b1.s1.c1  

      Attachments

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

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty