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

FTS: backup-restore API. Incorrect remap parameter reports status ok.

    XMLWordPrintable

Details

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

    Description

      Build: 7.0.0-4170

      Having the following KV structure:

      bucket b1, scope s1, collection c1

      and very basic fts index, covering collection b1.s1.c1,

      I'm trying to remap this index using the following backup

       

      {
        "uuid": "702195b6d8131c81",
        "indexDefs": {
          "i1": {
            "type": "fulltext-index",
            "name": "i1",
            "uuid": "",
            "sourceType": "gocbcore",
            "sourceName": "b1",
            "planParams": {
              "maxPartitionsPerPIndex": 171
            },
            "params": {
              "doc_config": {
                "docid_prefix_delim": "",
                "docid_regexp": "",
                "mode": "scope.collection.type_field",
                "type_field": "type"
              },
              "mapping": {
                "analysis": {},
                "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
              }
            },
            "sourceParams": {}
          }
        },
        "implVersion": "5.5.0"
      }
      

      and the following API call:

       

       

      curl -POST -H "Content-Type: application/json" -u <username>:<password> http://<your_ip>:<your_port>/api/v1/bucket/b1/backup?remap=s1: -d @backup.json
      

      The point is that incorrect remap parameter value usage returns the following successful report:

       

       

      {
        "status": "ok",
        "indexDefs": {
          "uuid": "702195b6d8131c81",
          "indexDefs": {
            "i1": {
              "type": "fulltext-index",
              "name": "i1",
              "uuid": "112de05a492172d0",
              "sourceType": "gocbcore",
              "sourceName": "b1",
              "planParams": {
                "maxPartitionsPerPIndex": 171
              },
              "params": {
                "doc_config": {
                  "docid_prefix_delim": "",
                  "docid_regexp": "",
                  "mode": "scope.collection.type_field",
                  "type_field": "type"
                },
                "mapping": {
                  "analysis": {},
                  "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",
                  "kvStoreName": "",
                  "mossStoreOptions": {},
                  "segmentVersion": 15
                }
              },
              "sourceParams": {}
            }
          },
          "implVersion": "5.5.0"
        }
      }

      Index is restored as well

       

      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:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty