cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing only works if I upload the file using Share GUI

Jhousyfran
Champ on-the-rise
Champ on-the-rise

When uploading a file, I expect the content to be indexed so that I am able to search it. This works when I upload the file to the Alfresco Share interface.

However, when I use the CMIS import tool, webdav, or the bulk filing system, the metadata is indexed, but the content isn't. 

All the metadata looks the same. And even when I delete data from Solr to force a reindexing, the only content that is indexed is the content of the files I uploaded with Share GUI.

When I increase the Solr debug logging level (like this: https://docs.alfresco.com/5.2/tasks/set-solr-log4j.html), the logs of the files that were sent through the interface and indexed are the same as the logs of the files that were sent via WebDav and not indexed.
 
File indexed by the interface:
2020-02-21 21:36:40.251 DEBUG (org.alfresco.solr.AlfrescoCoreAdminHandler@548d708a_Worker-22) [   ] o.a.s.t.MetadataTracker Node [id=879, nodeRef=workspace://SpacesStore/a6ffb77b-7690-4f3f-8a73-074dc406bc46, txnId=27, status=UPDATED, tenant=, aclId=11, shardPropertyValue=null]
 
File sent via WebDav:
2020-02-21 21:39:10.113 DEBUG (org.alfresco.solr.AlfrescoCoreAdminHandler@548d708a_Worker-36) [   ] o.a.s.t.MetadataTracker Node [id=885, nodeRef=workspace://SpacesStore/f2510e59-43ca-41e2-899f-a574bea41222, txnId=33, status=UPDATED, tenant=, aclId=11, shardPropertyValue=null]
 
I couldn't find a solution to this issue.
This is easy to replicate with the docker community deployment in version 6.2.0-ga.
The log files also do not report any errors.
30 REPLIES 30

Hello,

Thank you for your interest in this subject.

Content indexing does not work on our part when using bulk import to add a document to the repository.

Can you initiate a bulk import test ? http://localhost:8080/alfresco/service/bulkfsimport

Is this the addon you are using?

https://github.com/pmonks/alfresco-bulk-import

Hyland Developer Evangelist

I think so, I was not aware that it was an addon. 

I use bulk import from this documentation  :https://docs.alfresco.com/content-services/latest/admin/import-transfer

So I guess you're using this one...

https://github.com/Alfresco/alfresco-file-transfer-receiver

Ok, let me check it.

Hyland Developer Evangelist

In the documentation (https://docs.alfresco.com/content-services/latest/admin/import-transfer/) I use this paragraph : "Import with the Bulk Import tool", but I do not use the "Configure File System Transfer Receiver" paragraph.

Like you said, bulk import tool relates to https://github.com/pmonks/alfresco-bulk-import

From the source code, I guess that you need to add following property to alfresco-global.properties or as environment variable in Docker.

contentPropertyRestrictions.enabled=false

Since I didn't try that, let me know if that fix the issue.

Hyland Developer Evangelist

In fact, I've found this notes from the author of the addon:

https://github.com/pmonks/alfresco-bulk-import/wiki/Configuration

So that should be related with that "contentPropertyRestrictions" configuration (for sure).

Hyland Developer Evangelist

I made a test :  files are imported, metadata are indexed, but unfortunately not the contents.

I have put the parameter (contentPropertyRestrictions.enabled=false) in the following file : /usr/local/tomcat/shared/classes/alfresco-global.properties

gkeuss
Champ on-the-rise
Champ on-the-rise

Indexation of contents while doing a bulk import now works using Alfresco bulk import 2.1.0 (https://github.com/pmonks/alfresco-bulk-import/releases).

ymartin
Champ in-the-making
Champ in-the-making

Here is an hypothesis that may explain this behavior:

the Alfresco instance has not cross-locale support enabled https://docs.alfresco.com/insight-engine/latest/config/indexing/#cross-locale so a document inserted by webdav (or API, or bulkimport) is indexed with "system locale" whereas a document inserted by browser depends on browser/workstation locale.

When running everything on Ubuntu, your locale is "consistent" (the same value) for both system and browser.

Ideas how to fix:

  • either enable cross-locale support according to Search Service documentation, for instance when deploying with Docker refer to https://github.com/aborroy/search-services-cross-locale
  • either enforce your system locale so that Alfresco processes run with same locale as your browsers' users under the condition that all your users use the same single locale... (IMO not obvious at all)

Hope this helps