10-25-2017 12:49 AM
Morning all,
I've got a problem with a scheduled job that we use to copy folders.
The job reads a csv file that contains a list of folders to be created and the metadata to be applied.
To create the folder I use the FileFolderService.copy(...) method to copy a folder template from /Data Dictionary/Space Templates, then I set the metadata on the new folder.
All of the copying operation works as expected except the copied folder does not get indexed so cannot be searched.
I have found that the job was running as System therefore the copied folders are created/modified by System (no particular reason for this - i was just copying the example code in the documentation).
If I change the code so the job runs as admin then the copied folders get indexed correctly !!
If I drop the SOLR index and re-build it, the "System" owned folders are still not indexed.
We have just run the job as part of a data migration so now have 500,000+ folders that will not index.
Does anyone know the easiest way to change the creator & modifier of all my folders to admin? I could then re-build the SOLR index and see if it picks them up? Or is there a way to tell SOLR to index System content.
Thanks
Paul
10-26-2017 08:37 AM
Ok, so with the help of Alfresco Support, we found the problem...
Content owned by the System user is filtered out of all searches you run in Share.
The query that gets constructed includes "AND -cm:creator:system" so will not return those objects.
The content is still indexed, but will not be returned. Support's advice was to either customise Share to remove this or to run the job as a non-system account.
Hope this helps.
Explore our Alfresco products with the links below. Use labels to filter content by product module.