-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 8.10, 9.10, 10.2
-
Component/s: Elasticsearch
When automation operation Elasticsearch.Index is called with a document path as input, it is supposed to re-index the document, and its children if folderish.
In the case of a folderish document, calling operation Elasticsearch.Index only re-indexes its children, not folderish document in question. Calling operation Elasticsearch.Index a second time will re-index the folderish document.
How to reproduce:
- create a workspace named ws1 in /default-domain/workspaces (assume its uuid is 8a3521ce-b544-443b-9449-6127a1e308a4)
- create a File named File 001 in /default-domain/workspaces/ws1 (assume its uuid is 994b7f43-845e-4aaf-a1f4-1c01dc753e17)
- open a terminal and re-index workspace /default-domain/workspaces/ws1 with the following curl command:
curl -X POST 'http://localhost:8080/nuxeo/site/automation/Elasticsearch.Index' \ -u Administrator:Administrator \ -H "Content-Type:application/json" \ -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' \ -d '{"input":"doc:/default-domain/workspaces/ws1","params":{},"context":{}}'
- check if /default-domain/workspaces/ws1 is re-indexed with the following command:
curl -XGET 'http://localhost:9200/nuxeo/doc/8a3521ce-b544-443b-9449-6127a1e308a4?pretty'
Expected result: curl command returns
{ "_index" : "nuxeo", "_type" : "doc", "_id" : "8a3521ce-b544-443b-9449-6127a1e308a4", "_version" : 1532557186626555, "found" : true, "_source" : { "ecm:repository" : "default", "ecm:uuid" : "8a3521ce-b544-443b-9449-6127a1e308a4", "ecm:name" : "ws1", "ecm:title" : "ws1", "ecm:path" : "/default-domain/workspaces/ws1", "ecm:path@level1" : "default-domain", "ecm:path@level2" : "workspaces", "ecm:path@level3" : "ws1", "ecm:path@depth" : 4, "ecm:primaryType" : "Workspace", "ecm:parentId" : "62f54245-3fa9-456c-af87-89e5dbfbc89e", "ecm:currentLifeCycleState" : "project", "ecm:isCheckedIn" : false, "ecm:isProxy" : false, "ecm:isVersion" : false, "ecm:isLatestVersion" : false, "ecm:isLatestMajorVersion" : false, "ecm:mixinType" : [ "Folderish", "SuperSpace" ], "ecm:tag" : [ ], "ecm:changeToken" : "1483575232188", "ecm:acl" : [ "vdu1", "Administrator", "members" ], "webc:themePerspective" : null, "webc:useCaptcha" : null, "webc:isWebContainer" : null, "webc:template" : null, "webc:themePage" : "workspace", "webc:logo" : null, "webc:name" : null, "webc:email" : null, "webc:welcomeMedia" : null, "webc:url" : null, "webc:baseline" : null, "webc:theme" : "sites", "webc:moderationType" : "aposteriori", "webc:welcomeText" : null, "file:filename" : null, "file:content" : null, "common:size" : null, "common:icon-expanded" : null, "common:icon" : "/icons/workspace.gif", "files:files" : [ ], "dc:description" : null, "dc:language" : null, "dc:coverage" : null, "dc:valid" : null, "dc:creator" : "Administrator", "dc:modified" : "2017-01-05T00:13:52.188Z", "dc:lastContributor" : "Administrator", "dc:rights" : null, "dc:expired" : null, "dc:format" : null, "dc:created" : "2017-01-05T00:13:52.188Z", "dc:title" : "ws1", "dc:issued" : null, "dc:nature" : null, "dc:subjects" : [ ], "dc:contributors" : [ "Administrator" ], "dc:source" : null, "dc:publisher" : null, "publish:sections" : [ ] } }
Actual result: curl command returns
{ "_index" : "nuxeo", "_type" : "doc", "_id" : "8a3521ce-b544-443b-9449-6127a1e308a4", "found" : false }
Executing the re-index curl command a second time will actually re-index /default-domain/workspaces/ws1.