Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Cheshire-Cat
-
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