-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF49, 11.x, 2021.4
-
Component/s: Elasticsearch
-
Release Notes Summary:Proxies are reindexed when live document is trashed.
-
Backlog priority:750
-
Sprint:nxplatform #36
-
Story Points:3
When the parent folder of a document is moved to the trash, any proxy pointing to the document is not re-indexed in elasticsearch, therefore still reported in the VIEW tab in the Web UI.
How to reproduce::
- in a workspace named ws1, create a folder named livedocs and create a File document in it and retrieve its UUID (env. variable DOCID)
- in the same workspace, create another folder named proxies and create a live proxy pointing to the File document
- in the proxies folder, create a live proxy pointing to the File document and retrieve its UUID (env. variable PROXYDOCID):
DOCID=xxx-xxxx-xx curl -su Administrator:Administrator -X POST -H'Content-Type: application/json' \ http://localhost:8080/nuxeo/api/v1/id/$DOCID/@op/Document.CreateLiveProxy \ -d '{ "params": { "Destination Path": "/default-domain/workspaces/ws1/proxies" }, "context": {} }' |jq
- move the livedocs folder to the trash
Expected result: the proxy is moved to the trash (ecm:isTrashed=true) in the database and elasticsearch
Actual result: the proxy is moved to the trash (ecm:isTrashed=true) in the database but not in elasticsearch
Check proxy's value of ecm:isTrashed in the database:
PROXYDOCID=yyy-yyyy-yy curl -su Administrator:Administrator -H 'Content-Type:application/json' http://localhost:8080/nuxeo/api/v1/id/$PROXYDOCID -H'properties:*'|jq .isTrashed
Check proxy's value of ecm:isTrashed in elasticsearch:
curl -s http://localhost:9200/nuxeo/_search\?pretty=true\&q=_id:$PROXYDOCID |jq '.hits.hits[0]._source["ecm:isTrashed"]'
After re-indexing folder proxies and its children documents with the following curl command, the proxy's value of ecm:isTrashed in elasticsearch is fixed:
curl -X POST -su Administrator:Administrator -H "Content-Type:application/json" \ -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' \ http://localhost:8080/nuxeo/api/v1/automation/Elasticsearch.Index \ -d '{"input":"doc:/default-domain/workspaces/ws1/proxies","params":{},"context":{}}'
- is related to
-
NXP-31007 Fix update of proxy's Picture metadata when a picture document is published before Picture properties are computed
- Resolved
- Is referenced in