Details
-
Bug
-
Resolution: User Error
-
Major
-
5.5.0
-
None
-
Untriaged
-
Centos 64-bit
-
Unknown
Description
According to the feature spec:
"We can also create index on deleted document xattrs using the with clause
create index id2 on default(c1,meta().xattrs._sync) WITH {“xattrs_retain_deleted”:true} ;
This can be used to retain xattrs for deleted documents.
Select meta().xattrs._sync from default where c1 > 5;
This should retrieve only values for deleted documents."
I created 3 docs. docs are:
{ "test_doc_1": {c1:10, c2:11}
{test_doc_2": {c1:20, c2:21}}
{"test_doc_3": {c1:30, c2:31}}
added system xattr to each doc: _sync: {"b" :'value1'}, _sync: {"b" :'value2'}, _sync: {"b" :'value3'}
deleted test_doc_3
created index:
create index idx2 on default(c1,meta().xattrs._sync) WITH {"retain_deleted_xattr":true}
deleted test_doc_2
ran query:
select meta().xattrs._sync from default where c1 > 5
returns only the sync value for test_doc_1 when the design docs say "This should retrieve only values for deleted documents"